Bug 32214 - [gles2]no link error happens when missing vertex shader or frag shader
Summary: [gles2]no link error happens when missing vertex shader or frag shader
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 7.10
Hardware: All Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 23:38 UTC by fangxun
Modified: 2011-03-16 23:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
no vertex and frag (1.94 KB, text/plain)
2010-12-07 23:38 UTC, fangxun
Details
no frag shader (2.31 KB, text/plain)
2010-12-07 23:40 UTC, fangxun
Details
no vertex shader (2.21 KB, text/plain)
2010-12-07 23:41 UTC, fangxun
Details

Description fangxun 2010-12-07 23:38:11 UTC
Created attachment 40896 [details]
no vertex and frag

System Environment:
--------------------------
Libdrm:	(master)2.4.22-20-g39e5e982242cd2b611a9dfc1e9b63f857d52da61
Mesa:	(master)27609a826734594c092390c2538b74f8358c1aba
Xserver:  (master)xorg-server-1.9.99.901
Xf86_video_intel: (master)2.13.901-19-g00c204a7b2df7a6b501db9b57603534a45ecafa9
Kernel:	(drm-intel-next) 5aa7d52aebfc11760bbc5b081ed621227bb77981

Bug detailed description:
-------------------------
glGetProgramiv should return false but it returns true when missing vertex shader or frag shader. This issue happens on piketon and pineview.


Reproduce steps:
-------------------------
Build the attachment and run it.
Comment 1 fangxun 2010-12-07 23:40:42 UTC
Created attachment 40897 [details]
no frag shader
Comment 2 fangxun 2010-12-07 23:41:35 UTC
Created attachment 40898 [details]
no vertex shader
Comment 3 fangxun 2010-12-08 00:06:45 UTC
This issue also happens OpenGL GLSL.
Comment 4 Ian Romanick 2010-12-08 13:48:29 UTC
(In reply to comment #3)
> This issue also happens OpenGL GLSL.

This is not an error on desktop OpenGL before 3.1. Missing shader stages are supplied by fixed function.
Comment 5 Ian Romanick 2011-02-04 12:11:31 UTC
Fixed on master by the following commit.  This will be cherry-picked to 7.9 and 7.10 soon.

commit ce9171f9d8e0e2c2422fdddb198f8d548381b7ea
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Feb 3 17:10:14 2011 -0800

    linker: Generate link errors when ES shaders are missing stages
    
    ES requires that a vertex shader and a fragment shader be present.
    
    Fixes bugzilla #32214.
Comment 6 Ian Romanick 2011-02-25 18:09:23 UTC
Fixed on 7.9 (d8392a2c) and 7.10 (6b7b2af4).
Comment 7 fangxun 2011-03-16 23:08:42 UTC
Verified with mesa master fedc5b03db64cbb76d101945017a46c5d27f1bbb and 7.10 d59da648178f04f68232ee8a8994843c6b547af8.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.