Module: Mesa Branch: master Commit: 0b2e8d9e17452c62d1cc08ca290b0984ae592899 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b2e8d9e17452c62d1cc08ca290b0984ae592899
Author: Karol Herbst <[email protected]> Date: Thu Mar 28 23:47:07 2019 +0100 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]> --- src/compiler/glsl/glsl_to_nir.cpp | 6 +++--- 1 file 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. */ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
