[Mesa-dev] [PATCH 3/3] ac: handle cast derefs

Dave Airlie airlied at gmail.com
Mon Nov 19 20:15:55 UTC 2018


From: Dave Airlie <airlied at redhat.com>

Just give back the same value for now.
---
 src/amd/common/ac_nir_to_llvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index cc795324cc5..d7296a4617e 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3715,6 +3715,9 @@ static void visit_deref(struct ac_nir_context *ctx,
 		result = ac_build_gep0(&ctx->ac, get_src(ctx, instr->parent),
 		                       get_src(ctx, instr->arr.index));
 		break;
+	case nir_deref_type_cast:
+		result = get_src(ctx, instr->parent);
+		break;
 	default:
 		unreachable("Unhandled deref_instr deref type");
 	}
-- 
2.17.2



More information about the mesa-dev mailing list