anv: Add anv_memregion structure
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9324>
This commit is contained in:
parent
a41c3ed384
commit
835c257f64
|
@ -719,6 +719,10 @@ anv_physical_device_try_create(struct anv_instance *instance,
|
|||
|
||||
device->has_context_priority = anv_gem_has_context_priority(fd);
|
||||
|
||||
/* Initialize memory regions struct to 0. */
|
||||
memset(&device->vram, 0, sizeof(device->vram));
|
||||
memset(&device->sys, 0, sizeof(device->sys));
|
||||
|
||||
result = anv_physical_device_init_heaps(device, fd);
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_base;
|
||||
|
|
|
@ -964,6 +964,12 @@ struct anv_memory_heap {
|
|||
* Align it to 64 bits to make atomic operations faster on 32 bit platforms.
|
||||
*/
|
||||
VkDeviceSize used __attribute__ ((aligned (8)));
|
||||
|
||||
bool is_local_mem;
|
||||
};
|
||||
|
||||
struct anv_memregion {
|
||||
uint64_t size;
|
||||
};
|
||||
|
||||
struct anv_physical_device {
|
||||
|
@ -1059,6 +1065,8 @@ struct anv_physical_device {
|
|||
struct anv_memory_heap heaps[VK_MAX_MEMORY_HEAPS];
|
||||
} memory;
|
||||
|
||||
struct anv_memregion vram;
|
||||
struct anv_memregion sys;
|
||||
uint8_t driver_build_sha1[20];
|
||||
uint8_t pipeline_cache_uuid[VK_UUID_SIZE];
|
||||
uint8_t driver_uuid[VK_UUID_SIZE];
|
||||
|
|
Loading…
Reference in New Issue