wined3d: Move texture filter lookup table initialization to basetexture_init().
This commit is contained in:
parent
351d6de818
commit
a86f31658b
|
@ -48,6 +48,17 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DR
|
||||||
texture->baseTexture.is_srgb = FALSE;
|
texture->baseTexture.is_srgb = FALSE;
|
||||||
texture->baseTexture.pow2Matrix_identity = TRUE;
|
texture->baseTexture.pow2Matrix_identity = TRUE;
|
||||||
|
|
||||||
|
if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
|
||||||
|
{
|
||||||
|
texture->baseTexture.minMipLookup = minMipLookup;
|
||||||
|
texture->baseTexture.magLookup = magLookup;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
|
||||||
|
texture->baseTexture.magLookup = magLookup_noFilter;
|
||||||
|
}
|
||||||
|
|
||||||
return WINED3D_OK;
|
return WINED3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,17 +192,6 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup;
|
|
||||||
texture->baseTexture.magLookup = magLookup;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
|
|
||||||
texture->baseTexture.magLookup = magLookup_noFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Find the nearest pow2 match. */
|
/* Find the nearest pow2 match. */
|
||||||
pow2_edge_length = 1;
|
pow2_edge_length = 1;
|
||||||
while (pow2_edge_length < edge_length) pow2_edge_length <<= 1;
|
while (pow2_edge_length < edge_length) pow2_edge_length <<= 1;
|
||||||
|
|
|
@ -197,17 +197,6 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup;
|
|
||||||
texture->baseTexture.magLookup = magLookup;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
|
|
||||||
texture->baseTexture.magLookup = magLookup_noFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Precalculated scaling for 'faked' non power of two texture coords.
|
/* Precalculated scaling for 'faked' non power of two texture coords.
|
||||||
* Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
|
* Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE
|
||||||
* is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
|
* is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
|
||||||
|
|
|
@ -150,17 +150,6 @@ HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING)
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup;
|
|
||||||
texture->baseTexture.magLookup = magLookup;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
|
|
||||||
texture->baseTexture.magLookup = magLookup_noFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is NP2 support for volumes needed? */
|
/* Is NP2 support for volumes needed? */
|
||||||
texture->baseTexture.pow2Matrix[0] = 1.0f;
|
texture->baseTexture.pow2Matrix[0] = 1.0f;
|
||||||
texture->baseTexture.pow2Matrix[5] = 1.0f;
|
texture->baseTexture.pow2Matrix[5] = 1.0f;
|
||||||
|
|
Loading…
Reference in New Issue