Commit c0e49b0e authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Do not apply fixed-function state in context_apply_blit_state().

parent 56464f5e
......@@ -7840,7 +7840,7 @@ static DWORD arbfp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bl
else
wined3d_texture_load(src_texture, context, FALSE);
context_apply_blit_state(context, device);
context_apply_ffp_blit_state(context, device);
if (dst_location == WINED3D_LOCATION_DRAWABLE)
{
......
......@@ -1653,7 +1653,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_texture *dst_texture, un
/* Activate the Proper context for reading from the source surface, set it up for blitting */
context = context_acquire(device, src_texture, src_sub_resource_idx);
gl_info = context->gl_info;
context_apply_blit_state(context, device);
context_apply_ffp_blit_state(context, device);
wined3d_texture_load(dst_texture, context, FALSE);
offscreen_buffer = context_get_offscreen_gl_buffer(context);
......@@ -2764,8 +2764,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
* unless we're overwriting it completely. */
wined3d_texture_load(src_texture, context, FALSE);
/* Activate the destination context, set it up for blitting. */
context_apply_blit_state(context, device);
context_apply_ffp_blit_state(context, device);
if (dst_location == WINED3D_LOCATION_DRAWABLE)
{
......@@ -2825,7 +2824,6 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
checkGLcall("glDisable(GL_ALPHA_TEST)");
}
/* Leave the OpenGL state valid for blitting. */
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
checkGLcall("glDisable(GL_TEXTURE_2D)");
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
......
......@@ -1911,7 +1911,9 @@ struct wined3d_context
DWORD transform_feedback_paused : 1;
DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */
DWORD clip_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */
DWORD padding : 9;
DWORD last_was_ffp_blit : 1;
DWORD padding : 8;
DWORD constant_update_mask;
DWORD numbered_array_mask;
GLenum tracking_parm; /* Which source is tracking current colour */
......@@ -2138,6 +2140,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
struct wined3d_resource *rt, unsigned int rt_sub_resource_idx,
struct wined3d_resource *ds, unsigned int ds_sub_resource_idx, DWORD location) DECLSPEC_HIDDEN;
void context_apply_ffp_blit_state(struct wined3d_context *context,
const struct wined3d_device *device) DECLSPEC_HIDDEN;
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
unsigned int unit) DECLSPEC_HIDDEN;
void context_bind_bo(struct wined3d_context *context, GLenum binding, GLuint name) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment