From 3f43238b01b64beb2bfc59f62668405703be01a0 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 12 Feb 2020 11:49:28 +0300 Subject: [PATCH] Restore d3dx9_36-BumpLuminance patch 0002. --- ...mat-description-for-X8L8V8U8-for-for.patch | 24 +++++++++++++++++++ patches/d3dx9_36-BumpLuminance/definition | 1 + patches/patchinstall.sh | 16 +++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch create mode 100644 patches/d3dx9_36-BumpLuminance/definition diff --git a/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch b/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch new file mode 100644 index 00000000..d3171f52 --- /dev/null +++ b/patches/d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch @@ -0,0 +1,24 @@ +From 170a6d9df910f617585791df31aa72b79622ed0b Mon Sep 17 00:00:00 2001 +From: Christian Costa +Date: Mon, 16 May 2016 13:20:39 +0200 +Subject: d3dx9_36: Add format description for X8L8V8U8 for format conversions. + +--- + dlls/d3dx9_36/util.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/dlls/d3dx9_36/util.c b/dlls/d3dx9_36/util.c +index d8cd43a..12b9c2c 100644 +--- a/dlls/d3dx9_36/util.c ++++ b/dlls/d3dx9_36/util.c +@@ -90,6 +90,7 @@ static const struct pixel_format_desc formats[] = + {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, ++ {D3DFMT_X8L8V8U8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + /* marks last element */ + {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL }, + }; +-- +2.8.0 + diff --git a/patches/d3dx9_36-BumpLuminance/definition b/patches/d3dx9_36-BumpLuminance/definition new file mode 100644 index 00000000..c99a5b22 --- /dev/null +++ b/patches/d3dx9_36-BumpLuminance/definition @@ -0,0 +1 @@ +Fixes: Recognize bump luminance X8L8V8U8 when loading dds file diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 716e0ac6..cbab1312 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -102,6 +102,7 @@ patch_enable_all () enable_cryptext_CryptExtOpenCER="$1" enable_d3d11_Deferred_Context="$1" enable_d3dx9_32bpp_Alpha_Channel="$1" + enable_d3dx9_36_BumpLuminance="$1" enable_d3dx9_36_CloneEffect="$1" enable_d3dx9_36_D3DXDisassembleShader="$1" enable_d3dx9_36_D3DXOptimizeVertices="$1" @@ -420,6 +421,9 @@ patch_enable () d3dx9-32bpp_Alpha_Channel) enable_d3dx9_32bpp_Alpha_Channel="$2" ;; + d3dx9_36-BumpLuminance) + enable_d3dx9_36_BumpLuminance="$2" + ;; d3dx9_36-CloneEffect) enable_d3dx9_36_CloneEffect="$2" ;; @@ -2555,6 +2559,18 @@ if test "$enable_d3dx9_32bpp_Alpha_Channel" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_36-BumpLuminance +# | +# | Modified files: +# | * dlls/d3dx9_36/util.c +# | +if test "$enable_d3dx9_36_BumpLuminance" -eq 1; then + patch_apply d3dx9_36-BumpLuminance/0002-d3dx9_36-Add-format-description-for-X8L8V8U8-for-for.patch + ( + printf '%s\n' '+ { "Christian Costa", "d3dx9_36: Add format description for X8L8V8U8 for format conversions.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_36-CloneEffect # | # | This patchset fixes the following Wine bugs: