mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
zink: introduce a define for max descriptors per type
We know what this max is in the compiler, let's move that out into zink_descriptors.h, so we can reuse the constant. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11380>
This commit is contained in:
parent
0ee48216dd
commit
4439f500a2
2 changed files with 2 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ struct zink_shader {
|
|||
int binding;
|
||||
VkDescriptorType type;
|
||||
unsigned char size;
|
||||
} bindings[ZINK_DESCRIPTOR_TYPES][32];
|
||||
} bindings[ZINK_DESCRIPTOR_TYPES][ZINK_MAX_DESCRIPTORS_PER_TYPE];
|
||||
size_t num_bindings[ZINK_DESCRIPTOR_TYPES];
|
||||
unsigned num_texel_buffers;
|
||||
uint32_t ubos_used; // bitfield of which ubo indices are used
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ enum zink_descriptor_type {
|
|||
ZINK_DESCRIPTOR_TYPES,
|
||||
};
|
||||
|
||||
#define ZINK_MAX_DESCRIPTORS_PER_TYPE 32
|
||||
|
||||
struct zink_descriptor_refs {
|
||||
struct util_dynarray refs;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue