With the dri_interface.h clean of the macro, we can remove the final
only st/dri specific use of the very same.
Seemingly it was incorrectly used, as the build-time presence of dri2 is
not libdrm specific. At run-time, the code is already limited to dri2
use-cases plus returning true, when the extension is not present (or too
old) will likely lead to a crash as one tries to use it shortly after
the dri_with_format() call.
As a side effect this gives us a nice cleanup the builds.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
LOCAL_SRC_FILES += $(drisw_SOURCES)
endif
-# swrast only?
-ifeq ($(MESA_GPU_DRIVERS),swrast)
-LOCAL_CFLAGS += -D__NOT_HAVE_DRM_H
-else
+ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
LOCAL_SRC_FILES += $(dri2_SOURCES)
LOCAL_SHARED_LIBRARIES := libdrm
endif
libdri_la_SOURCES = $(common_SOURCES)
if HAVE_DRISW
-if !HAVE_DRI2
-AM_CPPFLAGS += \
- -D__NOT_HAVE_DRM_H
-endif
libdri_la_SOURCES += $(drisw_SOURCES)
endif
env = env.Clone()
-# XXX: If HAVE_DRI2
env.PkgUseModules(['DRM'])
-# else
-#env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
env.Append(CPPPATH = [
'#/src',
};
-#ifndef __NOT_HAVE_DRM_H
-
static inline boolean
dri_with_format(__DRIscreen * sPriv)
{
&& (loader->getBuffersWithFormat != NULL);
}
-#else
-
-static inline boolean
-dri_with_format(__DRIscreen * sPriv)
-{
- return TRUE;
-}
-
-#endif
-
void
dri_fill_st_visual(struct st_visual *stvis, struct dri_screen *screen,
const struct gl_config *mode);