check: add support for running test as standalone
[mesa.git] / src / glx / dri_glx.c
index 04a0847a4b61f938c7388b9fd8f75b120b9de33b..ae7e11c174b7f9dddfe43f8c4667f935b5971460 100644 (file)
@@ -40,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "glxclient.h"
 #include "xf86dri.h"
 #include "dri2.h"
-#include "sarea.h"
+#include "dri_sarea.h"
 #include <dlfcn.h>
 #include <sys/types.h>
 #include <sys/mman.h>
@@ -148,7 +148,7 @@ driGetDriverName(Display * dpy, int scrNum, char **driverName)
  * The returned char pointer points to a static array that will be
  * overwritten by subsequent calls.
  */
-_X_EXPORT const char *
+_GLX_PUBLIC const char *
 glXGetScreenDriver(Display * dpy, int scrNum)
 {
    static char ret[32];
@@ -178,7 +178,7 @@ glXGetScreenDriver(Display * dpy, int scrNum)
  *
  * Note: The driver remains opened after this function returns.
  */
-_X_EXPORT const char *
+_GLX_PUBLIC const char *
 glXGetDriverConfig(const char *driverName)
 {
    void *handle = driOpenDriver(driverName);
@@ -199,8 +199,6 @@ glXGetDriverConfig(const char *driverName)
    return dlsym(handle, "__driConfigOptions");
 }
 
-#ifdef XDAMAGE_1_1_INTERFACE
-
 static GLboolean
 has_damage_post(Display * dpy)
 {
@@ -274,8 +272,6 @@ static const __DRIdamageExtension damageExtension = {
    .reportDamage        = __glXReportDamage,
 };
 
-#endif
-
 static GLboolean
 __glXDRIGetDrawableInfo(__DRIdrawable * drawable,
                         unsigned int *index, unsigned int *stamp,
@@ -460,8 +456,10 @@ CallCreateNewScreen(Display *dpy, int scrn, struct dri_screen *psc,
    configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs);
    visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
 
-   if (!configs || !visuals)
+   if (!configs || !visuals) {
+       ErrorMessageF("No matching fbConfigs or visuals found\n");
        goto handle_error;
+   }
 
    glx_config_destroy_list(psc->base.configs);
    psc->base.configs = configs;