diff --git a/patches/d3d9-Tests/0001-d3d9-tests-Avoid-test-failures-on-specific-Nvidia-graphic-.patch b/patches/d3d9-Tests/0001-d3d9-tests-Avoid-test-failures-on-specific-Nvidia-graphic-.patch new file mode 100644 index 00000000..d2946d83 --- /dev/null +++ b/patches/d3d9-Tests/0001-d3d9-tests-Avoid-test-failures-on-specific-Nvidia-graphic-.patch @@ -0,0 +1,61 @@ +From a568780e076f43ab5a7f07c4eb963e7777f84255 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Sun, 15 May 2016 17:05:15 +0200 +Subject: d3d9/tests: Avoid test failures on specific Nvidia graphic cards. + +--- + dlls/d3d9/tests/visual.c | 24 +++++++++++++----------- + 1 file changed, 13 insertions(+), 11 deletions(-) + +diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c +index a308311..c3de15e 100644 +--- a/dlls/d3d9/tests/visual.c ++++ b/dlls/d3d9/tests/visual.c +@@ -14923,6 +14923,7 @@ static void fp_special_test(void) + D3DCOLOR nv40; + D3DCOLOR nv50; + D3DCOLOR warp; ++ D3DCOLOR todo; + } + vs_body[] = + { +@@ -14939,17 +14940,17 @@ static void fp_special_test(void) + * There are considerable differences between graphics cards in how + * these are handled, but pow and nrm never generate INF or NAN on + * real hardware. */ +- {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, +- {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff, 0x00008000}, +- {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000, 0x00008000}, +- {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, +- {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, +- {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, +- {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, +- {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000}, +- {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00, 0x00008000}, +- {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, +- {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, ++ {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U}, ++ {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff, 0x00008000, ~0U}, ++ {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000, 0x00008000, ~0U}, ++ {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000}, ++ {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U}, ++ {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000}, ++ {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000}, ++ {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, ~0U}, ++ {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00, 0x00008000, 0x00000000}, ++ {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00, 0x00ff8000, ~0U}, ++ {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00, 0x00ff8000, 0x00ff0000}, + }; + + static const DWORD ps_code[] = +@@ -15068,6 +15069,7 @@ static void fp_special_test(void) + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + color = getPixelColor(device, 320, 240); ++ todo_wine_if(vs_body[i].todo != ~0U && color_match(color, vs_body[i].todo, 1)) + ok(color_match(color, vs_body[i].r500, 1) + || color_match(color, vs_body[i].r600, 1) + || color_match(color, vs_body[i].nv40, 1) +-- +2.8.0 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 142a8aa4..08ab4842 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -104,6 +104,7 @@ patch_enable_all () enable_d3d9_DesktopWindow="$1" enable_d3d9_Skip_Tests="$1" enable_d3d9_Surface_Refcount="$1" + enable_d3d9_Tests="$1" enable_d3dx9_24_ID3DXEffect="$1" enable_d3dx9_25_ID3DXEffect="$1" enable_d3dx9_26_ID3DXEffect="$1" @@ -483,6 +484,9 @@ patch_enable () d3d9-Surface_Refcount) enable_d3d9_Surface_Refcount="$2" ;; + d3d9-Tests) + enable_d3d9_Tests="$2" + ;; d3dx9_24-ID3DXEffect) enable_d3dx9_24_ID3DXEffect="$2" ;; @@ -2846,6 +2850,18 @@ if test "$enable_d3d9_Surface_Refcount" -eq 1; then ) >> "$patchlist" fi +# Patchset d3d9-Tests +# | +# | Modified files: +# | * dlls/d3d9/tests/visual.c +# | +if test "$enable_d3d9_Tests" -eq 1; then + patch_apply d3d9-Tests/0001-d3d9-tests-Avoid-test-failures-on-specific-Nvidia-graphic-.patch + ( + echo '+ { "Sebastian Lackner", "d3d9/tests: Avoid test failures on specific Nvidia graphic cards.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_25-ID3DXEffect # | # | This patchset fixes the following Wine bugs: