st/nine: propertly declare constants (v2)
authorAxel Davy <axel.davy@ens.fr>
Mon, 24 Nov 2014 23:38:05 +0000 (00:38 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 26 Nov 2014 20:09:11 +0000 (20:09 +0000)
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@lists.freedesktop.org>
Tested-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_ff.c

index 689093319a5a80a966047e2a514a34324a5e858a..184c41130265a1f4b087a4e0aee3fe155cd0e1b0 100644 (file)
@@ -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)