abaire / nxdk_pgraph_tests

Tests to verify xemu handling of various pushbuffer commands
Other
12 stars 8 forks source link

Validate behavior when setting color and zeta buffers to the same offset #58

Closed abaire closed 2 years ago

abaire commented 2 years ago

Add a test that exercises this path: https://github.com/mborgerson/xemu/blob/5d02cdf512111bd362db182b78ca48fafdc2858a/hw/xbox/nv2a/pgraph.c#L5749

Dump the color and Z buffers after rendering to see how HW deals with this case. E.g., draw something to the depth buffer, set the color buffer offset to == the depth buffer, draw again, inspect the results in both the framebuffer and depth buffer. Then do the opposite, draw to color, set depth -> color buffer, draw, inspect.

abaire commented 2 years ago

I believe I covered this case in https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/color_zeta_overlap_tests.cpp. Writes with both values set to the same offset are non-deterministic, writes when only one or the other is set will just overwrite existing data as expected.