mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
anv: Set image memory types based on the type count
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 10fad58b31)
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
This commit is contained in:
parent
e064f7d826
commit
2f8ede04d9
1 changed files with 4 additions and 2 deletions
|
|
@ -1810,6 +1810,7 @@ void anv_GetImageMemoryRequirements(
|
|||
{
|
||||
ANV_FROM_HANDLE(anv_image, image, _image);
|
||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||
struct anv_physical_device *pdevice = &device->instance->physicalDevice;
|
||||
|
||||
/* The Vulkan spec (git aaed022) says:
|
||||
*
|
||||
|
|
@ -1818,12 +1819,13 @@ void anv_GetImageMemoryRequirements(
|
|||
* only if the memory type `i` in the VkPhysicalDeviceMemoryProperties
|
||||
* structure for the physical device is supported.
|
||||
*
|
||||
* We support exactly one memory type on LLC, two on non-LLC.
|
||||
* All types are currently supported for images.
|
||||
*/
|
||||
pMemoryRequirements->memoryTypeBits = device->info.has_llc ? 1 : 3;
|
||||
uint32_t memory_types = (1ull << pdevice->memory.type_count) - 1;
|
||||
|
||||
pMemoryRequirements->size = image->size;
|
||||
pMemoryRequirements->alignment = image->alignment;
|
||||
pMemoryRequirements->memoryTypeBits = memory_types;
|
||||
}
|
||||
|
||||
void anv_GetImageSparseMemoryRequirements(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue