mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 08:30:10 +01:00
microsoft/compiler: Fix assert.
Fix defect reported by Coverity Scan.
Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment var->type =
glsl_int_type() has a side effect. This code will work differently in a
non-debug build.
Fixes: afb64e10c1 ("microsoft/compiler: Move d3d12_fix_io_uint_type() to dxil_nir.c")
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17097>
This commit is contained in:
parent
2b87073133
commit
081b1eeacd
1 changed files with 4 additions and 1 deletions
|
|
@ -1993,7 +1993,10 @@ fix_io_uint_type(nir_shader *s, nir_variable_mode modes, int slot)
|
|||
nir_variable *fixed_var = NULL;
|
||||
nir_foreach_variable_with_modes(var, s, modes) {
|
||||
if (var->data.location == slot) {
|
||||
assert(var->type = glsl_int_type());
|
||||
if (var->type == glsl_uint_type())
|
||||
return false;
|
||||
|
||||
assert(var->type == glsl_int_type());
|
||||
var->type = glsl_uint_type();
|
||||
fixed_var = var;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue