intel: Use 3DSTATE_BINDING_TABLE_POOL_ALLOC exclusively on Gfx11+
On Icelake and later, we can use a new 3DSTATE_BINDING_TABLE_POOL_ALLOC command to update the location of the binder (buffer containing binding table entries), rather than having to move Surface State Base Address via a STATE_BASE_ADDRESS command. This has less stalling and also means our surface addresses can remain relative to a fixed 4GB address range, meaning we don't have to re-stream them any time the binder changes. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14507>
This commit is contained in:

committed by
Marge Bot

parent
e3a0e97300
commit
8b9045e7a4
@@ -166,13 +166,15 @@ blorp_alloc_binding_table(struct blorp_batch *blorp_batch,
|
||||
iris_binder_reserve(ice, num_entries * sizeof(uint32_t));
|
||||
uint32_t *bt_map = binder->map + bt_offset;
|
||||
|
||||
uint32_t surf_base_offset = GFX_VER < 11 ? binder->bo->address : 0;
|
||||
|
||||
*out_bt_offset = bt_offset;
|
||||
|
||||
for (unsigned i = 0; i < num_entries; i++) {
|
||||
surface_maps[i] = stream_state(batch, ice->state.surface_uploader,
|
||||
state_size, state_alignment,
|
||||
&surface_offsets[i], NULL);
|
||||
bt_map[i] = surface_offsets[i] - (uint32_t) binder->bo->address;
|
||||
bt_map[i] = surface_offsets[i] - surf_base_offset;
|
||||
}
|
||||
|
||||
iris_use_pinned_bo(batch, binder->bo, false, IRIS_DOMAIN_NONE);
|
||||
|
Reference in New Issue
Block a user