diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 891373556fac86d0c1b40b9179d07dbed0e24cab..8a4b71381ebeaba25a071202e94314b90a54df74 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -753,6 +753,7 @@ static void compile_shader(struct shader_runner *runner, const char *source, siz { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; + UINT flags = 0; HRESULT hr; static const char *const shader_models[] = @@ -765,8 +766,9 @@ static void compile_shader(struct shader_runner *runner, const char *source, siz [SHADER_MODEL_5_1] = "5_1", }; + flags |= D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; sprintf(profile, "%s_%s", type, shader_models[runner->minimum_shader_model]); - hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, 0, 0, &blob, &errors); + hr = D3DCompile(source, len, NULL, NULL, NULL, "main", profile, flags, 0, &blob, &errors); hr = map_unidentified_hrs(hr); ok(hr == expect, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 3907e785ded549ec3ad8a952248666971440e51d..a5e0b92b0d604476ef2a1cba3c635a05de538e0f 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -76,6 +76,7 @@ static ID3D10Blob *compile_shader(const char *source, const char *type, enum sha { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; + UINT flags = 0; HRESULT hr; static const char *const shader_models[] = @@ -88,8 +89,9 @@ static ID3D10Blob *compile_shader(const char *source, const char *type, enum sha [SHADER_MODEL_5_1] = "5_1", }; + flags |= D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; sprintf(profile, "%s_%s", type, shader_models[shader_model]); - hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, 0, 0, &blob, &errors); + hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, flags, 0, &blob, &errors); ok(hr == S_OK, "Failed to compile shader, hr %#lx.\n", hr); if (errors) { diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index 6765c5cef445d5d5e9348b9a96f84f85620dd0f3..d95851ba8f36c9f379a32822217ae6ac425a9481 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -60,6 +60,7 @@ static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, cons { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; + UINT flags = 0; HRESULT hr; static const char *const shader_models[] = @@ -72,8 +73,9 @@ static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, cons [SHADER_MODEL_5_1] = "5_1", }; + flags |= D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; sprintf(profile, "%s_%s", type, shader_models[runner->r.minimum_shader_model]); - hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, 0, 0, &blob, &errors); + hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, flags, 0, &blob, &errors); ok(FAILED(hr) == !blob, "Got unexpected hr %#x, blob %p.\n", hr, blob); if (errors) { diff --git a/tests/shader_runner_d3d9.c b/tests/shader_runner_d3d9.c index 15a5ab3e15f2e888ccb6f08e9e6efdeceec403c3..4245c6e389df1cf7d810823e1f542b55d3cc70f1 100644 --- a/tests/shader_runner_d3d9.c +++ b/tests/shader_runner_d3d9.c @@ -60,6 +60,7 @@ static ID3D10Blob *compile_shader(const char *source, const char *type, enum sha { ID3D10Blob *blob = NULL, *errors = NULL; char profile[7]; + UINT flags = 0; HRESULT hr; static const char *const shader_models[] = @@ -69,7 +70,7 @@ static ID3D10Blob *compile_shader(const char *source, const char *type, enum sha }; sprintf(profile, "%s_%s", type, shader_models[shader_model]); - hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, 0, 0, &blob, &errors); + hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, flags, 0, &blob, &errors); ok(hr == S_OK, "Failed to compile shader, hr %#lx.\n", hr); if (errors) {