tests: Add some tests for rasteriser-ordered views.

This commit is contained in:
Evan Tang
2023-10-13 16:35:12 -05:00
committed by Alexandre Julliard
parent f614d98759
commit 628acb6b96
Notes: Alexandre Julliard 2024-02-14 23:28:07 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/651
12 changed files with 421 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ struct d3d11_shader_runner
ID3D11RasterizerState *rasterizer_state;
bool supports_float64;
bool supports_rov;
};
static struct d3d11_shader_runner *d3d11_shader_runner(struct shader_runner *r)
@@ -260,6 +261,7 @@ static IDXGISwapChain *create_swapchain(ID3D11Device *device, HWND window)
static BOOL init_test_context(struct d3d11_shader_runner *runner)
{
D3D11_FEATURE_DATA_D3D11_OPTIONS2 options2 = {0};
D3D11_FEATURE_DATA_DOUBLES doubles = {0};
unsigned int rt_width, rt_height;
D3D11_RASTERIZER_DESC rs_desc;
@@ -281,6 +283,12 @@ static BOOL init_test_context(struct d3d11_shader_runner *runner)
trace("DoublePrecisionFloatShaderOps: %u.\n", doubles.DoublePrecisionFloatShaderOps);
runner->supports_float64 = doubles.DoublePrecisionFloatShaderOps;
hr = ID3D11Device_CheckFeatureSupport(runner->device,
D3D11_FEATURE_D3D11_OPTIONS2, &options2, sizeof(options2));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
trace("ROVsSupported: %u.\n", options2.ROVsSupported);
runner->supports_rov = options2.ROVsSupported;
rt_width = RENDER_TARGET_WIDTH;
rt_height = RENDER_TARGET_HEIGHT;
SetRect(&rect, 0, 0, rt_width, rt_height);
@@ -334,6 +342,8 @@ static bool d3d11_runner_check_requirements(struct shader_runner *r)
if (runner->r.require_float64 && !runner->supports_float64)
return false;
if (runner->r.require_rov && !runner->supports_rov)
return false;
return true;
}