diff options
author | Karol Herbst <[email protected]> | 2019-03-28 23:47:07 +0100 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-04-12 09:02:59 +0200 |
commit | 0b2e8d9e17452c62d1cc08ca290b0984ae592899 (patch) | |
tree | 60edd06c7f01e7c3d971d7337be48039d249fc2f /src/compiler/glsl | |
parent | d7bbb3caf19e6e0f2dd47855babb8f5e91596e77 (diff) |
glsl/nir: fetch the type for images from the deref instruction
fixes retrieving the sampler type for bindless images stored inside structs.
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 89edaa41d27..6c42bd9f5ac 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -1208,10 +1208,10 @@ nir_visitor::visit(ir_call *ir) /* Set the image variable dereference. */ exec_node *param = ir->actual_parameters.get_head(); ir_dereference *image = (ir_dereference *)param; - const glsl_type *type = - image->variable_referenced()->type->without_array(); + nir_deref_instr *deref = evaluate_deref(image); + const glsl_type *type = deref->type; - instr->src[0] = nir_src_for_ssa(&evaluate_deref(image)->dest.ssa); + instr->src[0] = nir_src_for_ssa(&deref->dest.ssa); param = param->get_next(); /* Set the intrinsic destination. */ |