From 8f06ba2f84c10028d76529f65511b8e9edb525ca Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 12 Dec 2012 03:03:24 +0000 Subject: [PATCH] swpipe: Improve llvmpipe environment * Only call correct public llvmpipe includes * Clean up tracing --- src/add-ons/opengl/swpipe/GalliumContext.cpp | 10 +++------- src/add-ons/opengl/swpipe/Jamfile | 6 ++++-- src/add-ons/opengl/swpipe/SoftwareWinsys.cpp | 10 +++++----- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/add-ons/opengl/swpipe/GalliumContext.cpp b/src/add-ons/opengl/swpipe/GalliumContext.cpp index 6e91cd08e02..f06c7b96b7a 100644 --- a/src/add-ons/opengl/swpipe/GalliumContext.cpp +++ b/src/add-ons/opengl/swpipe/GalliumContext.cpp @@ -26,13 +26,9 @@ extern "C" { #include "state_tracker/st_gl_api.h" #include "state_tracker/st_manager.h" #include "state_tracker/sw_winsys.h" -#include "softpipe/sp_context.h" #include "softpipe/sp_public.h" -#include "softpipe/sp_texture.h" -#ifdef USE_LLVMPIPE -#include "llvmpipe/lp_context.h" +#ifdef HAVE_LLVM #include "llvmpipe/lp_public.h" -#include "llvmpipe/lp_texture.h" #endif } @@ -209,7 +205,7 @@ GalliumContext::CreateScreen() return B_ERROR; } - #if USE_LLVMPIPE + #ifdef HAVE_LLVM fScreen = llvmpipe_create_screen(winsys); #endif @@ -223,7 +219,7 @@ GalliumContext::CreateScreen() } const char* driverName = fScreen->get_name(fScreen); - TRACE("%s: Using %s driver.\n", __func__, driverName); + ERROR("%s: Using %s driver.\n", __func__, driverName); return B_OK; } diff --git a/src/add-ons/opengl/swpipe/Jamfile b/src/add-ons/opengl/swpipe/Jamfile index 38fe42a6834..6283699f9ac 100644 --- a/src/add-ons/opengl/swpipe/Jamfile +++ b/src/add-ons/opengl/swpipe/Jamfile @@ -15,8 +15,10 @@ local sources = if $(HAIKU_LLVM_PRESENT) { # TODO: Add LLVM OptionalBuildPackage - SubDirC++Flags [ FDefines USE_LLVMPIPE ] ; - SubDirSysHdrs $(HAIKU_LLVM_HEADERS) ; + SubDirC++Flags [ FDefines HAVE_LLVM=0x0302 ] ; + + # TODO: This is a hack for now + SubDirSysHdrs /boot/common/include ; } diff --git a/src/add-ons/opengl/swpipe/SoftwareWinsys.cpp b/src/add-ons/opengl/swpipe/SoftwareWinsys.cpp index 1cdee948245..cd4e24b19c3 100644 --- a/src/add-ons/opengl/swpipe/SoftwareWinsys.cpp +++ b/src/add-ons/opengl/swpipe/SoftwareWinsys.cpp @@ -22,15 +22,15 @@ extern "C" { } -#define TRACE_CONTEXT -#ifdef TRACE_CONTEXT -# define TRACE(x...) printf("GalliumContext: " x) +#define TRACE_WINSYS +#ifdef TRACE_WINSYS +# define TRACE(x...) printf("GalliumWinsys: " x) # define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__) #else # define TRACE(x...) # define CALLED() #endif -#define ERROR(x...) printf("GalliumContext: " x) +#define ERROR(x...) printf("GalliumWinsys: " x) // Cast @@ -209,4 +209,4 @@ winsys_connect_hooks() winsys->displaytarget_destroy = hook_winsys_displaytarget_destroy; return winsys; -} \ No newline at end of file +}