diff --git a/tests/shader_runner.c b/tests/shader_runner.c index d68d7f18..910e6ecd 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -293,7 +293,7 @@ static void parse_test_directive(struct shader_runner *runner, const char *line) } else if (match_string(line, "probe all rgba", &line)) { - static const RECT rect = {0, 0, 640, 480}; + static const RECT rect = {0, 0, RENDER_TARGET_WIDTH, RENDER_TARGET_HEIGHT}; unsigned int ulps; struct vec4 v; int ret; diff --git a/tests/shader_runner.h b/tests/shader_runner.h index 84c17016..26fa2367 100644 --- a/tests/shader_runner.h +++ b/tests/shader_runner.h @@ -24,6 +24,9 @@ #include "vkd3d_common.h" #include "utils.h" +#define RENDER_TARGET_WIDTH 640 +#define RENDER_TARGET_HEIGHT 480 + enum shader_model { SHADER_MODEL_2_0, diff --git a/tests/shader_runner_d3d11.c b/tests/shader_runner_d3d11.c index 0a8e0efe..884d86af 100644 --- a/tests/shader_runner_d3d11.c +++ b/tests/shader_runner_d3d11.c @@ -241,8 +241,8 @@ static IDXGISwapChain *create_swapchain(ID3D11Device *device, HWND window) ok(hr == S_OK, "Failed to get factory, hr %#lx.\n", hr); IDXGIAdapter_Release(adapter); - dxgi_desc.BufferDesc.Width = 640; - dxgi_desc.BufferDesc.Height = 480; + dxgi_desc.BufferDesc.Width = RENDER_TARGET_WIDTH; + dxgi_desc.BufferDesc.Height = RENDER_TARGET_HEIGHT; dxgi_desc.BufferDesc.RefreshRate.Numerator = 60; dxgi_desc.BufferDesc.RefreshRate.Denominator = 1; dxgi_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; @@ -268,8 +268,8 @@ static BOOL init_test_context(struct d3d11_shader_runner *runner) { const D3D11_TEXTURE2D_DESC texture_desc = { - .Width = 640, - .Height = 480, + .Width = RENDER_TARGET_WIDTH, + .Height = RENDER_TARGET_HEIGHT, .MipLevels = 1, .ArraySize = 1, .Format = DXGI_FORMAT_R32G32B32A32_FLOAT, @@ -290,8 +290,8 @@ static BOOL init_test_context(struct d3d11_shader_runner *runner) return FALSE; } - rt_width = 640; - rt_height = 480; + rt_width = RENDER_TARGET_WIDTH; + rt_height = RENDER_TARGET_HEIGHT; SetRect(&rect, 0, 0, rt_width, rt_height); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); runner->window = CreateWindowA("static", "d3dcompiler_test", WS_OVERLAPPEDWINDOW, diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index a6db29ff..4f077b38 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -269,8 +269,8 @@ void run_shader_tests_d3d12(int argc, char **argv) { static const struct test_context_desc desc = { - .rt_width = 640, - .rt_height = 480, + .rt_width = RENDER_TARGET_WIDTH, + .rt_height = RENDER_TARGET_HEIGHT, .no_root_signature = true, .rt_format = DXGI_FORMAT_R32G32B32A32_FLOAT, };