[Mesa-stable] [PATCH v3 05/19] st/nine: propertly declare constants (v2)

David Heidelberg david at ixit.cz
Mon Nov 24 15:38:05 PST 2014


From: Axel Davy <axel.davy at ens.fr>

Fixes "Error : CONST[20]: Undeclared source register" when running
dx9_alpha_blending_material. Also artifacts on ilo.

v2: also remove unused MISC_CONST

Cc: "10.4" <mesa-stable at lists.freedesktop.org>
Tested-by: David Heidelberg <david at ixit.cz>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_ff.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c
index 6890933..184c411 100644
--- a/src/gallium/state_trackers/nine/nine_ff.c
+++ b/src/gallium/state_trackers/nine/nine_ff.c
@@ -189,13 +189,10 @@ static void nine_ureg_tgsi_dump(struct ureg_program *ureg, boolean override)
 
 /* AL should contain base address of lights table. */
 #define LIGHT_CONST(i)                                                \
-    ureg_src_indirect(ureg_src_register(TGSI_FILE_CONSTANT, (i)), _X(AL))
+    ureg_src_indirect(ureg_DECL_constant(ureg, i), _X(AL))
 
 #define MATERIAL_CONST(i) \
-    ureg_src_register(TGSI_FILE_CONSTANT, 19 + (i))
-
-#define MISC_CONST(i) \
-    ureg_src_register(TGSI_FILE_CONSTANT, (i))
+    ureg_DECL_constant(ureg, 19 + (i))
 
 #define _CONST(n) ureg_DECL_constant(ureg, n)
 
-- 
2.1.3



More information about the mesa-stable mailing list