radeonsi: handle indirect constants gracefully

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

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König
2012-08-24 12:55:34 +02:00
parent a96119cc8c
commit e7723b5bdf
@@ -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);