From 4747b2638c785337fccec2f17ef77fc870e68c2e Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Mon, 30 Jun 2014 18:42:31 +0300 Subject: i915: Protect macro argument for TEXTURE_SET() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Eric Anholt Signed-off-by: Ville Syrjälä --- 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 e08cbe52a35..d7ccc165a3b 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) -- cgit v1.2.3