wined3d: Pass a wined3d_context_gl structure to context_apply_blit_state().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
81f5f21ab5
commit
54945f04de
|
@ -2749,16 +2749,20 @@ static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *conte
|
|||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device)
|
||||
void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl, const struct wined3d_device *device)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct wined3d_texture *rt = context->current_rt.texture;
|
||||
struct wined3d_context *context = &context_gl->c;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_texture *rt;
|
||||
DWORD rt_mask, *cur_mask;
|
||||
unsigned int sampler;
|
||||
SIZE rt_size;
|
||||
|
||||
TRACE("Setting up context %p for blitting.\n", context);
|
||||
|
||||
gl_info = context->gl_info;
|
||||
rt = context->current_rt.texture;
|
||||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
if (context->render_offscreen)
|
||||
|
@ -2906,6 +2910,7 @@ static void context_apply_blit_projection(const struct wined3d_context *context,
|
|||
/* Context activation is done by the caller. */
|
||||
void context_apply_ffp_blit_state(struct wined3d_context *context, const struct wined3d_device *device)
|
||||
{
|
||||
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
unsigned int i, sampler;
|
||||
|
||||
|
@ -2919,14 +2924,14 @@ void context_apply_ffp_blit_state(struct wined3d_context *context, const struct
|
|||
context_get_rt_size(context, &rt_size);
|
||||
if (context->blit_w != rt_size.cx || context->blit_h != rt_size.cy)
|
||||
context_apply_blit_projection(context, rt_size.cx, rt_size.cy);
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_context_gl_apply_blit_state(context_gl, device);
|
||||
|
||||
checkGLcall("ffp blit state application");
|
||||
return;
|
||||
}
|
||||
context->last_was_ffp_blit = TRUE;
|
||||
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_context_gl_apply_blit_state(context_gl, device);
|
||||
|
||||
/* Disable all textures. The caller can then bind a texture it wants to blit
|
||||
* from. */
|
||||
|
|
|
@ -13307,7 +13307,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli
|
|||
wined3d_texture_load(src_texture, context, FALSE);
|
||||
}
|
||||
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_context_gl_apply_blit_state(wined3d_context_gl(context), device);
|
||||
|
||||
if (dst_location == WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
|
|
|
@ -737,7 +737,7 @@ static void texture2d_read_from_framebuffer(struct wined3d_texture *texture, uns
|
|||
}
|
||||
else
|
||||
{
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_context_gl_apply_blit_state(wined3d_context_gl(context), device);
|
||||
}
|
||||
|
||||
/* Select the correct read buffer, and give some debug output.
|
||||
|
@ -908,7 +908,7 @@ static void fb_copy_to_texture_direct(struct wined3d_texture_gl *dst_texture, un
|
|||
context = context_acquire(device, &src_texture->t, src_sub_resource_idx);
|
||||
context_gl = wined3d_context_gl(context);
|
||||
gl_info = context->gl_info;
|
||||
context_apply_blit_state(context, device);
|
||||
wined3d_context_gl_apply_blit_state(context_gl, device);
|
||||
wined3d_texture_load(&dst_texture->t, context, FALSE);
|
||||
|
||||
/* Bind the target texture */
|
||||
|
|
|
@ -2054,6 +2054,8 @@ static inline const struct wined3d_context_gl *wined3d_context_gl_const(const st
|
|||
return CONTAINING_RECORD(context, struct wined3d_context_gl, c);
|
||||
}
|
||||
|
||||
void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl,
|
||||
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_cleanup(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
|
@ -2207,7 +2209,6 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device,
|
|||
void context_alloc_fence(struct wined3d_context *context, struct wined3d_fence *fence) DECLSPEC_HIDDEN;
|
||||
void context_alloc_occlusion_query(struct wined3d_context *context,
|
||||
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
|
||||
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_state *state,
|
||||
UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN;
|
||||
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
|
||||
|
|
Loading…
Reference in New Issue