Yes, this is a test bug. Will you submit a PR with the fix?
Fixed.
PR: https://github.com/HansKristian-Work/vkd3d-proton/pull/2126 for test_large_texel_buffer_view
VKD3D_BINDLESS_MUTABLE_EMBEDDEDx1 2024-09VKD3D_BINDLESS_MUTABLE_EMBEDDED_PACKED_METADATAx1 2024-09
Recently we found that
test_planar_video_formatsfailed with AMDVLK.The failures are in the UAV test and
ClearUnorderedAccessViewFloatreturns early due tometa.view = NULLind3d12_desc_decode_metadata.However, this early return is not observed in other tests using
ClearUnorderedAccessView*.After investigation, I think the root cause is that this test uses cpu and gpu handle of same shader-visible descriptor heap for
ClearUnorderedAccessView*.For shader-visible descriptor heap, the low 5 bits of cpu va are 0, which leads to
meta.view = NULLind3d12_desc_decode_metadata.https://github.com/HansKristian-Work/vkd3d-proton/blob/26d283ccbc3d6fbffd8e7b84215d2ecf2caa791f/libs/vkd3d/resource.c#L8177
And it’s Illegal according to https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-clearunorderedaccessviewfloat.
The cpu handle should be created with a non-shader-visible heap. (Actually most tests in vkd3d follow this rule)
https://github.com/HansKristian-Work/vkd3d-proton/blob/26d283ccbc3d6fbffd8e7b84215d2ecf2caa791f/tests/d3d12_resource.c#L4286-L4289
I have checked other tests and found same issue in
test_sm68_draw_parameters.https://github.com/HansKristian-Work/vkd3d-proton/blob/26d283ccbc3d6fbffd8e7b84215d2ecf2caa791f/tests/d3d12_sm_advanced.c#L4180-L4183
BTW, since RADV supports
VKD3D_BINDLESS_MUTABLE_EMBEDDEDandVKD3D_BINDLESS_MUTABLE_EMBEDDED_PACKED_METADATAwhile AMDVLK only supports the first flag, 2 drivers would go into different code path ind3d12_desc_decode_metadata.Maybe that's why no issue is observed with RADV. (meta.view != NULL)
My local fix which works:
Software information
vkd3d test:
test_planar_video_formatsSystem information