From 6a488a1ae72d9106588ef169d9244b3650333d7e Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 24 Aug 2015 20:09:12 +0200 Subject: [PATCH] Make sure linux replay also checks for ARB_buffer_storage presence --- renderdoc/driver/gl/gl_replay_linux.cpp | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/renderdoc/driver/gl/gl_replay_linux.cpp b/renderdoc/driver/gl/gl_replay_linux.cpp index c39e19433..b5c908a2d 100644 --- a/renderdoc/driver/gl/gl_replay_linux.cpp +++ b/renderdoc/driver/gl/gl_replay_linux.cpp @@ -328,24 +328,32 @@ ReplayCreateStatus GL_CreateReplayDevice(const char *logfile, IReplayDriver **dr { // eventually we want to emulate EXT_dsa on replay if it isn't present, but for // now we just require it. - bool found = false; + bool dsa = false; + bool bufstorage = false; + + if(getStr) + RDCLOG("Running GL replay on: %s / %s / %s", getStr(eGL_VENDOR), getStr(eGL_RENDERER), getStr(eGL_VERSION)); GLint numExts = 0; getInt(eGL_NUM_EXTENSIONS, &numExts); - for(GLint i=0; i < numExts; i++) + for(GLint e=0; e < numExts; e++) { - const char *ext = (const char *)getStr(eGL_EXTENSIONS, (GLuint)i); + const char *ext = (const char *)getStri(eGL_EXTENSIONS, (GLuint)e); - if(!strcmp(ext, "GL_EXT_direct_state_access")) - { - found = true; - break; - } + RDCLOG("Extension % 3d: %s", e, ext); + + if(!strcmp(ext, "GL_EXT_direct_state_access")) dsa = true; + if(!strcmp(ext, "GL_ARB_buffer_storage")) bufstorage = true; } - if(!found) - { + if(!dsa) RDCERR("RenderDoc requires EXT_direct_state_access availability, and it is not reported. Try updating your drivers."); + + if(!bufstorage) + RDCERR("RenderDoc requires ARB_buffer_storage availability, and it is not reported. Try updating your drivers."); + + if(!dsa || !bufstorage) + { glXDestroyPbufferProc(dpy, pbuffer); glXDestroyCtxProc(dpy, ctx); XFree(fbcfg);