From af454773929dd01844326c8756cdce438ead2df9 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 23 Mar 2022 13:58:16 +0100 Subject: [PATCH] d3dcompiler: Allow cs5.1 shaders on earlier d3dcompiler versions. Signed-off-by: Paul Gofman Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- dlls/d3dcompiler_43/reflection.c | 4 ++-- dlls/d3dcompiler_43/tests/reflection.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 787d0388f93..096efc91bd4 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1507,9 +1507,9 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c TRACE("Target: %#x.\n", r->target); target_version = r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK; - #if D3D_COMPILER_VERSION < 47 - if (target_version >= 0x501) + if (target_version >= 0x501 && (!D3D_COMPILER_VERSION || ((r->target & D3DCOMPILER_SHADER_TARGET_SHADERTYPE_MASK) + >> D3DCOMPILER_SHADER_TARGET_SHADERTYPE_SHIFT) != 0x4353 /* CS */)) { WARN("Target version %#x is not supported in d3dcompiler %u.\n", target_version, D3D_COMPILER_VERSION); return E_INVALIDARG; diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index e4261ad0d79..bfd79d04618 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -1231,7 +1231,6 @@ static void test_reflection_cs(void) HRESULT hr; hr = call_reflect(test_blob, test_blob[6], &IID_ID3D11ShaderReflection, (void **)&ref11); - todo_wine_if(D3D_COMPILER_VERSION < 47) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (FAILED(hr)) return;