mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
anv: handle preprocess buffer creation on <= Gfx12.0
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31384>
This commit is contained in:
parent
d1ef313466
commit
badcfc164d
1 changed files with 14 additions and 4 deletions
|
|
@ -72,14 +72,24 @@ anv_get_buffer_memory_requirements(struct anv_device *device,
|
|||
* only if the memory type `i` in the VkPhysicalDeviceMemoryProperties
|
||||
* structure for the physical device is supported.
|
||||
*
|
||||
* We have special memory types for descriptor buffers.
|
||||
* Descriptors buffers need to be in the dynamic visible heap (for the
|
||||
* SAMPLER_STATE).
|
||||
*
|
||||
* Preprocess buffers containing INTERFACE_DESCRIPTOR_DATA structures also
|
||||
* need to be there (those structures are indexed from the dynamic state
|
||||
* heap).
|
||||
*/
|
||||
bool need_dynamic_visible_buffer =
|
||||
(usage & (VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT |
|
||||
VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT |
|
||||
VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT)) ||
|
||||
(device->info->verx10 <= 120 &&
|
||||
(usage & VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT));
|
||||
|
||||
uint32_t memory_types;
|
||||
if (flags & VK_BUFFER_CREATE_PROTECTED_BIT)
|
||||
memory_types = device->physical->memory.protected_mem_types;
|
||||
else if (usage & (VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT |
|
||||
VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT |
|
||||
VK_BUFFER_USAGE_2_DESCRIPTOR_HEAP_BIT_EXT))
|
||||
else if (need_dynamic_visible_buffer)
|
||||
memory_types = device->physical->memory.dynamic_visible_mem_types;
|
||||
else if (device->physical->instance->enable_buffer_comp)
|
||||
memory_types = device->physical->memory.default_buffer_mem_types |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue