Commit 5d009230 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Remove some redundant fields from IWineD3DBaseTextureImpl.

parent 0b980876
...@@ -419,7 +419,7 @@ static void shader_hw_sample(SHADER_OPCODE_ARG* arg, DWORD sampler_idx, const ch ...@@ -419,7 +419,7 @@ static void shader_hw_sample(SHADER_OPCODE_ARG* arg, DWORD sampler_idx, const ch
/* Signedness correction */ /* Signedness correction */
if(!GL_SUPPORT(NV_TEXTURE_SHADER3) /* Provides signed formats */ && texture) { 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)) || if((format == WINED3DFMT_V8U8 && !GL_SUPPORT(ATI_ENVMAP_BUMPMAP)) ||
format == WINED3DFMT_Q8W8V8U8 || format == WINED3DFMT_Q8W8V8U8 ||
......
...@@ -191,7 +191,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface) { ...@@ -191,7 +191,7 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface) {
HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) {
TRACE("(%p) : returning invalid call\n", This); TRACE("(%p) : returning invalid call\n", This);
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
...@@ -203,7 +203,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture ...@@ -203,7 +203,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture
WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) { WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) {
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
FIXME("(%p) : stub\n", This); FIXME("(%p) : stub\n", This);
if (!(This->baseTexture.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) {
return WINED3DTEXF_NONE; return WINED3DTEXF_NONE;
} }
return This->baseTexture.filterType; return This->baseTexture.filterType;
......
...@@ -829,8 +829,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U ...@@ -829,8 +829,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
object->pow2scalingFactorY = (((float)Height) / ((float)pow2Height)); object->pow2scalingFactorY = (((float)Height) / ((float)pow2Height));
TRACE(" xf(%f) yf(%f)\n", object->pow2scalingFactorX, object->pow2scalingFactorY); TRACE(" xf(%f) yf(%f)\n", object->pow2scalingFactorX, object->pow2scalingFactorY);
object->baseTexture.format = Format;
/* Calculate levels for mip mapping */ /* Calculate levels for mip mapping */
if (Levels == 0) { if (Levels == 0) {
TRACE("calculating levels %d\n", object->baseTexture.levels); TRACE("calculating levels %d\n", object->baseTexture.levels);
...@@ -904,7 +902,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa ...@@ -904,7 +902,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
object->width = Width; object->width = Width;
object->height = Height; object->height = Height;
object->depth = Depth; object->depth = Depth;
object->baseTexture.format = Format;
/* Calculate levels for mip mapping */ /* Calculate levels for mip mapping */
if (Levels == 0) { if (Levels == 0) {
...@@ -1025,7 +1022,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface ...@@ -1025,7 +1022,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
/* TODO: support for native non-power 2 */ /* TODO: support for native non-power 2 */
/* Precalculated scaling for 'faked' non power of two texture coords */ /* Precalculated scaling for 'faked' non power of two texture coords */
object->pow2scalingFactor = ((float)EdgeLength) / ((float)pow2EdgeLength); object->pow2scalingFactor = ((float)EdgeLength) / ((float)pow2EdgeLength);
object->baseTexture.format = Format;
/* Calculate levels for mip mapping */ /* Calculate levels for mip mapping */
if (Levels == 0) { if (Levels == 0) {
......
...@@ -874,8 +874,6 @@ typedef struct IWineD3DBaseTextureClass ...@@ -874,8 +874,6 @@ typedef struct IWineD3DBaseTextureClass
{ {
UINT levels; UINT levels;
BOOL dirty; BOOL dirty;
WINED3DFORMAT format;
DWORD usage;
UINT textureName; UINT textureName;
UINT LOD; UINT LOD;
WINED3DTEXTUREFILTERTYPE filterType; WINED3DTEXTUREFILTERTYPE filterType;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment