The X display server gains the vblank clock the setting's hold waits
on. It asks the Present extension for a notification at the vblank
count after the last one seen; the answer carries that vblank's count
and its time on the monotonic clock, for the CRTC the window is on.
The requests are made with xcb's own request call, so nothing beyond
libxcb is linked, on a connection of the clock's own: a wait is a
bounded poll of its socket, there is no thread, and no other thread's
events are read. A window destroyed, a server without Present or one
whose stamps are of another clock leave no clock, and the timer paces.
The GLX context says its swap tears with no swap interval where no
compositor shows the window: it asked to bypass one, or none runs.
samples/gfx/x11_vblank runs the clock against a real server in CI.
The KMS display server gains wait_vblank. The CRTC's sequence is the
count and its stamp the time; the next vblank is a sequence event,
queued on a file description of the server's own - the context's
carries its page flips, which are left to it - and waited for with
the caller's bound. No thread. An inactive CRTC, one with a variable
refresh rate on, and a kernel or libdrm without the sequence ioctls
count nothing, and the timer paces as before.
The hold needs a present that tears, which on KMS is an async page
flip: the KMS context answers present_immediate as it queues one. KMS
shows nothing but fullscreen, so the hold no longer waits there for
the Fullscreen setting; that test moves from the wrapper to where the
frame info is filled. The setting is listed on KMS builds.
display_servers_kms_test drives the clock over a FIFO standing in for
the device, and drm_vkms_live runs it on a real kernel's vkms: thirty
vblanks one by one, a page flip's event still the master's.
materialui, xmb and ozone reset box_wrap.len between two declarations,
which the C89 build refuses (-Werror=declaration-after-statement).
The reset follows the declarations.
The missing firmware dialog underlines each file's path, and measured
the path and the text before it with the font for every line of it in
every frame the box was up. The width and offset are now kept with the
line and the font - its size and the font generation - they were
measured in, for the few lines such a box has, and the frames after
the first draw the underline from them.
msgbox_layout's firmware lane draws the dialog in Ozone, XMB and
MaterialUI and checks the one underline under the path, not under its
number, as wide as the path, in the frames drawn from what was kept as
well as the first.
ozone_draw_messagebox() kept the box's position in size_t. For text
taller than the screen the top of it is above the screen, a negative
float stored into an unsigned: the box landed off the screen and the
cut to fit dropped every line, so nothing of the box was drawn - not
its text, not its buttons. The position is an int now, as XMB's and
MaterialUI's are.
Since the menu installs its effects, gl2 made them from GLSL only, and
a build with Cg but no GLSL drew no background effect. Each effect now
carries a Cg source for GL as well (cg_gl in the effect description,
the six gl_shaders/pipeline_*.cg.h back, the ribbon's built from the
shared ribbon code as D3D9's is), and gl2 makes the program from it
when there is no GLSL program to be had. The Cg programs live in a
context of their own (gfx/drivers_shader/shader_gl_cg.h), so they
outlive the backend's context, which a preset change remakes, and go
with the video driver. Like the GLSL ones they draw from the mesh's
buffer, with their uniforms found once.
Two things drew wrong under Cg and are dealt with here:
- The backend's own program leaves its vertex arrays on between draws,
and one of them is the attribute an effect's position aliases. Left
on, it won: the ribbons were drawn from the wrong vertices, the
simple ribbon a solid blot of layer on layer. An effect's draw now
turns the backend's arrays off first.
- The Ribbon's glow left its GLSL program bound. gl2 under GLSL binds
a program for every draw, but the Cg backend's ARB programs do not
unbind it, and a GLSL program wins over them: everything after the
glow went through it, a grey screen. The glow's passes now unbind
their program when done.
gl2 also sets the GLSL dialect for its context whatever the shader
backend, so the GLSL effects build under a Cg chain too.
Test: samples/gfx/menu_effects/menu_effects_cg_test.c (make check-cg),
run in samples-gfx under Xvfb (Cg finds its profiles through GLX). In a
legacy GL context, through the Cg backend itself, every effect's Cg
compiles in its ARB profiles and draws the same whether or not the
backend's own program drew just before, and the glow leaves no GLSL
program bound. Without the two changes above it fails on the ribbon,
the simple ribbon and the glow.
menu_wrap_offset(), which finds where a byte of a string landed in its
word_wrap() or word_wrap_wideglyph() wrap, moves to stdstring.c beside
them as word_wrap_offset(), and MaterialUI and XMB call it from there.
It gave a glyph the wide-glyph wrap had put a line end before the
offset of that line end, so the input dialog's caret sat at the end
of the line above; it now gives the glyph's own.
word_wrap_offset_test wraps plain, wide-glyph and mixed text at every
width from 1 to 39, with line ends left or made NUL as the drivers
make them, and checks that every character lands on itself or on the
line end its space or newline became, in order, that the end lands
on the end, that no wrap more than doubles its text, and that the
caret before a word moved to the next line is on that line. It found
the wrong offset and the wide-glyph wrap's runaway at narrow widths.
The warning's text was put together into menu_state_msg from five
strings every iteration while it was up. It is now built once into a
buffer of its own, again only for another reason or another language,
and menu_state_text points at it.
MaterialUI and XMB joined the input dialog's label and typed text into
a stack buffer every frame, only for the wrap cache to find it the same
as the text it kept. menu_input_dialog_text_is() compares the label and
the typed text with the kept text in place, and while they match the
box is drawn from the kept text itself: the two are joined again only
after a key changes what is typed.
With a box up, rgui_set_message() forced a redraw every iteration and
the box's drawing forced one for the next, so RGUI repainted its whole
framebuffer every frame; and the runloop marked the framebuffer dirty
whenever a box was up, so it was uploaded every frame too - for a box
that stays the same until it is answered.
RGUI now keeps the text and button state the framebuffer shows, and
redraws when the text, the box, the highlighted button or the one
under the pointer changes, or once more when the box is gone. A box
no longer marks the framebuffer dirty by itself: RGUI marks it when it
repaints. The pointer and animations still redraw as before.
The missing firmware dialog added room for a button row of its own to
the box in Ozone, XMB and MaterialUI, on top of the room every driver
now makes for a confirm's buttons, which left a gap under them the
height of a second row. That room is gone, with the variables it
left unused.
The dialog's text was copied into menu_state_msg every iteration;
menu_state_text now points at it, as at a built-in confirm's. A load
job freed with the dialog still up takes the dialog down with it, so
the menu never draws a freed message.
MaterialUI and XMB found the caret's line and column by copying the
text up to the cursor to the stack and wrapping that copy, and the
text up to the input line again for a selection: up to three wraps a
frame, with two copies. A wrap only turns whitespace into line ends
and adds line ends, so menu_wrap_offset() walks the box's own wrapped
lines to where the cursor's byte landed. The input dialog's text now
uses the box's kept wrap too, wrapped again only as it is typed.
The prefix's wrap could break differently from the text's: with the
cursor before a word that moved to the next line, the caret sat after
the previous line's last space. It now sits where the character is.
MaterialUI, XMB and Ozone measured each button's label with the font
on every frame a confirm box was up. menu_dialog_label_widths() keeps
the widths with the label strings and the font they were measured in,
and measures again only a label that is new, or every label when the
font, its size or the font generation moved. A label is told apart by
its string: another language's is another pointer. The drivers read
the widths in place.
The box's fade ran on three bits of ozone->flags. The main thread set
two of them every iteration (the render_messagebox callback, and the
input handler clearing one unless the keyboard was up) while frame()
read and wrote them - on the video thread under threaded video, where
the two threads' read-modify-writes of the same word could lose each
other's bits, these or any other.
frame() now fades the box in when its frame carries one, or the
keyboard is up, and out when neither is, keeping whether it showed
one in a field only it writes. The render_messagebox callback is gone;
ozone_render() takes whether a box is up from the menu's own state.
The box's text was wrapped and every line measured with the font each
frame, though it stays the same for as long as the box is up. The
handle now keeps the wrapped lines and the longest width with the text
and font they were made from, and a frame with the same text, font
and width draws from them. The text is copied only when it changes,
and a box cut short to fit the screen is wrapped again.
The box's text was wrapped, sometimes twice, and every line measured
with the font each frame, though it stays the same for as long as the
box is up. The handle now keeps the wrapped lines, the width they were
wrapped to and the longest line, with the text and the layout they
were made for (screen, font, button row), and a frame with the same
text and layout draws from them. The text is copied only when it
changes. The input dialog's line, which changes as it is typed, is
wrapped as before, and a box cut short to fit the screen is wrapped
again.
The box's text was wrapped and every line measured with the font each
frame, though it stays the same for as long as the box is up. The
handle now keeps the wrapped lines and the longest width with the text
and font they were made from, and a frame with the same text, font
and width draws from them. The text is copied only when it changes.
The input dialog's line, which changes as it is typed, is wrapped as
before, and a box cut short to fit the screen is wrapped again.
A Cancel/OK confirm and the "No information available" boxes copied a
msg_hash string into menu_state_msg every iteration. menu_state_text
now points at such a string instead, and MENU_STATE_TEXT() gives
whichever the box shows: the pointed-at string or the buffer the
dynamic texts (help, warnings, bind prompts) are still written into.
XMB, MaterialUI and Ozone copied the box's text into their handles on
the main thread every iteration, and their frame() read it there - on
the video thread under threaded video, with nothing ordering the write
against the read. Ozone also read the menu's own buffer from frame().
The frame info now carries the text: video_info->menu.msgbox points at
the menu's buffer, and the threaded wrapper gives a frame that has a
box its own copy, as it does the statistics text. Without the wrapper
the drivers draw the menu's text in place, with no copy at all. XMB
and MaterialUI no longer need a render_messagebox callback; Ozone's
only sets its fade flags, and its fade animations are tagged with the
alpha they drive.
rgui_set_message() copied the menu's text into a 1 KiB array in the
handle every iteration, for rgui_render() to draw a moment later on
the same thread. The handle now borrows the menu's string: it belongs
to the menu handle, outlives the driver's data, and is only rewritten
by the next menu iteration, after this one's render.
ozone_messagebox() freed and strdup'd the text every iteration, while
the frame drew it - on the video thread under threaded video. The
fade animations were tagged with that string's address, which changed
each iteration, so the fade-out never matched the fade-in it kills,
and a context reset dropped the string without freeing it.
The text now goes into a buffer in the handle: no allocation per
frame, and a tag that stays put.
xmb_messagebox() strdup'd the text every iteration and xmb_frame()
copied it to the stack and freed it, so a box on screen cost an
allocation, a free and two copies per frame. Under threaded video the
frame runs on the video thread, which freed the main thread's string.
The text now goes into a buffer in the handle, which the frame draws
in place and empties.
Ozone, XMB, MaterialUI and RGUI centered a confirm box on its text and
then added the button room below it, so every box with buttons hung
low: the Security Warning, Quit's confirm, Check Core Signatures Off
and the first-run prompt. The box was only lifted when its bottom left
the screen.
Each driver now centers the whole box, text and buttons, and still
never lifts it above the top of the screen, so a box taller than the
screen is laid out as before. The plain message box is unchanged.
core_warning_test checks that RGUI centers the warnings' boxes and the
Check Core Signatures Off confirm.
A setting, off by default. With Display Pacing, vsync off and
fullscreen, the hold releases each core frame on a vblank the display
server counted instead of sleeping to a deadline: the vblank nearest
the frame's due time, which accumulates in the content's period on the
clock, so 60 on 120 Hz and 59.94 on 60 Hz keep the content's rate. It
holds only where a frame's start cannot cost latency: the driver says
its present tears (the new present_immediate poke: Direct3D 11 and 12,
Vulkan in immediate mode), no variable refresh rate is in use, and the
content is no faster than the display. Everywhere else the timer
schedule paces, as it does with the setting off.
The display server's wait_vblank now returns a vblank count and the
latest one's time, with a bounded wait for the next. On Windows a
thread of its own sits in D3DKMTWaitForVerticalBlankEvent, which takes
no timeout, and counts; it parks unasked, and when the wait fails or
comes straight back. The hold waits two content periods at most, takes
no vblank that is old, and stands down when vblanks stop or do not
keep the display's grid - for good the second time running.
The harness drives the hold from a vblank clock of its own: the rate
at 60, 120 and 144 Hz, each case it stands aside for, and each way it
stands down. samples/gfx/win32_d3dkmt runs the Windows clock under
Wine on entry points of its own.
The six XMB background effects (ribbon, simple ribbon, simple snow,
snow, bokeh, snowflake) were baked into every video driver as fixed
shader slots, VIDEO_SHADER_MENU to VIDEO_SHADER_MENU_6. Each driver
carried its own copies of the sources, built them whether or not a menu
used them, and had a case per slot in its draw code.
Now the menu owns them. XMB keeps one table of the effects
(menu/drivers/xmb_effects.h) with each effect's sources for every
backend - GLSL (legacy and core), SPIR-V, HLSL SM3 and SM4, Metal and
GX2 - and how it draws (a mesh or a quad, its blend, whether it takes
the ribbon data, whether it flips Y). XMB installs them through
gfx_display_effect_install() and draws one by handing the draw its
effect. The drivers have a single generic path: an effect_install
callback that makes a program from the backend's source, and a draw
that goes by the effect's flags. VIDEO_SHADER_MENU..MENU_6 are gone,
and so is the shader backend's init_menu_shaders.
Installs are kept in a small lock-free table in gfx_display. The
programs are made on the drawing thread when the first effect is
drawn, all at once, so nothing is compiled while an effect is on
screen. When the video driver goes away the programs are dropped and
made again under the next one.
What this removes or speeds up:
- Menus that draw no effect (Ozone, MaterialUI, RGUI, XMB with the
effect off) build no effect programs at all.
- GL: effect draws use their own program with every uniform and
attribute location looked up once at compile. Before, every effect
draw looked up "time", "Ribbon" and "OutputSize" by name through
the shader backend, with prefix retries, each frame. The quads draw
from the full-screen mesh's buffer, as the ribbon draws from its
own: no vertices are uploaded per draw, and nothing is read from
client memory, which a core profile does not allow.
- GL core: effects no longer switch to and from the shader chain's
program through the chain path; the chain program is put back only
after an effect was drawn.
- D3D9 (HLSL and Cg): the constant registers/parameters are found once
when an effect is compiled, not on every draw.
- Vulkan: display.pipelines shrinks from 9 to 3 (plastic stays at its
own slot); the effect pipelines are made from the effect's own
SPIR-V and remade with the passes.
- D3D12: effect bytecode is compiled once; only the PSOs are remade
when the render target format changes.
- The seven Cg effect sources (gl_shaders/pipeline_*.cg.h) are gone.
Unchanged: the plastic effect and the stock shaders keep their ids;
fonts and other menus use them, and moving them buys nothing.
Behaviour notes:
- GL (gl2) effects need GLSL; a Cg-only GL build no longer draws
them.
- GL core draws effects only when built with slang (they come from
the SPIR-V); without it the background is plain.
- D3D9 HLSL no longer falls back to stock shading when an effect
fails to compile; the effect is skipped instead.
Tests:
- samples/gfx/menu_effects (new): every effect carries a source for
every backend, its flags hold together, and each source names the
inputs and uniforms the drivers set for those flags. Each GLSL
program is made through shader_glsl.c as gl2 makes it - GL legacy
and core profile, GLES 3 and 2, on Mesa's EGL device - its
locations checked and drawn once into a framebuffer. The SPIR-V goes
through spirv-val. Cross-built with mingw-w64, the HLSL is compiled
under Wine as D3D9 (SM3), D3D10/11 (SM4) and D3D12 (SM5) compile it;
what Wine's compiler does not yet support (SM1 branches and loops,
atan) is reported as skipped. Run in samples-gfx and
samples-gfx-d3d.
- samples/gfx/gfx_display_mesh covers install-once, re-making after
the driver is lost, and no draw without an install.
- samples/gfx/d3d9_failed_lock's ribbon test follows the new ids.
A staged load whose core the check refuses ends as a failed load does
and is parked with what it needs to run again, its subsystem state
included. It keeps that snapshot after the preload stage's pass too,
so a core that changes before the core stage opens it is parked, not
failed silently. Load Core and the other user actions with no load
after their probe park the core load; a parked Load Core whose core
changed since its check parks again on its re-run. Probes stay quiet.
Subsystem loads from a playlist or from netplay, whose subsystem a
refused core can't name, are not parked: they say the core wasn't
loaded and how to trust it. So does a netplay lobby join of a refused
core, which then leaves netplay off. While the first run's seed hasn't
checked the core's folder yet, they say RetroArch is still checking
the installed cores.
The companion UI's Load Core (Cocoa's menu bar) opens the core before
it parks it, so a first Load Core of an untrusted core asks; answered,
or trusted already, it starts a core that runs without content, as
before. Of the running core, the open reads load_no_content from the
running state, not the core; runloop_core_probe_live() says so, and
that core keeps its flag and starts as before.
Qt's Load Core shows no error box, and the Cocoa and Win32 companion
windows clear their status line, for a load the check held back: the
Security Warning says why, and Qt's modal box would hold the frame
loop the warning needs. A parked Load Core run again by Load Once or
Always Trust that then fails to open for another reason says "Failed
to open libretro core", as the runloop does; one the check refuses
again stays quiet.
The core loaded last keeps its pass after the unload, so its reload
after Close Content and menu or driver init pass without another hash
or warning. Where a file's identity can't bind the pass (Windows, and
Linux filesystems that don't keep ctime), its checked file stays open
to bind it. Loading another core ends the pass. So do the Core
Updater, Core Manager delete and core restore: on the main thread,
before they replace or delete a core file, they close every core file
the check keeps open for a pass or a refusal.
Builds that trust the test signing key get a Test Signing Key toggle
in Notification Visibility. Off hides the on-screen reminder; the log
line saying the build trusts a test key stays on every launch.
Release builds have no such setting.
The box can come up while a key is still down, mid-scroll or from the
press that started the load. Raising it holds back what is down, as a
menu open does, so a held direction's repeat can't walk the highlight to
Always Trust; a press made with the box up acts at once.
The box is centred on its text, so the buttons' room only grows it
downward: at scale 1.50 the Security Warning ran off the bottom in
XMB and MaterialUI, and in Ozone on a short screen. A box whose bottom
would leave the screen now moves up, never above the top. If it is
still too tall, XMB first wraps it wider by the font's measured width;
then the box is drawn as tall as the screen with the buttons at its
bottom and the text cut back to the last whole paragraph that fits, or
to a line ending in "..." when the first paragraph alone doesn't.
A named row too wide for the box drops its icons; one too wide even
then stacks its buttons one under another, each as wide as the text
column, and a stack whose labels still don't fit drops its icons too.
Text, buttons and hit boxes move together; boxes that fit are drawn as
before.
Every confirm's buttons come from one getter: Cancel and OK for a
classic confirm, the named buttons of the Security Warning with the
highlighted one lit.
RGUI draws them as one row. When three don't fit its narrowest
layouts they stack one per line, the box widening to the widest
button up to the framebuffer's width, and the box stays on screen. A
button wider than the screen is lit where it shows.
Ozone, XMB and MaterialUI lay the row out from the box's bottom edge,
so it no longer drifts onto or under that edge as the text grows, as
the first-run downloads prompt showed. XMB and MaterialUI placed it
from the text's top, mirrored, about half a line further down per
line of text. In XMB and MaterialUI a row wider than the screen no
longer widens the box past it, and MaterialUI's row stops one margin
inside each side of the screen; Ozone stops the box at the screen's
width and packs from the left.
The Security Warning's highlighted button is drawn with the cursor in
Ozone and on the selection colour in XMB and MaterialUI. Its buttons
carry their pad icons, and in XMB and MaterialUI Cancel and OK keep
theirs. In Ozone every button keeps room for an icon, so nothing
moves with the highlight, and icon and label are centred on the ink,
in the cursor as drawn.
The Security Warning harness now taps each button through RGUI under
a scripted mouse, including a click that wakes the screensaver and a
tap begun on a box since replaced.
The warning now opens the menu's confirm box with named buttons
instead of a list screen: its text in the box, then Cancel, Install
and Trust, or Cancel, Load Once and Always Trust This Core. Cancel
starts highlighted, Left/Up and Right/Down move between buttons, OK
presses the highlighted one, Back and Info cancel, and the answer is
logged. The box goes up for the pending request, waits while a
Cancel/OK confirm is open, and a press on a box an older request put
up chooses nothing.
The list screen goes with its text rows and their 40-character wrap,
the row labels and the handlers behind them; the strings the dialog
shows stay.
A classic confirm reads as Cancel and OK through the same getter, so
the drivers can draw one button row for every confirm. For the named
buttons it also says which pad icon each shows: Back on Cancel, OK on
the others, dimmed unless highlighted.
A tap whose press began on a box since replaced chooses nothing, a
hover measured on a replaced box is dropped, and a confirm set over
another box starts with nothing hovered.
Restoring a backup or using Install or Restore a Core now unpacks the
core under its own name beside the one it replaces and checks it with
the .sig kept beside what was picked. A restore from RetroArch's own
backup list may be an older build. Anything that doesn't pass goes to
the Security Warning; Install and Trust runs the restore again and
installs only when the core is still the one the warning showed.
On a Play Store build a core installed through Play Feature Delivery
is a link into the APK's read-only lib folder; a restore stages beside
the link and deletes it only once the core passes. Install and Trust
that can't run the restore again says so.
A backup gets a copy of the core's .sig beside it, whether it is
written or moved into the backups before an update, so a restore can
check it. Pruning and Delete Backup remove it with the backup.
When an update's install move puts the new core in, the old .sig is
set aside as in core_install_commit(), and the backup's copy of it
goes if the move rolls back.
While a Security Warning is pending or the confirm for turning the
checks off is up, button states from the command interfaces and the
network pad are dropped where they join the menu's input, and a MENU
request is answered with an error instead of being run. Keyboard,
touch, overlays and controllers work as before, and so does synthetic
input once neither is up. The core_warning harness drives both through
a command interface stand-in and the network pad's state.
The value lives in the trust store, not retroarch.cfg, so no config
file can turn the checks off. Turning them off always asks first with
the OK/Back confirm, even with confirmations off; turning them on asks
nothing. The row is hidden when the feature is inactive, and in a
session whose store couldn't be read it shows its value but says it
can't be changed.
The row is a switch like Core Lock's: Left and Right leave it alone
when it already sits on that side, and Start resets it to On.
The confirm dialogs (quit, reset, close content) arm their command
before the dialog is pushed. When the push fails, the command is
cleared, so a later OK elsewhere can't run it.
core_warning_push() holds one request, a copy of the check that failed,
and opens a screen built like Load Archive / Open Archive: the reason
and the full-access warning as rows above the choices, the line about
turning the checks off below, the cursor on Cancel. An install offers
Install and Trust, a load Load Once and Always Trust This Core, a core
that couldn't be read Cancel only. The text rows are wrapped short
because no menu driver wraps a label. The core updater's two refusal
messages are added with the rest.
The caller's callback gets the choice, or Cancel on Back, a newer
request or quit. Each request has a serial that its screen's rows
carry, so OK on rows built for an older request refreshes the screen
rather than answering the newer one. OK and Back take the screen off
the stack before the callback runs, so a callback that changes the
menu stack (a load starting content) isn't followed by a pop of the
wrong screen. A newer push runs the replaced request's callback with
Cancel inside itself, with the newer request already in the slot; a
choice made from there is ignored.
A request still pending when a stack flush (a tab switch, a menu
reinit) takes its screen away gets it back on the next frame; one
answered before its screen came up leaves none. Info on the screen
does nothing. core_warning_push() refuses during deinit's cancel and
when the menu driver shows no screens (null), so the caller keeps its
request instead of one nobody can answer.
samples/menu/core_warning drives the screen through the shipping
handlers, with core_signature.c rebuilt around the test key and a trust
store of its own.
The ribbon's drifting specks of light are drawn only with Ribbon
Particles on, off by default like Ribbon Glow and Plastic Effect. With
it off the ribbon draws its sheet alone, as Simple Ribbon does, and
the glow is made of what the ribbon draws. The Wii U, which builds the
specks on the CPU, skips them too.
Rebuild the horizontal map only when its source or output width changes, and invalidate it when scratch storage is freed. Keep the infrequent map builder separate using RGUI_NOINLINE so it does not disturb the unscaled path.
Reuse the existing scratch allocation and preserve upload-buffer loans and fallback copies. Cover dirty-frame reuse, changed pixels, width changes and height-only reuse in the menu framebuffer fixture.
The Ribbon is a lit sheet with drifting dust, worked out from the
menu's clock alone, so every frame shows it at its own time at any
refresh rate. Plastic Effect shades XMB icons and text as translucent
plastic, and Ribbon Glow adds a soft bloom to the Ribbon; both are
settings of their own, off by default, since both cost GPU time. The
Simplified Ribbon draws from the Ribbon's mesh.
Drivers:
- Every driver draws the sheet on the GPU from the mesh's positions,
read in place; the Wii U works out only the dust on the CPU.
- The ribbon's data reaches the GPU straight from gfx_display: its own
buffer index on Metal, written into the mapped constants on
D3D10/11/12, bound only for the ribbon draw.
- With float images the glow takes one output pass. Vulkan, GL and
Metal draw its capture and blurs before the frame's first pass, so
the pass the menu draws in is never split, which on a tiled GPU
would store and reload the whole target.
Based on PR #20101.
Co-authored-by: Jean-André Santoni <[email protected]>
A repeat the core sends as a NULL frame is left unpresented, so the
display receives the content's own frame rate and frame generation or
interpolation tools see the real cadence. It stays out of the way where
the presents are the effect (Black Frame Insertion, shader sub-frames,
Threaded Video Frame Repeat, a headset) and with the menu open,
fast-forward or a cached frame shown again.
While repeats are being skipped, the runloop holds the loop to the
content's period with its timer wherever only VSync or the threaded
hold would have, since neither can block on a frame that is never
presented, and the driver's release stands aside. Lanes in
samples/runloop/pacing and samples/gfx/threaded_video pin both halves.
Idea from beetle-psx-libretro#1013 by Razor221.
Use the same native queue limits in menu ranges and backend initialization. Honor the selected NVENC ring size instead of fixing it at four. Keep invalid legacy values on the existing four-slot fallback and restore legacy ranges when switching away from native recording.
Validate native ranges and fallback values, driver changes and actual Metal initializer slot configurations in the portable frontend tests.