Commit f6b6d273 by Nicolas Capens Committed by Nicolas Capens

Add stubs for RAD entry functions.

BUG=18218488 Change-Id: I9b69d2f8fdb64b9e91877bd4f506fc30a2bcd33c Reviewed-on: https://swiftshader-review.googlesource.com/1224Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 77e72aff
......@@ -1195,9 +1195,13 @@ __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const cha
static const Extension eglExtensions[] =
{
{"eglCreateImageKHR", (__eglMustCastToProperFunctionPointerType)eglCreateImageKHR},
{"eglDestroyImageKHR", (__eglMustCastToProperFunctionPointerType)eglDestroyImageKHR},
};
#define EXTENSION(name) {#name, (__eglMustCastToProperFunctionPointerType)name}
EXTENSION(eglCreateImageKHR),
EXTENSION(eglDestroyImageKHR),
#undef EXTENSION
};
for(int ext = 0; ext < sizeof(eglExtensions) / sizeof(Extension); ext++)
{
......
......@@ -6153,28 +6153,32 @@ __eglMustCastToProperFunctionPointerType glGetProcAddress(const char *procname)
static const Extension glExtensions[] =
{
{"glTexImage3DOES", (__eglMustCastToProperFunctionPointerType)glTexImage3DOES},
{"glBlitFramebufferANGLE", (__eglMustCastToProperFunctionPointerType)glBlitFramebufferANGLE},
{"glRenderbufferStorageMultisampleANGLE", (__eglMustCastToProperFunctionPointerType)glRenderbufferStorageMultisampleANGLE},
{"glDeleteFencesNV", (__eglMustCastToProperFunctionPointerType)glDeleteFencesNV},
{"glGenFencesNV", (__eglMustCastToProperFunctionPointerType)glGenFencesNV},
{"glIsFenceNV", (__eglMustCastToProperFunctionPointerType)glIsFenceNV},
{"glTestFenceNV", (__eglMustCastToProperFunctionPointerType)glTestFenceNV},
{"glGetFenceivNV", (__eglMustCastToProperFunctionPointerType)glGetFenceivNV},
{"glFinishFenceNV", (__eglMustCastToProperFunctionPointerType)glFinishFenceNV},
{"glSetFenceNV", (__eglMustCastToProperFunctionPointerType)glSetFenceNV},
{"glGetGraphicsResetStatusEXT", (__eglMustCastToProperFunctionPointerType)glGetGraphicsResetStatusEXT},
{"glReadnPixelsEXT", (__eglMustCastToProperFunctionPointerType)glReadnPixelsEXT},
{"glGetnUniformfvEXT", (__eglMustCastToProperFunctionPointerType)glGetnUniformfvEXT},
{"glGetnUniformivEXT", (__eglMustCastToProperFunctionPointerType)glGetnUniformivEXT},
{"glGenQueriesEXT", (__eglMustCastToProperFunctionPointerType)glGenQueriesEXT},
{"glDeleteQueriesEXT", (__eglMustCastToProperFunctionPointerType)glDeleteQueriesEXT},
{"glIsQueryEXT", (__eglMustCastToProperFunctionPointerType)glIsQueryEXT},
{"glBeginQueryEXT", (__eglMustCastToProperFunctionPointerType)glBeginQueryEXT},
{"glEndQueryEXT", (__eglMustCastToProperFunctionPointerType)glEndQueryEXT},
{"glGetQueryivEXT", (__eglMustCastToProperFunctionPointerType)glGetQueryivEXT},
{"glGetQueryObjectuivEXT", (__eglMustCastToProperFunctionPointerType)glGetQueryObjectuivEXT},
{"glEGLImageTargetTexture2DOES", (__eglMustCastToProperFunctionPointerType)glEGLImageTargetTexture2DOES}
#define EXTENSION(name) {#name, (__eglMustCastToProperFunctionPointerType)name}
EXTENSION(glTexImage3DOES),
EXTENSION(glBlitFramebufferANGLE),
EXTENSION(glRenderbufferStorageMultisampleANGLE),
EXTENSION(glDeleteFencesNV),
EXTENSION(glGenFencesNV),
EXTENSION(glIsFenceNV),
EXTENSION(glTestFenceNV),
EXTENSION(glGetFenceivNV),
EXTENSION(glFinishFenceNV),
EXTENSION(glSetFenceNV),
EXTENSION(glGetGraphicsResetStatusEXT),
EXTENSION(glReadnPixelsEXT),
EXTENSION(glGetnUniformfvEXT),
EXTENSION(glGetnUniformivEXT),
EXTENSION(glGenQueriesEXT),
EXTENSION(glDeleteQueriesEXT),
EXTENSION(glIsQueryEXT),
EXTENSION(glBeginQueryEXT),
EXTENSION(glEndQueryEXT),
EXTENSION(glGetQueryivEXT),
EXTENSION(glGetQueryObjectuivEXT),
EXTENSION(glEGLImageTargetTexture2DOES),
#undef EXTENSION
};
for(int ext = 0; ext < sizeof(glExtensions) / sizeof(Extension); ext++)
......
......@@ -91,7 +91,7 @@ CONSTRUCTOR static bool eglAttachProcess()
libRAD = loadLibrary(libRAD_lib);
rad::createContext = (egl::Context *(*)(const egl::Config*, const egl::Context*))getProcAddress(libRAD, "glCreateContext");
rad::getProcAddress = (__eglMustCastToProperFunctionPointerType (*)(const char*))getProcAddress(libRAD, "glGetProcAddress");
rad::getProcAddress = (__eglMustCastToProperFunctionPointerType (RADAPIENTRY *)(const char*))getProcAddress(libRAD, "radGetProcAddress");
rad::createBackBuffer = (egl::Image *(*)(int, int, const egl::Config*))getProcAddress(libRAD, "createBackBuffer");
rad::createDepthStencil = (egl::Image *(*)(unsigned int, unsigned int, sw::Format, int, bool))getProcAddress(libRAD, "createDepthStencil");
rad::createFrameBuffer = (sw::FrameBuffer *(*)(EGLNativeDisplayType, EGLNativeWindowType, int, int))getProcAddress(libRAD, "createFrameBuffer");
......@@ -303,7 +303,7 @@ void error(EGLint errorCode)
namespace rad
{
egl::Context *(*createContext)(const egl::Config *config, const egl::Context *shareContext) = 0;
__eglMustCastToProperFunctionPointerType (*getProcAddress)(const char *procname) = 0;
__eglMustCastToProperFunctionPointerType (RADAPIENTRY *getProcAddress)(const char *procname) = 0;
egl::Image *(*createBackBuffer)(int width, int height, const egl::Config *config) = 0;
egl::Image *(*createDepthStencil)(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard) = 0;
......
......@@ -17,6 +17,7 @@
#define EGLAPI
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <RAD/rad.h>
namespace egl
{
......@@ -86,7 +87,7 @@ namespace sw
namespace rad
{
extern egl::Context *(*createContext)(const egl::Config *config, const egl::Context *shareContext);
extern __eglMustCastToProperFunctionPointerType (*getProcAddress)(const char *procname);
extern __eglMustCastToProperFunctionPointerType (RADAPIENTRY *getProcAddress)(const char *procname);
extern egl::Image *(*createBackBuffer)(int width, int height, const egl::Config *config);
extern egl::Image *(*createDepthStencil)(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard);
......
......@@ -168,6 +168,8 @@ EXPORTS
glGetQueryivEXT @170
glGetQueryObjectuivEXT @171
radGetProcAddress
; EGL dependencies
glCreateContext
glGetProcAddress
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment