Mesa (master): radeonsi: handle indirect constants gracefully
Christian König
deathsimple at kemper.freedesktop.org
Mon Sep 3 09:23:45 UTC 2012
Module: Mesa
Branch: master
Commit: e7723b5bdfe7dc725dd29a725c4637a7f34eda83
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e7723b5bdfe7dc725dd29a725c4637a7f34eda83
Author: Christian König <deathsimple at vodafone.de>
Date: Fri Aug 24 12:55:34 2012 +0200
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 at vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
---
src/gallium/drivers/radeonsi/radeonsi_shader.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 2f417ec..9734ab3 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);
More information about the mesa-commit
mailing list