From: Andrey Gusev andrey.goosev@gmail.com
Fixes rendering glitches in Batman: Arkham Knight.
Signed-off-by: Andrey Gusev andrey.goosev@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- v2: - Just require ARB_half_float_vertex. Upload conversion is not actually implemented for R16_FLOAT. However, the format can't be used by d3d9 and earlier, and GL implementations lacking ARB_half_float_vertex or equivalent are unlikely to work well with d3d10+, so not much could be gained by implementing it. - Add a test_format_support() test, as well as d3d10 tests.
dlls/d3d10core/tests/d3d10core.c | 2 ++ dlls/d3d11/tests/d3d11.c | 2 ++ dlls/wined3d/utils.c | 1 + 3 files changed, 5 insertions(+)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 73151f2296c..a4729f9d2d3 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -12373,6 +12373,7 @@ static void test_create_input_layout(void) DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R16_UINT, DXGI_FORMAT_R16_SINT, DXGI_FORMAT_R8_UINT, @@ -13648,6 +13649,7 @@ static void test_format_support(void) static const struct format_support vertex_buffers[] = { {DXGI_FORMAT_R8G8_UINT}, + {DXGI_FORMAT_R16_FLOAT}, };
if (!(device = create_device())) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 140e7cc195c..53087684acf 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -18552,6 +18552,7 @@ static void test_create_input_layout(void) DXGI_FORMAT_R32_FLOAT, DXGI_FORMAT_R32_UINT, DXGI_FORMAT_R32_SINT, + DXGI_FORMAT_R16_FLOAT, DXGI_FORMAT_R16_UINT, DXGI_FORMAT_R16_SINT, DXGI_FORMAT_R8G8_UNORM, @@ -20622,6 +20623,7 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) static const struct format_support vertex_buffers[] = { {DXGI_FORMAT_R8G8_UINT, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R16_FLOAT, D3D_FEATURE_LEVEL_10_0}, };
device_desc.feature_level = &feature_level; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 1b0d7cc6eba..b7afa721587 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -727,6 +727,7 @@ static const struct wined3d_format_vertex_info format_vertex_info[] = {WINED3DFMT_R8_UINT, WINED3D_FFP_EMIT_INVALID, GL_UNSIGNED_BYTE}, {WINED3DFMT_R8_SINT, WINED3D_FFP_EMIT_INVALID, GL_BYTE}, {WINED3DFMT_R8G8_UINT, WINED3D_FFP_EMIT_INVALID, GL_UNSIGNED_BYTE}, + {WINED3DFMT_R16_FLOAT, WINED3D_FFP_EMIT_INVALID, GL_HALF_FLOAT, ARB_HALF_FLOAT_VERTEX}, {WINED3DFMT_R16_UINT, WINED3D_FFP_EMIT_INVALID, GL_UNSIGNED_SHORT}, {WINED3DFMT_R16_SINT, WINED3D_FFP_EMIT_INVALID, GL_SHORT}, {WINED3DFMT_R32_UINT, WINED3D_FFP_EMIT_INVALID, GL_UNSIGNED_INT},
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102323
Your paranoid android.
=== w1064v1809 (32 bit report) ===
d3d11: d3d11.c:5920: Test failed: Got unexpected IAVertices count: 0. d3d11.c:5921: Test failed: Got unexpected IAPrimitives count: 0. d3d11.c:5922: Test failed: Got unexpected VSInvocations count: 0. d3d11.c:5925: Test failed: Got unexpected CInvocations count: 0. d3d11.c:5926: Test failed: Got unexpected CPrimitives count: 0.
=== debiant2 (32 bit French report) ===
d3d11: d3d11.c:28199: Test failed: d3d11.c:16428: Test marked todo: Got texcoord {8.71093690e-001, 1.28906310e-001}, expected {8.71093750e-001, 1.28906250e-001} at (3, 3), offset 1.56250000e-002.