Mesa (main): zink: repack zink_resource_object struct
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 17 19:59:56 UTC 2021
Module: Mesa
Branch: main
Commit: 2857267b888e28c9679558e559f0e5af168671c1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2857267b888e28c9679558e559f0e5af168671c1
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Jun 11 09:33:43 2021 -0400
zink: repack zink_resource_object struct
this makes better use of cachelines and eliminates holes
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12410>
---
src/gallium/drivers/zink/zink_resource.h | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_resource.h b/src/gallium/drivers/zink/zink_resource.h
index 3887f0a308d..ceed23ea5e8 100644
--- a/src/gallium/drivers/zink/zink_resource.h
+++ b/src/gallium/drivers/zink/zink_resource.h
@@ -54,32 +54,35 @@ struct mem_key {
struct zink_resource_object {
struct pipe_reference reference;
+
+ unsigned persistent_maps; //if nonzero, requires vkFlushMappedMemoryRanges during batch use
+ struct zink_descriptor_refs desc_set_refs;
+
+ struct zink_batch_usage *reads;
+ struct zink_batch_usage *writes;
+ void *map;
+ unsigned map_count;
+
+ struct util_dynarray tmp;
+
union {
VkBuffer buffer;
VkImage image;
};
- struct util_dynarray tmp;
+ VkSampleLocationsInfoEXT zs_evaluate;
+ bool needs_zs_evaluate;
+
bool storage_init; //layout was set for image
bool transfer_dst;
+ bool is_buffer;
VkImageAspectFlags modifier_aspect;
- bool dedicated;
struct zink_bo *bo;
VkDeviceMemory mem;
VkDeviceSize offset, size, alignment;
- VkSampleLocationsInfoEXT zs_evaluate;
- bool needs_zs_evaluate;
-
- unsigned persistent_maps; //if nonzero, requires vkFlushMappedMemoryRanges during batch use
- struct zink_descriptor_refs desc_set_refs;
-
- struct zink_batch_usage *reads;
- struct zink_batch_usage *writes;
- void *map;
- unsigned map_count;
- bool is_buffer;
+ bool dedicated;
bool host_visible;
bool coherent;
};
More information about the mesa-commit
mailing list