Roderick Colenbrander : wined3d: Get rid of d3dfmt_get_conv in RealizePalette.
Alexandre Julliard
julliard at winehq.org
Fri Mar 19 11:16:39 CDT 2010
Module: wine
Branch: master
Commit: fb8812db8945c23eeb6655cc94f6c36d7d15d05f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fb8812db8945c23eeb6655cc94f6c36d7d15d05f
Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Thu Mar 18 23:59:02 2010 +0100
wined3d: Get rid of d3dfmt_get_conv in RealizePalette.
---
dlls/wined3d/surface.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index de19c48..bdc7b1f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4355,19 +4355,10 @@ 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)
{
- int bpp;
- GLenum format, internal, type;
- CONVERT_TYPES convert;
-
- /* Check if we are using a RTL mode which uses texturing for uploads */
- BOOL use_texture = (wined3d_settings.rendertargetlock_mode == RTL_READTEX);
-
- /* Check if we have hardware palette conversion if we have convert is set to NO_CONVERSION */
- d3dfmt_get_conv(This, TRUE, use_texture, &format, &internal, &type, &convert, &bpp, FALSE);
-
- if((This->resource.usage & WINED3DUSAGE_RENDERTARGET) && (convert == NO_CONVERSION))
+ 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))
{
- IWineD3DDeviceImpl *device = This->resource.device;
struct wined3d_context *context;
/* Make sure the texture is up to date. This call doesn't do anything if the texture is already up to date. */
@@ -4378,7 +4369,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface)
/* Re-upload the palette */
context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
- d3dfmt_p8_upload_palette(iface, context->gl_info, convert);
+ d3dfmt_p8_upload_palette(iface, context->gl_info, NO_CONVERSION);
context_release(context);
} else {
if(!(This->Flags & SFLAG_INSYSMEM)) {
More information about the wine-cvs
mailing list