mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 10:00:14 +01:00
glxglvnddispatch: Add missing dispatch for GetDriverConfig
Together with some fixes to xdriinfo this fixes xdriinfo not working
with glvnd.
Since apps (xdriinfo) expect GetDriverConfig to work without going to
need through the dance to setup a glxcontext (which is a reasonable
expectation IMHO), the dispatch for this ends up significantly different
then any other dispatch function.
This patch gets the job done, but I'm not really happy with how this
patch turned out, suggestions for a better fix are welcome.
Cc: Kyle Brenneman <kbrenneman@nvidia.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 84f764a759)
This commit is contained in:
parent
6123a076d0
commit
bcd09ef32e
2 changed files with 15 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "glxclient.h"
|
||||
#include "glxglvnd.h"
|
||||
#include "glxglvnddispatchfuncs.h"
|
||||
#include "g_glxglvnddispatchindices.h"
|
||||
|
|
@ -50,6 +51,7 @@ const char * const __glXDispatchTableStrings[DI_LAST_INDEX] = {
|
|||
__ATTRIB(GetCurrentDisplayEXT),
|
||||
// glXGetCurrentDrawable implemented by libglvnd
|
||||
// glXGetCurrentReadDrawable implemented by libglvnd
|
||||
__ATTRIB(GetDriverConfig),
|
||||
// glXGetFBConfigAttrib implemented by libglvnd
|
||||
__ATTRIB(GetFBConfigAttribSGIX),
|
||||
__ATTRIB(GetFBConfigFromVisualSGIX),
|
||||
|
|
@ -334,6 +336,17 @@ static Display *dispatch_GetCurrentDisplayEXT(void)
|
|||
|
||||
|
||||
|
||||
static const char *dispatch_GetDriverConfig(const char *driverName)
|
||||
{
|
||||
/*
|
||||
* The options are constant for a given driverName, so we do not need
|
||||
* a context (and apps expect to be able to call this without one).
|
||||
*/
|
||||
return glXGetDriverConfig(driverName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int dispatch_GetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config,
|
||||
int attribute, int *value_return)
|
||||
{
|
||||
|
|
@ -939,6 +952,7 @@ const void * const __glXDispatchFunctions[DI_LAST_INDEX + 1] = {
|
|||
__ATTRIB(DestroyGLXPbufferSGIX),
|
||||
__ATTRIB(GetContextIDEXT),
|
||||
__ATTRIB(GetCurrentDisplayEXT),
|
||||
__ATTRIB(GetDriverConfig),
|
||||
__ATTRIB(GetFBConfigAttribSGIX),
|
||||
__ATTRIB(GetFBConfigFromVisualSGIX),
|
||||
__ATTRIB(GetMscRateOML),
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ typedef enum __GLXdispatchIndex {
|
|||
DI_GetCurrentDisplayEXT,
|
||||
// GetCurrentDrawable implemented by libglvnd
|
||||
// GetCurrentReadDrawable implemented by libglvnd
|
||||
DI_GetDriverConfig,
|
||||
// GetFBConfigAttrib implemented by libglvnd
|
||||
DI_GetFBConfigAttribSGIX,
|
||||
DI_GetFBConfigFromVisualSGIX,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue