diff options
author | Jesse Natalie <jenatali@microsoft.com> | 2023-12-06 14:05:39 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-12-06 23:46:42 +0000 |
commit | d157cd7442a57569f4c1e3a6d4d1ce56380126ff (patch) | |
tree | 28f32549e445bfa3d6032f8e400c9d9f6652286c /src/microsoft/clc/clc_compiler.c | |
parent | 03ae2611838bf86c3c589980645b2c5880a3751c (diff) |
microsoft/clc: One more image lowering fix
Bindings are not necessarily globally unique, and even the location
where we were trying to read the binding value out of is a union, so
we could be trying to compare binding values against data for other
arg types.
Instead, use the arg metadata offset, which is globally unique and
outside of the union.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26555>
Diffstat (limited to 'src/microsoft/clc/clc_compiler.c')
-rw-r--r-- | src/microsoft/clc/clc_compiler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/microsoft/clc/clc_compiler.c b/src/microsoft/clc/clc_compiler.c index 3635fb960eb..29561e4aa02 100644 --- a/src/microsoft/clc/clc_compiler.c +++ b/src/microsoft/clc/clc_compiler.c @@ -136,7 +136,7 @@ clc_lower_input_image_deref(nir_builder *b, struct clc_image_lower_context *cont nir_variable *in_var = nir_deref_instr_get_variable(context->deref); context->metadata_index = 0; - while (context->metadata->args[context->metadata_index].image.buf_ids[0] != in_var->data.binding) + while (context->metadata->args[context->metadata_index].offset != in_var->data.driver_location) context->metadata_index++; context->num_buf_ids = context->metadata->args[context->metadata_index].image.num_buf_ids; |