D837 - A sampler's table border colour is read from the guest's table

Status: decided Date: 2026-10-14

A sampler descriptor whose BORDER_COLOR_TYPE is REGISTER (3) takes its border colour from the border colour table, not from one of the three built-in colours. The table is wherever TA_BC_BASE_ADDR (and _HI) last put it in the submission, in 256-byte units. The colour is entry BORDER_COLOR_PTR (SQ_IMG_SAMP_WORD3 bits 11:0): sixteen bytes, four floats, red to alpha.

The decoder names the entry (BorderColour::Table). Once a submission's textures are bound, the pipeline reads each named entry from guest memory and binds its four floats (BorderColour::Custom). The Vulkan backend samples that colour through VK_EXT_custom_border_color, as a colour of the sampler's own with no format. The device enables the extension where it offers both customBorderColors and customBorderColorWithoutFormat.

Two cases are refused, as before:

Why: a GL guest's GL_TEXTURE_BORDER_COLOR is any colour. oops-gl writes it into the table (OOPS_GL_BORDER_TABLE_OFFSET) and names entry 0, as radeonsi does (si_translate_border_color). Refusing the texture refused the draw, and nothing after it retired. In gl1-probe, that stopped every rendering check from border-and-mirror on.

Rejected: