summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/pipe/i915simple/i915_state_derived.c2
-rw-r--r--src/mesa/pipe/i915simple/i915_state_sampler.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_derived.c b/src/mesa/pipe/i915simple/i915_state_derived.c
index c24f54580ed..bab3015fdeb 100644
--- a/src/mesa/pipe/i915simple/i915_state_derived.c
+++ b/src/mesa/pipe/i915simple/i915_state_derived.c
@@ -174,7 +174,7 @@ void i915_update_derived( struct i915_context *i915 )
if (i915->dirty & (I915_NEW_SETUP | I915_NEW_FS))
calculate_vertex_layout( i915 );
- if (i915->dirty & I915_NEW_SAMPLER)
+ if (i915->dirty & (I915_NEW_SAMPLER | I915_NEW_TEXTURE))
i915_update_samplers(i915);
if (i915->dirty & I915_NEW_TEXTURE)
diff --git a/src/mesa/pipe/i915simple/i915_state_sampler.c b/src/mesa/pipe/i915simple/i915_state_sampler.c
index e23e4bdcf74..e4d7fec27be 100644
--- a/src/mesa/pipe/i915simple/i915_state_sampler.c
+++ b/src/mesa/pipe/i915simple/i915_state_sampler.c
@@ -155,7 +155,6 @@ static void update_sampler(struct i915_context *i915,
uint unit,
const struct pipe_sampler_state *sampler,
const struct pipe_mipmap_tree *mt,
- const struct pipe_surface *surface,
unsigned state[3] )
{
const unsigned ws = sampler->wrap_s;
@@ -187,8 +186,8 @@ static void update_sampler(struct i915_context *i915,
state[0] |= ((b << SS2_LOD_BIAS_SHIFT) & SS2_LOD_BIAS_MASK);
}
- if (surface->format == PIPE_FORMAT_YCBCR ||
- surface->format == PIPE_FORMAT_YCBCR_REV)
+ if (mt->format == PIPE_FORMAT_YCBCR ||
+ mt->format == PIPE_FORMAT_YCBCR_REV)
state[0] |= SS2_COLORSPACE_CONVERSION;
@@ -259,7 +258,6 @@ static void update_sampler(struct i915_context *i915,
void i915_update_samplers( struct i915_context *i915 )
{
- const struct pipe_surface *surface = i915->framebuffer.cbufs[0];
uint unit;
i915->current.sampler_enable_nr = 0;
@@ -273,7 +271,6 @@ void i915_update_samplers( struct i915_context *i915 )
unit,
i915->sampler + unit, /* sampler state */
i915->texture[unit], /* mipmap tree */
- surface, /* cbuffer info */
i915->current.sampler[unit] /* the result */
);