Valhall uses index-driven vertex shading to compiles vertex shaders into two binaries: Position Shader and Varying Shader.

Position Shader computes only position and is executed for every indexed vertex. Varying Shader computes the remaining non-position attribute outputs. It’s only executed for vertices that are part of a visible primitive that survives culling.

  • Work Registers
  • Uniform Registers
  • Stack spilling: how much memory is stacked because variables spilled
    • spill: when there are not enough registers to keep the variables, some of them may be moved to and from RAM.
  • 16-bit arithmetic: (or lower), higher the better, how efficient the calculation
    • 16 is a special number. $2^{16} - 1$ is 65535 or 0xFFFF. It’s the maximum value of 2 bytes. It’s the largest number the unsigned 16-bit integer can hold and the largest memory address that a 16-bit architecture can access.

Valhll architecture Column, each unit is a pipeline:

  • FMA (Arithmetic fused mutiply accumulate unit)
    • the main arithmetic pipeline. each implements a 16-wide warp
  • CVT (Arithmetic convert unit)
    • simple operation: format conversion and integer addition. 16-wide warp.
  • SFU (Arithmetic special functions unit)
    • special function for such as reciprocals and transcendental functions. 4-wide issue path, executing a 16-wide warp over 4 clock cycles.
  • LS (Load/Store unit)
    • non-texture memory access, including buffer and image access, and atomic operations (one step)
  • V (Varying unit)
    • varying interpolator
  • T (Texture unit)
    • texture sampling and filtering operations

Shader properties: what features of the language is used, and the impact on the performance of shader execution.