Summary: | [SNB/IVB/HSW Bisected]Piglit spec/ARB_uniform_buffer/object_layout-std140-base-size-and-alignment fails | ||
---|---|---|---|
Product: | Mesa | Reporter: | lu hua <huax.lu> |
Component: | glsl-compiler | Assignee: | Matt Turner <mattst88> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | idr, xunx.fang |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 67224 | ||
Attachments: | patch |
Description
lu hua
2013-01-21 03:28:36 UTC
*** This bug has been marked as a duplicate of bug 59957 *** With latest piglit, it still fails on mesa master and 9.1 branch. Output: type row_major offset expected offset size expected size float n 4 4 4 4 float y 4 4 4 4 vec2 n 8 8 8 8 vec2 y 8 8 8 8 vec3 n 16 16 12 12 vec3 y 16 16 12 12 vec4 n 16 16 16 16 vec4 y 16 16 16 16 int n 4 4 4 4 int y 4 4 4 4 ivec2 n 8 8 8 8 ivec2 y 8 8 8 8 ivec3 n 16 16 12 12 ivec3 y 16 16 12 12 ivec4 n 16 16 16 16 ivec4 y 16 16 16 16 uint n 4 4 4 4 uint y 4 4 4 4 uvec2 n 8 8 8 8 uvec2 y 8 8 8 8 uvec3 n 16 16 12 12 uvec3 y 16 16 12 12 uvec4 n 16 16 16 16 uvec4 y 16 16 16 16 Failed to compile fragment shader: 0:9(30): error: Operands to arithmetic operators must be numeric 0:9(41): error: Operands to arithmetic operators must be numeric 0:9(17): error: cannot construct `vec4' from a non-numeric data type Failed to compile shader: #version 140 layout(std140) uniform ubo { float pad; bool u; float size_test; }; void main() { gl_FragColor = vec4(pad + u + size_test); } PIGLIT: {'result': 'fail' } It's obvious that the test is broken... you can't add a bool and a vec4. I'll have to fix it harder. commit e656145aed68c680b8a9cfb0d07b74d7928a607c Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 19 12:00:02 2013 -0800 layout-std140-base-size-and-alignment: Fix running the test. spec/ARB_uniform_buffer/object_layout-std140-base-size-and-alignment fixed. spec/ARB_uniform_buffer/object_getactiveuniformblockiv-uniform-block-data-size still fails. output: type row_major DATA_SIZE expected float n 16 16 Failed to compile fragment shader: 0:0(0): error: uniform block layout qualifiers row_major and column_major can only be applied to matrix and structure types Failed to compile shader: #version 140 layout(std140) uniform ubo { float align_test; layout(row_major) float u; }; void main() { gl_FragColor = vec4(align_test); } PIGLIT: {'result': 'fail' } Updated versions of both desktop GLSL and OpenGL ES 3.0 GLSL spec allow these layout qualifiers on more types. The GLSL 4.40 spec says: "The row_major and column_major qualifiers affect the layout of matrices, including all matrices contained in structures and arrays they are applied to, to all depths of nesting. These qualifiers can be applied to other types, but will have no effect." Mesa should be updated. Created attachment 83004 [details] [review] patch (In reply to comment #6) > Updated versions of both desktop GLSL and OpenGL ES 3.0 GLSL spec allow > these layout qualifiers on more types. The GLSL 4.40 spec says: > > "The row_major and column_major qualifiers affect the layout of > matrices, including all matrices contained in structures and arrays > they are applied to, to all depths of nesting. These qualifiers can > be applied to other types, but will have no effect." > > Mesa should be updated. Should we consider this a clarification? If so, see attached patch. Is the updated ES 3.0 GLSL spec not released yet? 3.00.4 does not contain this text. (In reply to comment #7) > Should we consider this a clarification? If so, see attached patch. > > Is the updated ES 3.0 GLSL spec not released yet? 3.00.4 does not contain > this text. I'll double check. It's always possible that the ES group decided something different and I missed it. (In reply to comment #7) > Created attachment 83004 [details] [review] [review] > patch > > (In reply to comment #6) > > Updated versions of both desktop GLSL and OpenGL ES 3.0 GLSL spec allow > > these layout qualifiers on more types. The GLSL 4.40 spec says: > > > > "The row_major and column_major qualifiers affect the layout of > > matrices, including all matrices contained in structures and arrays > > they are applied to, to all depths of nesting. These qualifiers can > > be applied to other types, but will have no effect." > > > > Mesa should be updated. > > Should we consider this a clarification? If so, see attached patch. Still trying to sort this out. > Is the updated ES 3.0 GLSL spec not released yet? 3.00.4 does not contain > this text. I think I'd like to keep the warnings. There are still shipping compilers, especially for ES3, that will reject this usage. The warning check can be simplified to just !type->is_matrix(), and never generate the error... at least on desktop. Patches on the list. Committed. 1a45db97058d63b742993d0fcf0e5df44e2aa1c6 77373e020ecc1b156802a583745dc6ce16e91c9e 921ef55a72dd07a6db0f170767d4a278c46d9ae6 dded321f92e4727584a98b71d7aaa15d4f01fb24 Verified.Fixed. |
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.