mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Enable compiler backwards compatibility mode only for shaders that require it.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
9624e2f904
commit
269747dbf3
Notes:
Alexandre Julliard
2023-08-28 22:17:11 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/316
@@ -58,7 +58,6 @@ static struct d3d12_shader_runner *d3d12_shader_runner(struct shader_runner *r)
|
||||
|
||||
static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, const char *source, const char *type)
|
||||
{
|
||||
UINT flags = runner->r.compile_options | D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY;
|
||||
ID3D10Blob *blob = NULL, *errors = NULL;
|
||||
char profile[7];
|
||||
HRESULT hr;
|
||||
@@ -74,7 +73,7 @@ static ID3D10Blob *compile_shader(const struct d3d12_shader_runner *runner, cons
|
||||
};
|
||||
|
||||
sprintf(profile, "%s_%s", type, shader_models[runner->r.minimum_shader_model]);
|
||||
hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, flags, 0, &blob, &errors);
|
||||
hr = D3DCompile(source, strlen(source), NULL, NULL, NULL, "main", profile, runner->r.compile_options, 0, &blob, &errors);
|
||||
ok(FAILED(hr) == !blob, "Got unexpected hr %#x, blob %p.\n", hr, blob);
|
||||
if (errors)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user