Skip to content

Commit

Permalink
libretro: macos build fix
Browse files Browse the repository at this point in the history
Some OpenGL functions are missing on macOS
  • Loading branch information
flyinghead committed Nov 13, 2023
1 parent 4cd90d8 commit 32ecb14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
12 changes: 8 additions & 4 deletions core/deps/libretro-common/glsym/glsym_gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ const struct rglgen_sym_map rglgen_symbol_map[] = {
SYM(VertexAttribL1ui64ARB),
SYM(VertexAttribL1ui64vARB),
SYM(GetVertexAttribLui64vARB),
SYM(CreateSyncFromCLeventARB),
SYM(DispatchComputeGroupSizeARB),
SYM(DebugMessageControlARB),
SYM(DebugMessageInsertARB),
Expand Down Expand Up @@ -1097,7 +1096,6 @@ const struct rglgen_sym_map rglgen_symbol_map[] = {
SYM(ConservativeRasterParameterfNV),
SYM(ConservativeRasterParameteriNV),
SYM(DrawVkImageNV),
SYM(GetVkProcAddrNV),
SYM(WaitVkSemaphoreNV),
SYM(SignalVkSemaphoreNV),
SYM(SignalVkFenceNV),
Expand Down Expand Up @@ -1267,6 +1265,10 @@ const struct rglgen_sym_map rglgen_symbol_map[] = {
SYM(GetIntegerui64i_vNV),
SYM(ViewportSwizzleNV),
SYM(FramebufferTextureMultiviewOVR),
#ifndef __APPLE__
SYM(CreateSyncFromCLeventARB),
SYM(GetVkProcAddrNV),
#endif

{ NULL, NULL },
};
Expand Down Expand Up @@ -1944,7 +1946,6 @@ RGLSYMGLISIMAGEHANDLERESIDENTARBPROC __rglgen_glIsImageHandleResidentARB;
RGLSYMGLVERTEXATTRIBL1UI64ARBPROC __rglgen_glVertexAttribL1ui64ARB;
RGLSYMGLVERTEXATTRIBL1UI64VARBPROC __rglgen_glVertexAttribL1ui64vARB;
RGLSYMGLGETVERTEXATTRIBLUI64VARBPROC __rglgen_glGetVertexAttribLui64vARB;
RGLSYMGLCREATESYNCFROMCLEVENTARBPROC __rglgen_glCreateSyncFromCLeventARB;
RGLSYMGLDISPATCHCOMPUTEGROUPSIZEARBPROC __rglgen_glDispatchComputeGroupSizeARB;
RGLSYMGLDEBUGMESSAGECONTROLARBPROC __rglgen_glDebugMessageControlARB;
RGLSYMGLDEBUGMESSAGEINSERTARBPROC __rglgen_glDebugMessageInsertARB;
Expand Down Expand Up @@ -2340,7 +2341,6 @@ RGLSYMGLSUBPIXELPRECISIONBIASNVPROC __rglgen_glSubpixelPrecisionBiasNV;
RGLSYMGLCONSERVATIVERASTERPARAMETERFNVPROC __rglgen_glConservativeRasterParameterfNV;
RGLSYMGLCONSERVATIVERASTERPARAMETERINVPROC __rglgen_glConservativeRasterParameteriNV;
RGLSYMGLDRAWVKIMAGENVPROC __rglgen_glDrawVkImageNV;
RGLSYMGLGETVKPROCADDRNVPROC __rglgen_glGetVkProcAddrNV;
RGLSYMGLWAITVKSEMAPHORENVPROC __rglgen_glWaitVkSemaphoreNV;
RGLSYMGLSIGNALVKSEMAPHORENVPROC __rglgen_glSignalVkSemaphoreNV;
RGLSYMGLSIGNALVKFENCENVPROC __rglgen_glSignalVkFenceNV;
Expand Down Expand Up @@ -2511,3 +2511,7 @@ RGLSYMGLGETINTEGERUI64I_VNVPROC __rglgen_glGetIntegerui64i_vNV;
RGLSYMGLVIEWPORTSWIZZLENVPROC __rglgen_glViewportSwizzleNV;
RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR;

#ifndef __APPLE__
RGLSYMGLCREATESYNCFROMCLEVENTARBPROC __rglgen_glCreateSyncFromCLeventARB;
RGLSYMGLGETVKPROCADDRNVPROC __rglgen_glGetVkProcAddrNV;
#endif
11 changes: 7 additions & 4 deletions core/deps/libretro-common/include/glsym/glsym_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ typedef GLboolean (APIENTRYP RGLSYMGLISIMAGEHANDLERESIDENTARBPROC) (GLuint64 han
typedef void (APIENTRYP RGLSYMGLVERTEXATTRIBL1UI64ARBPROC) (GLuint index, GLuint64EXT x);
typedef void (APIENTRYP RGLSYMGLVERTEXATTRIBL1UI64VARBPROC) (GLuint index, const GLuint64EXT *v);
typedef void (APIENTRYP RGLSYMGLGETVERTEXATTRIBLUI64VARBPROC) (GLuint index, GLenum pname, GLuint64EXT *params);
typedef GLsync (APIENTRYP RGLSYMGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
typedef void (APIENTRYP RGLSYMGLDISPATCHCOMPUTEGROUPSIZEARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z);
typedef void (APIENTRYP RGLSYMGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
typedef void (APIENTRYP RGLSYMGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
Expand Down Expand Up @@ -1120,7 +1119,6 @@ typedef void (APIENTRYP RGLSYMGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLui
typedef void (APIENTRYP RGLSYMGLCONSERVATIVERASTERPARAMETERFNVPROC) (GLenum pname, GLfloat value);
typedef void (APIENTRYP RGLSYMGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param);
typedef void (APIENTRYP RGLSYMGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
typedef GLVULKANPROCNV (APIENTRYP RGLSYMGLGETVKPROCADDRNVPROC) (const GLchar *name);
typedef void (APIENTRYP RGLSYMGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
typedef void (APIENTRYP RGLSYMGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore);
typedef void (APIENTRYP RGLSYMGLSIGNALVKFENCENVPROC) (GLuint64 vkFence);
Expand Down Expand Up @@ -3206,7 +3204,6 @@ extern RGLSYMGLISIMAGEHANDLERESIDENTARBPROC __rglgen_glIsImageHandleResidentARB;
extern RGLSYMGLVERTEXATTRIBL1UI64ARBPROC __rglgen_glVertexAttribL1ui64ARB;
extern RGLSYMGLVERTEXATTRIBL1UI64VARBPROC __rglgen_glVertexAttribL1ui64vARB;
extern RGLSYMGLGETVERTEXATTRIBLUI64VARBPROC __rglgen_glGetVertexAttribLui64vARB;
extern RGLSYMGLCREATESYNCFROMCLEVENTARBPROC __rglgen_glCreateSyncFromCLeventARB;
extern RGLSYMGLDISPATCHCOMPUTEGROUPSIZEARBPROC __rglgen_glDispatchComputeGroupSizeARB;
extern RGLSYMGLDEBUGMESSAGECONTROLARBPROC __rglgen_glDebugMessageControlARB;
extern RGLSYMGLDEBUGMESSAGEINSERTARBPROC __rglgen_glDebugMessageInsertARB;
Expand Down Expand Up @@ -3602,7 +3599,6 @@ extern RGLSYMGLSUBPIXELPRECISIONBIASNVPROC __rglgen_glSubpixelPrecisionBiasNV;
extern RGLSYMGLCONSERVATIVERASTERPARAMETERFNVPROC __rglgen_glConservativeRasterParameterfNV;
extern RGLSYMGLCONSERVATIVERASTERPARAMETERINVPROC __rglgen_glConservativeRasterParameteriNV;
extern RGLSYMGLDRAWVKIMAGENVPROC __rglgen_glDrawVkImageNV;
extern RGLSYMGLGETVKPROCADDRNVPROC __rglgen_glGetVkProcAddrNV;
extern RGLSYMGLWAITVKSEMAPHORENVPROC __rglgen_glWaitVkSemaphoreNV;
extern RGLSYMGLSIGNALVKSEMAPHORENVPROC __rglgen_glSignalVkSemaphoreNV;
extern RGLSYMGLSIGNALVKFENCENVPROC __rglgen_glSignalVkFenceNV;
Expand Down Expand Up @@ -3773,6 +3769,13 @@ extern RGLSYMGLGETINTEGERUI64I_VNVPROC __rglgen_glGetIntegerui64i_vNV;
extern RGLSYMGLVIEWPORTSWIZZLENVPROC __rglgen_glViewportSwizzleNV;
extern RGLSYMGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC __rglgen_glFramebufferTextureMultiviewOVR;

#ifndef __APPLE__
typedef GLsync (APIENTRYP RGLSYMGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context *context, struct _cl_event *event, GLbitfield flags);
typedef GLVULKANPROCNV (APIENTRYP RGLSYMGLGETVKPROCADDRNVPROC) (const GLchar *name);
extern RGLSYMGLCREATESYNCFROMCLEVENTARBPROC __rglgen_glCreateSyncFromCLeventARB;
extern RGLSYMGLGETVKPROCADDRNVPROC __rglgen_glGetVkProcAddrNV;
#endif

struct rglgen_sym_map { const char *sym; void *ptr; };
extern const struct rglgen_sym_map rglgen_symbol_map[];
#ifdef __cplusplus
Expand Down

0 comments on commit 32ecb14

Please sign in to comment.