wined3d: Set the viewport to the texture size in depth_blt().
This commit is contained in:
parent
16f38d7481
commit
81effcf30d
|
@ -708,11 +708,11 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, WineDirect3DVertexStridedDa
|
|||
glEnd();
|
||||
}
|
||||
|
||||
void depth_blt(IWineD3DDevice *iface, GLuint texture) {
|
||||
void depth_blt(IWineD3DDevice *iface, GLuint texture, GLsizei w, GLsizei h) {
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
|
||||
GLint old_binding = 0;
|
||||
|
||||
glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||
glPushAttrib(GL_ENABLE_BIT | GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_VIEWPORT_BIT);
|
||||
|
||||
glDisable(GL_CULL_FACE);
|
||||
glEnable(GL_BLEND);
|
||||
|
@ -723,6 +723,7 @@ void depth_blt(IWineD3DDevice *iface, GLuint texture) {
|
|||
glDepthFunc(GL_ALWAYS);
|
||||
glDepthMask(GL_TRUE);
|
||||
glBlendFunc(GL_ZERO, GL_ONE);
|
||||
glViewport(0, 0, w, h);
|
||||
|
||||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
|
||||
glGetIntegerv(GL_TEXTURE_BINDING_2D, &old_binding);
|
||||
|
|
|
@ -3995,7 +3995,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
|
|||
attach_depth_stencil_fbo(device, GL_FRAMEBUFFER_EXT, iface, FALSE);
|
||||
|
||||
/* Do the actual blit */
|
||||
depth_blt((IWineD3DDevice *)device, device->depth_blt_texture);
|
||||
depth_blt((IWineD3DDevice *)device, device->depth_blt_texture, This->currentDesc.Width, This->currentDesc.Height);
|
||||
checkGLcall("depth_blt");
|
||||
|
||||
if (device->render_offscreen) {
|
||||
|
@ -4017,7 +4017,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
|
|||
|
||||
GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0));
|
||||
checkGLcall("glBindFramebuffer()");
|
||||
depth_blt((IWineD3DDevice *)device, This->glDescription.textureName);
|
||||
depth_blt((IWineD3DDevice *)device, This->glDescription.textureName, This->currentDesc.Width, This->currentDesc.Height);
|
||||
checkGLcall("depth_blt");
|
||||
|
||||
if (device->render_offscreen) {
|
||||
|
|
|
@ -785,7 +785,11 @@ struct ffp_settings {
|
|||
FOG_EXP,
|
||||
FOG_EXP2
|
||||
} fog;
|
||||
unsigned char sRGB_write;
|
||||
/* Use an int instead of a char to get dword alignment. gcc tends to align the
|
||||
* size of the whole structure, so there are 3 padding bytes. These remain
|
||||
* uninitialized in the construction function and cause confusion in the hashmap
|
||||
*/
|
||||
unsigned int sRGB_write;
|
||||
};
|
||||
|
||||
struct ffp_desc
|
||||
|
@ -2516,6 +2520,6 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
|
|||
void bind_fbo(IWineD3DDevice *iface, GLenum target, GLuint *fbo);
|
||||
void attach_depth_stencil_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer);
|
||||
void attach_surface_fbo(IWineD3DDeviceImpl *This, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface);
|
||||
void depth_blt(IWineD3DDevice *iface, GLuint texture);
|
||||
void depth_blt(IWineD3DDevice *iface, GLuint texture, GLsizei w, GLsizei h);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue