Personally, I'm not a fan of the switch/case style of tests. My preference would be to either just explicitly write out the tests, or to encode them using the `tests[]` construction we use in a couple of other tests.
Do you have any recommendations on what to put in a `tests[]` table? I feel like I'd end up with this, which doesn't make it super obvious how the values get used in the test. ```c static const struct { BOOL clear_depth; float depth_clear_value; BOOL clear_color; float color_clear_value[4]; enum { DEPTH_NONE, DEPTH_GE, DEPTH_WRITE_GE } depth_state; enum { DEPTH_QUARTER_QUAD, DEPTH_THREE_QUARTER_QUAD } vertex_buffer_depth; BOOL use_ps; DWORD expected_color[2]; float expected_depth[2]; } tests[] = { /* Draw with succeeding depth compare */ {TRUE, 0.0f, FALSE, {0, 0, 0, 0}, DEPTH_GE, DEPTH_QUARTER_QUAD, TRUE, {0xff0000ff, 0xff000000}, {0.00f, 0.00f}}, /* Draw with failing depth compare */ {TRUE, 1.0f, FALSE, {0, 0, 0, 0}, DEPTH_GE, DEPTH_THREE_QUARTER_QUAD, TRUE, {0xff000000, 0xff000000}, {1.00f, 1.00f}}, /* Draw with depth write */ {TRUE, 0.0f, FALSE, {0, 0, 0, 0}, DEPTH_WRITE_GE, DEPTH_QUARTER_QUAD, FALSE, {0xff000000, 0xff000000}, {0.25f, 0.00f}}, /* Color write */ {FALSE, 0.0f, TRUE, {0, 1, 0, 1}, DEPTH_NONE, DEPTH_QUARTER_QUAD, TRUE, {0xff0000ff, 0xff00ff00}, {0.50f, 0.50f}}, }; ```
I don't think the comment is terribly clear, but it sounds like we're getting fixed-function with the GL backend, and things just happen to work with the Vulkan backend because we don't yet have a fixed-function implementation there.
As in we're getting GL's emulation of d3d ffp, or we're hitting GL ffp? [I took an apitrace](/uploads/f29fa0f24cb38f3f2600183eddd28201/d3d11_test.trace) and if you look at call 233640, it is using a program with a VS and no FS, so I don't think we're hitting ffp emulation. As for whether we're hitting GL's ffp path, I don't think so but I don't really know GL that well.