zink: replace has_descriptors program member with a util function
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10849>
This commit is contained in:
parent
9d128e6aed
commit
d54c21d279
|
@ -478,7 +478,7 @@ zink_draw_vbo(struct pipe_context *pctx,
|
|||
}
|
||||
}
|
||||
|
||||
if (gfx_program->base.has_descriptors)
|
||||
if (zink_program_has_descriptors(&gfx_program->base))
|
||||
zink_descriptors_update(ctx, false);
|
||||
|
||||
struct zink_batch *batch = zink_batch_rp(ctx);
|
||||
|
@ -730,7 +730,7 @@ zink_launch_grid(struct pipe_context *pctx, const struct pipe_grid_info *info)
|
|||
VkPipeline pipeline = zink_get_compute_pipeline(screen, comp_program,
|
||||
&ctx->compute_pipeline_state);
|
||||
|
||||
if (comp_program->base.has_descriptors)
|
||||
if (zink_program_has_descriptors(&comp_program->base))
|
||||
zink_descriptors_update(ctx, true);
|
||||
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ struct zink_program {
|
|||
bool is_compute;
|
||||
|
||||
struct zink_program_descriptor_data *dd;
|
||||
bool has_descriptors;
|
||||
|
||||
VkPipelineLayout layout;
|
||||
VkDescriptorSetLayout dsl[ZINK_DESCRIPTOR_TYPES];
|
||||
|
@ -218,4 +217,10 @@ zink_get_compute_pipeline(struct zink_screen *screen,
|
|||
struct zink_compute_program *comp,
|
||||
struct zink_compute_pipeline_state *state);
|
||||
|
||||
static inline bool
|
||||
zink_program_has_descriptors(const struct zink_program *pg)
|
||||
{
|
||||
return pg->dsl[0] || pg->dsl[1] || pg->dsl[2] || pg->dsl[3];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue