summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2014-06-30 18:42:31 +0300
committerVille Syrjälä <[email protected]>2014-11-13 19:13:27 +0200
commit4747b2638c785337fccec2f17ef77fc870e68c2e (patch)
tree1360576278fdbcc26305bc066c40e2f651141bb6 /src
parent3746ff89bc5c0b84119e8aff3afab39842fbb40e (diff)
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]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915/i830_reg.h2
1 files changed, 1 insertions, 1 deletions
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)