Files
libretroadmin 73c11aba4c GL renderers, angrylion: fix the open items, and fail CI on UB
Rice crashed in the driver whenever it put a frame the CPU left in RDRAM
on screen: COGL_FragmentProgramCombiner had no
InitCombinerBlenderForSimpleTextureDraw, so the base version's
fixed-function setup ran and DrawFrameBuffer drew with no program bound.
It now samples the frame with the copy program. The krom ROMs that hit
it (shade32, tlut16, zbuf16) are no longer skipped by the GL lane, and
under the sanitizers they also showed Rice freeing its CTextures, which
come from new, with free.

Glide64's grLfbWriteRegion (the Puzzle League hack) drew nothing: it
called glTexSubImage2D with glTexImage2D's arguments into a texture
with no storage, drew with the default program, whose vertexOffset is
never set, told the shader the texture was 1x1 while addressing it in
texels, folded its strip on itself, never enabled its arrays, and was
clipped and culled by whatever the frame left set. It now draws the
image where it was written and puts the frame's state back as it
found it. test_glitch64_lfb_write runs Glitch64 on Mesa through
headless EGL and holds every pixel of the window to the image.

Glide64's texture conversions (the path GLES takes) worked on the
window's size in texels rather than the texture's - 640x480 texels for
a 32x32 texture, past the end of the texture buffer at large window
sizes - and touched one texel past the end besides; and every format
went up as 32-bit RGBA. 565, intensity and intensity-alpha now go up as
Glide lays them out, 4444 is rotated in place to GL's RGBA4 instead of
widened, and rows narrower than 4 bytes upload with an unpack alignment
of 1. test_glitch64_textures, built for desktop GL and for GLES 2,
uploads every format at five sizes from a buffer exactly as large as
the widest conversion needs and holds every texel to what the format
means.

Undefined behaviour UBSan found in the GL lane:
- angrylion models the RDP's adders and shifters with int arithmetic
  that wraps as the hardware does; its objects are built with -fwrapv
  (Makefile and Android.mk), bit-exact and as fast.
- glsm indexed its uniform cache with location -1 and with program
  names past it; such uniforms now go straight to GL. The core's glsm
  is edited in place: libretro-common upstream no longer has glsm, and
  this copy already carries the core's own changes.
- lightning's x86 backend stored immediates through unaligned pointers
  into the code buffer; it stores them with memcpy.
- Glide64 shifted a command byte into an int's sign bit and shifted
  negative texture row padding; Rice read matrix halves through
  unaligned pointers, negated INT_MIN for a viewport built from a VI
  size of 0 (the scale is kept until the VI has a size), and downcast
  its renderer before it was constructed.
The GL lane's sanitizer run is now SANITIZER=address,undefined, runs the
angrylion lane too, and both lanes fail on any sanitizer report.

angrylion's filtered VI now draws straight into a lent frontend buffer
with the overscan hidden (the buffer is the crop, and rows write only
its columns) and for interlaced frames under bob deinterlacing (every
line is drawn each frame). The E90 overlay takes the columns it draws
into. The lend lane runs those, and one of krom's interlaced CPU tests,
woven and bobbed.
2026-11-02 13:33:16 +01:00
..
2026-09-02 23:58:47 +02:00