wined3d: Disable framebuffer to texture blitting.
The current code doesn't work for this at all and causes major rendering issues in e.g. C&C. I don't think we should fix this code either since it isn't worth the effort and requires evil things like paletteOverride.
This commit is contained in:
parent
9fec1a02b9
commit
a5a4be4fc5
|
@ -3894,7 +3894,14 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
|||
if((srcSwapchain || SrcSurface == myDevice->render_targets[0]) && !dstSwapchain) {
|
||||
/* Blit from render target to texture */
|
||||
BOOL stretchx;
|
||||
BOOL paletteOverride = FALSE;
|
||||
|
||||
/* P8 read back is not implemented */
|
||||
if (Src->resource.format_desc->format == WINED3DFMT_P8_UINT ||
|
||||
This->resource.format_desc->format == WINED3DFMT_P8_UINT)
|
||||
{
|
||||
TRACE("P8 read back not supported by frame buffer to texture blit\n");
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if(Flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE)) {
|
||||
TRACE("Color keying not supported by frame buffer to texture blit\n");
|
||||
|
@ -3908,15 +3915,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
|||
stretchx = FALSE;
|
||||
}
|
||||
|
||||
/* When blitting from a render target a texture, the texture isn't required to have a palette.
|
||||
* In this case grab the palette from the render target. */
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT && !This->palette)
|
||||
{
|
||||
paletteOverride = TRUE;
|
||||
TRACE("Source surface (%p) lacks palette, overriding palette with palette %p of destination surface (%p)\n", Src, This->palette, This);
|
||||
This->palette = Src->palette;
|
||||
}
|
||||
|
||||
/* Blt is a pretty powerful call, while glCopyTexSubImage2D is not. glCopyTexSubImage cannot
|
||||
* flip the image nor scale it.
|
||||
*
|
||||
|
@ -3947,10 +3945,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
|||
fb_copy_to_texture_hwstretch(This, SrcSurface, &src_rect, &dst_rect, Filter);
|
||||
}
|
||||
|
||||
/* Clear the palette as the surface didn't have a palette attached, it would confuse GetPalette and other calls */
|
||||
if(paletteOverride)
|
||||
This->palette = NULL;
|
||||
|
||||
if(!(This->Flags & SFLAG_DONOTFREE)) {
|
||||
HeapFree(GetProcessHeap(), 0, This->resource.heapMemory);
|
||||
This->resource.allocatedMemory = NULL;
|
||||
|
|
Loading…
Reference in New Issue