rusticl: make image format/order work on radeonsi
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19381>
This commit is contained in:
@@ -39,6 +39,14 @@ rusticl_lower_intrinsics_instr(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val = intrins->src[0].ssa;
|
val = intrins->src[0].ssa;
|
||||||
|
|
||||||
|
if (val->parent_instr->type == nir_instr_type_deref) {
|
||||||
|
nir_deref_instr *deref = nir_instr_as_deref(val->parent_instr);
|
||||||
|
nir_variable *var = nir_deref_instr_get_variable(deref);
|
||||||
|
assert(var);
|
||||||
|
val = nir_imm_intN_t(b, var->data.binding, val->bit_size);
|
||||||
|
}
|
||||||
|
|
||||||
// we put write images after read images
|
// we put write images after read images
|
||||||
if (glsl_type_is_image(var->type)) {
|
if (glsl_type_is_image(var->type)) {
|
||||||
val = nir_iadd_imm(b, val, b->shader->info.num_textures);
|
val = nir_iadd_imm(b, val, b->shader->info.num_textures);
|
||||||
|
Reference in New Issue
Block a user