swpipe: Improve llvmpipe environment

* Only call correct public llvmpipe includes
* Clean up tracing
This commit is contained in:
Alexander von Gluck IV
2012-12-12 03:04:43 +00:00
parent f1a3e05d8c
commit 8f06ba2f84
3 changed files with 12 additions and 14 deletions
+3 -7
View File
@@ -26,13 +26,9 @@ extern "C" {
#include "state_tracker/st_gl_api.h" #include "state_tracker/st_gl_api.h"
#include "state_tracker/st_manager.h" #include "state_tracker/st_manager.h"
#include "state_tracker/sw_winsys.h" #include "state_tracker/sw_winsys.h"
#include "softpipe/sp_context.h"
#include "softpipe/sp_public.h" #include "softpipe/sp_public.h"
#include "softpipe/sp_texture.h" #ifdef HAVE_LLVM
#ifdef USE_LLVMPIPE
#include "llvmpipe/lp_context.h"
#include "llvmpipe/lp_public.h" #include "llvmpipe/lp_public.h"
#include "llvmpipe/lp_texture.h"
#endif #endif
} }
@@ -209,7 +205,7 @@ GalliumContext::CreateScreen()
return B_ERROR; return B_ERROR;
} }
#if USE_LLVMPIPE #ifdef HAVE_LLVM
fScreen = llvmpipe_create_screen(winsys); fScreen = llvmpipe_create_screen(winsys);
#endif #endif
@@ -223,7 +219,7 @@ GalliumContext::CreateScreen()
} }
const char* driverName = fScreen->get_name(fScreen); 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; return B_OK;
} }
+4 -2
View File
@@ -15,8 +15,10 @@ local sources =
if $(HAIKU_LLVM_PRESENT) { if $(HAIKU_LLVM_PRESENT) {
# TODO: Add LLVM OptionalBuildPackage # TODO: Add LLVM OptionalBuildPackage
SubDirC++Flags [ FDefines USE_LLVMPIPE ] ; SubDirC++Flags [ FDefines HAVE_LLVM=0x0302 ] ;
SubDirSysHdrs $(HAIKU_LLVM_HEADERS) ;
# TODO: This is a hack for now
SubDirSysHdrs /boot/common/include ;
} }
+5 -5
View File
@@ -22,15 +22,15 @@ extern "C" {
} }
#define TRACE_CONTEXT #define TRACE_WINSYS
#ifdef TRACE_CONTEXT #ifdef TRACE_WINSYS
# define TRACE(x...) printf("GalliumContext: " x) # define TRACE(x...) printf("GalliumWinsys: " x)
# define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__) # define CALLED() TRACE("CALLED: %s\n", __PRETTY_FUNCTION__)
#else #else
# define TRACE(x...) # define TRACE(x...)
# define CALLED() # define CALLED()
#endif #endif
#define ERROR(x...) printf("GalliumContext: " x) #define ERROR(x...) printf("GalliumWinsys: " x)
// Cast // Cast
@@ -209,4 +209,4 @@ winsys_connect_hooks()
winsys->displaytarget_destroy = hook_winsys_displaytarget_destroy; winsys->displaytarget_destroy = hook_winsys_displaytarget_destroy;
return winsys; return winsys;
} }