[Mesa-dev] [PATCH 10/16] anv: Set image memory types based on the type count
Nanley Chery
nanleychery at gmail.com
Tue May 23 21:20:41 UTC 2017
On Thu, May 18, 2017 at 02:00:57PM -0700, Jason Ekstrand wrote:
> ---
> src/intel/vulkan/anv_device.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
This patch is
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 8bf52cc..b0ccbbb 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -1758,6 +1758,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:
> *
> @@ -1766,12 +1767,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(
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list