util,gallium: put count in pipe_resource & sampler_view on its own cache line
authorMarek Olšák <marek.olsak@amd.com>
Sun, 27 Jun 2021 21:55:29 +0000 (17:55 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 Oct 2021 03:26:20 +0000 (03:26 +0000)
commit8c6e18bc513b98d92673163bced7631d8ee6eafc
tree0449c9ae183c6f598172c743785c76b31feff44a
parentb34a3459f893df10024d06c0055123a8fe199f17
util,gallium: put count in pipe_resource & sampler_view on its own cache line

This adds 60 bytes to both structures. It eliminates "False Sharing"
for atomic operations (see wikipedia).

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11618>
src/gallium/auxiliary/util/u_tests.c
src/gallium/drivers/d3d12/d3d12_blit.cpp
src/gallium/drivers/d3d12/d3d12_surface.cpp
src/gallium/drivers/r300/r300_context.c
src/gallium/include/pipe/p_compiler.h
src/gallium/include/pipe/p_state.h
src/util/macros.h
src/util/u_memory.h