beetle-psx-libretro/rsx
Eric Warmenhoven f9fa3eb5e8 Fix Vulkan renderer on Metal.
Vertex attribute binding strides must be aligned to 4 bytes, so says
MoltenVK. So we'll create the quad as R32G32_SFLOAT instead of
R8G8_SNORM.

Also when running a debug build of the core in a debug build of
retroarch in the debugger, the dynamic linker gets very confused about
which spirv-cross functions to call. The easiest way to give it a clue
is to reduce the exported symbol list.

Also fix the debug build on Apple.
2023-05-05 22:27:59 -04:00
..
shaders_gl GLES 3.0 Support on HW Renderer 2022-07-06 18:17:16 -07:00
README.md Update READMEs 2019-12-25 11:04:17 -08:00
rsx_dump.cpp Cut down on stdio.h usage 2020-10-03 21:51:46 +02:00
rsx_dump.h Rework UpdateDisplayMode and rsx set_display_mode functions 2020-02-25 13:04:35 -08:00
rsx_intf.cpp Make it so you can select between the old and new crop behavior 2021-11-01 17:25:49 +01:00
rsx_intf.h Make it so you can select between the old and new crop behavior 2021-11-01 17:25:49 +01:00
rsx_lib_gl.cpp Fix Vulkan renderer on Metal. 2023-05-05 22:27:59 -04:00
rsx_lib_gl.h Revert "improve context switching" 2020-10-02 13:28:38 +02:00
rsx_lib_vulkan.cpp Make it so you can select between the old and new crop behavior 2021-11-01 17:25:49 +01:00
rsx_lib_vulkan.h Add options to exclude sprites and 2D polygons from texture filtering 2020-09-26 22:27:08 -03:00

RSX API and OpenGL 3.3 Renderer

RSX API

The RSX API is the means by which components of the Beetle PSX libretro core interface with the hardware renderers. The RSX API offers two general classes of functions for the core. The first class consists of various functions used to perform libretro-specific actions such as reading core options or preparing/finalizing the current emulation loop frame. The second class of functions consists of RSX interface functions that the emulated PSX GPU uses to issue commands to the hardware renderer. Not every emulated PSX GPU command has a corresponding RSX interface function, but the set of available functions can be extended or modified as necessary when bugs are discovered and higher accuracy is required.

Each unique hardware renderer will implement RSX interface functions as another layer of function calls, typically but not necessarily one per RSX interface function. The RSX interface should then select the correct function to call based on the currently running hardware renderer.

The RSX API also includes support for dumping RSX API calls to file, which can be utilized for debugging purposes by any renderers that implement RSX playback.

OpenGL 3.3 Renderer

The OpenGL renderer is currently implemented in rsx_lib_gl.cpp and can be called via the functions exposed in rsx_lib_gl.h.

Building

The RSX API and OpenGL renderer are components of the Beetle PSX libretro core. To build with OpenGL support, run make HAVE_OPENGL=1 in the repository's top level directory. To build with all possible hardware renderers, instead run make HAVE_HW=1. To build with dump support, additionally pass RSX_DUMP=1.

Coding Style

The preferred coding style for the rsx subdirectory is the libretro coding style. See: https://docs.libretro.com/development/coding-standards/

Credits

The OpenGL renderer was originally authored by simias as a port/plugin of Rustation's GL renderer to Beetle PSX.