d3dcompiler: Allow cs5.1 shaders on earlier d3dcompiler versions.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2022-03-23 13:58:16 +01:00 committed by Alexandre Julliard
parent 47b9c450c6
commit af45477392
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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;