Removed some unused fields in vfe state settings
authorbsegovia <devnull@localhost>
Fri, 5 Aug 2011 07:06:05 +0000 (07:06 +0000)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Aug 2012 23:14:46 +0000 (16:14 -0700)
src/cl_command_queue_gen6.c
src/cl_command_queue_gen7.c
src/intel/intel_gpgpu.c
src/intel/intel_gpgpu.h

index 95884c1..e581a30 100644 (file)
@@ -143,7 +143,7 @@ cl_command_queue_ND_range_gen6(cl_command_queue queue,
     gpgpu_set_perf_counters(gpgpu, queue->perf->bo);
 
   /* Setup the kernel */
-  gpgpu_state_init(gpgpu, ctx->device->max_compute_unit, cst_sz / 32, 64);
+  gpgpu_state_init(gpgpu, ctx->device->max_compute_unit, cst_sz / 32);
   if (queue->last_batch != NULL)
     drm_intel_bo_unreference(queue->last_batch);
   queue->last_batch = NULL;
index abf4518..ffb45c0 100644 (file)
@@ -138,7 +138,7 @@ cl_command_queue_ND_range_gen7(cl_command_queue queue,
   TRY (cl_set_local_ids, data, local_wk_sz, cst_sz, id_offset, thread_n);
 
   /* Setup the kernel */
-  gpgpu_state_init(gpgpu, ctx->device->max_compute_unit, cst_sz / 32, 64);
+  gpgpu_state_init(gpgpu, ctx->device->max_compute_unit, cst_sz / 32);
   if (queue->last_batch != NULL)
     drm_intel_bo_unreference(queue->last_batch);
   queue->last_batch = NULL;
index 9aee653..779e906 100644 (file)
@@ -590,22 +590,21 @@ gpgpu_flush(intel_gpgpu_t *state)
 LOCAL void
 gpgpu_state_init(intel_gpgpu_t *state,
                  uint32_t max_threads,
-                 uint32_t size_cs_entry,
-                 uint32_t num_cs_entries)
+                 uint32_t size_cs_entry)
 {
   dri_bo *bo;
   int32_t i;
 
   /* URB */
-  state->urb.num_cs_entries = num_cs_entries;
+  state->urb.num_cs_entries = 64;
   state->urb.size_cs_entry = size_cs_entry;
   state->max_threads = max_threads;
 
   /* constant buffer */
   if(state->curbe_b.bo)
     dri_bo_unreference(state->curbe_b.bo);
-  uint32_t size_cb = state->urb.num_cs_entries * state->urb.size_cs_entry * (512/8);
-  size_cb = (size_cb + (4096 - 1)) & (~(4096-1)); /* roundup to 4K */
+  uint32_t size_cb = state->urb.num_cs_entries * state->urb.size_cs_entry * 64;
+  size_cb = ALIGN(size_cb, 4096);
   bo = dri_bo_alloc(state->drv->bufmgr,
                     "CONSTANT_BUFFER",
                     size_cb,
index 25cfaec..41335fd 100644 (file)
@@ -105,10 +105,7 @@ extern void gpgpu_bind_buf(intel_gpgpu_t*,
                            uint32_t cchint);
 
 /* Configure state, size in 512-bit units */
-extern void gpgpu_state_init(intel_gpgpu_t*,
-                             uint32_t max_threads,
-                             uint32_t size_cs_entry,
-                             uint32_t num_cs_entries);
+extern void gpgpu_state_init(intel_gpgpu_t*, uint32_t max_threads, uint32_t size_cs_entry);
 
 /* Set the buffer object where to report performance counters */
 extern void gpgpu_set_perf_counters(intel_gpgpu_t*, struct _drm_intel_bo *perf);