New: [GLSL] Sampler arrays indexed with non-constant expressions
https://bugs.freedesktop.org/show_bug.cgi?id=71723
Priority: medium
Bug ID: 71723
Assignee: [email protected]
Summary: [GLSL] Sampler arrays indexed with non-constant
expressions
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86-64 (AMD64)
Status: NEW
Version: 9.2
Component: Drivers/DRI/Radeon
Product: MesaCreated attachment 89383
--> https://bugs.freedesktop.org/attachment.cgi?id=89383&action=edit
Test vertex shader
Hello,
in my opinion GLSL compiler in mesa is too restrictive when it comes to sampler arrays. The attached vertex shader can not be compiled due to the "sampler arrays indexed with non-constant expressions is forbidden in GLSL 1.30 and later":
Lines 159-136 of src/glsl/ast_array_index.cpp say:
* This restriction was added in GLSL 1.30. Shaders using earlier version
* of the language should not be rejected by the compiler front-end for
* using this construct. This allows useful things such as using a loop
* counter as the index to an array of samplers. If the loop in unrolled,
* the code should compile correctly. Instead, emit a warning.
If compiler actually attempted to unroll the loop above, it would notice that the code does compile correctly in that case. Instead it just emits and error and, in my opinion, contradicts the comment above by not allowing the aforementioned "useful thing".
Can the compiler be changed to _first_ attempt to unroll the loop and then check for sampler array indices being constants?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 71723] Sampler arrays indexed with non-constant expressions
https://bugs.freedesktop.org/show_bug.cgi?id=71723
Victor Luchits <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|[email protected] |[email protected] |.org | QA Contact| |[email protected] | |ktop.org Summary|[GLSL] Sampler arrays |Sampler arrays indexed with |indexed with non-constant |non-constant expressions |expressions | Component|Drivers/DRI/Radeon |glsl-compiler
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel