diff options
author | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-04-07 19:40:43 +0200 |
---|---|---|
committer | Jakob Bornecrantz <jakob@tungstengraphics.com> | 2008-04-07 19:40:43 +0200 |
commit | d5d93a31580cf58744b4d186a4ab8fac09743a33 (patch) | |
tree | bf12baafd02e373384c5e4f624a299ff08190fb5 /src/gallium/winsys/dri/intel/intel_winsys_i915.c | |
parent | d945e8ddd7cc8f2882ea0a2336bc2e534a1bca78 (diff) |
i915: Pulled in changes from i915tex
Diffstat (limited to 'src/gallium/winsys/dri/intel/intel_winsys_i915.c')
-rw-r--r-- | src/gallium/winsys/dri/intel/intel_winsys_i915.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/gallium/winsys/dri/intel/intel_winsys_i915.c b/src/gallium/winsys/dri/intel/intel_winsys_i915.c index 4d183db7c3..ae3e9654d3 100644 --- a/src/gallium/winsys/dri/intel/intel_winsys_i915.c +++ b/src/gallium/winsys/dri/intel/intel_winsys_i915.c @@ -31,8 +31,8 @@ #include <stdlib.h> #include <xf86drm.h> -#include "dri_bufpool.h" -#include "dri_bufmgr.h" +#include "ws_dri_bufpool.h" +#include "ws_dri_bufmgr.h" #include "intel_context.h" #include "intel_batchbuffer.h" @@ -106,10 +106,18 @@ static void intel_i915_batch_reloc( struct i915_winsys *sws, mask |= DRM_BO_FLAG_READ; } - intel_batchbuffer_emit_reloc( intel->batch, +#if 0 /* JB old */ + intel_batchbuffer_emit_reloc( intel->batch, dri_bo( buf ), - flags, mask, + flags, mask, delta ); +#else /* new */ + intel_offset_relocation( intel->batch, + delta, + dri_bo( buf ), + flags, + mask ); +#endif } @@ -126,8 +134,18 @@ static void intel_i915_batch_flush( struct i915_winsys *sws, fu.dri = intel_batchbuffer_flush( intel->batch ); - if (fu.dri) - iws->pws->fence_reference(iws->pws, fence, fu.pipe); + if (!fu.dri && fence) { + *fence = NULL; + return; + } + + if (fu.dri) { + if (fence) + *fence = fu.pipe; + else + iws->pws->fence_reference(iws->pws, &fu.dri, NULL); + } + // if (0) intel_i915_batch_wait_idle( sws ); } |