[retro-gtk] Update hardware rendering section in UNIMPLEMENTED.md
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] Update hardware rendering section in UNIMPLEMENTED.md
- Date: Mon, 23 Mar 2020 13:55:07 +0000 (UTC)
commit 71f7d872e5a83d98d67783df77d385c075990b2b
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Feb 18 03:49:08 2020 +0500
Update hardware rendering section in UNIMPLEMENTED.md
OpenGL rendering is now implemented, so leave only Vulkan-specific and
shared context bits.
UNIMPLEMENTED.md | 178 ++++++-------------------------------------------------
1 file changed, 17 insertions(+), 161 deletions(-)
---
diff --git a/UNIMPLEMENTED.md b/UNIMPLEMENTED.md
index ad28488..cf8e55e 100644
--- a/UNIMPLEMENTED.md
+++ b/UNIMPLEMENTED.md
@@ -430,23 +430,11 @@ struct retro_frame_time_callback
};
```
-## Hardware Rendering
+## Hardware Rendering via Vulkan
-The hardware rendering system is unimplemented.
+Vulkan rendering is unimplemented.
```
-#define RETRO_ENVIRONMENT_SET_HW_RENDER 14
- /* struct retro_hw_render_callback * --
- * Sets an interface to let a libretro core render with
- * hardware acceleration.
- * Should be called in retro_load_game().
- * If successful, libretro cores will be able to render to a
- * frontend-provided framebuffer.
- * The size of this framebuffer will be at least as large as
- * max_width/max_height provided in get_av_info().
- * If HW rendering is used, pass only RETRO_HW_FRAME_BUFFER_VALID
or
- * NULL to retro_video_refresh_t.
- */
#define RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE (41 | RETRO_ENVIRONMENT_EXPERIMENTAL)
/* const struct retro_hw_render_interface ** --
* Returns an API specific rendering interface for accessing API
specific data.
@@ -466,18 +454,6 @@ The hardware rendering system is unimplemented.
* so it will be used after SET_HW_RENDER, but before the
context_reset callback.
*/
-#define RETRO_ENVIRONMENT_SET_HW_SHARED_CONTEXT (44 | RETRO_ENVIRONMENT_EXPERIMENTAL)
- /* N/A (null) * --
- * The frontend will try to use a 'shared' hardware context
(mostly applicable
- * to OpenGL) when a hardware context is being set up.
- *
- * Returns true if the frontend supports shared hardware contexts
and false
- * if the frontend does not support shared hardware contexts.
- *
- * This will do nothing on its own until SET_HW_RENDER env
callbacks are
- * being used.
- */
-
enum retro_hw_render_interface_type
{
RETRO_HW_RENDER_INTERFACE_VULKAN = 0,
@@ -509,141 +485,24 @@ struct retro_hw_render_context_negotiation_interface
enum retro_hw_render_context_negotiation_interface_type interface_type;
unsigned interface_version;
};
+```
-/* Pass this to retro_video_refresh_t if rendering to hardware.
- * Passing NULL to retro_video_refresh_t is still a frame dupe as normal.
- * */
-#define RETRO_HW_FRAME_BUFFER_VALID ((void*)-1)
-
-/* Invalidates the current HW context.
- * Any GL state is lost, and must not be deinitialized explicitly.
- * If explicit deinitialization is desired by the libretro core,
- * it should implement context_destroy callback.
- * If called, all GPU resources must be reinitialized.
- * Usually called when frontend reinits video driver.
- * Also called first time video driver is initialized,
- * allowing libretro core to initialize resources.
- */
-typedef void (RETRO_CALLCONV *retro_hw_context_reset_t)(void);
-
-/* Gets current framebuffer which is to be rendered to.
- * Could change every frame potentially.
- */
-typedef uintptr_t (RETRO_CALLCONV *retro_hw_get_current_framebuffer_t)(void);
-
-/* Get a symbol from HW context. */
-typedef retro_proc_address_t (RETRO_CALLCONV *retro_hw_get_proc_address_t)(const char *sym);
-
-enum retro_hw_context_type
-{
- RETRO_HW_CONTEXT_NONE = 0,
- /* OpenGL 2.x. Driver can choose to use latest compatibility context. */
- RETRO_HW_CONTEXT_OPENGL = 1,
- /* OpenGL ES 2.0. */
- RETRO_HW_CONTEXT_OPENGLES2 = 2,
- /* Modern desktop core GL context. Use version_major/
- * version_minor fields to set GL version. */
- RETRO_HW_CONTEXT_OPENGL_CORE = 3,
- /* OpenGL ES 3.0 */
- RETRO_HW_CONTEXT_OPENGLES3 = 4,
- /* OpenGL ES 3.1+. Set version_major/version_minor. For GLES2 and GLES3,
- * use the corresponding enums directly. */
- RETRO_HW_CONTEXT_OPENGLES_VERSION = 5,
-
- /* Vulkan, see RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE. */
- RETRO_HW_CONTEXT_VULKAN = 6,
-
- /* Direct3D, set version_major to select the type of interface
- * returned by RETRO_ENVIRONMENT_GET_HW_RENDER_INTERFACE */
- RETRO_HW_CONTEXT_DIRECT3D = 7,
-
- RETRO_HW_CONTEXT_DUMMY = INT_MAX
-};
-
-struct retro_hw_render_callback
-{
- /* Which API to use. Set by libretro core. */
- enum retro_hw_context_type context_type;
-
- /* Called when a context has been created or when it has been reset.
- * An OpenGL context is only valid after context_reset() has been called.
- *
- * When context_reset is called, OpenGL resources in the libretro
- * implementation are guaranteed to be invalid.
- *
- * It is possible that context_reset is called multiple times during an
- * application lifecycle.
- * If context_reset is called without any notification (context_destroy),
- * the OpenGL context was lost and resources should just be recreated
- * without any attempt to "free" old resources.
- */
- retro_hw_context_reset_t context_reset;
-
- /* Set by frontend.
- * TODO: This is rather obsolete. The frontend should not
- * be providing preallocated framebuffers. */
- retro_hw_get_current_framebuffer_t get_current_framebuffer;
-
- /* Set by frontend.
- * Can return all relevant functions, including glClear on Windows. */
- retro_hw_get_proc_address_t get_proc_address;
-
- /* Set if render buffers should have depth component attached.
- * TODO: Obsolete. */
- bool depth;
-
- /* Set if stencil buffers should be attached.
- * TODO: Obsolete. */
- bool stencil;
-
- /* If depth and stencil are true, a packed 24/8 buffer will be added.
- * Only attaching stencil is invalid and will be ignored. */
-
- /* Use conventional bottom-left origin convention. If false,
- * standard libretro top-left origin semantics are used.
- * TODO: Move to GL specific interface. */
- bool bottom_left_origin;
-
- /* Major version number for core GL context or GLES 3.1+. */
- unsigned version_major;
-
- /* Minor version number for core GL context or GLES 3.1+. */
- unsigned version_minor;
-
- /* If this is true, the frontend will go very far to avoid
- * resetting context in scenarios like toggling fullscreen, etc.
- * TODO: Obsolete? Maybe frontend should just always assume this ...
- */
- bool cache_context;
-
- /* The reset callback might still be called in extreme situations
- * such as if the context is lost beyond recovery.
- *
- * For optimal stability, set this to false, and allow context to be
- * reset at any time.
- */
-
- /* A callback to be called before the context is destroyed in a
- * controlled way by the frontend. */
- retro_hw_context_reset_t context_destroy;
+## Shared OpenGL Context
- /* OpenGL resources can be deinitialized cleanly at this step.
- * context_destroy can be set to NULL, in which resources will
- * just be destroyed without any notification.
- *
- * Even when context_destroy is non-NULL, it is possible that
- * context_reset is called without any destroy notification.
- * This happens if context is lost by external factors (such as
- * notified by GL_ARB_robustness).
- *
- * In this case, the context is assumed to be already dead,
- * and the libretro implementation must not try to free any OpenGL
- * resources in the subsequent context_reset.
- */
+Hardware rendering via shared context is unimplemented.
- /* Creates a debug context. */
- bool debug_context;
-};
+```
+#define RETRO_ENVIRONMENT_SET_HW_SHARED_CONTEXT (44 | RETRO_ENVIRONMENT_EXPERIMENTAL)
+ /* N/A (null) * --
+ * The frontend will try to use a 'shared' hardware context
(mostly applicable
+ * to OpenGL) when a hardware context is being set up.
+ *
+ * Returns true if the frontend supports shared hardware contexts
and false
+ * if the frontend does not support shared hardware contexts.
+ *
+ * This will do nothing on its own until SET_HW_RENDER env
callbacks are
+ * being used.
+ */
```
## Input Descriptors
@@ -1151,9 +1010,6 @@ The proc address system is unimplemented.
* If a core wants to expose this interface,
SET_PROC_ADDRESS_CALLBACK
* **MUST** be called from within retro_set_environment().
*/
-
-typedef void (RETRO_CALLCONV *retro_proc_address_t)(void);
-
/* libretro API extension functions:
* (None here so far).
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]