Module: Mesa Branch: master Commit: 4747b2638c785337fccec2f17ef77fc870e68c2e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4747b2638c785337fccec2f17ef77fc870e68c2e
Author: Ville Syrjälä <[email protected]> Date: Mon Jun 30 18:42:31 2014 +0300 i915: Protect macro argument for TEXTURE_SET() 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 <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> --- 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) _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
