mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 17:50:12 +01:00
glsl: Don't allow invalid identifiers as interface block instance names.
Note: we need to make an exception for the gl_PerVertex interface block, since in geometry shaders it is allowed to be redeclared with the instance name gl_in. Future patches will make redeclaration of gl_PerVertex work properly. Fixes piglit test spec/glsl-1.50/compiler/interface-block-instance-name-uses-gl-prefix.vert. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
9b5b0320b6
commit
9fb6f59552
1 changed files with 3 additions and 0 deletions
|
|
@ -4692,6 +4692,9 @@ ast_interface_block::hir(exec_list *instructions,
|
||||||
* field selector ( . ) operator (analogously to structures)."
|
* field selector ( . ) operator (analogously to structures)."
|
||||||
*/
|
*/
|
||||||
if (this->instance_name) {
|
if (this->instance_name) {
|
||||||
|
if (!redeclaring_per_vertex)
|
||||||
|
validate_identifier(this->instance_name, loc, state);
|
||||||
|
|
||||||
ir_variable *var;
|
ir_variable *var;
|
||||||
|
|
||||||
if (this->is_array) {
|
if (this->is_array) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue