Files
LibretroAdmin 3174aeef4a slang: presets with frame history read views in place too
A glcore or Vulkan preset reading earlier frames (OriginalHistory1 and
on) kept copying each view of a hardware frame out to a texture of its
own, then copied that texture again into the history at the frame's
end: two copies a view a frame. Its passes can read the view where it
lies like any other preset's; only the history needs a copy, and that
copy can come straight from the view's rectangle. So such a preset now
reads in place, and the history takes the one copy:

- Vulkan: vkCmdCopyImage from the view's origin in the frame, no longer
  from the corner of a copy. Copies of the same texels, the same size.
- glcore: the history's quad copy samples the view's rectangle in the
  frame, as the copy out of a larger texture already did, nearest at
  texel centres.

gl3_framebuffer_copy_partial() made, filled and deleted a vertex buffer
on every call; the chain now makes that buffer once and the copy writes
its quad into it, so neither the history copy nor the copy out of a
larger texture allocates mid-game.

samples/gfx/gl3_shader_status and samples/gfx/vulkan_chain_alloc check
that a chain with history reads in place, that the frame is not copied
out first, and that the history copy comes from the view's rectangle
(and, on glcore, through the chain's own buffer); both fail on the old
code.
2026-11-08 00:42:45 +01:00
..