mesa/src
Paulo Zanoni ad4d13f184 anv: reduce struct anv_image_memory_range from 32 to 24 bytes
Reorder its members to fill the current padding hole, reducing the
struct size from 32 to 24.

This struct appears multiple times inside struct anv_image and its
members, so this change brings down sizeof(struct anv_image) from
1744 to 1600.

We went from:

struct anv_image_memory_range {
	enum anv_image_memory_binding binding;           /*     0     4 */

	/* XXX 4 bytes hole, try to pack */

	uint64_t                   offset;               /*     8     8 */
	uint64_t                   size;                 /*    16     8 */
	uint32_t                   alignment;            /*    24     4 */

	/* size: 32, cachelines: 1, members: 4 */
	/* sum members: 24, holes: 1, sum holes: 4 */
	/* padding: 4 */
	/* last cacheline: 32 bytes */
};

to:

struct anv_image_memory_range {
	enum anv_image_memory_binding binding;           /*     0     4 */
	uint32_t                   alignment;            /*     4     4 */
	uint64_t                   size;                 /*     8     8 */
	uint64_t                   offset;               /*    16     8 */

	/* size: 24, cachelines: 1, members: 4 */
	/* last cacheline: 24 bytes */
};

Considering we can have tens of thousands of anv_image structs
allocated at the same time on gaming workloads, this can save us a few
MB of memory. It ain't much but it's honest work.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28700>
2024-04-15 18:18:12 +00:00
..
amd radv: use canonicalized VA for VM fault reports 2024-04-15 17:38:44 +00:00
android_stub
asahi agx: set compact_arrays in compiler options 2024-04-12 18:43:48 +00:00
broadcom v3d: set use_clipdist_array=true for lower_clip? 2024-04-11 18:57:25 +00:00
c11
compiler nir/opt_varyings: Add workaround for RADV mesh shader multiview. 2024-04-14 19:51:12 +00:00
drm-shim drm-shim: Add io region handling in mmap 2024-03-19 10:22:34 +00:00
egl egl/dri2: don't bind dri2 for zink 2024-04-12 17:48:51 +00:00
etnaviv etnaviv: hwdb: Drop stdint.h dependency 2024-04-15 16:57:29 +00:00
freedreno zink: ci updates 2024-04-12 21:30:45 +00:00
gallium panfrost: fix a GPU/CPU synchronization problem 2024-04-15 10:52:52 +00:00
gbm gbm: Remove hardcoded color-channel data 2024-02-27 10:51:03 +00:00
getopt
glx glx/egl: fix LIBGL_KOPPER_DISABLE 2024-04-04 13:18:00 +00:00
gtest
imagination meson: add VK_DRIVER_FILES to devenv, alongside the old VK_ICD_FILENAMES 2024-04-02 18:08:52 +00:00
imgui
intel anv: reduce struct anv_image_memory_range from 32 to 24 bytes 2024-04-15 18:18:12 +00:00
loader loader/wayland: Add named queue fallback 2024-02-28 11:01:31 +00:00
mapi treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible 2024-03-22 18:22:34 +00:00
mesa glsl: inline _mesa_copy_linked_program_data() 2024-04-13 11:36:08 +00:00
microsoft microsoft/compiler: set compact_arrays in compiler options 2024-04-05 17:56:28 +00:00
nouveau nvk: Remove duplicate DRM_NODE_RENDER check 2024-04-15 17:18:31 +00:00
panfrost panvk: wire up version-overriding 2024-04-15 16:09:51 +00:00
tool pps: Config tweaks to avoid loosing traces 2024-03-25 19:49:50 +00:00
util util/u_queue: read fence->signalled locked with TSAN 2024-04-11 13:52:36 +00:00
virtio venus: use more relaxed profile for TLS ring seqno wait 2024-04-13 00:52:22 +00:00
vulkan vulkan/video: copy the profile over for h264 encode. 2024-04-11 12:48:22 +10:00
.clang-format agx: add Braun-Hack spiller pass 2024-03-30 00:26:18 +00:00
meson.build loader/wayland: Add fallback wl_display_dispatch_queue_timeout 2024-02-27 13:10:13 +00:00