From e3bcc7544c40dc386868aba21b8506d0bd649db3 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 12 Mar 2009 09:53:15 +0100 Subject: [PATCH] wined3d: Remove the shader_color_fixup field from IWineD3DBaseTextureClass. This is redundant now. --- dlls/wined3d/device.c | 3 --- dlls/wined3d/pixelshader.c | 2 +- dlls/wined3d/utils.c | 2 +- dlls/wined3d/wined3d_private.h | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 683c9f427e2..52df212d93f 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1067,7 +1067,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, tmpW = max(1, tmpW >> 1); tmpH = max(1, tmpH >> 1); } - object->baseTexture.shader_color_fixup = object->resource.format_desc->color_fixup; object->baseTexture.internal_preload = texture_internal_preload; TRACE("(%p) : Created texture %p\n", This, object); @@ -1188,7 +1187,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa tmpH = max(1, tmpH >> 1); tmpD = max(1, tmpD >> 1); } - object->baseTexture.shader_color_fixup = object->resource.format_desc->color_fixup; object->baseTexture.internal_preload = volumetexture_internal_preload; *ppVolumeTexture = (IWineD3DVolumeTexture *) object; @@ -1386,7 +1384,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface } tmpW = max(1, tmpW >> 1); } - object->baseTexture.shader_color_fixup = object->resource.format_desc->color_fixup; object->baseTexture.internal_preload = cubetexture_internal_preload; TRACE("(%p) : Created Cube Texture %p\n", This, object); diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 3d326353e61..68dd80162fc 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -468,7 +468,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp args->color_fixup[i] = COLOR_FIXUP_IDENTITY; continue; } - args->color_fixup[i] = tex->baseTexture.shader_color_fixup; + args->color_fixup[i] = tex->resource.format_desc->color_fixup; } if (shader->baseShader.reg_maps.shader_version >= WINED3DPS_VERSION(3,0)) { diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6d19010332b..e6a6de0b034 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2105,7 +2105,7 @@ void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_setting texture = (IWineD3DBaseTextureImpl *) stateblock->textures[i]; if(texture) { - settings->op[i].color_fixup = texture->baseTexture.shader_color_fixup; + settings->op[i].color_fixup = texture->resource.format_desc->color_fixup; if(ignore_textype) { settings->op[i].tex_type = tex_1d; } else { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8ed82fc2fa6..570ab7f7b92 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1336,7 +1336,6 @@ typedef struct IWineD3DBaseTextureClass BOOL is_srgb; const struct min_lookup *minMipLookup; const GLenum *magLookup; - struct color_fixup_desc shader_color_fixup; void (*internal_preload)(IWineD3DBaseTexture *iface, enum WINED3DSRGB srgb); } IWineD3DBaseTextureClass;