From e986d8c3377470d039cc6ed19e73786c3105863b Mon Sep 17 00:00:00 2001 From: Giancarlo Devich Date: Mon, 9 Jan 2023 11:33:20 -0800 Subject: [PATCH] d3d12: Update hard-coded heap sizes and batch limit Increasing the heap sizes and active batch count reduces flushing churn when rendering runs out of descriptors. Part-of: --- src/gallium/drivers/d3d12/d3d12_batch.cpp | 5 ++--- src/gallium/drivers/d3d12/d3d12_context.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_batch.cpp b/src/gallium/drivers/d3d12/d3d12_batch.cpp index d61d0a352fb..3728df8f42b 100644 --- a/src/gallium/drivers/d3d12/d3d12_batch.cpp +++ b/src/gallium/drivers/d3d12/d3d12_batch.cpp @@ -61,18 +61,17 @@ d3d12_init_batch(struct d3d12_context *ctx, struct d3d12_batch *batch) IID_PPV_ARGS(&batch->cmdalloc)))) return false; - batch->sampler_heap = d3d12_descriptor_heap_new(screen->dev, D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, - 128); + 1024); batch->view_heap = d3d12_descriptor_heap_new(screen->dev, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, - 1024); + 8096); if (!batch->sampler_heap && !batch->view_heap) return false; diff --git a/src/gallium/drivers/d3d12/d3d12_context.h b/src/gallium/drivers/d3d12/d3d12_context.h index d3996ab76c3..c28a778dbd3 100644 --- a/src/gallium/drivers/d3d12/d3d12_context.h +++ b/src/gallium/drivers/d3d12/d3d12_context.h @@ -177,7 +177,7 @@ struct d3d12_context { struct hash_table *compute_transform_cache; struct hash_table_u64 *bo_state_table; - struct d3d12_batch batches[4]; + struct d3d12_batch batches[8]; unsigned current_batch_idx; struct util_dynarray recently_destroyed_bos;