wined3d: Properly check if sRGB writes should be enabled in context_apply_clear_state().
In particular, while enabling sRGB writes is harmless for framebuffers that are not sRGB capable, the default framebuffer may be sRGB capable regardless of the associated wined3d format. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
966a07149a
commit
cb9704a979
|
@ -2606,10 +2606,9 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
|||
* performance incredibly. */
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
|
||||
if (gl_info->supported[ARB_FRAMEBUFFER_SRGB])
|
||||
if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB])
|
||||
{
|
||||
if (!(context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL)
|
||||
|| device->state.render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
if (needs_srgb_write(context, &device->state, fb))
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
else
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
|
|
Loading…
Reference in New Issue