Summary: | GL42-CTS.gpu_shader_fp64.named_uniform_blocks fails | ||
---|---|---|---|
Product: | Mesa | Reporter: | Samuel Iglesias Gonsálvez <siglesias> |
Component: | Drivers/DRI/i965 | Assignee: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Status: | RESOLVED NOTOURBUG | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Samuel Iglesias Gonsálvez
2016-05-20 11:46:52 UTC
So, our FS is not explicitly disabled, but it does not seem to run for any fragments... from the description it seems that NVIDIA assigns a default value to gl_Positon within the render region if the shader does not set it explicitly (probably (0,0,0,1)?). I guess what we need to do to see if this is a bug in the test or in the diver is check if there is anything in the GL spec that mandates a specific value for gl_Position if none is set by the shader. (In reply to Iago Toral from comment #1) > So, our FS is not explicitly disabled, but it does not seem to run for any > fragments... from the description it seems that NVIDIA assigns a default > value to gl_Positon within the render region if the shader does not set it > explicitly (probably (0,0,0,1)?). Yes, I though the same after submitting this bug report. > I guess what we need to do to see if this > is a bug in the test or in the diver is check if there is anything in the GL > spec that mandates a specific value for gl_Position if none is set by the > shader. From GLSL 4.2, "7.1 Built-In Language Variables": "As an output variable, gl_Position is intended for writing the homogeneous vertex position. It can be written at any time during shader execution. This value will be used by primitive assembly, clipping, culling, and other fixed functionality operations, if present, that operate on primitives after vertex processing has occurred. Its value is undefined after the vertex processing stage if the vertex shader executable does not write gl_Position, and it is undefined after geometry processing if the geometry executable calls EmitVertex() without having written gl_Position since the last EmitVertex() (or hasn't written it at all). As an input variable, gl_Position reads the output written in the previous shader stage to gl_Position." So, according to the spec, gl_Position value is undefined if it is not set by any shader. I found a Chromium bug [0] which explains that some drivers fail when linking shaders that don't set gl_Position. The workaround was to initialize gl_Position at the beginning of the vertex shader's main() to vec4(0,0,0,0) like in ANGLE [1]. Looks like it is a test issue because it doesn't set gl_Position and expects to render a point in the texture. [0] https://bugs.chromium.org/p/chromium/issues/detail?id=416670 [1] https://code.google.com/p/chromium/codesearch#chromium/src/third_party/angle/include/GLSLANG/ShaderLang.h&sq=package:chromium&type=cs&l=171&rcl=1463944873 I forgot to say that I keep this bug open to discuss if we want to initialize gl_Position too, keep current behaviour or if there are more news related to it. I believe this was a CTS bug fixed by CTS commit 9604d02b1089bc9eb9661deec56fe3e35663fb96. Marking as NOTOURBUG. |
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.