Navigate to the top level

Fog_carryover

Description
Tests the behavior when fog is enabled but the fog coordinate is not specified by the shader.
This test reproduces behavior observed in "Blade 2"
https://github.com/xemu-project/xemu/issues/1852
Observations from HW:
A draw that cannot write anything (color, depth, and stencil all disabled) still updates the carried fog values.
Carried fog is tracked per vertex rather than as a single value. For vertices submitted inline (immediate mode SET_VERTEX, inline buffers, and inline arrays) a vertex that does not write fog inherits the fog of the vertex six positions earlier in submission order. The association continues across draws and does not depend on whether the primitives are points or triangles. This is consistent with six vertex output buffers used round robin.
For vertices fetched from memory (draw arrays and inline elements) the inherited values have no stable pattern and differ between runs, presumably depending on the timing of vertex fetch relative to shader execution.
Waiting for the pushbuffer to become idle between draws changes the association; the six vertex pattern above does not predict the results of CarryoverNopDraw, which waits between its draws.
A draw that cannot write anything (color, depth, and stencil all disabled) still updates the carried fog values.
Carried fog is tracked per vertex rather than as a single value. For vertices submitted inline (immediate mode SET_VERTEX, inline buffers, and inline arrays) a vertex that does not write fog inherits the fog of the vertex six positions earlier in submission order. The association continues across draws and does not depend on whether the primitives are points or triangles. This is consistent with six vertex output buffers used round robin.
For vertices fetched from memory (draw arrays and inline elements) the inherited values have no stable pattern and differ between runs, presumably depending on the timing of vertex fetch relative to shader execution.
Waiting for the pushbuffer to become idle between draws changes the association; the six vertex pattern above does not predict the results of CarryoverNopDraw, which waits between its draws.
Suite class def

CarryoverArrayDisabledFogCoord

Fixed function EXP fog with NV097_SET_FOG_GEN_MODE_V_FOG_X (the fog coordinate is consumed directly), drawn with NV097_DRAW_ARRAYS. A control row of small immediate mode quads is drawn first: one with fog disabled to show the unfogged geometry color, one with the initializer fog coordinate and one with the shared fog coordinate. The initializer quad is drawn last so that the context fog coordinate is left at the initializer value, which is not used by any other draw. Two rows are then drawn, one per variant fog coordinate, each with three quads:

Image with alpha
Test result for Fog_carryover::CarryoverArrayDisabledFogCoord
Image as seen on display
No alpha test result for Fog_carryover::CarryoverArrayDisabledFogCoord

CarryoverLineLoop

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverLineLoop
Image as seen on display
No alpha test result for Fog_carryover::CarryoverLineLoop

CarryoverLines

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverLines
Image as seen on display
No alpha test result for Fog_carryover::CarryoverLines

CarryoverLineStrip

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverLineStrip
Image as seen on display
No alpha test result for Fog_carryover::CarryoverLineStrip

CarryoverNopDraw

For each draw mode, renders a row of three quads. The left quad is a reference drawn with the nop draw's fog coordinate (red). The middle quad is drawn normally with a fog coordinate that produces no fog (blue). The middle quad is then drawn again with the nop draw's fog coordinate while color writes, depth writes, depth test, and stencil test are all disabled, so the draw produces no visible output. Finally a quad on the right is drawn without specifying a fog coordinate. If the right quad matches the middle quad, the nop draw did not update the carried fog; if it matches the left quad, the nop draw updated it. The color/zeta limit error check is disabled around the nop draw, with waits for the pushbuffer to become idle on either side.

Image with alpha
Test result for Fog_carryover::CarryoverNopDraw
Image as seen on display
No alpha test result for Fog_carryover::CarryoverNopDraw

CarryoverPoints

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverPoints
Image as seen on display
No alpha test result for Fog_carryover::CarryoverPoints

CarryoverPoly

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverPoly
Image as seen on display
No alpha test result for Fog_carryover::CarryoverPoly

CarryoverQuads

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverQuads
Image as seen on display
No alpha test result for Fog_carryover::CarryoverQuads

CarryoverQuadStrip

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverQuadStrip
Image as seen on display
No alpha test result for Fog_carryover::CarryoverQuadStrip

CarryoverTriFan

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverTriFan
Image as seen on display
No alpha test result for Fog_carryover::CarryoverTriFan

CarryoverTris

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverTris
Image as seen on display
No alpha test result for Fog_carryover::CarryoverTris

CarryoverTriStrip

Renders a series of primitives using various draw modes on the left, setting fog coordinates. Then renders a quad using the same draw mode on the right without specifying a fog coordinate at all. The fog mode is set to EXP.

Image with alpha
Test result for Fog_carryover::CarryoverTriStrip
Image as seen on display
No alpha test result for Fog_carryover::CarryoverTriStrip

CarryoverVertexSlots

Probes how carried fog values are associated with vertices. Each row draws a single priming batch of points, all stacked at the leftmost position: 8 + k blue (unfogged) points followed by one red (fogged) marker point, where k is the row label. Sixteen points are then drawn in a separate batch to the right without specifying a fog coordinate, so each shows the fog value it inherited. Points are used so that every inherited value is visible without interpolation.

Image with alpha
Test result for Fog_carryover::CarryoverVertexSlots
Image as seen on display
No alpha test result for Fog_carryover::CarryoverVertexSlots

FogCarryover

The left column triangles are rendered with the fog coordinate explicitly passed through from the vertex by the shader. The right column triangles do not specify the fog coordinate at all.

Image with alpha
Test result for Fog_carryover::FogCarryover
Image as seen on display
No alpha test result for Fog_carryover::FogCarryover