diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_program.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h index 2046d78471d..f95b531a413 100644 --- a/src/mesa/drivers/dri/i915/i915_context.h +++ b/src/mesa/drivers/dri/i915/i915_context.h @@ -116,6 +116,7 @@ enum { }; #define I915_TEX_UNITS 8 +#define I915_WPOS_TEX_INVALID 0xff #define I915_MAX_CONSTANT 32 #define I915_CONSTANT_SIZE (2+(4*I915_MAX_CONSTANT)) diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 0fad2c34c34..e19ca60bd33 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1063,7 +1063,7 @@ check_wpos(struct i915_fragment_program *p) GLint i; unsigned unit = 0; - p->wpos_tex = -1; + p->wpos_tex = I915_WPOS_TEX_INVALID; if ((inputs & VARYING_BIT_POS) == 0) return; @@ -1252,7 +1252,7 @@ i915ValidateFragmentProgram(struct i915_context *i915) intel->coloroffset = 0; intel->specoffset = 0; - if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) { + if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != I915_WPOS_TEX_INVALID) { EMIT_ATTR(_TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, S4_VFMT_XYZW, 16); } else { diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index a8f693f71af..20a47804249 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -482,7 +482,7 @@ i915_init_program(struct i915_context *i915, struct i915_fragment_program *p) p->decl_t = 0; p->temp_flag = 0xffff000; p->utemp_flag = ~0x7; - p->wpos_tex = -1; + p->wpos_tex = I915_WPOS_TEX_INVALID; p->depth_written = 0; p->nr_params = 0; |