renderer: if the srgb state changes dirty samplers

srgb decode is part of sampler state, so if we are using
samplers just dirty the sampler state.

fixes: tex-srgb
macos/master
Dave Airlie 10 years ago
parent 00850485f6
commit 08a215de78
  1. 4
      src/vrend_renderer.c

@ -1668,10 +1668,14 @@ void vrend_set_single_sampler_view(struct vrend_context *ctx,
tex->cur_swizzle_a = view->gl_swizzle_a; tex->cur_swizzle_a = view->gl_swizzle_a;
} }
if (tex->srgb_decode != view->srgb_decode && util_format_is_srgb(tex->base.base.format)) { if (tex->srgb_decode != view->srgb_decode && util_format_is_srgb(tex->base.base.format)) {
if (vrend_state.have_samplers)
ctx->sub->sampler_state_dirty = TRUE;
else {
glTexParameteri(view->texture->target, GL_TEXTURE_SRGB_DECODE_EXT, glTexParameteri(view->texture->target, GL_TEXTURE_SRGB_DECODE_EXT,
view->srgb_decode); view->srgb_decode);
tex->srgb_decode = view->srgb_decode; tex->srgb_decode = view->srgb_decode;
} }
}
} else { } else {
GLenum internalformat; GLenum internalformat;
tex = (struct vrend_texture *)view->texture; tex = (struct vrend_texture *)view->texture;

Loading…
Cancel
Save