wined3d: Pass a wined3d_context_gl structure to context_check_fbo_status().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
907b2a3333
commit
49889f72d7
|
@ -7900,7 +7900,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl
|
|||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER,
|
||||
&dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location);
|
||||
context_set_draw_buffer(context, buffer);
|
||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
}
|
||||
|
||||
|
|
|
@ -375,9 +375,9 @@ static void context_dump_fbo_attachment(const struct wined3d_gl_info *gl_info, G
|
|||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
void context_check_fbo_status(const struct wined3d_context *context, GLenum target)
|
||||
void wined3d_context_gl_check_fbo_status(const struct wined3d_context_gl *context_gl, GLenum target)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
|
||||
GLenum status;
|
||||
|
||||
if (!FIXME_ON(d3d))
|
||||
|
@ -394,7 +394,7 @@ void context_check_fbo_status(const struct wined3d_context *context, GLenum targ
|
|||
|
||||
FIXME("FBO status %s (%#x).\n", debug_fbostatus(status), status);
|
||||
|
||||
if (!context->current_fbo)
|
||||
if (!context_gl->c.current_fbo)
|
||||
{
|
||||
ERR("FBO 0 is incomplete, driver bug?\n");
|
||||
return;
|
||||
|
@ -2787,9 +2787,7 @@ void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl,
|
|||
}
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
context_check_fbo_status(context, GL_FRAMEBUFFER);
|
||||
}
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
context_get_rt_size(context, &rt_size);
|
||||
|
@ -3097,9 +3095,7 @@ BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl,
|
|||
}
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
context_check_fbo_status(&context_gl->c, GL_FRAMEBUFFER);
|
||||
}
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_FRAMEBUFFER);
|
||||
|
||||
context_gl->c.last_was_blit = FALSE;
|
||||
context_gl->c.last_was_ffp_blit = FALSE;
|
||||
|
@ -4021,9 +4017,7 @@ static BOOL context_apply_draw_state(struct wined3d_context *context,
|
|||
}
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
context_check_fbo_status(context, GL_FRAMEBUFFER);
|
||||
}
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_FRAMEBUFFER);
|
||||
|
||||
context->numDirtyEntries = 0; /* This makes the whole list clean */
|
||||
context->last_was_blit = FALSE;
|
||||
|
|
|
@ -13334,7 +13334,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
|
|||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER,
|
||||
&dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location);
|
||||
context_set_draw_buffer(context, buffer);
|
||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,12 +106,12 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device, struct
|
|||
|
||||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER, NULL, 0,
|
||||
&src_texture->resource, src_sub_resource_idx, src_location);
|
||||
context_check_fbo_status(context, GL_READ_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER);
|
||||
|
||||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, NULL, 0,
|
||||
&dst_texture->resource, dst_sub_resource_idx, dst_location);
|
||||
context_set_draw_buffer(context, GL_NONE);
|
||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
if (gl_mask & GL_DEPTH_BUFFER_BIT)
|
||||
|
@ -252,7 +252,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
|
|||
&src_texture->resource, src_sub_resource_idx, NULL, 0, src_location);
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(buffer);
|
||||
checkGLcall("glReadBuffer()");
|
||||
context_check_fbo_status(context, GL_READ_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER);
|
||||
|
||||
if (dst_location == WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
|
@ -271,7 +271,7 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3
|
|||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER,
|
||||
&dst_texture->resource, dst_sub_resource_idx, NULL, 0, dst_location);
|
||||
context_set_draw_buffer(context, buffer);
|
||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
@ -737,7 +737,7 @@ static void texture2d_read_from_framebuffer(struct wined3d_texture *texture, uns
|
|||
{
|
||||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER,
|
||||
resource, sub_resource_idx, NULL, 0, src_location);
|
||||
context_check_fbo_status(context, GL_READ_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
}
|
||||
else
|
||||
|
@ -2260,7 +2260,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
|
|||
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER,
|
||||
dst_resource, dst_sub_resource_idx, NULL, 0, dst_location);
|
||||
context_set_draw_buffer(context, buffer);
|
||||
context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER);
|
||||
wined3d_context_gl_check_fbo_status(context_gl, GL_DRAW_FRAMEBUFFER);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
}
|
||||
|
||||
|
|
|
@ -2074,6 +2074,7 @@ void wined3d_context_gl_apply_ffp_blit_state(struct wined3d_context_gl *context_
|
|||
const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_context_gl_bind_texture(struct wined3d_context_gl *context_gl,
|
||||
GLenum target, GLuint name) DECLSPEC_HIDDEN;
|
||||
void wined3d_context_gl_check_fbo_status(const struct wined3d_context_gl *context_gl, GLenum target) DECLSPEC_HIDDEN;
|
||||
void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
void wined3d_context_gl_free_fence(struct wined3d_fence *fence) DECLSPEC_HIDDEN;
|
||||
void wined3d_context_gl_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
|
||||
|
@ -2227,7 +2228,6 @@ void context_active_texture(struct wined3d_context *context, const struct wined3
|
|||
unsigned int unit) DECLSPEC_HIDDEN;
|
||||
void context_bind_bo(struct wined3d_context *context, GLenum binding, GLuint name) DECLSPEC_HIDDEN;
|
||||
void context_bind_dummy_textures(const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void context_check_fbo_status(const struct wined3d_context *context, GLenum target) DECLSPEC_HIDDEN;
|
||||
void context_copy_bo_address(struct wined3d_context *context,
|
||||
const struct wined3d_bo_address *dst, GLenum dst_binding,
|
||||
const struct wined3d_bo_address *src, GLenum src_binding, size_t size) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue