mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
glsl: mark uniform and input interface blocks as read only
Reviewed-by: Mark Janes <mark.a.janes@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
58030a8f99
commit
2cb149c289
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue