Module: wine Branch: master Commit: 5d00923017453ad2b919d4d96511f2b624fba190 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5d00923017453ad2b919d4d965...
Author: H. Verbeet hverbeet@gmail.com Date: Thu May 3 21:00:25 2007 +0200
wined3d: Remove some redundant fields from IWineD3DBaseTextureImpl.
---
dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/basetexture.c | 4 ++-- dlls/wined3d/device.c | 4 ---- dlls/wined3d/wined3d_private.h | 2 -- 4 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 7faf45c..be66033 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -419,7 +419,7 @@ static void shader_hw_sample(SHADER_OPCODE_ARG* arg, DWORD sampler_idx, const ch
/* Signedness correction */ if(!GL_SUPPORT(NV_TEXTURE_SHADER3) /* Provides signed formats */ && texture) { - WINED3DFORMAT format = texture->baseTexture.format; + WINED3DFORMAT format = texture->resource.format;
if((format == WINED3DFMT_V8U8 && !GL_SUPPORT(ATI_ENVMAP_BUMPMAP)) || format == WINED3DFMT_Q8W8V8U8 || diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index d01847f..3faac87 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -191,7 +191,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface) { HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
- if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { + if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { TRACE("(%p) : returning invalid call\n", This); return WINED3DERR_INVALIDCALL; } @@ -203,7 +203,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) { IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; FIXME("(%p) : stub\n", This); - if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { + if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { return WINED3DTEXF_NONE; } return This->baseTexture.filterType; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e80614e..b581afb 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -829,8 +829,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U object->pow2scalingFactorY = (((float)Height) / ((float)pow2Height)); TRACE(" xf(%f) yf(%f)\n", object->pow2scalingFactorX, object->pow2scalingFactorY);
- object->baseTexture.format = Format; - /* Calculate levels for mip mapping */ if (Levels == 0) { TRACE("calculating levels %d\n", object->baseTexture.levels); @@ -904,7 +902,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa object->width = Width; object->height = Height; object->depth = Depth; - object->baseTexture.format = Format;
/* Calculate levels for mip mapping */ if (Levels == 0) { @@ -1025,7 +1022,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface /* TODO: support for native non-power 2 */ /* Precalculated scaling for 'faked' non power of two texture coords */ object->pow2scalingFactor = ((float)EdgeLength) / ((float)pow2EdgeLength); - object->baseTexture.format = Format;
/* Calculate levels for mip mapping */ if (Levels == 0) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 80f1751..d0870b4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -874,8 +874,6 @@ typedef struct IWineD3DBaseTextureClass { UINT levels; BOOL dirty; - WINED3DFORMAT format; - DWORD usage; UINT textureName; UINT LOD; WINED3DTEXTUREFILTERTYPE filterType;