[PATCH vkd3d 14/41] vkd3d: Add test helper function to determine if DXIL is supported.
Hans-Kristian Arntzen
post at arntzen-software.no
Wed Jan 29 05:51:43 CST 2020
Signed-off-by: Hans-Kristian Arntzen <post at arntzen-software.no>
---
tests/d3d12.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index 0679b5e..b4fc818 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -911,6 +911,27 @@ static bool init_compute_test_context_(unsigned int line, struct test_context *c
return true;
}
+#define context_supports_dxil(context) context_supports_dxil_(__LINE__, context)
+static bool context_supports_dxil_(unsigned int line, struct test_context *context)
+{
+ D3D12_FEATURE_DATA_SHADER_MODEL model;
+ HRESULT hr;
+ model.HighestShaderModel = D3D_SHADER_MODEL_6_0;
+ hr = ID3D12Device_CheckFeatureSupport(context->device, D3D12_FEATURE_SHADER_MODEL, &model, sizeof(model));
+ ok_(line)(hr == S_OK, "Failed to query shader model support, hr %#x.\n", hr);
+
+ if (hr != S_OK)
+ return false;
+
+ if (model.HighestShaderModel < D3D_SHADER_MODEL_6_0)
+ {
+ skip_(line)("Device does not support shader model 6.0, skipping DXIL tests.\n");
+ return false;
+ }
+ else
+ return true;
+}
+
struct depth_stencil_resource
{
ID3D12Resource *texture;
--
2.25.0
More information about the wine-devel
mailing list