tests/shader-runner: Query for SM6 support instead of checking VKD3D_SHADER_UNSUPPORTED_DXIL.

This change avoids skipping the tests on a Windows build, where the
support is present but the macro is not defined.

Thanks Giovanni for pointing this out.
This commit is contained in:
Francisco Casas 2024-09-24 22:30:08 -03:00 committed by Henri Verbeet
parent 42f910e56e
commit 95bd06be83
Notes: Henri Verbeet 2024-09-30 21:04:44 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1115

View File

@ -1059,22 +1059,18 @@ static void run_shader_tests_for_model_range(void *dxc_compiler,
ID3D12Device *device; ID3D12Device *device;
HRESULT hr; HRESULT hr;
#ifndef VKD3D_SHADER_UNSUPPORTED_DXIL
if (minimum_shader_model >= SHADER_MODEL_6_0)
{
skip("DXIL support is not enabled. If this is unintentional, "
"add -DVKD3D_SHADER_UNSUPPORTED_DXIL to CPPFLAGS.\n");
return;
}
#endif
if (!init_test_context(&runner.test_context, &desc)) if (!init_test_context(&runner.test_context, &desc))
return; return;
device = runner.test_context.device; device = runner.test_context.device;
if (minimum_shader_model >= SHADER_MODEL_6_0 && !device_supports_shader_model_6_0(device)) if (minimum_shader_model >= SHADER_MODEL_6_0 && !device_supports_shader_model_6_0(device))
{ {
#ifdef VKD3D_CROSSTEST
skip("The device does not support shader model 6.0.\n"); skip("The device does not support shader model 6.0.\n");
#else
skip("DXIL support is not enabled. If this is unintentional, "
"add -DVKD3D_SHADER_UNSUPPORTED_DXIL to CPPFLAGS.\n");
#endif
destroy_test_context(&runner.test_context); destroy_test_context(&runner.test_context);
return; return;
} }