diff options
author | Michel Dänzer <[email protected]> | 2018-03-08 17:32:50 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2018-03-09 16:52:11 +0100 |
commit | 2a4596a2f08321f35ec8dc59667ce3a7e7080e7e (patch) | |
tree | 2370e7ef8e62efca1c11c27f739deadd28798507 /src | |
parent | 379e00dc273ce8989d56fc7db531c84061710d65 (diff) |
st/mesa: gl_program::info.system_values_read is a 64-bit-field
We were dropping the upper 32 bits, which caused assertion failures in
some compute shader piglit tests with radeonsi since the commit below.
Fixes: 752e96970303 ("compiler: Add two new system values for subgroups")
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index ccf4dabcc9f..911c855d43a 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -6532,10 +6532,10 @@ st_translate_program( /* Declare misc input registers */ { - GLbitfield sysInputs = proginfo->info.system_values_read; + GLbitfield64 sysInputs = proginfo->info.system_values_read; for (i = 0; sysInputs; i++) { - if (sysInputs & (1 << i)) { + if (sysInputs & (1ull << i)) { enum tgsi_semantic semName = _mesa_sysval_to_semantic(i); t->systemValues[i] = ureg_DECL_system_value(ureg, semName, 0); @@ -6567,7 +6567,7 @@ st_translate_program( emit_wpos(st_context(ctx), t, proginfo, ureg, program->wpos_transform_const); - sysInputs &= ~(1 << i); + sysInputs &= ~(1ull << i); } } } @@ -6864,7 +6864,7 @@ get_mesa_program_tgsi(struct gl_context *ctx, /* This must be done before the uniform storage is associated. */ if (shader->Stage == MESA_SHADER_FRAGMENT && (prog->info.inputs_read & VARYING_BIT_POS || - prog->info.system_values_read & (1 << SYSTEM_VALUE_FRAG_COORD))) { + prog->info.system_values_read & (1ull << SYSTEM_VALUE_FRAG_COORD))) { static const gl_state_index16 wposTransformState[STATE_LENGTH] = { STATE_INTERNAL, STATE_FB_WPOS_Y_TRANSFORM }; diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index c76180a5799..99cddd66282 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -951,9 +951,9 @@ st_translate_mesa_program(struct gl_context *ctx, /* Declare misc input registers */ - GLbitfield sysInputs = program->info.system_values_read; + GLbitfield64 sysInputs = program->info.system_values_read; for (i = 0; sysInputs; i++) { - if (sysInputs & (1 << i)) { + if (sysInputs & (1ull << i)) { unsigned semName = _mesa_sysval_to_semantic(i); t->systemValues[i] = ureg_DECL_system_value(ureg, semName, 0); @@ -985,7 +985,7 @@ st_translate_mesa_program(struct gl_context *ctx, semName == TGSI_SEMANTIC_POSITION) emit_wpos(st_context(ctx), t, program, ureg); - sysInputs &= ~(1 << i); + sysInputs &= ~(1ull << i); } } |