mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added wined3d-WINED3DFMT_B8G8R8X8_UNORM patchset
This commit is contained in:
parent
77ecb8ba3f
commit
7993325086
@ -370,6 +370,7 @@ patch_enable_all ()
|
||||
enable_wined3d_QUERY_Stubs="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
enable_wined3d_UAV_Counters="$1"
|
||||
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$1"
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1"
|
||||
enable_wined3d_texture_blt_device="$1"
|
||||
enable_wined3d_wined3d_guess_gl_vendor="$1"
|
||||
@ -1284,6 +1285,9 @@ patch_enable ()
|
||||
wined3d-UAV_Counters)
|
||||
enable_wined3d_UAV_Counters="$2"
|
||||
;;
|
||||
wined3d-WINED3DFMT_B8G8R8X8_UNORM)
|
||||
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$2"
|
||||
;;
|
||||
wined3d-WINED3D_RS_COLORWRITEENABLE)
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$2"
|
||||
;;
|
||||
@ -7618,6 +7622,21 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-WINED3DFMT_B8G8R8X8_UNORM
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#44888] Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/surface.c
|
||||
# |
|
||||
if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -eq 1; then
|
||||
patch_apply wined3d-WINED3DFMT_B8G8R8X8_UNORM/0001-wined3d-Implement-WINED3DFMT_B8G8R8X8_UNORM-to-WINED.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Stanislav Zhukov", "wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-texture-blt-device
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,52 @@
|
||||
From e2d79a523dba80544b4358a60b5f248f74eb4c00 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Zhukov <koncord@tes3mp.com>
|
||||
Date: Wed, 11 Jul 2018 09:33:19 +1000
|
||||
Subject: [PATCH] wined3d: Implement WINED3DFMT_B8G8R8X8_UNORM to
|
||||
WINED3DFMT_L8_UNORM conversion.
|
||||
|
||||
Signed-off-by: Stanislav Zhukov <koncord@tes3mp.com>
|
||||
---
|
||||
dlls/wined3d/surface.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index f9e3af37ff4..6ad7bb94573 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -919,6 +919,25 @@ static void convert_x8r8g8b8_dxt5(const BYTE *src, BYTE *dst,
|
||||
wined3d_dxt5_encode(src, dst, pitch_in, pitch_out, WINED3DFMT_B8G8R8X8_UNORM, w, h);
|
||||
}
|
||||
|
||||
+static void convert_x8r8g8b8_l8(const BYTE *src, BYTE *dst,
|
||||
+ DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h)
|
||||
+{
|
||||
+ unsigned int x, y;
|
||||
+
|
||||
+ TRACE("Converting %ux%u pixels, pitches %u %u.\n", w, h, pitch_in, pitch_out);
|
||||
+
|
||||
+ for (y = 0; y < h; ++y)
|
||||
+ {
|
||||
+ const DWORD *src_line = (const DWORD *)(src + y * pitch_in);
|
||||
+ BYTE *dst_line = (BYTE *)(dst + y * pitch_out);
|
||||
+
|
||||
+ for (x = 0; x < w; ++x)
|
||||
+ {
|
||||
+ dst_line[x] = src_line[x] & 0x000000ff;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
struct d3dfmt_converter_desc
|
||||
{
|
||||
enum wined3d_format_id from, to;
|
||||
@@ -933,6 +952,7 @@ static const struct d3dfmt_converter_desc converters[] =
|
||||
{WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_B8G8R8A8_UNORM, convert_a8r8g8b8_x8r8g8b8},
|
||||
{WINED3DFMT_YUY2, WINED3DFMT_B8G8R8X8_UNORM, convert_yuy2_x8r8g8b8},
|
||||
{WINED3DFMT_YUY2, WINED3DFMT_B5G6R5_UNORM, convert_yuy2_r5g6b5},
|
||||
+ {WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_L8_UNORM, convert_x8r8g8b8_l8},
|
||||
};
|
||||
|
||||
static const struct d3dfmt_converter_desc dxtn_converters[] =
|
||||
--
|
||||
2.18.0
|
||||
|
1
patches/wined3d-WINED3DFMT_B8G8R8X8_UNORM/definition
Normal file
1
patches/wined3d-WINED3DFMT_B8G8R8X8_UNORM/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [44888] Implement WINED3DFMT_B8G8R8X8_UNORM to WINED3DFMT_L8_UNORM conversion
|
Loading…
Reference in New Issue
Block a user