diff options
author | Bas Nieuwenhuizen <[email protected]> | 2019-05-09 01:57:28 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2019-05-12 23:02:44 +0000 |
commit | f53ebfb4503a1ae054539df1c414b86c3b1966d9 (patch) | |
tree | 0772ab26b76b0db96abf6fe4b2edaae2ac4e2ec3 /src/amd/vulkan/radv_descriptor_set.h | |
parent | d6dfb2cf5029ae1601eb6792aabd971b1459899f (diff) |
radv: Do not use extra descriptor space for the 3rd plane.
While ImageFormatProperties returns the number of internal descriptors,
it turns out that applications do not need to actually allocate more
descriptors in the descriptor pool.
So if we make descriptors with more planes larger we have to be
convervative and always allocate space for the larger descriptors
which is a waste given the low usage of this ext.
So let us make use of the fact that 3plane formats all have the
same formats & dimensions for the last two planes. This way we
only need the first half of the descriptor of the 3rd plane and
can share the second half of the second plane.
This allows us to use 16 bytes for the descriptor which nicely
fits into the 16 bytes that are unused right next to the sampler.
Fixes: 5564c38212a "radv: Update descriptor sets for multiple planes."
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_descriptor_set.h')
-rw-r--r-- | src/amd/vulkan/radv_descriptor_set.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_descriptor_set.h b/src/amd/vulkan/radv_descriptor_set.h index 5fd19d94482..89be6e69068 100644 --- a/src/amd/vulkan/radv_descriptor_set.h +++ b/src/amd/vulkan/radv_descriptor_set.h @@ -104,7 +104,7 @@ radv_immutable_samplers(const struct radv_descriptor_set_layout *set, static inline unsigned radv_combined_image_descriptor_sampler_offset(const struct radv_descriptor_set_binding_layout *binding) { - return binding->size - ((!binding->immutable_samplers_equal) ? 32 : 0); + return binding->size - ((!binding->immutable_samplers_equal) ? 16 : 0); } static inline const struct radv_sampler_ycbcr_conversion * |