Navigate to the top level

Antialiasing_tests

Description
Tests the effects of NV097_SET_SURFACE_FORMAT_ANTI_ALIASING in various scenarios.
Many of these tests were created to demonstrate specific bugs in xemu and are not of practical value in typical hardware use cases.
Suite class def

AAOnThenOffCPUWrite

Configure the framebuffer surface with some antialiasing mode, clear, change the mode, modify the framebuffer by writing directly to VRAM, then render. Used to reproduce xemu-project/xemu#652.

Image with alpha
Test result for Antialiasing_tests::AAOnThenOffCPUWrite
Image as seen on display
No alpha test result for Antialiasing_tests::AAOnThenOffCPUWrite

CompositeBlurCenter1

As CompositeCenter1, but the composite uses four vertically offset taps (-3, -1, +1, +3 texels) weighted by combiner constants (0x2A, 0x55, 0x55, 0x2A) as done by Rugby 2005's depth of field effect. The composite should be a slightly vertically blurred version of the source.

Image with alpha
Test result for Antialiasing_tests::CompositeBlurCenter1
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeBlurCenter1

CompositeBlurCenterCorner2

As CompositeCenterCorner2, but with the four tap vertical blur described in CompositeBlurCenter1. This most closely replicates Rugby 2005 (xemu-project/xemu#2388). The composite should be a slightly vertically blurred version of the source, filling the entire 256x256 target.

Image with alpha
Test result for Antialiasing_tests::CompositeBlurCenterCorner2
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeBlurCenterCorner2

CompositeBlurSquareOffset4

As CompositeSquareOffset4, but with the four tap vertical blur described in CompositeBlurCenter1.

Image with alpha
Test result for Antialiasing_tests::CompositeBlurSquareOffset4
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeBlurSquareOffset4

CompositeCenter1

Renders a 256x192 surface with NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_CENTER_1, then samples it as a linear texture whose image rect matches the surface pitch to draw a full screen quad into a 256x256 swizzled surface. The left side of the screen shows the source surface, the right side shows the swizzled composite at 1:1. The composite should contain the entire source image stretched to fill the 256x256 target. This is the non-antialiased control case.

Image with alpha
Test result for Antialiasing_tests::CompositeCenter1
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeCenter1

CompositeCenterCorner2

As CompositeCenter1, but the source uses NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_CENTER_CORNER_2, so the backing surface (and texture image rect) is 512x192. The composite should contain the entire source image (all 8 bars and the full arrow) stretched to fill the 256x256 target, just as in CompositeCenter1.

Image with alpha
Test result for Antialiasing_tests::CompositeCenterCorner2
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeCenterCorner2

CompositeSquareOffset4

As CompositeCenter1, but the source uses NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_SQUARE_OFFSET_4, so the backing surface (and texture image rect) is 512x384. The composite should contain the entire source image stretched to fill the 256x256 target.

Image with alpha
Test result for Antialiasing_tests::CompositeSquareOffset4
Image as seen on display
No alpha test result for Antialiasing_tests::CompositeSquareOffset4

CPUWriteIgnoresSurfaceConfig

This test verifies that direct writes to VRAM bypass any surface configuration. It sets up a texture surface with antialiasing enabled, then writes directly to texture memory and renders the texture to the screen. It is expected that antialiasing has no effect.

Image with alpha
Test result for Antialiasing_tests::CPUWriteIgnoresSurfaceConfig
Image as seen on display
No alpha test result for Antialiasing_tests::CPUWriteIgnoresSurfaceConfig

CreateSurfaceWithCenter1

Tests rendering with NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_CENTER_1

Image with alpha
Test result for Antialiasing_tests::CreateSurfaceWithCenter1
Image as seen on display
No alpha test result for Antialiasing_tests::CreateSurfaceWithCenter1

CreateSurfaceWithCenterCorner2

Tests rendering with NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_CENTER_CORNER_2

Image with alpha
Test result for Antialiasing_tests::CreateSurfaceWithCenterCorner2
Image as seen on display
No alpha test result for Antialiasing_tests::CreateSurfaceWithCenterCorner2

CreateSurfaceWithSquareOffset4

Tests rendering with NV097_SET_SURFACE_FORMAT_ANTI_ALIASING_SQUARE_OFFSET_4

Image with alpha
Test result for Antialiasing_tests::CreateSurfaceWithSquareOffset4
Image as seen on display
No alpha test result for Antialiasing_tests::CreateSurfaceWithSquareOffset4

FBSurfaceWithCenter1

Image with alpha
Test result for Antialiasing_tests::FBSurfaceWithCenter1
Image as seen on display
No alpha test result for Antialiasing_tests::FBSurfaceWithCenter1

FBSurfaceWithCenterCorner2

Image with alpha
Test result for Antialiasing_tests::FBSurfaceWithCenterCorner2
Image as seen on display
No alpha test result for Antialiasing_tests::FBSurfaceWithCenterCorner2

FramebufferNotModifiedBySurfaceState

Image with alpha
Test result for Antialiasing_tests::FramebufferNotModifiedBySurfaceState
Image as seen on display
No alpha test result for Antialiasing_tests::FramebufferNotModifiedBySurfaceState

GPUAAWriteAfterCPUWrite

Image with alpha
Test result for Antialiasing_tests::GPUAAWriteAfterCPUWrite
Image as seen on display
No alpha test result for Antialiasing_tests::GPUAAWriteAfterCPUWrite

NonAACPURoundTrip

Image with alpha
Test result for Antialiasing_tests::NonAACPURoundTrip
Image as seen on display
No alpha test result for Antialiasing_tests::NonAACPURoundTrip

SurfaceStatesAreIndependent

Image with alpha
Test result for Antialiasing_tests::SurfaceStatesAreIndependent
Image as seen on display
No alpha test result for Antialiasing_tests::SurfaceStatesAreIndependent