From e7723b5bdfe7dc725dd29a725c4637a7f34eda83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Fri, 24 Aug 2012 12:55:34 +0200 Subject: [PATCH] radeonsi: handle indirect constants gracefully MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's not supported yet, so at least don't try to crash the box. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- 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 2f417ecda52..9734ab3ad0d 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); -- 2.30.2