I tested on Piketon and found it will fail in rendering when there is no vertex shader specified. But according to the GL spec about glLinkProgram it says: "If program contains shader objects of type GL_VERTEX_SHADER but does not contain shader objects of type GL_FRAGMENT_SHADER, the vertex shader will be linked against the implicit interface for fixed functionality fragment processing. Similarly, if program contains shader objects of type GL_FRAGMENT_SHADER but it does not contain shader objects of type GL_VERTEX_SHADER, the fragment shader will be linked against the implicit interface for fixed functionality vertex processing. " This issue existed on both Mesa master branch(56d30bb00d40cd391d7a469604792a27ddcc459c) and 7.11 branch(4464ee1a9aa3745109cee23531e3fb2323234d07). I have made a piglit case to reproduce it.
Created attachment 52989 [details] piglit test case
It looks like some state is going wrong somewhere. It acts like the drawing operation never happens. MESA_GLSL=dump shows the expected IR being generated: GLSL IR for linked fragment program 2: ( (declare (out ) vec4 gl_FragColor) (function main (signature void (parameters ) ( (assign (xyzw) (var_ref gl_FragColor) (constant vec4 (0.200000 0.800000 0.200000 1.000000)) ) )) ) ) Mesa IR for linked fragment program 2: 0: (assign (xyzw) (var_ref gl_FragColor) (constant vec4 (0.200000 0.800000 0.200000 1.000000)) ) MOV OUTPUT[2], CONST[0]; 1: END I'll dig into this more tomorrow.
The test also fails with (classic) swrast.
The test fails because it is completely broken. It calls piglit_ortho_projection, then it draws a rectangle from (0, 0)-(0.5, 0.5). That rectangle covers a quarter of the pixels in the lower-left corner of the window. This is clearly not what was wanted. Deleting the call to piglit_ortho_projection causes the test to pass.
(In reply to comment #4) > The test fails because it is completely broken. It calls > piglit_ortho_projection, then it draws a rectangle from (0, 0)-(0.5, 0.5). > That rectangle covers a quarter of the pixels in the lower-left corner of the > window. This is clearly not what was wanted. > Deleting the call to piglit_ortho_projection causes the test to pass. Ian, thanks very much for your explaination. I will close it now.
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.