Initial commit
This commit is contained in:
+207
@@ -0,0 +1,207 @@
|
||||
From 8a734f44beea9b10548ba696eaea1f5a76148fd5 Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <dc4@broadcom.com>
|
||||
Date: Tue, 9 Jul 2013 09:26:26 -0400
|
||||
Subject: [PATCH] Allow applications to set next resource handle
|
||||
|
||||
This patch adds provisions in userland to
|
||||
let apps callers set the next rendereing dispmanx resource.
|
||||
It's useful for implementing, say, a buffer carousel.
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/common/khrn_client_rpc.h | 2 ++
|
||||
interface/khronos/common/khrn_int_ids.h | 2 ++
|
||||
interface/khronos/egl/egl_client.c | 30 +++++++++++++++++++---
|
||||
interface/khronos/egl/egl_client_surface.c | 24 ++++++++++++++++-
|
||||
interface/khronos/egl/egl_client_surface.h | 3 ++-
|
||||
interface/khronos/egl/egl_int_impl.h | 5 ++--
|
||||
6 files changed, 59 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/interface/khronos/common/khrn_client_rpc.h b/interface/khronos/common/khrn_client_rpc.h
|
||||
index dc4351d..10ea060 100644
|
||||
--- a/interface/khronos/common/khrn_client_rpc.h
|
||||
+++ b/interface/khronos/common/khrn_client_rpc.h
|
||||
@@ -685,6 +685,7 @@ static INLINE void rpc_call12_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
|
||||
static INLINE void rpc_call13_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
static INLINE void rpc_call14_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
+static INLINE void rpc_call16_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, uint32_t p14, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
#endif
|
||||
|
||||
#define RPC_CALL1_OUT_CTRL(fn, thread, id, out) rpc_call1_out_ctrl(thread, id, out)
|
||||
@@ -702,6 +703,7 @@ static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
|
||||
#define RPC_CALL13_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out) rpc_call13_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out)
|
||||
#define RPC_CALL14_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) rpc_call14_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out)
|
||||
#define RPC_CALL15_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) rpc_call15_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out)
|
||||
+#define RPC_CALL16_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) rpc_call16_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out)
|
||||
|
||||
# if !defined(__SYMBIAN32__) //use functions defined in khrpc.cpp
|
||||
static INLINE uint32_t rpc_call1_out_ctrl_res(CLIENT_THREAD_STATE_T *thread,uint32_t id, void *out) { uint32_t res; rpc_begin(thread); RPC_CALL(thread, id); res = rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_RES | RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); return res; }
|
||||
diff --git a/interface/khronos/common/khrn_int_ids.h b/interface/khronos/common/khrn_int_ids.h
|
||||
index 8378f4a..ec961e0 100644
|
||||
--- a/interface/khronos/common/khrn_int_ids.h
|
||||
+++ b/interface/khronos/common/khrn_int_ids.h
|
||||
@@ -367,6 +367,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define EGLINTCREATESURFACE_ID 0x4000
|
||||
+#define EGLINTCREATESURFACE_ID_V2 0x4100
|
||||
#define EGLINTCREATEGLES11_ID 0x4001
|
||||
#define EGLINTCREATEGLES20_ID 0x4002
|
||||
#define EGLINTCREATEVG_ID 0x4003
|
||||
@@ -377,6 +378,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define EGLINTMAKECURRENT_ID 0x4008
|
||||
#define EGLINTFLUSHANDWAIT_ID 0x4009
|
||||
#define EGLINTSWAPBUFFERS_ID 0x400a
|
||||
+#define EGLINTSWAPBUFFERS_ID_V2 0x410a
|
||||
#define EGLINTSELECTMIPMAP_ID 0x400b
|
||||
#define EGLINTFLUSH_ID 0x400c
|
||||
#define EGLINTGETCOLORDATA_ID 0x400d
|
||||
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
|
||||
index 9d617c8..b8bb374 100644
|
||||
--- a/interface/khronos/egl/egl_client.c
|
||||
+++ b/interface/khronos/egl/egl_client.c
|
||||
@@ -162,6 +162,17 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T *
|
||||
void egl_gl_flush_callback(bool wait);
|
||||
void egl_vg_flush_callback(bool wait);
|
||||
|
||||
+#include "interface/vmcs_host/vc_dispmanx_types.h"
|
||||
+/**HACKHACK - give us the ability to inject a DispmanX
|
||||
+ * resource handle into the CreateWindowSurface and
|
||||
+ * SwapBuffers calls */
|
||||
+static DISPMANX_RESOURCE_HANDLE_T next_resource_handle;
|
||||
+
|
||||
+EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle)
|
||||
+{
|
||||
+ next_resource_handle = handle;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate)
|
||||
Also affects global image (and possibly others?)
|
||||
@@ -644,7 +655,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
|
||||
false,
|
||||
EGL_NO_TEXTURE,
|
||||
EGL_NO_TEXTURE,
|
||||
- 0, 0);
|
||||
+ 0, 0,
|
||||
+ next_resource_handle);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -889,7 +901,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig
|
||||
mipmap_texture,
|
||||
texture_format,
|
||||
texture_target,
|
||||
- 0, 0);
|
||||
+ 0, 0, 0);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -1031,7 +1043,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c
|
||||
false,
|
||||
EGL_NO_TEXTURE,
|
||||
EGL_NO_TEXTURE,
|
||||
- pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle);
|
||||
+ pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -2303,6 +2315,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
|
||||
vcos_log_trace("eglSwapBuffers server call");
|
||||
|
||||
+ if (next_resource_handle)
|
||||
+ RPC_CALL7(eglIntSwapBuffers_impl,
|
||||
+ thread,
|
||||
+ EGLINTSWAPBUFFERS_ID_V2,
|
||||
+ RPC_UINT(surface->serverbuffer),
|
||||
+ RPC_UINT(surface->width),
|
||||
+ RPC_UINT(surface->height),
|
||||
+ RPC_UINT(surface->internal_handle),
|
||||
+ RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0),
|
||||
+ RPC_UINT(khrn_platform_get_window_position(surface->win)),
|
||||
+ RPC_INT(next_resource_handle));
|
||||
+ else
|
||||
RPC_CALL6(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID,
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 6846dfa..128325e 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -314,7 +314,8 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
EGLenum texture_format,
|
||||
EGLenum texture_target,
|
||||
EGLNativePixmapType pixmap,
|
||||
- const uint32_t *pixmap_server_handle)
|
||||
+ const uint32_t *pixmap_server_handle,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle)
|
||||
{
|
||||
KHRN_IMAGE_FORMAT_T color;
|
||||
KHRN_IMAGE_FORMAT_T depth;
|
||||
@@ -473,6 +474,27 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
#endif
|
||||
uint32_t results[3];
|
||||
|
||||
+ if (next_resource_handle)
|
||||
+ RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl,
|
||||
+ thread,
|
||||
+ EGLINTCREATESURFACE_ID_V2,
|
||||
+ RPC_UINT(serverwin),
|
||||
+ RPC_UINT(buffers),
|
||||
+ RPC_UINT(width),
|
||||
+ RPC_UINT(height),
|
||||
+ RPC_UINT(color),
|
||||
+ RPC_UINT(depth),
|
||||
+ RPC_UINT(mask),
|
||||
+ RPC_UINT(multi),
|
||||
+ RPC_UINT(largest_pbuffer),
|
||||
+ RPC_UINT(mipmap_texture),
|
||||
+ RPC_UINT(config_depth_bits),
|
||||
+ RPC_UINT(config_stencil_bits),
|
||||
+ RPC_UINT(sem_name),
|
||||
+ RPC_UINT(type),
|
||||
+ RPC_INT(next_resource_handle),
|
||||
+ results);
|
||||
+ else
|
||||
RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl,
|
||||
thread,
|
||||
EGLINTCREATESURFACE_ID,
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
|
||||
index c99d44c..b5bf70a 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.h
|
||||
+++ b/interface/khronos/egl/egl_client_surface.h
|
||||
@@ -322,7 +322,8 @@ extern EGL_SURFACE_T *egl_surface_create(
|
||||
EGLenum texture_format,
|
||||
EGLenum texture_target,
|
||||
EGLNativePixmapType pixmap,
|
||||
- const uint32_t *pixmap_server_handle);
|
||||
+ const uint32_t *pixmap_server_handle,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle);
|
||||
extern EGL_SURFACE_T *egl_surface_from_vg_image(
|
||||
VGImage vg_handle,
|
||||
EGLSurface name,
|
||||
diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h
|
||||
index 8a5734c..51b3580 100644
|
||||
--- a/interface/khronos/egl/egl_int_impl.h
|
||||
+++ b/interface/khronos/egl/egl_int_impl.h
|
||||
@@ -56,7 +56,8 @@ FN(int, eglIntCreateSurface_impl, (
|
||||
uint32_t config_stencil_bits,
|
||||
uint32_t sem,
|
||||
uint32_t type,
|
||||
- uint32_t *results))
|
||||
+ uint32_t *results,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle))
|
||||
|
||||
FN(int, eglIntCreatePbufferFromVGImage_impl, (
|
||||
VGImage vg_handle,
|
||||
@@ -110,7 +111,7 @@ FN(void, eglIntMakeCurrent_impl, (uint32_t pid_0, uint32_t pid_1, uint32_t glver
|
||||
FN(int, eglIntFlushAndWait_impl, (uint32_t flushgl, uint32_t flushvg))
|
||||
FN(void, eglIntFlush_impl, (uint32_t flushgl, uint32_t flushvg))
|
||||
|
||||
-FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position))
|
||||
+FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position, DISPMANX_RESOURCE_HANDLE_T new_back_buffer))
|
||||
FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
|
||||
|
||||
FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
|
||||
@@ -0,0 +1,33 @@
|
||||
From 15fbe266af3dcc5b7660397204b06d04364a953a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 2 Apr 2022 21:37:42 -0700
|
||||
Subject: [PATCH] mmal: Do not use -Werror
|
||||
|
||||
Clang warns about unused-but-set variables
|
||||
interface/mmal/vc/mmal_vc_api.c:395:18: error: variable 'status' set but not used [-We
|
||||
rror,-Wunused-but-set-variable]
|
||||
| MMAL_STATUS_T status;
|
||||
| ^
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/mmal/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
|
||||
index 46f149d..c5c1642 100644
|
||||
--- a/interface/mmal/CMakeLists.txt
|
||||
+++ b/interface/mmal/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE)
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
endif (NOT DEFINED LIBRARY_TYPE)
|
||||
|
||||
-add_definitions(-Wall -Werror)
|
||||
+add_definitions(-Wall)
|
||||
|
||||
add_library(mmal SHARED util/mmal_util.c)
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
||||
+1893
File diff suppressed because it is too large
Load Diff
+865
File diff suppressed because one or more lines are too long
+27
@@ -0,0 +1,27 @@
|
||||
From 73e338f99f89bc85fe384759a385d95e904adb7f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 10 Aug 2015 02:38:27 -0700
|
||||
Subject: [PATCH] wayland-egl: Add bcm_host to dependencies
|
||||
|
||||
It uses headers like vcos_platform_types.h but does not
|
||||
depend on module which should add the required include paths
|
||||
lets add the dependency on bcm_host module which should do it
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/wayland-egl/wayland-egl.pc.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
index 8bafc15..fd259c9 100644
|
||||
--- a/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
+++ b/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
@@ -6,5 +6,6 @@ includedir=${prefix}/include
|
||||
Name: wayland-egl
|
||||
Description: VideoCore wayland-egl library
|
||||
Version: @PROJECT_APIVER@
|
||||
+Requires: bcm_host
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 8e79662e7b396325bee3f310a9406c74110cc7f4 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Sat, 24 Jan 2015 22:07:19 +0100
|
||||
Subject: [PATCH] interface: remove faulty assert() to make weston happy at
|
||||
runtime
|
||||
|
||||
This was removed after a discussion on IRC with the weston guys
|
||||
('daniels' on irc.freenode.net/#wayland).
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/vmcs_host/vc_vchi_dispmanx.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
index eab146e..29e0dee 100755
|
||||
--- a/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
+++ b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
@@ -1306,7 +1306,6 @@ static void *dispmanx_notify_func( void *arg ) {
|
||||
// Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
|
||||
vchi_service_release(dispmanx_client.notify_handle[0]);
|
||||
if (dispmanx_client.update_callback ) {
|
||||
- vcos_assert( dispmanx_client.pending_update_handle == handle);
|
||||
dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
|
||||
}
|
||||
} else {
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From 22652fec1206eb6e5b3c05e2c4933feffce922e8 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:10:47 -0800
|
||||
Subject: [PATCH] zero-out wl buffers in egl_surface_free
|
||||
|
||||
origins from buildroot
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/egl/egl_client_surface.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 42350bf..1f923d9 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -690,11 +690,13 @@ void egl_surface_free(EGL_SURFACE_T *surface)
|
||||
if (surface->back_wl_buffer) {
|
||||
wl_buffer_destroy(surface->back_wl_buffer->wl_buffer);
|
||||
free(surface->back_wl_buffer);
|
||||
+ surface->back_wl_buffer = 0;
|
||||
}
|
||||
|
||||
if (surface->front_wl_buffer) {
|
||||
wl_buffer_destroy(surface->front_wl_buffer->wl_buffer);
|
||||
free(surface->front_wl_buffer);
|
||||
+ surface->front_wl_buffer = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
From 5c0fb637f8b1286da19b904c7be1692a4aa61244 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:11:41 -0800
|
||||
Subject: [PATCH] initialize front back wayland buffers
|
||||
|
||||
origins from metrological wayland support
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/egl/egl_client_surface.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 1f923d9..9a9582c 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -401,11 +401,14 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
#ifdef BUILD_WAYLAND
|
||||
if (type == WINDOW && wl_display) {
|
||||
surface->wl_egl_window = (struct wl_egl_window*)win;
|
||||
+ surface->front_wl_buffer = NULL;
|
||||
surface->back_wl_buffer = allocate_wl_buffer(
|
||||
surface->wl_egl_window, color);
|
||||
resource = surface->back_wl_buffer->resource;
|
||||
} else {
|
||||
surface->wl_egl_window = NULL;
|
||||
+ surface->front_wl_buffer = NULL;
|
||||
+ surface->back_wl_buffer = NULL;
|
||||
resource = DISPMANX_NO_HANDLE;
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,26 @@
|
||||
From 18839d288b60aa3592ba5a3ac4ac44eb8328a793 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:09:18 -0800
|
||||
Subject: [PATCH] Remove RPC_FLUSH
|
||||
|
||||
Origins from buildroot
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/ext/gl_oes_egl_image_client.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/interface/khronos/ext/gl_oes_egl_image_client.c b/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
index f9b7287..b04ffef 100644
|
||||
--- a/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
+++ b/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
@@ -107,7 +107,6 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageO
|
||||
GLEGLIMAGETARGETTEXTURE2DOES_ID,
|
||||
RPC_ENUM(target),
|
||||
RPC_EGLID(image));
|
||||
- RPC_FLUSH(thread);
|
||||
#if EGL_BRCM_global_image
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,77 @@
|
||||
From f324e2724973aa76d054c3662d5d0903fd405390 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 13:12:47 -0800
|
||||
Subject: [PATCH] fix cmake dependency race
|
||||
|
||||
Fixes errors like
|
||||
|
||||
/a/builder/mnt/build-oe/tmp-glibc/work/raspberrypi2-oe-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_vchi_dispmanx.h:72:66:
|
||||
fatal error: interface/vmcs_host/wayland-dispmanx-server-protocol.h: No
|
||||
such file or directory
|
||||
compilation terminated.
|
||||
interface/khronos/CMakeFiles/EGL_static.dir/build.make:773: recipe for
|
||||
target 'interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o'
|
||||
failed
|
||||
make[2]: ***
|
||||
[interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o] Error 1
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/vcos/pthreads/CMakeLists.txt | 8 ++++++++
|
||||
interface/vmcs_host/CMakeLists.txt | 8 --------
|
||||
interface/vmcs_host/vc_vchi_dispmanx.h | 2 +-
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
|
||||
index 1d81ca3..d6cd415 100644
|
||||
--- a/interface/vcos/pthreads/CMakeLists.txt
|
||||
+++ b/interface/vcos/pthreads/CMakeLists.txt
|
||||
@@ -33,6 +33,14 @@ set (SOURCES
|
||||
../generic/vcos_generic_blockpool.c
|
||||
)
|
||||
|
||||
+if (BUILD_WAYLAND)
|
||||
+wayland_add_protocol_server(
|
||||
+ SOURCES
|
||||
+ ../../../interface/wayland/dispmanx.xml
|
||||
+ dispmanx
|
||||
+)
|
||||
+endif ()
|
||||
+
|
||||
if (VCOS_PTHREADS_BUILD_SHARED)
|
||||
add_library (vcos SHARED ${SOURCES})
|
||||
target_link_libraries (vcos pthread dl rt)
|
||||
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
|
||||
index 552312a..775742d 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
-if (BUILD_WAYLAND)
|
||||
-wayland_add_protocol_server(
|
||||
- VCHOSTIF_SOURCE
|
||||
- ../../interface/wayland/dispmanx.xml
|
||||
- dispmanx
|
||||
-)
|
||||
-endif ()
|
||||
-
|
||||
add_library(vchostif ${VCHOSTIF_SOURCE})
|
||||
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
index f0bae30..8c44c58 100644
|
||||
--- a/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
+++ b/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
@@ -69,7 +69,7 @@ typedef struct {
|
||||
#ifdef BUILD_WAYLAND
|
||||
/* XXX: This should be in a private header that can be included from EGL and vc_* */
|
||||
#include <wayland-server.h>
|
||||
-#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h"
|
||||
+#include "interface/vcos/pthreads/wayland-dispmanx-server-protocol.h"
|
||||
struct wl_dispmanx_server_buffer {
|
||||
struct wl_resource *resource;
|
||||
struct wl_dispmanx *dispmanx;
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
From 09de2ce12ed8a879cc822cd20c5f2756d030808a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 29 Mar 2016 20:38:30 -0700
|
||||
Subject: [PATCH] Fix for framerate with nested composition
|
||||
|
||||
frame rate appears irregular and lower than expected when using nested composition.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/egl/egl_client.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
|
||||
index 03fe67b..13a110c 100644
|
||||
--- a/interface/khronos/egl/egl_client.c
|
||||
+++ b/interface/khronos/egl/egl_client.c
|
||||
@@ -2342,6 +2342,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
surface->back_wl_buffer = buffer;
|
||||
}
|
||||
|
||||
+ glFlush();
|
||||
+ glFinish();
|
||||
+
|
||||
RPC_CALL7(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID_V2,
|
||||
@@ -2353,6 +2356,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
RPC_UINT(khrn_platform_get_window_position(surface->win)),
|
||||
RPC_INT(surface->back_wl_buffer->resource));
|
||||
|
||||
+ RPC_FLUSH(thread);
|
||||
+
|
||||
surface->front_wl_buffer->in_use = 1;
|
||||
wl_surface_attach(wl_egl_window->wl_surface,
|
||||
surface->front_wl_buffer->wl_buffer,
|
||||
@@ -2360,11 +2365,13 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
wl_surface_damage(wl_egl_window->wl_surface, 0, 0,
|
||||
surface->width, surface->height);
|
||||
wl_surface_commit(wl_egl_window->wl_surface);
|
||||
+ wl_display_flush(wl_display);
|
||||
|
||||
while(ret != -1 && surface->back_wl_buffer->in_use)
|
||||
ret = wl_display_dispatch_queue(wl_display, process->wl_queue);
|
||||
} else
|
||||
#endif
|
||||
+ {
|
||||
RPC_CALL6(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID,
|
||||
@@ -2376,6 +2383,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
RPC_UINT(khrn_platform_get_window_position(surface->win)));
|
||||
|
||||
RPC_FLUSH(thread);
|
||||
+ }
|
||||
|
||||
#ifdef ANDROID
|
||||
CLIENT_UNLOCK();
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
From 140df8cbf93fc3295f57bffeb254adeb0b17d3a0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 2 Apr 2016 10:37:24 -0700
|
||||
Subject: [PATCH] build shared library for vchostif
|
||||
|
||||
Fixes #149
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/vmcs_host/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
|
||||
index 775742d..76813c9 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
-add_library(vchostif ${VCHOSTIF_SOURCE})
|
||||
+add_library(vchostif SHARED ${VCHOSTIF_SOURCE})
|
||||
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
set(INSTALL_TARGETS vchostif)
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
From bdb5bbe994b91a7c64ca6103fbf2bbd590e6b8e5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 2 Apr 2016 10:54:59 -0700
|
||||
Subject: [PATCH] implement buffer wrapping interface for dispmanx
|
||||
|
||||
Courtesy: Zan Dobersek
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/ext/egl_wayland.c | 42 +++++++++++++++++++++++++++++
|
||||
interface/wayland/dispmanx.xml | 10 +++++++
|
||||
2 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
|
||||
index 5730743..9ef89cd 100644
|
||||
--- a/interface/khronos/ext/egl_wayland.c
|
||||
+++ b/interface/khronos/ext/egl_wayland.c
|
||||
@@ -133,8 +133,50 @@ dispmanx_create_buffer(struct wl_client *client, struct wl_resource *resource,
|
||||
buffer->handle);
|
||||
}
|
||||
|
||||
+static void
|
||||
+dispmanx_wrap_buffer(struct wl_client *client, struct wl_resource *resource,
|
||||
+ uint32_t id, uint32_t handle, int32_t width, int32_t height,
|
||||
+ uint32_t stride, uint32_t buffer_height, uint32_t format)
|
||||
+{
|
||||
+ struct wl_dispmanx_server_buffer *buffer;
|
||||
+ VC_IMAGE_TYPE_T vc_format = get_vc_format(format);
|
||||
+ uint32_t dummy;
|
||||
+
|
||||
+ if(vc_format == VC_IMAGE_MIN) {
|
||||
+ wl_resource_post_error(resource,
|
||||
+ WL_DISPMANX_ERROR_INVALID_FORMAT,
|
||||
+ "invalid format");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buffer = calloc(1, sizeof *buffer);
|
||||
+ if (buffer == NULL) {
|
||||
+ wl_resource_post_no_memory(resource);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buffer->handle = handle;
|
||||
+ buffer->width = width;
|
||||
+ buffer->height = height;
|
||||
+ buffer->format = format;
|
||||
+
|
||||
+ buffer->resource = wl_resource_create(resource->client, &wl_buffer_interface,
|
||||
+ 1, id);
|
||||
+ if (!buffer->resource) {
|
||||
+ wl_resource_post_no_memory(resource);
|
||||
+ vc_dispmanx_resource_delete(buffer->handle);
|
||||
+ free(buffer);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wl_resource_set_implementation(buffer->resource,
|
||||
+ (void (**)(void)) &dispmanx_buffer_interface,
|
||||
+ buffer, destroy_buffer);
|
||||
+}
|
||||
+
|
||||
static const struct wl_dispmanx_interface dispmanx_interface = {
|
||||
dispmanx_create_buffer,
|
||||
+ dispmanx_wrap_buffer,
|
||||
};
|
||||
|
||||
static void
|
||||
diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml
|
||||
index c18626d..11ed1ef 100644
|
||||
--- a/interface/wayland/dispmanx.xml
|
||||
+++ b/interface/wayland/dispmanx.xml
|
||||
@@ -118,6 +118,16 @@
|
||||
<arg name="buffer" type="object" interface="wl_buffer"/>
|
||||
<arg name="handle" type="uint"/>
|
||||
</event>
|
||||
+
|
||||
+ <request name="wrap_buffer">
|
||||
+ <arg name="id" type="new_id" interface="wl_buffer"/>
|
||||
+ <arg name="handle" type="uint"/>
|
||||
+ <arg name="width" type="int"/>
|
||||
+ <arg name="height" type="int"/>
|
||||
+ <arg name="stride" type="uint"/>
|
||||
+ <arg name="buffer_height" type="uint"/>
|
||||
+ <arg name="format" type="uint"/>
|
||||
+ </request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
From ffdcdf7605f4f266b408cf161e7c76dab54d689b Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Date: Thu, 19 Jan 2017 18:56:07 +0000
|
||||
Subject: [PATCH] Implement triple buffering for wayland
|
||||
|
||||
Change from double to triple buffering for wayland.
|
||||
This enables higher frame rates without tearing artifacts
|
||||
by allowing both the glFinish and the buffer release
|
||||
interlock to operate without pushing the frame period
|
||||
to two vertical intervals
|
||||
|
||||
Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/egl/egl_client.c | 3 ++-
|
||||
interface/khronos/egl/egl_client_surface.c | 8 ++++++++
|
||||
interface/khronos/egl/egl_client_surface.h | 11 +++++++++++
|
||||
3 files changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
|
||||
index 13a110c..0380274 100644
|
||||
--- a/interface/khronos/egl/egl_client.c
|
||||
+++ b/interface/khronos/egl/egl_client.c
|
||||
@@ -2323,7 +2323,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
|
||||
buffer_temp = surface->front_wl_buffer;
|
||||
surface->front_wl_buffer = surface->back_wl_buffer;
|
||||
- surface->back_wl_buffer = buffer_temp;
|
||||
+ surface->back_wl_buffer = surface->middle_wl_buffer;
|
||||
+ surface->middle_wl_buffer = buffer_temp;
|
||||
|
||||
configid = egl_config_to_id(surface->config);
|
||||
color = egl_config_get_color_format(configid);
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 9a9582c..10b3b04 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -402,12 +402,14 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
if (type == WINDOW && wl_display) {
|
||||
surface->wl_egl_window = (struct wl_egl_window*)win;
|
||||
surface->front_wl_buffer = NULL;
|
||||
+ surface->middle_wl_buffer = NULL;
|
||||
surface->back_wl_buffer = allocate_wl_buffer(
|
||||
surface->wl_egl_window, color);
|
||||
resource = surface->back_wl_buffer->resource;
|
||||
} else {
|
||||
surface->wl_egl_window = NULL;
|
||||
surface->front_wl_buffer = NULL;
|
||||
+ surface->middle_wl_buffer = NULL;
|
||||
surface->back_wl_buffer = NULL;
|
||||
resource = DISPMANX_NO_HANDLE;
|
||||
}
|
||||
@@ -696,6 +698,12 @@ void egl_surface_free(EGL_SURFACE_T *surface)
|
||||
surface->back_wl_buffer = 0;
|
||||
}
|
||||
|
||||
+ if (surface->middle_wl_buffer) {
|
||||
+ wl_buffer_destroy(surface->middle_wl_buffer->wl_buffer);
|
||||
+ free(surface->middle_wl_buffer);
|
||||
+ surface->middle_wl_buffer = 0;
|
||||
+ }
|
||||
+
|
||||
if (surface->front_wl_buffer) {
|
||||
wl_buffer_destroy(surface->front_wl_buffer->wl_buffer);
|
||||
free(surface->front_wl_buffer);
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
|
||||
index e328b77..58a3184 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.h
|
||||
+++ b/interface/khronos/egl/egl_client_surface.h
|
||||
@@ -312,6 +312,17 @@ typedef struct {
|
||||
*/
|
||||
struct wl_dispmanx_client_buffer *front_wl_buffer;
|
||||
|
||||
+ /*
|
||||
+ middle_wl_buffer
|
||||
+
|
||||
+ Validity:
|
||||
+ type == WINDOW
|
||||
+
|
||||
+ Invariant:
|
||||
+ client-side information about the wl_buffer in the middle
|
||||
+ */
|
||||
+ struct wl_dispmanx_client_buffer *middle_wl_buffer;
|
||||
+
|
||||
/*
|
||||
back_wl_buffer
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From 4624c934d1a783968306e61ded4389c153e3d009 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 10 May 2017 06:39:34 +0000
|
||||
Subject: [PATCH] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
|
||||
|
||||
weston code uses these defines
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/include/GLES2/gl2ext.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/GLES2/gl2ext.h b/interface/khronos/include/GLES2/gl2ext.h
|
||||
index 4eacf7f..b1acc9f 100644
|
||||
--- a/interface/khronos/include/GLES2/gl2ext.h
|
||||
+++ b/interface/khronos/include/GLES2/gl2ext.h
|
||||
@@ -327,6 +327,14 @@ typedef void* GLeglImageOES;
|
||||
#define GL_RGBX_BRCM 0x80EE
|
||||
#endif
|
||||
|
||||
+#ifndef GL_EXT_texture_rg
|
||||
+#define GL_EXT_texture_rg 1
|
||||
+#define GL_RED_EXT 0x1903
|
||||
+#define GL_RG_EXT 0x8227
|
||||
+#define GL_R8_EXT 0x8229
|
||||
+#define GL_RG8_EXT 0x822B
|
||||
+#endif /* GL_EXT_texture_rg */
|
||||
+
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
From 528a439539a77e67bf136d425eac3240ca6f1cd7 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Galbusera <gizero@gmail.com>
|
||||
Date: Fri, 14 Jul 2017 09:52:54 +0200
|
||||
Subject: [PATCH] EGL/glplatform.h: define EGL_CAST
|
||||
|
||||
C++ / C typecast macros for special EGL handle values: used by libepoxy code
|
||||
The definition comes from the updated version of this header in mesa.
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
interface/khronos/include/EGL/eglplatform.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglplatform.h b/interface/khronos/include/EGL/eglplatform.h
|
||||
index 1f7c930..c39d425 100644
|
||||
--- a/interface/khronos/include/EGL/eglplatform.h
|
||||
+++ b/interface/khronos/include/EGL/eglplatform.h
|
||||
@@ -202,4 +202,11 @@ EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *i
|
||||
#include "interface/khronos/common/khrn_client_mangle.h"
|
||||
#endif
|
||||
|
||||
+/* C++ / C typecast macros for special EGL handle values */
|
||||
+#if defined(__cplusplus)
|
||||
+#define EGL_CAST(type, value) (static_cast<type>(value))
|
||||
+#else
|
||||
+#define EGL_CAST(type, value) ((type) (value))
|
||||
+#endif
|
||||
+
|
||||
#endif /* __eglplatform_h */
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
From c5969e5e5c50e2c9b32c6f945040a8e5763ba06c Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Date: Sat, 27 Jan 2018 12:28:31 -0500
|
||||
Subject: [PATCH] Allow multiple wayland compositor state data per process
|
||||
|
||||
When eglBindWaylandDisplayWL is called store the wl_global
|
||||
created in a list associated with the wayland display.
|
||||
This allows multiple wayland compositor instances to be
|
||||
created and used per process. This scenario is common for
|
||||
applications integrating externl process UI elements
|
||||
via embedded composition e.g. westeros
|
||||
|
||||
Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/common/khrn_client.c | 2 +-
|
||||
interface/khronos/common/khrn_client.h | 11 +++++-
|
||||
interface/khronos/ext/egl_wayland.c | 50 ++++++++++++++++++++++----
|
||||
3 files changed, 55 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c
|
||||
index d7e798e..60bdb63 100644
|
||||
--- a/interface/khronos/common/khrn_client.c
|
||||
+++ b/interface/khronos/common/khrn_client.c
|
||||
@@ -147,7 +147,7 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process)
|
||||
{
|
||||
if (!process->inited) {
|
||||
#ifdef BUILD_WAYLAND
|
||||
- process->wl_global = NULL;
|
||||
+ process->wlStateMap = NULL;
|
||||
#endif
|
||||
|
||||
if (!khrn_pointer_map_init(&process->contexts, 64))
|
||||
diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h
|
||||
index 615f7b4..4fa86f7 100644
|
||||
--- a/interface/khronos/common/khrn_client.h
|
||||
+++ b/interface/khronos/common/khrn_client.h
|
||||
@@ -170,6 +170,15 @@ static INLINE CLIENT_THREAD_STATE_T *CLIENT_GET_CHECK_THREAD_STATE(void)
|
||||
return (CLIENT_THREAD_STATE_T *)platform_tls_get_check(client_tls);
|
||||
}
|
||||
|
||||
+#ifdef BUILD_WAYLAND
|
||||
+typedef struct WAYLAND_STATE
|
||||
+{
|
||||
+ struct WAYLAND_STATE *next;
|
||||
+ struct wl_display *display;
|
||||
+ struct wl_global *wl_global;
|
||||
+} WAYLAND_STATE_T;
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
per-process state
|
||||
|
||||
@@ -318,7 +327,7 @@ struct CLIENT_PROCESS_STATE {
|
||||
struct wl_event_queue *wl_queue;
|
||||
|
||||
/* Compositor-side Wayland state */
|
||||
- struct wl_global *wl_global;
|
||||
+ WAYLAND_STATE_T *wlStateMap;
|
||||
#endif
|
||||
};
|
||||
|
||||
diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
|
||||
index 9ef89cd..abd5ab3 100644
|
||||
--- a/interface/khronos/ext/egl_wayland.c
|
||||
+++ b/interface/khronos/ext/egl_wayland.c
|
||||
@@ -208,17 +208,38 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
{
|
||||
CLIENT_THREAD_STATE_T *thread;
|
||||
CLIENT_PROCESS_STATE_T *process;
|
||||
+ WAYLAND_STATE_T *stateIter;
|
||||
+ WAYLAND_STATE_T *stateNew;
|
||||
+ struct wl_global *wl_global;
|
||||
|
||||
if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
|
||||
return EGL_FALSE;
|
||||
|
||||
- if (process->wl_global != NULL)
|
||||
+ stateIter= process->wlStateMap;
|
||||
+ while( stateIter )
|
||||
+ {
|
||||
+ if ( stateIter->display == display )
|
||||
+ goto error;
|
||||
+ stateIter= stateIter->next;
|
||||
+ }
|
||||
+
|
||||
+ wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
|
||||
+ NULL, bind_dispmanx);
|
||||
+ if (wl_global == NULL)
|
||||
goto error;
|
||||
|
||||
- process->wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
|
||||
- NULL, bind_dispmanx);
|
||||
- if (process->wl_global == NULL)
|
||||
+ stateNew= (WAYLAND_STATE_T*)calloc( 1, sizeof(WAYLAND_STATE_T));
|
||||
+ if (stateNew == NULL )
|
||||
+ {
|
||||
+ wl_global_destroy(wl_global);
|
||||
goto error;
|
||||
+ }
|
||||
+
|
||||
+ stateNew->next= process->wlStateMap;
|
||||
+ stateNew->display= display;
|
||||
+ stateNew->wl_global= wl_global;
|
||||
+ process->wlStateMap= stateNew;
|
||||
+ CLIENT_UNLOCK();
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
@@ -232,12 +253,29 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
{
|
||||
CLIENT_THREAD_STATE_T *thread;
|
||||
CLIENT_PROCESS_STATE_T *process;
|
||||
+ WAYLAND_STATE_T *stateIter;
|
||||
+ WAYLAND_STATE_T *statePrev;
|
||||
|
||||
if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
|
||||
return EGL_FALSE;
|
||||
|
||||
- wl_global_destroy(process->wl_global);
|
||||
- process->wl_global = NULL;
|
||||
+ statePrev= NULL;
|
||||
+ stateIter= process->wlStateMap;
|
||||
+ while( stateIter )
|
||||
+ {
|
||||
+ if ( stateIter->display == display )
|
||||
+ {
|
||||
+ wl_global_destroy(stateIter->wl_global);
|
||||
+ if ( statePrev )
|
||||
+ statePrev->next= stateIter->next;
|
||||
+ else
|
||||
+ process->wlStateMap= stateIter->next;
|
||||
+ free( stateIter );
|
||||
+ break;
|
||||
+ }
|
||||
+ statePrev= stateIter;
|
||||
+ stateIter= stateIter->next;
|
||||
+ }
|
||||
|
||||
CLIENT_UNLOCK();
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From 8091dac73f792fb000e7ec97de6be23cd84b7cb7 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Hromic <hhromic@gmail.com>
|
||||
Date: Sun, 13 May 2018 10:49:04 +0100
|
||||
Subject: [PATCH] khronos: backport typedef for EGL_EXT_image_dma_buf_import
|
||||
|
||||
The `gstreamer1.0-plugins-base` package version `1.14` uses `EGL_EXT_image_dma_buf_import`, which
|
||||
expects the `EGLuint64KHR` typedef that is present in recent versions of Khronos.
|
||||
However, the older version included in userland does not provide it.
|
||||
|
||||
This patch backports the missing typedef from recent Khronos into userland.
|
||||
See: <https://www.khronos.org/registry/EGL/api/EGL/eglext.h>
|
||||
|
||||
Submitted to userland in <https://github.com/raspberrypi/userland/pull/467>
|
||||
|
||||
Upstream-Status: Submitted
|
||||
---
|
||||
interface/khronos/include/EGL/eglext.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
|
||||
index d7e5ba7..dcc90ce 100755
|
||||
--- a/interface/khronos/include/EGL/eglext.h
|
||||
+++ b/interface/khronos/include/EGL/eglext.h
|
||||
@@ -190,6 +190,10 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSy
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
|
||||
+#ifndef EGL_KHR_uint64_typedef
|
||||
+#define EGL_KHR_uint64_typedef 1
|
||||
+typedef khronos_uint64_t EGLuint64KHR;
|
||||
+#endif /* EGL_KHR_uint64_typedef */
|
||||
|
||||
#ifndef EGL_WL_bind_wayland_display
|
||||
#define EGL_WL_bind_wayland_display 1
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From 214f1895db14e3a88d5b2b3b6c844af3890e2eba Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 15 Jul 2018 00:48:38 -0700
|
||||
Subject: [PATCH] Add EGL_IMG_context_priority related defines
|
||||
|
||||
These defines are needed for compiling weston 4.x
|
||||
taken from Khronos headers
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/include/EGL/eglext.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
|
||||
index dcc90ce..6842bf9 100755
|
||||
--- a/interface/khronos/include/EGL/eglext.h
|
||||
+++ b/interface/khronos/include/EGL/eglext.h
|
||||
@@ -93,6 +93,14 @@ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
+#ifndef EGL_IMG_context_priority
|
||||
+#define EGL_IMG_context_priority 1
|
||||
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3102
|
||||
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
+#endif /* EGL_IMG_context_priority */
|
||||
+
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
From bcdc525b2e4403f9e878e93cbd0d146ce9e37bb8 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 25 Jul 2019 23:30:27 -0700
|
||||
Subject: [PATCH] libfdt: Undefine __wordsize if already defined
|
||||
|
||||
glibc 2.30+ defines __wordsize, which is same so its easier to compile
|
||||
for multiple versions of glibc even ones which does not have this define
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
opensrc/helpers/libfdt/libfdt_env.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/opensrc/helpers/libfdt/libfdt_env.h b/opensrc/helpers/libfdt/libfdt_env.h
|
||||
index f4608be..5e83a27 100644
|
||||
--- a/opensrc/helpers/libfdt/libfdt_env.h
|
||||
+++ b/opensrc/helpers/libfdt/libfdt_env.h
|
||||
@@ -18,6 +18,10 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
+#ifdef __bitwise
|
||||
+#undef __bitwise
|
||||
+#endif
|
||||
+
|
||||
#ifdef __CHECKER__
|
||||
#define FDT_FORCE __attribute__((force))
|
||||
#define FDT_BITWISE __attribute__((bitwise))
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
From 372b3b75945300604c9b7b012ecb25c0548a1495 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Jansa <martin.jansa@lge.com>
|
||||
Date: Wed, 13 Jun 2018 18:22:22 +0000
|
||||
Subject: [PATCH] openmaxil: add pkg-config file
|
||||
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
CMakeLists.txt | 2 +-
|
||||
pkgconfig/openmaxil.pc.in | 10 ++++++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
create mode 100644 pkgconfig/openmaxil.pc.in
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 80337b2..3e3c90e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -133,7 +133,7 @@ include_directories("${PROJECT_BINARY_DIR}")
|
||||
include(FindPkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
# Produce a pkg-config file
|
||||
- foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc)
|
||||
+ foreach(PCFILE bcm_host.pc brcmegl.pc brcmglesv2.pc brcmvg.pc vcsm.pc mmal.pc openmaxil.pc)
|
||||
configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
|
||||
diff --git a/pkgconfig/openmaxil.pc.in b/pkgconfig/openmaxil.pc.in
|
||||
new file mode 100644
|
||||
index 0000000..8793a61
|
||||
--- /dev/null
|
||||
+++ b/pkgconfig/openmaxil.pc.in
|
||||
@@ -0,0 +1,10 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
+exec_prefix=${prefix}
|
||||
+libdir=${exec_prefix}/lib
|
||||
+includedir=${prefix}/include
|
||||
+
|
||||
+Name: openmaxil
|
||||
+Description: Broadcom openmaxil library
|
||||
+Version: 1
|
||||
+Libs: -L${libdir} -lopenmaxil -lvcos -lvchiq_arm -pthread
|
||||
+Cflags: -I${includedir} -I${includedir}/IL -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
From d08003ab30452b4268121bcf82e03fdf21c89cdd Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 31 Mar 2020 11:51:02 -0700
|
||||
Subject: [PATCH] cmake: Disable format-overflow warning as error
|
||||
|
||||
gcc10 complains about a check which could potentially be null
|
||||
|
||||
build/inc/interface/vcos/vcos_logging.h:234:88: error: '%s' directive argument is null [-Werror=format-overflow=]
|
||||
234 | # define _VCOS_LOG_X(cat, _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0)
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A potential fix would be to check for fmt not being null but lets leave
|
||||
that to experts
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
|
||||
index 2f4beb9..7a4ab06 100644
|
||||
--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
|
||||
+++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ if (WIN32)
|
||||
set(VCOS_PLATFORM win32)
|
||||
else ()
|
||||
set(VCOS_PLATFORM pthreads)
|
||||
- add_definitions(-Wall -Werror)
|
||||
+ add_definitions(-Wall -Werror -Wno-error=format-overflow)
|
||||
endif ()
|
||||
|
||||
# set this as we want all the source of vchostif to be available in libbcm_host
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
From 451e8458e45926e4e1c0433864ac4cf8b05d792b Mon Sep 17 00:00:00 2001
|
||||
From: Trevor Woerner <twoerner@gmail.com>
|
||||
Date: Fri, 27 Nov 2020 03:12:26 -0500
|
||||
Subject: [PATCH] all host_applications: remove non-existent projects
|
||||
|
||||
The ALL_APPS symbol will optionally build an additional set of projects,
|
||||
however, several of them don't exist anymore. Remove them from the list of
|
||||
ALL_APPS.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/raspberrypi/userland/pull/661]
|
||||
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
|
||||
---
|
||||
host_applications/linux/CMakeLists.txt | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt
|
||||
index 928b637..554ae46 100644
|
||||
--- a/host_applications/linux/CMakeLists.txt
|
||||
+++ b/host_applications/linux/CMakeLists.txt
|
||||
@@ -14,10 +14,6 @@ add_subdirectory(apps/dtoverlay)
|
||||
add_subdirectory(apps/dtmerge)
|
||||
|
||||
if(ALL_APPS)
|
||||
- add_subdirectory(apps/vcdbg)
|
||||
- add_subdirectory(libs/elftoolchain)
|
||||
- # add_subdirectory(apps/smct)
|
||||
- add_subdirectory(apps/edid_parser)
|
||||
add_subdirectory(apps/hello_pi)
|
||||
endif()
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
From 5f4324a0008c2e8e1f511432f98bf85c9fffd35c Mon Sep 17 00:00:00 2001
|
||||
From: Trevor Woerner <twoerner@gmail.com>
|
||||
Date: Fri, 27 Nov 2020 03:18:50 -0500
|
||||
Subject: [PATCH] hello_pi: optionally build wayland-specific app
|
||||
|
||||
Only build the wayland-specific hello_pi app when building for wayland.
|
||||
|
||||
Upstream-Status: Inappropriate [the wayland example is not part of upstream]
|
||||
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
|
||||
---
|
||||
host_applications/linux/apps/hello_pi/CMakeLists.txt | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
index 2849fad..7de3265 100644
|
||||
--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
+++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
@@ -25,7 +25,9 @@ add_subdirectory(hello_encode)
|
||||
add_subdirectory(hello_jpeg)
|
||||
add_subdirectory(hello_videocube)
|
||||
add_subdirectory(hello_teapot)
|
||||
-add_subdirectory(hello_wayland)
|
||||
+if (BUILD_WAYLAND)
|
||||
+ add_subdirectory(hello_wayland)
|
||||
+endif()
|
||||
|
||||
if(BUILD_FONT)
|
||||
set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
From 4a3e515d3ea7ff0fc4063b9677b056af4ee7a3f6 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 2 Dec 2020 14:28:01 -0800
|
||||
Subject: [PATCH] userland: Sync needed defines for weston build
|
||||
|
||||
eglext.h from userland is not sufficient to compile latest weston,
|
||||
therefore import needed defines and typedefs from latest mesa
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
interface/khronos/include/EGL/eglext.h | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
|
||||
index 6842bf9..7118e92 100755
|
||||
--- a/interface/khronos/include/EGL/eglext.h
|
||||
+++ b/interface/khronos/include/EGL/eglext.h
|
||||
@@ -225,6 +225,20 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st
|
||||
|
||||
#endif
|
||||
|
||||
+typedef void* EGLSyncKHR;
|
||||
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
|
||||
+typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
|
||||
+#ifndef EGL_ANDROID_native_fence_sync
|
||||
+#define EGL_ANDROID_native_fence_sync 1
|
||||
+#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
|
||||
+#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
|
||||
+#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
|
||||
+#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
|
||||
+typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
+#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
+EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
+#endif
|
||||
+#endif /* EGL_ANDROID_native_fence_sync */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
Reference in New Issue
Block a user