Commit 8a002b09 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: arbfp_set_shader_blit should handle ENTER_GL/LEAVE_GL instead of the caller.

parent 06076371
......@@ -3662,8 +3662,10 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t
glDesc->conversion_group != WINED3DFMT_YV12) {
TRACE("Format: %s\n", debug_d3dformat(glDesc->conversion_group));
/* Don't bother setting up a shader for unconverted formats */
ENTER_GL();
glEnable(textype);
checkGLcall("glEnable(textype)");
LEAVE_GL();
return WINED3D_OK;
}
......@@ -3691,12 +3693,14 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t
shader = gen_yuv_shader(device, glDesc->conversion_group, textype);
}
ENTER_GL();
glEnable(GL_FRAGMENT_PROGRAM_ARB);
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB)");
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader));
checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader)");
GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, size));
checkGLcall("glProgramLocalParameter4fvARB");
LEAVE_GL();
return WINED3D_OK;
}
......
......@@ -3485,10 +3485,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
rect.y1 += This->currentDesc.Height - h; rect.y2 += This->currentDesc.Height - h;
}
ENTER_GL();
myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format,
Src->glDescription.target, Src->pow2Width, Src->pow2Height);
ENTER_GL();
/* Bind the texture */
glBindTexture(Src->glDescription.target, Src->glDescription.textureName);
checkGLcall("glBindTexture");
......
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