#endif
#if defined(GALLIUM_NOUVEAU)
+#if defined(DRI_TARGET)
+#include "dri_screen.h"
+
+const __DRIextension **__driDriverGetExtensions_nouveau(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_nouveau(void)
+{
+ globalDriverAPI = &galliumdrm_driver_api;
+ return galliumdrm_driver_extensions;
+}
+#endif
+
static struct pipe_screen *
pipe_nouveau_create_screen(int fd)
{
.ReleaseBuffer = dri2_release_buffer,
};
+const struct __DriverAPIRec galliumdrm_driver_api = {
+ .InitScreen = dri2_init_screen,
+ .DestroyScreen = dri_destroy_screen,
+ .CreateContext = dri_create_context,
+ .DestroyContext = dri_destroy_context,
+ .CreateBuffer = dri2_create_buffer,
+ .DestroyBuffer = dri_destroy_buffer,
+ .MakeCurrent = dri_make_current,
+ .UnbindContext = dri_unbind_context,
+
+ .AllocateBuffer = dri2_allocate_buffer,
+ .ReleaseBuffer = dri2_release_buffer,
+};
+
/* This is the table of extensions that the loader will dlsym() for. */
PUBLIC const __DRIextension *__driDriverExtensions[] = {
&driCoreExtension.base,
NULL
};
+const __DRIextension *galliumdrm_driver_extensions[] = {
+ &driCoreExtension.base,
+ &driImageDriverExtension.base,
+ &driDRI2Extension.base,
+ &gallium_config_options.base,
+ NULL
+};
+
/* vim: set sw=3 ts=8 sts=3 expandtab: */
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
+ -I$(top_srcdir)/src/mapi \
+ -I$(top_srcdir)/src/mesa \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common \
+ -I$(top_srcdir)/src/gallium/state_trackers/dri/common \
$(GALLIUM_TARGET_CFLAGS)
AM_CPPFLAGS = \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE
+if HAVE_GALLIUM_NOUVEAU
+AM_CPPFLAGS += \
+ -DDRI_TARGET
+endif
+
dridir = $(DRI_DRIVER_INSTALL_DIR)
dri_LTLIBRARIES = gallium_dri.la