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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user