Enable pipe control.
authorYang Rong <rong.r.yang@intel.com>
Mon, 19 May 2014 05:52:20 +0000 (13:52 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Mon, 19 May 2014 04:46:59 +0000 (12:46 +0800)
The previour pipe control don't work, because it don't advance the batch buffer.
So the value set in function intel_gpgpu_pipe_control will be flushed later. Fix it.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Junyan He <junyan.he@inbox.com>
src/intel/intel_gpgpu.c
src/intel/intel_structs.h

index da8fdc4..95ab2d5 100644 (file)
@@ -315,9 +315,8 @@ intel_gpgpu_write_timestamp(intel_gpgpu_t *gpgpu, int idx)
 static void
 intel_gpgpu_pipe_control(intel_gpgpu_t *gpgpu)
 {
-  BEGIN_BATCH(gpgpu->batch, SIZEOF32(gen6_pipe_control_t));
   gen6_pipe_control_t* pc = (gen6_pipe_control_t*)
-    intel_batchbuffer_alloc_space(gpgpu->batch, 0);
+    intel_batchbuffer_alloc_space(gpgpu->batch, sizeof(gen6_pipe_control_t));
   memset(pc, 0, sizeof(*pc));
   pc->dw0.length = SIZEOF32(gen6_pipe_control_t) - 2;
   pc->dw0.instruction_subopcode = GEN7_PIPE_CONTROL_SUBOPCODE_3D_CONTROL;
@@ -328,6 +327,7 @@ intel_gpgpu_pipe_control(intel_gpgpu_t *gpgpu)
   pc->dw1.texture_cache_invalidation_enable = 1;
   pc->dw1.cs_stall = 1;
   pc->dw1.dc_flush_enable = 1;
+  //pc->dw1.instruction_cache_invalidate_enable = 1;
   ADVANCE_BATCH(gpgpu->batch);
 }
 
index 59a9810..ef76bb4 100644 (file)
@@ -351,8 +351,12 @@ typedef struct gen6_pipe_control
   } dw2;
 
   struct {
-    uint64_t data;
-  } qw0;
+    uint32_t data;
+  } dw3;
+
+  struct {
+    uint32_t data;
+  } dw4;
 } gen6_pipe_control_t;
 
 typedef struct gen6_sampler_state