diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-04-23 12:57:46 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-04-23 12:57:46 +0100 |
commit | 13cb8264d81f09ce046c73fd751596572d13512e (patch) | |
tree | 61d663c2871c386d8bfca075a2387108d7e9a012 /src/gallium/winsys/drm/intel/gem | |
parent | 49ba80dff335226a54dae60477b256384005b393 (diff) |
gallium/intel/gem: Use softpipe rather than i915simple if INTEL_SOFTPIPE is set.
Diffstat (limited to 'src/gallium/winsys/drm/intel/gem')
-rw-r--r-- | src/gallium/winsys/drm/intel/gem/intel_be_context.c | 14 | ||||
-rw-r--r-- | src/gallium/winsys/drm/intel/gem/intel_be_device.c | 7 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_context.c b/src/gallium/winsys/drm/intel/gem/intel_be_context.c index bb6f1b916c..cfe8c88466 100644 --- a/src/gallium/winsys/drm/intel/gem/intel_be_context.c +++ b/src/gallium/winsys/drm/intel/gem/intel_be_context.c @@ -1,6 +1,8 @@ #include "pipe/p_screen.h" +#include "softpipe/sp_winsys.h" + #include "intel_be_device.h" #include "intel_be_context.h" #include "intel_be_batchbuffer.h" @@ -106,13 +108,13 @@ intel_be_create_context(struct pipe_screen *screen) intel_be_init_context(intel, device); -#if 0 - pipe = intel_create_softpipe(intel, screen->winsys); -#else - pipe = i915_create_context(screen, &device->base, &intel->base); -#endif + if (getenv("INTEL_SOFTPIPE")) + pipe = softpipe_create(screen); + else + pipe = i915_create_context(screen, &device->base, &intel->base); - pipe->priv = intel; + if (pipe) + pipe->priv = intel; return pipe; } diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_device.c b/src/gallium/winsys/drm/intel/gem/intel_be_device.c index 0f6300323b..8979f0ae15 100644 --- a/src/gallium/winsys/drm/intel/gem/intel_be_device.c +++ b/src/gallium/winsys/drm/intel/gem/intel_be_device.c @@ -10,6 +10,7 @@ #include "intel_be_fence.h" #include "i915simple/i915_winsys.h" +#include "softpipe/sp_winsys.h" #include "intel_be_api.h" @@ -302,7 +303,11 @@ intel_be_create_screen(int drmFD, int deviceID) intel_be_init_device(dev, drmFD, deviceID); - screen = i915_create_screen(&dev->base, deviceID); + if (getenv("INTEL_SOFTPIPE")) { + screen = softpipe_create_screen(&dev->base); + drm_api_hooks.buffer_from_texture = softpipe_get_texture_buffer; + } else + screen = i915_create_screen(&dev->base, deviceID); return screen; } |