Module: Mesa Branch: master Commit: 2cb149c2894679c5c7af81b40277f77cc0fb099d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cb149c2894679c5c7af81b40277f77cc0fb099d
Author: Timothy Arceri <[email protected]> Date: Fri Mar 27 23:03:40 2015 +1100 glsl: mark uniform and input interface blocks as read only Reviewed-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> --- src/glsl/ast_to_hir.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d387b2e..036ec17 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5776,6 +5776,9 @@ ast_interface_block::hir(exec_list *instructions, var->data.matrix_layout = matrix_layout == GLSL_MATRIX_LAYOUT_INHERITED ? GLSL_MATRIX_LAYOUT_COLUMN_MAJOR : matrix_layout; + if (var_mode == ir_var_shader_in || var_mode == ir_var_uniform) + var->data.read_only = true; + if (state->stage == MESA_SHADER_GEOMETRY && var_mode == ir_var_shader_in) handle_geometry_shader_input_decl(state, loc, var); @@ -5816,6 +5819,9 @@ ast_interface_block::hir(exec_list *instructions, var->data.sample = fields[i].sample; var->init_interface_type(block_type); + if (var_mode == ir_var_shader_in || var_mode == ir_var_uniform) + var->data.read_only = true; + if (fields[i].matrix_layout == GLSL_MATRIX_LAYOUT_INHERITED) { var->data.matrix_layout = matrix_layout == GLSL_MATRIX_LAYOUT_INHERITED ? GLSL_MATRIX_LAYOUT_COLUMN_MAJOR : matrix_layout; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
