[Mesa-dev] [PATCH 2/5] radeonsi: handle indirect constants gracefully

Christian König deathsimple at vodafone.de
Wed Aug 29 02:11:40 PDT 2012


It's not supported yet, so at least don't try to crash the box.

Signed-off-by: Christian König <deathsimple at vodafone.de>
---
 src/gallium/drivers/radeonsi/radeonsi_shader.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 98866c4..45eda64 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -362,6 +362,13 @@ static LLVMValueRef fetch_constant(
 	LLVMValueRef offset;
 	LLVMValueRef load;
 
+	/* currently not supported */
+	if (reg->Register.Indirect) {
+		assert(0);
+		load = lp_build_const_int32(base->gallivm, 0);
+		return bitcast(bld_base, type, load);
+	}
+
 	/* XXX: Assume the pointer to the constant buffer is being stored in
 	 * SGPR[0:1] */
 	const_ptr = use_sgpr(base->gallivm, SGPR_CONST_PTR_F32, 0);
-- 
1.7.9.5



More information about the mesa-dev mailing list