Module: wine
Branch: master
Commit: e6ae272efee51dffa62ca75d4f909c8855edf950
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e6ae272efee51dffa62ca75d4…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Mon Apr 5 20:05:18 2010 +0200
wined3d: Due to code rewrites is_color_fixup_supported is not needed anymore in RealizePalette.
The code in question should be executed in all cases. This also fixes
palette refresh issues when shaders / paletted textures aren't around.
---
dlls/wined3d/surface.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6ced082..f0bd431 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4276,18 +4276,13 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface)
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
{
- IWineD3DDeviceImpl *device = This->resource.device;
- if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) &&
- device->blitter->color_fixup_supported(&device->adapter->gl_info, This->resource.format_desc->color_fixup))
+ if(This->resource.usage & WINED3DUSAGE_RENDERTARGET)
{
/* Make sure the texture is up to date. This call doesn't do anything if the texture is already up to date. */
IWineD3DSurface_LoadLocation(iface, SFLAG_INTEXTURE, NULL);
/* We want to force a palette refresh, so mark the drawable as not being up to date */
IWineD3DSurface_ModifyLocation(iface, SFLAG_INDRAWABLE, FALSE);
-
- /* Force a palette refresh by re-uploading to the drawable */
- IWineD3DSurface_LoadLocation(iface, SFLAG_INDRAWABLE, NULL);
} else {
if(!(This->Flags & SFLAG_INSYSMEM)) {
TRACE("Palette changed with surface that does not have an up to date system memory copy\n");
Module: wine
Branch: master
Commit: a5a4be4fc54bb4bfb860bdfd98cd241785027797
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5a4be4fc54bb4bfb860bdfd9…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Mon Apr 5 20:05:16 2010 +0200
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.
---
dlls/wined3d/surface.c | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 95889e4..a863372 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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;
Module: wine
Branch: master
Commit: 9fec1a02b9e13969f929a3eed249e67773286033
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9fec1a02b9e13969f929a3eed…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Mon Apr 5 20:05:15 2010 +0200
wined3d: Disable paletted texture support. It was only offered on a few cards, so can be missed.
---
dlls/wined3d/directx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 581d6c7..5501899 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3404,12 +3404,12 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter,
return FALSE;
/*****
- * supported: Palettized
+ * Not supported: Palettized
+ * Only some Geforce/Voodoo3/G400 cards offer 8-bit textures in case of <=Direct3D7.
+ * Since it is not widely available, don't offer it. Further no Windows driver offers
+ * WINED3DFMT_P8_UINT_A8_NORM, so don't offer it either.
*/
case WINED3DFMT_P8_UINT:
- TRACE_(d3d_caps)("[OK]\n");
- return TRUE;
- /* No Windows driver offers WINED3DFMT_P8_UINT_A8_UNORM, so don't offer it either */
case WINED3DFMT_P8_UINT_A8_UNORM:
return FALSE;