st/dri: unwrap/remove __NOT_HAVE_DRM_H magic
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>
This commit is contained in:
parent
0efd773f71
commit
72c784347b
|
@ -48,10 +48,7 @@ LOCAL_CFLAGS += -DGALLIUM_SOFTPIPE
|
|||
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
|
||||
|
|
|
@ -50,10 +50,6 @@ noinst_LTLIBRARIES = libdri.la
|
|||
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
|
||||
|
||||
|
|
|
@ -5,10 +5,7 @@ Import('*')
|
|||
|
||||
env = env.Clone()
|
||||
|
||||
# XXX: If HAVE_DRI2
|
||||
env.PkgUseModules(['DRM'])
|
||||
# else
|
||||
#env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
|
||||
|
||||
env.Append(CPPPATH = [
|
||||
'#/src',
|
||||
|
|
|
@ -122,8 +122,6 @@ struct __DRIimageRec {
|
|||
|
||||
};
|
||||
|
||||
#ifndef __NOT_HAVE_DRM_H
|
||||
|
||||
static inline boolean
|
||||
dri_with_format(__DRIscreen * sPriv)
|
||||
{
|
||||
|
@ -134,16 +132,6 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue