summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-06-01 19:27:02 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-08-30 22:09:36 -0700
commitd82f8d9772813949d0f5455cd0edad9003be0fb0 (patch)
tree7d0b6d08ff752cc9e60ed97491ddeaf378c0a01b /src/compiler/glsl/ast_to_hir.cpp
parenta0b1260fe0577e504c8ef31c07e13025324af8f8 (diff)
downloadexternal_mesa3d-d82f8d9772813949d0f5455cd0edad9003be0fb0.zip
external_mesa3d-d82f8d9772813949d0f5455cd0edad9003be0fb0.tar.gz
external_mesa3d-d82f8d9772813949d0f5455cd0edad9003be0fb0.tar.bz2
glsl: Handle patch qualifier on interface blocks.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/compiler/glsl/ast_to_hir.cpp')
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 581367b..6e9c32e 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -7498,10 +7498,12 @@ ast_interface_block::hir(exec_list *instructions,
_mesa_glsl_error(&loc, state, "geometry shader inputs must be arrays");
} else if ((state->stage == MESA_SHADER_TESS_CTRL ||
state->stage == MESA_SHADER_TESS_EVAL) &&
+ !this->layout.flags.q.patch &&
this->array_specifier == NULL &&
var_mode == ir_var_shader_in) {
_mesa_glsl_error(&loc, state, "per-vertex tessellation shader inputs must be arrays");
} else if (state->stage == MESA_SHADER_TESS_CTRL &&
+ !this->layout.flags.q.patch &&
this->array_specifier == NULL &&
var_mode == ir_var_shader_out) {
_mesa_glsl_error(&loc, state, "tessellation control shader outputs must be arrays");
@@ -7617,6 +7619,8 @@ ast_interface_block::hir(exec_list *instructions,
if (var_mode == ir_var_shader_in || var_mode == ir_var_uniform)
var->data.read_only = true;
+ var->data.patch = this->layout.flags.q.patch;
+
if (state->stage == MESA_SHADER_GEOMETRY && var_mode == ir_var_shader_in)
handle_geometry_shader_input_decl(state, loc, var);
else if ((state->stage == MESA_SHADER_TESS_CTRL ||