mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
dzn: Partial revert of 8887852d
Turns out there was a good reason for having both buffer count and desc_count. They served different purposes. Fixes:8887852d("dzn: Add some docs around descriptor sets and remove redundant/unused data") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23218> (cherry picked from commitb4852c4efb)
This commit is contained in:
parent
04affaa567
commit
a59bb82ce7
3 changed files with 7 additions and 4 deletions
|
|
@ -652,7 +652,7 @@
|
|||
"description": "dzn: Partial revert of 8887852d",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "8887852d208821b48c0b6d844e8224957fdcdef5"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -421,8 +421,9 @@ dzn_descriptor_set_layout_create(struct dzn_device *device,
|
|||
if (is_dynamic) {
|
||||
range->OffsetInDescriptorsFromTableStart =
|
||||
set_layout->dynamic_buffers.range_offset +
|
||||
set_layout->dynamic_buffers.count;
|
||||
set_layout->dynamic_buffers.desc_count;
|
||||
set_layout->dynamic_buffers.count += range->NumDescriptors;
|
||||
set_layout->dynamic_buffers.desc_count += range->NumDescriptors;
|
||||
} else {
|
||||
range->OffsetInDescriptorsFromTableStart = set_layout->range_desc_count[type];
|
||||
if (!binfos[binding].variable_size)
|
||||
|
|
@ -440,7 +441,8 @@ dzn_descriptor_set_layout_create(struct dzn_device *device,
|
|||
if (is_dynamic) {
|
||||
range->OffsetInDescriptorsFromTableStart =
|
||||
set_layout->dynamic_buffers.range_offset +
|
||||
set_layout->dynamic_buffers.count;
|
||||
set_layout->dynamic_buffers.desc_count;
|
||||
set_layout->dynamic_buffers.desc_count += range->NumDescriptors;
|
||||
} else {
|
||||
range->OffsetInDescriptorsFromTableStart = set_layout->range_desc_count[type];
|
||||
set_layout->range_desc_count[type] += range->NumDescriptors;
|
||||
|
|
@ -679,7 +681,7 @@ dzn_pipeline_layout_create(struct dzn_device *device,
|
|||
}
|
||||
|
||||
if (!device->bindless)
|
||||
layout->desc_count[D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV] += set_layout->dynamic_buffers.count;
|
||||
layout->desc_count[D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV] += set_layout->dynamic_buffers.desc_count;
|
||||
|
||||
dynamic_buffer_base += set_layout->dynamic_buffers.count;
|
||||
for (uint32_t o = 0, elem = 0; o < set_layout->dynamic_buffers.count; o++, elem++) {
|
||||
|
|
|
|||
|
|
@ -794,6 +794,7 @@ struct dzn_descriptor_set_layout {
|
|||
struct {
|
||||
uint32_t bindings[MAX_DYNAMIC_BUFFERS];
|
||||
uint32_t count;
|
||||
uint32_t desc_count;
|
||||
uint32_t range_offset;
|
||||
} dynamic_buffers;
|
||||
uint32_t buffer_count;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue