[Mesa-dev] [PATCH] Fix build when configured --with-gallium-drivers=swrast --disable-driglx-direct on platforms which don't have LIBDRM
Jon TURNEY
jon.turney at dronecode.org.uk
Sun Dec 1 04:59:52 PST 2013
As elsewhere, place code which relies on including xf86drm.h that has been added
since the last time this was fixed under #ifdef GLX_DIRECT_RENDERING.
Future work: It should be possible to build when configured
--with-gallium-drivers=swrast --enable-driglx-direct without LIBDRM to build a
libGL which can load just swrast, since there is no functional dependency, but
work is needed to untangle the build dependency.
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
src/glx/dri2_query_renderer.c | 5 +++++
src/glx/tests/query_renderer_implementation_unittest.cpp | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c
index b50a202..3bc90c7 100644
--- a/src/glx/dri2_query_renderer.c
+++ b/src/glx/dri2_query_renderer.c
@@ -20,6 +20,9 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
+
+#ifdef GLX_DIRECT_RENDERING
+
#include "glxclient.h"
#include "glx_error.h"
#include "xf86drm.h"
@@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
}
+
+#endif /* GLX_DIRECT_RENDERING */
diff --git a/src/glx/tests/query_renderer_implementation_unittest.cpp b/src/glx/tests/query_renderer_implementation_unittest.cpp
index 4749089..3d8dc2a 100644
--- a/src/glx/tests/query_renderer_implementation_unittest.cpp
+++ b/src/glx/tests/query_renderer_implementation_unittest.cpp
@@ -24,6 +24,8 @@
#include <signal.h>
#include <setjmp.h>
+#ifdef GLX_DIRECT_RENDERING
+
extern "C" {
#include "glxclient.h"
#include "glx_error.h"
@@ -308,3 +310,5 @@ TEST_F(dri2_query_renderer_integer_test, valid_attribute_mapping)
EXPECT_FALSE(got_sigsegv);
}
}
+
+#endif
--
1.8.3.4
More information about the mesa-dev
mailing list