mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
tests: Use a macro to define the render target size.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e5be178fe2
commit
099df706f0
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user