From: Zebediah Figura zfigura@codeweavers.com
--- dlls/d3d11/tests/d3d11.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 345a87c4194..2a2a3d714b8 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -20771,7 +20771,7 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
if (formats[i].fl_required <= feature_level) { - todo_wine_if (feature_flag == D3D11_FORMAT_SUPPORT_DISPLAY) + todo_wine_if (feature_flag == D3D11_FORMAT_SUPPORT_DISPLAY || feature_flag == D3D11_FORMAT_SUPPORT_BLENDABLE) ok(supported, "Format %#x - %s not supported, feature_level %#x, format support %#x.\n", format, feature_name, feature_level, format_support[format]); continue; @@ -20785,7 +20785,7 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE continue; }
- todo_wine_if (feature_flag != D3D11_FORMAT_SUPPORT_DISPLAY) + todo_wine_if (feature_flag != D3D11_FORMAT_SUPPORT_DISPLAY && feature_flag != D3D11_FORMAT_SUPPORT_BLENDABLE) ok(!supported, "Format %#x - %s supported, feature level %#x, format support %#x.\n", format, feature_name, feature_level, format_support[format]); } @@ -20814,6 +20814,39 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) {DXGI_FORMAT_R16_FLOAT, D3D_FEATURE_LEVEL_10_0}, };
+ static const struct format_support blend[] = + { + {DXGI_FORMAT_R16G16B16A16_UNORM, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R16G16_UNORM, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R16_UNORM, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R16G16B16A16_SNORM, D3D_FEATURE_LEVEL_10_1}, + {DXGI_FORMAT_R16G16_SNORM, D3D_FEATURE_LEVEL_10_1}, + {DXGI_FORMAT_R16_SNORM, D3D_FEATURE_LEVEL_10_1}, + {DXGI_FORMAT_R8G8B8A8_SNORM, D3D_FEATURE_LEVEL_10_1}, + {DXGI_FORMAT_R8G8_SNORM, D3D_FEATURE_LEVEL_10_1}, + {DXGI_FORMAT_R8_SNORM, D3D_FEATURE_LEVEL_10_1}, + + {DXGI_FORMAT_R32G32B32A32_FLOAT, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R32G32_FLOAT, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R32_FLOAT, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R10G10B10A2_UNORM, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R11G11B10_FLOAT, D3D_FEATURE_LEVEL_10_0}, + {DXGI_FORMAT_R16_FLOAT, D3D_FEATURE_LEVEL_10_0}, + + {DXGI_FORMAT_R16G16B16A16_FLOAT, D3D_FEATURE_LEVEL_9_3}, + + {DXGI_FORMAT_R8G8B8A8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_R8G8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_R8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_A8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_B5G6R5_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_B8G8R8A8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_B8G8R8X8_UNORM, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, D3D_FEATURE_LEVEL_9_1}, + {DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, D3D_FEATURE_LEVEL_9_1}, + }; + device_desc.feature_level = &feature_level; device_desc.flags = 0; if (!(device = create_device(&device_desc))) @@ -20887,6 +20920,9 @@ static void test_format_support(const D3D_FEATURE_LEVEL feature_level) display_format_support, ARRAY_SIZE(display_format_support), D3D11_FORMAT_SUPPORT_DISPLAY, "display");
+ check_format_support(format_support, feature_level, blend, ARRAY_SIZE(blend), + D3D11_FORMAT_SUPPORT_BLENDABLE, "blendable"); + refcount = ID3D11Device_Release(device); ok(!refcount, "Device has %lu references left.\n", refcount); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=117082
Your paranoid android.
=== build (build log) ===
WineRunBuild.pl:error: The build timed out
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/wined3d/utils.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 381c1ae7bc6..7761576c058 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4300,6 +4300,7 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format, {WINED3DFMT_B8G8R8A8_UNORM_SRGB, VK_FORMAT_B8G8R8A8_SRGB, }, {WINED3DFMT_B8G8R8X8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, "XYZ1"}, {WINED3DFMT_B8G8R8X8_UNORM_SRGB, VK_FORMAT_B8G8R8A8_SRGB, "XYZ1"}, + {WINED3DFMT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16, }, {WINED3DFMT_BC1_UNORM, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, }, {WINED3DFMT_BC1_UNORM_SRGB, VK_FORMAT_BC1_RGBA_SRGB_BLOCK, }, {WINED3DFMT_BC2_UNORM, VK_FORMAT_BC2_UNORM_BLOCK, },
From: Zebediah Figura zfigura@codeweavers.com
Vulkan 1.0 implementations without KHR_maintenance1 will still be broken. In order to work around this we would have to try creating textures with TRANSFER_* usage. This does not seem worthwhile. --- dlls/wined3d/utils.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 7761576c058..06c95135678 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4397,6 +4397,11 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format, { caps |= WINED3D_FORMAT_CAP_UNORDERED_ACCESS; } + if ((texture_flags & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) + && (texture_flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT)) + { + caps |= WINED3D_FORMAT_CAP_BLIT; + }
if (!(~caps & (WINED3D_FORMAT_CAP_RENDERTARGET | WINED3D_FORMAT_CAP_FILTERING))) caps |= WINED3D_FORMAT_CAP_GEN_MIPMAP;
On Wed, 15 Jun 2022 at 23:56, Zebediah Figura wine@gitlab.winehq.org wrote:
- if ((texture_flags & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT)
&& (texture_flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT))
- {
caps |= WINED3D_FORMAT_CAP_BLIT;
- }
This checks for the source AND destination bits. I think that's correct, but it's different from what the commit message says.
On 6/16/22 04:51, Henri Verbeet wrote:
On Wed, 15 Jun 2022 at 23:56, Zebediah Figura wine@gitlab.winehq.org wrote:
- if ((texture_flags & VK_FORMAT_FEATURE_TRANSFER_SRC_BIT)
&& (texture_flags & VK_FORMAT_FEATURE_TRANSFER_DST_BIT))
- {
caps |= WINED3D_FORMAT_CAP_BLIT;
- }
This checks for the source AND destination bits. I think that's correct, but it's different from what the commit message says.
Indeed, that was an error in the commit message; thanks for pointing that out.
From: Zebediah Figura zfigura@codeweavers.com
WINED3D_GL_RES_TYPE_RB is not used by the Vulkan backend.
We could alternatively solve this by filling WINED3D_GL_RES_TYPE_RB for the Vulkan backend, but this makes less sense. Checking both formats is more in line with what is done elsewhere, e.g. wined3d_check_surface_format(). --- dlls/wined3d/directx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 925b2df0401..794a612821f 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1971,6 +1971,7 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, allowed_bind_flags = WINED3D_BIND_RENDER_TARGET | WINED3D_BIND_DEPTH_STENCIL | WINED3D_BIND_UNORDERED_ACCESS; + gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_2D; if (!(bind_flags & WINED3D_BIND_SHADER_RESOURCE)) { if (!wined3d_check_surface_format(format)) @@ -1978,8 +1979,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, TRACE("%s is not supported for plain surfaces.\n", debug_d3dformat(format->id)); return WINED3DERR_NOTAVAILABLE; } - - gl_type = gl_type_end = WINED3D_GL_RES_TYPE_RB; break; } allowed_usage |= WINED3DUSAGE_DYNAMIC @@ -1993,7 +1992,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, | WINED3DUSAGE_QUERY_VERTEXTEXTURE | WINED3DUSAGE_QUERY_WRAPANDMIP; allowed_bind_flags |= WINED3D_BIND_SHADER_RESOURCE; - gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_2D; if (usage & WINED3DUSAGE_LEGACY_CUBEMAP) { allowed_usage &= ~WINED3DUSAGE_QUERY_LEGACYBUMPMAP; @@ -2092,6 +2090,11 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d,
for (; gl_type <= gl_type_end; ++gl_type) { + unsigned int caps = format->caps[gl_type]; + + if (gl_type == WINED3D_GL_RES_TYPE_TEX_2D) + caps |= format->caps[WINED3D_GL_RES_TYPE_RB]; + if ((format->caps[gl_type] & format_caps) != format_caps) { TRACE("Requested format caps %#x, but format %s only has %#x.\n",
On Wed, 15 Jun 2022 at 23:56, Zebediah Figura wine@gitlab.winehq.org wrote:
WINED3D_GL_RES_TYPE_RB is not used by the Vulkan backend.
We could alternatively solve this by filling WINED3D_GL_RES_TYPE_RB for the Vulkan backend, but this makes less sense. Checking both formats is more in line with what is done elsewhere, e.g. wined3d_check_surface_format().
The issue with that is that the RB flags may be a superset of the TEX_2D flags. For example, some GPUs from a certain era support depth/stencil renderbuffer attachments, but not depth/shadow textures. Doing this the other way around probably makes more sense; i.e., "if (gl_type == WINED3D_GL_RES_TYPE_RB) caps |= format->caps[WINED3D_GL_RES_TYPE_TEX_2D];".
It's of course a little ugly that GL resource types bleed through into the common code in the first place. We may want to try to fix that at some point, but it's probably not quite trivial.
On 6/16/22 04:48, Henri Verbeet wrote:
On Wed, 15 Jun 2022 at 23:56, Zebediah Figura wine@gitlab.winehq.org wrote:
WINED3D_GL_RES_TYPE_RB is not used by the Vulkan backend.
We could alternatively solve this by filling WINED3D_GL_RES_TYPE_RB for the Vulkan backend, but this makes less sense. Checking both formats is more in line with what is done elsewhere, e.g. wined3d_check_surface_format().
The issue with that is that the RB flags may be a superset of the TEX_2D flags. For example, some GPUs from a certain era support depth/stencil renderbuffer attachments, but not depth/shadow textures. Doing this the other way around probably makes more sense; i.e., "if (gl_type == WINED3D_GL_RES_TYPE_RB) caps |= format->caps[WINED3D_GL_RES_TYPE_TEX_2D];".
Or add WINED3D_GL_RES_TYPE_RB only if WINED3D_BIND_SHADER_RESOURCE is missing, which should I think be identical. I'll modify accordingly.
It's of course a little ugly that GL resource types bleed through into the common code in the first place. We may want to try to fix that at some point, but it's probably not quite trivial.
I guess the architecturally nice thing to do would be to report capability flags based on the bind flags, but that does feel somewhat awkward in its own ways...
From: Zebediah Figura zfigura@codeweavers.com
This fixes rendering in Raft. --- dlls/d3d11/device.c | 2 +- dlls/d3d11/tests/d3d11.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e93cdf74518..d510cebb110 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3886,7 +3886,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 * {WINED3D_RTYPE_NONE, WINED3D_BIND_UNORDERED_ACCESS, 0, D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW}, {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, WINED3DUSAGE_QUERY_WRAPANDMIP, D3D11_FORMAT_SUPPORT_MIP}, {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, WINED3DUSAGE_QUERY_GENMIPMAP, D3D11_FORMAT_SUPPORT_MIP_AUTOGEN}, - {WINED3D_RTYPE_NONE, WINED3D_BIND_RENDER_TARGET, WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3D11_FORMAT_SUPPORT_BLENDABLE}, + {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_RENDER_TARGET, WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING, D3D11_FORMAT_SUPPORT_BLENDABLE}, }; HRESULT hr;
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 2a2a3d714b8..6d836c8d892 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -20771,7 +20771,7 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE
if (formats[i].fl_required <= feature_level) { - todo_wine_if (feature_flag == D3D11_FORMAT_SUPPORT_DISPLAY || feature_flag == D3D11_FORMAT_SUPPORT_BLENDABLE) + todo_wine_if (feature_flag == D3D11_FORMAT_SUPPORT_DISPLAY) ok(supported, "Format %#x - %s not supported, feature_level %#x, format support %#x.\n", format, feature_name, feature_level, format_support[format]); continue; @@ -20785,7 +20785,7 @@ static void check_format_support(const unsigned int *format_support, D3D_FEATURE continue; }
- todo_wine_if (feature_flag != D3D11_FORMAT_SUPPORT_DISPLAY && feature_flag != D3D11_FORMAT_SUPPORT_BLENDABLE) + todo_wine_if (feature_flag != D3D11_FORMAT_SUPPORT_DISPLAY) ok(!supported, "Format %#x - %s supported, feature level %#x, format support %#x.\n", format, feature_name, feature_level, format_support[format]); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=117086
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
d3d11: d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xb000, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa100, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa000, format support 0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9300, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9300, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9300, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9200, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9200, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9200, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9100, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9100, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9100, format support 0.
=== w7u_adm (32 bit report) ===
d3d11: d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xb000, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa100, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa000, format support 0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9300, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9300, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9300, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9200, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9200, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9200, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9100, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9100, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9100, format support 0.
=== w7u_el (32 bit report) ===
d3d11: d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xb000, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa100, format support 0. d3d11.c:20775: Test failed: Format 0x55 - blendable not supported, feature_level 0xa000, format support 0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9300, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9300, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9300, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9200, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9200, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9200, format support 0x201e0. d3d11.c:20775: Test failed: Format 0x31 - blendable not supported, feature_level 0x9100, format support 0. d3d11.c:20775: Test failed: Format 0x3d - blendable not supported, feature_level 0x9100, format support 0x213e0. d3d11.c:20775: Test failed: Format 0x41 - blendable not supported, feature_level 0x9100, format support 0.