zink: use zink_program in zink_batch_reference_program()
this is a little nicer no functional changes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9273>
This commit is contained in:

committed by
Marge Bot

parent
5503ffecfb
commit
747caaa83d
@@ -197,12 +197,12 @@ zink_batch_reference_sampler_view(struct zink_batch *batch,
|
||||
|
||||
void
|
||||
zink_batch_reference_program(struct zink_batch *batch,
|
||||
struct pipe_reference *prog)
|
||||
struct zink_program *pg)
|
||||
{
|
||||
struct set_entry *entry = _mesa_set_search(batch->programs, prog);
|
||||
struct set_entry *entry = _mesa_set_search(batch->programs, pg);
|
||||
if (!entry) {
|
||||
entry = _mesa_set_add(batch->programs, prog);
|
||||
pipe_reference(NULL, prog);
|
||||
entry = _mesa_set_add(batch->programs, pg);
|
||||
pipe_reference(NULL, &pg->reference);
|
||||
}
|
||||
batch->has_work = true;
|
||||
}
|
||||
|
@@ -34,6 +34,7 @@ struct pipe_reference;
|
||||
struct zink_context;
|
||||
struct zink_fence;
|
||||
struct zink_framebuffer;
|
||||
struct zink_program;
|
||||
struct zink_render_pass;
|
||||
struct zink_resource;
|
||||
struct zink_sampler_view;
|
||||
@@ -85,7 +86,7 @@ zink_batch_reference_sampler_view(struct zink_batch *batch,
|
||||
|
||||
void
|
||||
zink_batch_reference_program(struct zink_batch *batch,
|
||||
struct pipe_reference *prog);
|
||||
struct zink_program *pg);
|
||||
|
||||
void
|
||||
zink_batch_reference_surface(struct zink_batch *batch,
|
||||
|
@@ -520,9 +520,9 @@ update_descriptors(struct zink_context *ctx, struct zink_screen *screen, bool is
|
||||
}
|
||||
|
||||
if (is_compute)
|
||||
zink_batch_reference_program(batch, &ctx->curr_compute->base.reference);
|
||||
zink_batch_reference_program(batch, &ctx->curr_compute->base);
|
||||
else
|
||||
zink_batch_reference_program(batch, &ctx->curr_program->base.reference);
|
||||
zink_batch_reference_program(batch, &ctx->curr_program->base);
|
||||
|
||||
if (batch->descs_used + num_descriptors >= batch->max_descs) {
|
||||
if (is_compute)
|
||||
|
Reference in New Issue
Block a user