mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
[WINESYNC]d3dx9_36: Align texture dimensions to block size for compressed textures in D3DXCheckTextureRequirements.
wine-staging patch by Christian Costa <titan.costa@gmail.com>
This commit is contained in:
parent
afac88c50e
commit
81c78a0a6b
3 changed files with 54 additions and 4 deletions
|
@ -335,10 +335,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN
|
|||
|
||||
if (fmt->block_width != 1 || fmt->block_height != 1)
|
||||
{
|
||||
if (w < fmt->block_width)
|
||||
w = fmt->block_width;
|
||||
if (h < fmt->block_height)
|
||||
h = fmt->block_height;
|
||||
if (w % fmt->block_width)
|
||||
w += fmt->block_width - w % fmt->block_width;
|
||||
if (h % fmt->block_height)
|
||||
h += fmt->block_height - h % fmt->block_height;
|
||||
}
|
||||
|
||||
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue