mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
tests: Test clip planes.
This commit is contained in:
committed by
Henri Verbeet
parent
4400315c4b
commit
3b1760134f
Notes:
Henri Verbeet
2024-10-02 22:36:40 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/946
@@ -152,6 +152,7 @@ static bool init_test_context(struct d3d9_shader_runner *runner)
|
||||
runner->caps.runner = "d3d9.dll";
|
||||
runner->caps.minimum_shader_model = SHADER_MODEL_2_0;
|
||||
runner->caps.maximum_shader_model = SHADER_MODEL_3_0;
|
||||
runner->caps.clip_planes = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -469,6 +470,16 @@ static bool d3d9_runner_draw(struct shader_runner *r,
|
||||
runner->r.flat_shading ? D3DSHADE_FLAT : D3DSHADE_GOURAUD);
|
||||
ok(hr == D3D_OK, "Failed to set render state, hr %#lx.\n", hr);
|
||||
|
||||
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, TRUE);
|
||||
ok(hr == D3D_OK, "Failed to set render state, hr %#lx.\n", hr);
|
||||
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPLANEENABLE, runner->r.clip_plane_mask);
|
||||
ok(hr == D3D_OK, "Failed to set render state, hr %#lx.\n", hr);
|
||||
for (unsigned int i = 0; i < 8; ++i)
|
||||
{
|
||||
hr = IDirect3DDevice9_SetClipPlane(device, i, &runner->r.clip_planes[i].x);
|
||||
ok(hr == D3D_OK, "Failed to set clip plane, hr %#lx.\n", hr);
|
||||
}
|
||||
|
||||
hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration);
|
||||
ok(hr == D3D_OK, "Failed to create vertex declaration, hr %#lx.\n", hr);
|
||||
hr = IDirect3DDevice9_CreateVertexShader(device, ID3D10Blob_GetBufferPointer(vs_code), &vs);
|
||||
|
||||
Reference in New Issue
Block a user