Skip to content

Commit

Permalink
swpipe: Improve llvmpipe environment
Browse files Browse the repository at this point in the history
* Only call correct public llvmpipe includes
* Clean up tracing
  • Loading branch information
kallisti5 committed Dec 12, 2012
1 parent f1a3e05 commit 8f06ba2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
10 changes: 3 additions & 7 deletions src/add-ons/opengl/swpipe/GalliumContext.cpp
Expand Up @@ -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
}

Expand Down Expand Up @@ -209,7 +205,7 @@ GalliumContext::CreateScreen()
return B_ERROR;
}

#if USE_LLVMPIPE
#ifdef HAVE_LLVM
fScreen = llvmpipe_create_screen(winsys);
#endif

Expand All @@ -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;
}
Expand Down
6 changes: 4 additions & 2 deletions src/add-ons/opengl/swpipe/Jamfile
Expand Up @@ -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 ;
}


Expand Down
10 changes: 5 additions & 5 deletions src/add-ons/opengl/swpipe/SoftwareWinsys.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -209,4 +209,4 @@ winsys_connect_hooks()
winsys->displaytarget_destroy = hook_winsys_displaytarget_destroy;

return winsys;
}
}

0 comments on commit 8f06ba2

Please sign in to comment.