From: Ville Syrjälä <ville.syrj...@linux.intel.com>

TEXTURE_SET() is the only register macro that forgets to wrap the
argument evaluation in parens. Only simple integers are passed to this
macro so there's no bug but sitll it seems prudent to add the
parens.

Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 src/mesa/drivers/dri/i915/i830_reg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i915/i830_reg.h 
b/src/mesa/drivers/dri/i915/i830_reg.h
index e08cbe5..d7ccc16 100644
--- a/src/mesa/drivers/dri/i915/i830_reg.h
+++ b/src/mesa/drivers/dri/i915/i830_reg.h
@@ -256,7 +256,7 @@
 
 #define _3DSTATE_MAP_COORD_TRANSFORM   ((3<<29)|(0x1d<<24)|(0x8c<<16))
 #define DISABLE_TEX_TRANSFORM          (1<<28)
-#define TEXTURE_SET(x)                 (x<<29)
+#define TEXTURE_SET(x)                 ((x)<<29)
 
 #define _3DSTATE_VERTEX_TRANSFORM      ((3<<29)|(0x1d<<24)|(0x8b<<16))
 #define DISABLE_VIEWPORT_TRANSFORM     (1<<31)
-- 
1.8.5.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to