summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/genX_blorp_exec.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-23 20:51:26 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-09-13 12:40:11 -0700
commitcb780c9ccf7b7c68943b3e3f4850a60cd4f703e1 (patch)
treeff78a706109d79ea1e4e04d18c450c2fdada4748 /src/mesa/drivers/dri/i965/genX_blorp_exec.c
parent524fd55d2d973f50a5d8bc2255684610f5faae32 (diff)
downloadexternal_mesa3d-cb780c9ccf7b7c68943b3e3f4850a60cd4f703e1.zip
external_mesa3d-cb780c9ccf7b7c68943b3e3f4850a60cd4f703e1.tar.gz
external_mesa3d-cb780c9ccf7b7c68943b3e3f4850a60cd4f703e1.tar.bz2
intel/blorp: Rework alloc_binding_table
The original blorp_alloc_binding_table helper was supposed to return the binding table offset and map along with the surface state maps. This isn't quite what we want, however. What we really want is the binding table offsets, surface state offsets, and surface state maps. In the GL driver, the binding table map *is* an array of surface state offsets. However, in Vulkan, this isn't quite true as the entries in the binding table are surface state offsets combined with another binding table block offset. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/genX_blorp_exec.c')
-rw-r--r--src/mesa/drivers/dri/i965/genX_blorp_exec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index 2e62c70..47d509d 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -104,20 +104,21 @@ blorp_alloc_dynamic_state(struct blorp_batch *batch,
static void
blorp_alloc_binding_table(struct blorp_batch *batch, unsigned num_entries,
unsigned state_size, unsigned state_alignment,
- uint32_t *bt_offset, uint32_t **bt_map,
+ uint32_t *bt_offset, uint32_t *surface_offsets,
void **surface_maps)
{
assert(batch->blorp->driver_ctx == batch->driver_batch);
struct brw_context *brw = batch->driver_batch;
- *bt_map = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,
- num_entries * sizeof(uint32_t), 32,
- bt_offset);
+ uint32_t *bt_map = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,
+ num_entries * sizeof(uint32_t), 32,
+ bt_offset);
for (unsigned i = 0; i < num_entries; i++) {
surface_maps[i] = brw_state_batch(brw, AUB_TRACE_SURFACE_STATE,
state_size, state_alignment,
- &(*bt_map)[i]);
+ &(surface_offsets)[i]);
+ bt_map[i] = surface_offsets[i];
}
}