From b34a0b024b7ba9019181a2fd2469ec1d9f3fb6fa Mon Sep 17 00:00:00 2001 From: bsegovia Date: Fri, 5 Aug 2011 07:06:05 +0000 Subject: [PATCH] Removed some unused fields in vfe state settings --- src/cl_command_queue_gen6.c | 2 +- src/cl_command_queue_gen7.c | 2 +- src/intel/intel_gpgpu.c | 9 ++++----- src/intel/intel_gpgpu.h | 5 +---- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/cl_command_queue_gen6.c b/src/cl_command_queue_gen6.c index 95884c1..e581a30 100644 --- a/src/cl_command_queue_gen6.c +++ b/src/cl_command_queue_gen6.c @@ -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; diff --git a/src/cl_command_queue_gen7.c b/src/cl_command_queue_gen7.c index abf4518..ffb45c0 100644 --- a/src/cl_command_queue_gen7.c +++ b/src/cl_command_queue_gen7.c @@ -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; diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c index 9aee653..779e906 100644 --- a/src/intel/intel_gpgpu.c +++ b/src/intel/intel_gpgpu.c @@ -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, diff --git a/src/intel/intel_gpgpu.h b/src/intel/intel_gpgpu.h index 25cfaec..41335fd 100644 --- a/src/intel/intel_gpgpu.h +++ b/src/intel/intel_gpgpu.h @@ -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); -- 2.7.4