summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/dri/intel/intel_winsys_i915.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/dri/intel/intel_winsys_i915.c')
-rw-r--r--src/gallium/winsys/dri/intel/intel_winsys_i915.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/winsys/dri/intel/intel_winsys_i915.c b/src/gallium/winsys/dri/intel/intel_winsys_i915.c
index 2def1afc31..4d183db7c3 100644
--- a/src/gallium/winsys/dri/intel/intel_winsys_i915.c
+++ b/src/gallium/winsys/dri/intel/intel_winsys_i915.c
@@ -39,12 +39,14 @@
#include "intel_winsys.h"
#include "pipe/p_util.h"
+#include "pipe/p_winsys.h"
#include "i915simple/i915_winsys.h"
#include "i915simple/i915_screen.h"
struct intel_i915_winsys {
struct i915_winsys winsys; /**< batch buffer funcs */
+ struct pipe_winsys *pws;
struct intel_context *intel;
};
@@ -112,19 +114,22 @@ static void intel_i915_batch_reloc( struct i915_winsys *sws,
-static void intel_i915_batch_flush( struct i915_winsys *sws )
+static void intel_i915_batch_flush( struct i915_winsys *sws,
+ struct pipe_fence_handle **fence )
{
- struct intel_context *intel = intel_i915_winsys(sws)->intel;
+ struct intel_i915_winsys *iws = intel_i915_winsys(sws);
+ struct intel_context *intel = iws->intel;
+ union {
+ struct _DriFenceObject *dri;
+ struct pipe_fence_handle *pipe;
+ } fu;
- intel_batchbuffer_flush( intel->batch );
-// if (0) intel_i915_batch_wait_idle( sws );
-}
+ fu.dri = intel_batchbuffer_flush( intel->batch );
+ if (fu.dri)
+ iws->pws->fence_reference(iws->pws, fence, fu.pipe);
-static void intel_i915_batch_finish( struct i915_winsys *sws )
-{
- struct intel_context *intel = intel_i915_winsys(sws)->intel;
- intel_batchbuffer_finish( intel->batch );
+// if (0) intel_i915_batch_wait_idle( sws );
}
@@ -145,7 +150,7 @@ intel_create_i915simple( struct intel_context *intel,
iws->winsys.batch_dword = intel_i915_batch_dword;
iws->winsys.batch_reloc = intel_i915_batch_reloc;
iws->winsys.batch_flush = intel_i915_batch_flush;
- iws->winsys.batch_finish = intel_i915_batch_finish;
+ iws->pws = winsys;
iws->intel = intel;
screen = i915_create_screen(winsys, intel->intelScreen->deviceID);