[FIX]RetroArch CRASH on Metal internal assert
_validateGetBytes:39: failed assertion `texture must not be a
framebufferOnly texture.' GPU Capture were done on a
framebufferOnly texture. Fix it by setting framebufferOnly
CAMetalLayer property to NO. Subsequent MTLTexture inherits from
this property.
[FIX]Capture black frames. Resulting PNG screenshots were black.
Since GPU texture where not sync with CPU,
getBytes:bytesPerRow:fromRegion:mipmapLevel: behavior is undefined
Fix it by adding synchronizeResource command to blitCommandEncoder
In order to keep performances, syncing is done ONLY when a GPU
Capture is requested.
[FIX]Corrupted image due to incorrect viewport copy
Modify code in charge of copying MTLTexture bytes to 24bits PNG
buffer.
- Revert odroidgo changes to drm_ctx
- Introduce new drm_go2_ctx specifically for odroidgo2 (and libgo2)
- Add hw_scaling option to mitigate builtin gl scaling/filtering and to
use libgo2 and rga's hw scaling and bicubic filtering via librga. The
quality of the image is improved by this and should be a bit faster.
Credits to CrashOverride for the initial libgo2 port and
commit to RA. And to natinusala for the initial cleanup/commit in the original
drm_ctx driver. NOirBRight for finding this setting and testing.
libgo2 improvements
- Expose rga scale mode as param for future use
- Cleanup whitespace
- Add option to disable managed surfaces and allow direct posting to drm
driver
oga graphics driver
- Uses direct framebuffers in libgo2
- Bitmap font only supported for now
- Uses built-in bicubic filtering: graphics quality better than gl + bilinear
- Support for rotation
Commit 10df615d141 ("add "Send Debug Info" option under Help") added some
debug information that contains the GL_VENDOR, GL_RENDERER and GL_VERSION
strings that are returned by the glGetString() function, and is used by
algorithms to recognize the platform.
But in some GL contexts, these may be NULL which leads to a NULL pointer
dereference when trying to copy the returned strings. Commit 97247dbaecc
("gl1: check for vender/renderer was in the wrong place") later fixed it
for the GL1 driver, but it missed doing the same for the GL driver.
For example, on an Exynos Odroid XU4 with a mali-fdev GL context I get:
$ retroarch -v
[INFO] RetroArch 1.8.5 (Git 8d3f25f)
[INFO] === Build =======================================
[INFO] Capabilities: NEON VFPv3 VFPv4
[INFO] Built: Mar 18 2020
[INFO] Version: 1.8.5
[INFO] Git: 8d3f25f
[INFO] =================================================
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 30000.00 Hz.
[INFO] [Video]: Video @ 960x720
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [GL]: Found GL context: mali-fbdev
[INFO] [GL]: Detecting screen resolution 0x0.
[INFO] [EGL]: Current context: 0xf08e20.
[INFO] [GL]: Vendor: (null), Renderer: (null).
[INFO] [GL]: Version: (null).
Segmentation fault (core dumped)