From: Jordan Justen Date: Mon, 20 Oct 2014 23:23:51 +0000 (-0700) Subject: glsl/cs: Change gl_WorkGroupSize from ivec3 to uvec3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=307d22abb08f9433ae9a0a95b0225c2725ec50de;p=mesa.git glsl/cs: Change gl_WorkGroupSize from ivec3 to uvec3 As documented in: https://www.opengl.org/registry/specs/ARB/compute_shader.txt const uvec3 gl_WorkGroupSize; Signed-off-by: Jordan Justen Reviewed-by: Matt Turner --- diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index fe1e1291e07..811a9557df9 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5908,7 +5908,7 @@ ast_cs_input_layout::hir(exec_list *instructions, * declare it earlier). */ ir_variable *var = new(state->symbols) - ir_variable(glsl_type::ivec3_type, "gl_WorkGroupSize", ir_var_auto); + ir_variable(glsl_type::uvec3_type, "gl_WorkGroupSize", ir_var_auto); var->data.how_declared = ir_var_declared_implicitly; var->data.read_only = true; instructions->push_tail(var); @@ -5916,10 +5916,10 @@ ast_cs_input_layout::hir(exec_list *instructions, ir_constant_data data; memset(&data, 0, sizeof(data)); for (int i = 0; i < 3; i++) - data.i[i] = this->local_size[i]; - var->constant_value = new(var) ir_constant(glsl_type::ivec3_type, &data); + data.u[i] = this->local_size[i]; + var->constant_value = new(var) ir_constant(glsl_type::uvec3_type, &data); var->constant_initializer = - new(var) ir_constant(glsl_type::ivec3_type, &data); + new(var) ir_constant(glsl_type::uvec3_type, &data); var->data.has_initializer = true; return NULL;