Files
reims-vgpu/docs
Anees Iqbal 88f07d368f 🐛 Draw a shown surface through a view at an index of its own
The display's passes (the present shaders' conversion and the colour's) sampled
a presented IOSurface's texture through the texture's own resource index, which
is the guest's. The guest's indices belong to its processes: when one ends (a
logout, a window server restart), its indices go back to the guest's kext, and
the next process's texture made at one of them takes that index's element at
once. The display can still show the old texture and draws it again at each
refresh, so a refresh drew the new texture's pixels into the window, or
undefined ones once that texture had gone and emptied the element, until the
guest presented again.

The display now samples the texture through a view of its own: the whole
texture in its own pixel format, at one of the platform's own indices, made at
the texture's first such draw and kept with the decoder's entry and with each
of the display's holds of it, so a later present or refresh of that texture
makes no Vulkan call. The copy path reads the image through no index and is
unchanged. Where the platform refuses the view, the draw answers nothing: the
window keeps its last frame and the host's read of the display answers black,
counted as display-view-refused. No draw falls back to the guest's index.

For the host: a refresh after the guest reuses the shown texture's index still
shows that texture. a_color_draws_a_presented_surface_through_its_tables and
a_surface_takes_the_table_at_its_own_size_in_unorm now expect the view, not the
surface, in the fragment binds.
2026-11-21 05:31:47 -08:00
..