mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 03:10:09 +01:00
zink: add a null sampler view descriptor hash to the screen
pre-hashing this saves us time later since we can just reuse it Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9348>
This commit is contained in:
parent
67f9038b85
commit
fa77cc2fbb
2 changed files with 11 additions and 0 deletions
|
|
@ -1249,6 +1249,13 @@ zink_create_logical_device(struct zink_screen *screen)
|
|||
return dev;
|
||||
}
|
||||
|
||||
static void
|
||||
pre_hash_descriptor_states(struct zink_screen *screen)
|
||||
{
|
||||
VkDescriptorImageInfo null_info = {};
|
||||
screen->null_descriptor_hashes.sampler_view = _mesa_hash_data(&null_info, sizeof(VkDescriptorImageInfo));
|
||||
}
|
||||
|
||||
static struct zink_screen *
|
||||
zink_internal_create_screen(const struct pipe_screen_config *config)
|
||||
{
|
||||
|
|
@ -1319,6 +1326,7 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
zink_screen_init_compiler(screen);
|
||||
disk_cache_init(screen);
|
||||
populate_format_props(screen);
|
||||
pre_hash_descriptor_states(screen);
|
||||
|
||||
VkPipelineCacheCreateInfo pcci;
|
||||
pcci.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO;
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ struct zink_screen {
|
|||
} driconf;
|
||||
|
||||
VkFormatProperties format_props[PIPE_FORMAT_COUNT];
|
||||
struct {
|
||||
uint32_t sampler_view;
|
||||
} null_descriptor_hashes;
|
||||
};
|
||||
|
||||
static inline struct zink_screen *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue