zink: add batch tracking id for program struct
this reduces overhead of batch tracking Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9967>
This commit is contained in:
parent
1fdd906b21
commit
122d01e73a
|
@ -465,10 +465,9 @@ void
|
|||
zink_batch_reference_program(struct zink_batch *batch,
|
||||
struct zink_program *pg)
|
||||
{
|
||||
bool found = false;
|
||||
_mesa_set_search_and_add(batch->state->programs, pg, &found);
|
||||
if (!found)
|
||||
pipe_reference(NULL, &pg->reference);
|
||||
if (!ptr_add_usage(batch, batch->state->programs, pg, &pg->batch_uses))
|
||||
return;
|
||||
pipe_reference(NULL, &pg->reference);
|
||||
batch->has_work = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,7 @@ struct zink_shader_cache {
|
|||
|
||||
struct zink_program {
|
||||
struct pipe_reference reference;
|
||||
struct zink_batch_usage batch_uses;
|
||||
bool is_compute;
|
||||
|
||||
struct zink_descriptor_pool *pool[ZINK_DESCRIPTOR_TYPES];
|
||||
|
|
Loading…
Reference in New Issue