[PATCH 0/6] MR11746: d3dx test fixes
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dx10_43/tests/d3dx10.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index c759a5fb35b..b2a02fd74ce 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -5047,21 +5047,19 @@ static void test_dxt10_dds_header_image_info(void) D3D10_RESOURCE_DIMENSION_TEXTURE2D } }, - /* Resource dimension is validated for cube textures. */ - { - 0, 4, 4, 1, (4 * 4), 1, 0, 0, - { DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSION_TEXTURE3D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, - (4 * 4 * 4 * 12), { E_FAIL } - }, - /* - * 10. - * 1D Texture cube, invalid. - */ - { - 0, 4, 4, 1, (4 * 4), 1, 0, 0, - { DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSION_TEXTURE1D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, - (4 * 4 * 4 * 12), { E_FAIL } - }, + /* Resource dimension is not necessarily validated for cube textures, + * it sporadically crashes on Windows. */ + /* { */ + /* 0, 4, 4, 1, (4 * 4), 1, 0, 0, */ + /* { DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSION_TEXTURE3D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, */ + /* (4 * 4 * 4 * 12), { E_FAIL } */ + /* }, */ + /* 1D Texture cube, invalid. */ + /* { */ + /* 0, 4, 4, 1, (4 * 4), 1, 0, 0, */ + /* { DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSION_TEXTURE1D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, */ + /* (4 * 4 * 4 * 12), { E_FAIL } */ + /* }, */ }; D3DX10_IMAGE_INFO info; unsigned int i; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dx11_43/tests/d3dx11.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c index bdf34daa761..70ccd0d116c 100644 --- a/dlls/d3dx11_43/tests/d3dx11.c +++ b/dlls/d3dx11_43/tests/d3dx11.c @@ -3564,21 +3564,19 @@ static void test_dxt10_dds_header_image_info(void) D3D11_RESOURCE_DIMENSION_TEXTURE2D } }, - /* Resource dimension is validated for cube textures. */ - { - 0, 4, 4, 1, (4 * 4), 1, 0, 0, - { DXGI_FORMAT_R8G8B8A8_UNORM, D3D11_RESOURCE_DIMENSION_TEXTURE3D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, - (4 * 4 * 4 * 12), { E_FAIL } - }, - /* - * 10. - * 1D Texture cube, invalid. - */ - { - 0, 4, 4, 1, (4 * 4), 1, 0, 0, - { DXGI_FORMAT_R8G8B8A8_UNORM, D3D11_RESOURCE_DIMENSION_TEXTURE1D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, - (4 * 4 * 4 * 12), { E_FAIL } - }, + /* Resource dimension is not necessarily validated for cube textures, + * it sporadically crashes on Windows. */ + /* { */ + /* 0, 4, 4, 1, (4 * 4), 1, 0, 0, */ + /* { DXGI_FORMAT_R8G8B8A8_UNORM, D3D10_RESOURCE_DIMENSION_TEXTURE3D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, */ + /* (4 * 4 * 4 * 12), { E_FAIL } */ + /* }, */ + /* 1D Texture cube, invalid. */ + /* { */ + /* 0, 4, 4, 1, (4 * 4), 1, 0, 0, */ + /* { DXGI_FORMAT_R8G8B8A8_UNORM, D3D11_RESOURCE_DIMENSION_TEXTURE1D, DDS_RESOURCE_MISC_TEXTURECUBE, 2, 0, }, */ + /* (4 * 4 * 4 * 12), { E_FAIL } */ + /* }, */ }; D3DX11_IMAGE_INFO info; unsigned int i; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dx10_43/tests/d3dx10.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/dlls/d3dx10_43/tests/d3dx10.c b/dlls/d3dx10_43/tests/d3dx10.c index b2a02fd74ce..77d0749409d 100644 --- a/dlls/d3dx10_43/tests/d3dx10.c +++ b/dlls/d3dx10_43/tests/d3dx10.c @@ -6153,41 +6153,33 @@ static void test_dxt_formats(void) static void test_srgb_filter_flags(void) { + /* + * An input value > 1.0f being converted from SRGB to linear produces + * quite a few different values depending on the SDK version, and + * sometimes changes run to run. Presumably it's reading beyond the end of + * a LUT, values above ~106.0f will cause a crash on all versions and + * bitnesses. + */ static const float test_float4_srgb_in[] = { 0.09f, 0.1f, 0.2f, 1.0f, 0.30f, 0.4f, 0.5f, 2.0f, 0.60f, 0.7f, 0.8f, 3.0f, - 0.90f, 1.5f, -1.0f, 4.0f, + 0.90f, 1.0f, -1.0f, 4.0f, }; static const float test_float4_srgb_in_expected[] = { 5.00732847e-003, 6.27983455e-003, 2.89932229e-002, 1.00000000e+000, 7.07391128e-002, 1.33206353e-001, 2.17635408e-001, 2.00000000e+000, 3.25037479e-001, 4.56263810e-001, 6.12064898e-001, 3.00000000e+000, - 7.93109715e-001, -2.24207754e-044, 1.00000000e+000, 4.00000000e+000, + 7.93109715e-001, 1.00000000e+000, 1.00000000e+000, 4.00000000e+000, }; static const float test_float4_srgb_in_expected_32[] = { 5.00732893e-003, 6.27983361e-003, 2.89932191e-002, 1.00000000e+000, 7.07391202e-002, 1.33206338e-001, 2.17635408e-001, 2.00000000e+000, 3.25037509e-001, 4.56263840e-001, 6.12064838e-001, 3.00000000e+000, - /* - * On 32-bit d3dx10+, an input value of 1.5f being converted from SRGB - * to linear produces quite a few different values depending on the - * SDK version. Presumably it's reading beyond the end of a LUT, - * values above ~106.0f will cause a crash on all versions and - * bitnesses. - */ -#if D3DX10_SDK_VERSION < 35 - 7.93109715e-001, 3.48807693e-001, 1.00000000e+000, 4.00000000e+000 -#elif D3DX10_SDK_VERSION < 37 - 7.93109715e-001, 3.56686294e-001, 1.00000000e+000, 4.00000000e+000 -#elif D3DX10_SDK_VERSION < 40 - 7.93109715e-001, 3.64580810e-001, 1.00000000e+000, 4.00000000e+000 -#else - 7.93109715e-001, 3.33099246e-001, 1.00000000e+000, 4.00000000e+000 -#endif + 7.93109715e-001, 1.00000000e+000, 1.00000000e+000, 4.00000000e+000 }; static const float test_float4_srgb_out[] = { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dx11_43/tests/d3dx11.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c index 70ccd0d116c..cd6dba8bac7 100644 --- a/dlls/d3dx11_43/tests/d3dx11.c +++ b/dlls/d3dx11_43/tests/d3dx11.c @@ -4657,37 +4657,33 @@ static void test_dxt_formats(void) static void test_srgb_filter_flags(void) { + /* + * An input value > 1.0f being converted from SRGB to linear produces + * quite a few different values depending on the SDK version, and + * sometimes changes run to run. Presumably it's reading beyond the end of + * a LUT, values above ~106.0f will cause a crash on all versions and + * bitnesses. + */ static const float test_float4_srgb_in[] = { 0.09f, 0.1f, 0.2f, 1.0f, 0.30f, 0.4f, 0.5f, 2.0f, 0.60f, 0.7f, 0.8f, 3.0f, - 0.90f, 1.5f, -1.0f, 4.0f, + 0.90f, 1.0f, -1.0f, 4.0f, }; static const float test_float4_srgb_in_expected[] = { 5.00732847e-003, 6.27983455e-003, 2.89932229e-002, 1.00000000e+000, 7.07391128e-002, 1.33206353e-001, 2.17635408e-001, 2.00000000e+000, 3.25037479e-001, 4.56263810e-001, 6.12064898e-001, 3.00000000e+000, - 7.93109715e-001, 0.00000000e-000, 1.00000000e+000, 4.00000000e+000, + 7.93109715e-001, 1.00000000e+000, 1.00000000e+000, 4.00000000e+000, }; static const float test_float4_srgb_in_expected_32[] = { 5.00732893e-003, 6.27983361e-003, 2.89932191e-002, 1.00000000e+000, 7.07391202e-002, 1.33206338e-001, 2.17635408e-001, 2.00000000e+000, 3.25037509e-001, 4.56263840e-001, 6.12064838e-001, 3.00000000e+000, - /* - * On 32-bit d3dx10+, an input value of 1.5f being converted from SRGB - * to linear produces quite a few different values depending on the - * SDK version. Presumably it's reading beyond the end of a LUT, - * values above ~106.0f will cause a crash on all versions and - * bitnesses. - */ -#if D3DX11_SDK_VERSION == 42 - 7.93109715e-001, 6.54184470e+027, 1.00000000e+000, 4.00000000e+000 -#else - 7.93109715e-001, 1.12405043e+032, 1.00000000e+000, 4.00000000e+000 -#endif + 7.93109715e-001, 1.00000000e+000, 1.00000000e+000, 4.00000000e+000 }; static const float test_float4_srgb_out[] = { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dx11_43/tests/d3dx11.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/d3dx11_43/tests/d3dx11.c b/dlls/d3dx11_43/tests/d3dx11.c index cd6dba8bac7..edacf4e0914 100644 --- a/dlls/d3dx11_43/tests/d3dx11.c +++ b/dlls/d3dx11_43/tests/d3dx11.c @@ -4859,9 +4859,6 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE "float4 light_color = LIGHT;\n"; char *buffer; - trace("filename %s.\n", filename); - trace("parent_data %p: %s.\n", parent_data, parent_data ? (char *)parent_data : "(null)"); - if (!strcmp(filename, "include1.h")) { buffer = malloc(strlen(include1)); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c index a0cc1367424..d97bc8eb9a4 100644 --- a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c +++ b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c @@ -1490,9 +1490,6 @@ static HRESULT WINAPI test_d3dinclude_open(ID3DInclude *iface, D3D_INCLUDE_TYPE "def c0, LIGHT, 0, 0, 0\n"; char *buffer; - trace("filename %s.\n", filename); - trace("parent_data %p: %s.\n", parent_data, parent_data ? (char *)parent_data : "(null)"); - if (!strcmp(filename, "include1.h")) { buffer = strdup(include1); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11746
participants (2)
-
Matteo Bruni -
Matteo Bruni (@Mystral)