NVN formats

Values from the reconstructed NVN header, each confirmed in at least one title:

NVNFormatVulkan
0x03R8 UINTR8_UINT
0x06R16R16_UNORM
0x0aR32FR32_SFLOAT
0x0fRG8 UINTR8G8_UINT
0x11RG16FR16G16_SFLOAT
0x12RG16R16G16_UNORM
0x13RG16 SNORMR16G16_SNORM
0x25RGBA8R8G8B8A8_UNORM
0x26RGBA8 SNORMR8G8B8A8_SNORM
0x27RGBA8 UINTR8G8B8A8_UINT
0x29RGBA16FR16G16B16A16_SFLOAT
0x2eRGBA32FR32G32B32A32_SFLOAT
0x38RGBA8 sRGBR8G8B8A8_SRGB
0x3dRGB10A2A2B10G10R10_UNORM_PACK32
0x3fR11G11B10FB10G11R11_UFLOAT_PACK32

Also seen, without their enum values recorded: R8, RG8, R16F, D16, D32F, D24S8, BC1, BC2, BC3 and BC4. An sRGB view of RGBA8 storage (game C) is a format reinterpretation of one image, not a second image.

A window's color space (API 231)

The Ounce's driver takes a window's color space from the format of its first texture, in the function that makes its native window, and from nothing else. nvnWindowBuilderSetColorSpace stores its value in the builder for the getter, and nvnWindowInitialize never reads it. One game's driver (SDK 19.3.3) makes a window of nine formats:

NVNFormatNative window color space
0x25, 0x38, 0x37, 0x6d, 0x9a, 0x9cRGBA8, RGBX8 and BGRA8, sRGB or not0: SDR
0x3dRGB10A21: PQ (SMPTE ST 2084) in BT.2020's primaries
0x29, 0x71RGBA16F, RGBX16F2: scRGB, linear light with 1.0 at 80 nits

For the last three it then gives the display the window's HDR metadata, the builder's defaults unless the game set others, and again on every nvnWindowSetHdrDisplayMetadata and nvnWindowSetHdrContentMetadata. That game calls none of the color space or metadata functions: it asks the display session whether the display is HDR (GetHdrStatus: 1 SDR, 2 HDR, with the display's peak in nits; command 105 is the paper white), and makes its window RGB10A2 or RGBA16F when it is. nvn_window_space (gpu/nvn/nvn_obj.h) is that table, and hdr_game what the game is told.


Made from docs/layers/gpu/nvn.md at 69237645142c. GPL-3.0-or-later.