So if we have tests that are todo on both sm<4 and sm>=6 we can write, e.g.: todo(sm<4) todo(sm>=6) draw draw OTOH if we were to have tests that are todo only in sm>=4 and sm<6 we can write: todo(sm>=4,sm<6) draw quad Effectively, multiple arguments in a single todo() are like an AND and multiple todo()-s behave like an OR.
I'd like to hear from others as well, but that syntax doesn't seem ideal. Using "," for "and" in particular seems prone to confusion. Some possible alternatives:
- "todo(sm<4,sm>=6)" and "todo(sm<4+sm>=6)" - "todo(sm<4 | sm>=6)" and "todo(sm<4 & sm>=6)" - "todo(sm<4 ∪ sm>=6)" and "todo(sm<4 ∩ sm>=6)"
static HRESULT map_unidentified_hrs(HRESULT hr) { - if (hr == 0x80010064) + if (hr == 0x80010064 || hr == 0x88760b59)
0x88760b59 is D3DXERR_INVALIDDATA.
@@ -1690,13 +1692,13 @@ START_TEST(shader_runner) #if defined(VKD3D_CROSSTEST) trace("Running tests from a Windows cross build\n"); - trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d9.dll\n"); + trace("Compiling SM1 shaders with d3dcompiler_47.dll and executing with d3d9.dll\n"); run_shader_tests_d3d9(); - trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d11.dll\n"); + trace("Compiling SM4 shaders with d3dcompiler_47.dll and executing with d3d11.dll\n"); run_shader_tests_d3d11(); - trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll\n"); + trace("Compiling SM4 shaders with d3dcompiler_47.dll and executing with d3d12.dll\n"); run_shader_tests_d3d12(NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1); print_dll_version("d3dcompiler_47.dll");
These traces (and others) probably make more sense inside their corresponding run_shader_tests_*() functions. Relatedly, ideally we'd only have a single invocation of run_shader_tests_vulkan() and run_shader_tests_d3d12(), which would then take care of invoking run_shader_tests() multiple times themselves.
@@ -407,7 +407,11 @@ static bool compile_shader(const struct vulkan_shader_runner *runner, const char info.source.code = source; info.source.size = strlen(source); info.source_type = VKD3D_SHADER_SOURCE_HLSL; - info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + if (runner->r.minimum_shader_model < SHADER_MODEL_4_0) + info.target_type = VKD3D_SHADER_TARGET_D3D_BYTECODE; + else + info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF; + info.log_level = VKD3D_SHADER_LOG_WARNING; info.options = options;
You should also change the "info.source_type = VKD3D_SHADER_SOURCE_DXBC_TPF;" line a bit further down to something like "info.source_type = info.target_type;".
For the record, it is possible to squash this [commit](https://gitlab.winehq.org/fcasas/vkd3d/-/commit/4fd2ba66b1783c7e346f520b1ea3...) in 3/3 if we want to avoid the `skip_execution` flag and add `todo(sm<4)` qualifiers instead.
The problem is that these would be almost everywhere before we add SM1 execution support, and also, until we properly parse the d3dbc, they have to be in the `draw` directives instead of the `probe` directives so I am not sure is a good idea.
It doesn't seem too bad to me. For comparison, see commit 57280673e51f6b60487e91369bd57213a8243a56.