mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against 5e8eb5f4c54c3a6d3c92fd414372da2fbd5bd91a
This commit is contained in:
parent
5b066d6aed
commit
6be963ebfd
@ -1,53 +0,0 @@
|
||||
From 5d633f126af17add8eaefc10c08e400616ff5fc9 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 4 Nov 2014 22:22:03 +0100
|
||||
Subject: [PATCH] d3dx9_36: Align texture dimensions to block size for
|
||||
compressed textures in D3DXCheckTextureRequirements.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/texture.c | 9 +++++++++
|
||||
dlls/d3dx9_36/texture.c | 8 ++++----
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
|
||||
index fc1589d25e..93a7fcd911 100644
|
||||
--- a/dlls/d3dx9_36/tests/texture.c
|
||||
+++ b/dlls/d3dx9_36/tests/texture.c
|
||||
@@ -448,6 +448,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
|
||||
ok(width == 4, "Got unexpected width %d.\n", width);
|
||||
ok(height == 4, "Got unexpected height %d.\n", height);
|
||||
ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format);
|
||||
+
|
||||
+ width = 5; height = 5;
|
||||
+ mipmaps = 1;
|
||||
+ hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
|
||||
+ ok(hr == D3D_OK, "D3DXCheckTextureRequirements returned %#x, expected %#x\n", hr, D3D_OK);
|
||||
+ ok(width == 8, "Returned width %d, expected %d\n", width, 8);
|
||||
+ ok(height == 8, "Returned height %d, expected %d\n", height, 8);
|
||||
+ ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
|
||||
+ ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 4ae924999e..a592b7ba1e 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -339,10 +339,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)))
|
||||
--
|
||||
2.21.0
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "b360cd67e8f7f8c01f09457bacb032fd4a248d0a"
|
||||
echo "5e8eb5f4c54c3a6d3c92fd414372da2fbd5bd91a"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -117,7 +117,6 @@ patch_enable_all ()
|
||||
enable_d3dx9_36_DrawText="$1"
|
||||
enable_d3dx9_36_Filter_Warnings="$1"
|
||||
enable_d3dx9_36_Optimize_Inplace="$1"
|
||||
enable_d3dx9_36_Texture_Align="$1"
|
||||
enable_d3dx9_36_UpdateSkinnedMesh="$1"
|
||||
enable_dbghelp_Debug_Symbols="$1"
|
||||
enable_ddraw_Device_Caps="$1"
|
||||
@ -475,9 +474,6 @@ patch_enable ()
|
||||
d3dx9_36-Optimize_Inplace)
|
||||
enable_d3dx9_36_Optimize_Inplace="$2"
|
||||
;;
|
||||
d3dx9_36-Texture_Align)
|
||||
enable_d3dx9_36_Texture_Align="$2"
|
||||
;;
|
||||
d3dx9_36-UpdateSkinnedMesh)
|
||||
enable_d3dx9_36_UpdateSkinnedMesh="$2"
|
||||
;;
|
||||
@ -2805,18 +2801,6 @@ if test "$enable_d3dx9_36_Optimize_Inplace" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3dx9_36-Texture_Align
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/tests/texture.c, dlls/d3dx9_36/texture.c
|
||||
# |
|
||||
if test "$enable_d3dx9_36_Texture_Align" -eq 1; then
|
||||
patch_apply d3dx9_36-Texture_Align/0001-d3dx9_36-Align-texture-dimensions-to-block-size-for-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Align texture dimensions to block size for compressed textures in D3DXCheckTextureRequirements.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3dx9_36-UpdateSkinnedMesh
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user