wined3d: Track framebuffer changes.
This commit is contained in:
parent
d321959dd7
commit
cd96c59d91
|
@ -2061,6 +2061,7 @@ void context_apply_blit_state(struct wined3d_context *context, struct wined3d_de
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
SetupForBlit(device, context);
|
SetupForBlit(device, context);
|
||||||
|
context_invalidate_state(context, STATE_FRAMEBUFFER, device->StateTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL context_validate_rt_config(UINT rt_count,
|
static BOOL context_validate_rt_config(UINT rt_count,
|
||||||
|
@ -2122,6 +2123,9 @@ BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_d
|
||||||
}
|
}
|
||||||
|
|
||||||
LEAVE_GL();
|
LEAVE_GL();
|
||||||
|
|
||||||
|
/* TODO: This is not necessary if the rts are the device's current targets */
|
||||||
|
context_invalidate_state(context, STATE_FRAMEBUFFER, device->StateTable);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2265,9 +2269,6 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
|
||||||
state_table[rep].apply(rep, device->stateBlock, context);
|
state_table[rep].apply(rep, device->stateBlock, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME */
|
|
||||||
state_table[STATE_FRAMEBUFFER].apply(STATE_FRAMEBUFFER, device->stateBlock, context);
|
|
||||||
|
|
||||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||||
{
|
{
|
||||||
context_check_fbo_status(context, GL_FRAMEBUFFER);
|
context_check_fbo_status(context, GL_FRAMEBUFFER);
|
||||||
|
|
|
@ -5129,6 +5129,8 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device,
|
||||||
device_invalidate_state(device, STATE_SCISSORRECT);
|
device_invalidate_state(device, STATE_SCISSORRECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5179,6 +5181,8 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
|
||||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_DEPTHBIAS));
|
device_invalidate_state(device, STATE_RENDER(WINED3DRS_DEPTHBIAS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3993,6 +3993,7 @@ static void read_from_framebuffer_texture(struct wined3d_surface *surface, BOOL
|
||||||
*/
|
*/
|
||||||
context = context_acquire(device, surface);
|
context = context_acquire(device, surface);
|
||||||
gl_info = context->gl_info;
|
gl_info = context->gl_info;
|
||||||
|
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||||
|
|
||||||
surface_prepare_texture(surface, gl_info, srgb);
|
surface_prepare_texture(surface, gl_info, srgb);
|
||||||
surface_bind_and_dirtify(surface, gl_info, srgb);
|
surface_bind_and_dirtify(surface, gl_info, srgb);
|
||||||
|
@ -5104,6 +5105,7 @@ static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREF
|
||||||
context_set_draw_buffer(context, GL_COLOR_ATTACHMENT0);
|
context_set_draw_buffer(context, GL_COLOR_ATTACHMENT0);
|
||||||
}
|
}
|
||||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||||
|
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||||
|
|
||||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||||
|
|
|
@ -309,6 +309,7 @@ static void swapchain_blit(struct wined3d_swapchain *swapchain,
|
||||||
|
|
||||||
context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL);
|
context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, NULL);
|
||||||
context_set_draw_buffer(context, GL_BACK);
|
context_set_draw_buffer(context, GL_BACK);
|
||||||
|
device_invalidate_state(device, STATE_FRAMEBUFFER);
|
||||||
|
|
||||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
device_invalidate_state(device, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||||
|
|
Loading…
Reference in New Issue