mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: rename fb_binds -> fb_bind_count
this is more accurate Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18787>
This commit is contained in:
parent
bc5ed17844
commit
630967b252
5 changed files with 11 additions and 11 deletions
|
|
@ -1563,7 +1563,7 @@ update_binds_for_samplerviews(struct zink_context *ctx, struct zink_resource *re
|
|||
static void
|
||||
flush_pending_clears(struct zink_context *ctx, struct zink_resource *res)
|
||||
{
|
||||
if (res->fb_binds && ctx->clears_enabled)
|
||||
if (res->fb_bind_count && ctx->clears_enabled)
|
||||
zink_fb_clears_apply(ctx, &res->base.b);
|
||||
}
|
||||
|
||||
|
|
@ -2802,8 +2802,8 @@ unbind_fb_surface(struct zink_context *ctx, struct pipe_surface *surf, unsigned
|
|||
if (changed) {
|
||||
ctx->rp_changed = true;
|
||||
}
|
||||
res->fb_binds--;
|
||||
if (!res->fb_binds) {
|
||||
res->fb_bind_count--;
|
||||
if (!res->fb_bind_count) {
|
||||
check_resource_for_batch_ref(ctx, res);
|
||||
if (res->sampler_bind_count[0])
|
||||
update_res_sampler_layouts(ctx, res);
|
||||
|
|
@ -2930,7 +2930,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
|
|||
}
|
||||
}
|
||||
}
|
||||
res->fb_binds++;
|
||||
res->fb_bind_count++;
|
||||
if (util_format_has_alpha1(psurf->format)) {
|
||||
if (!res->valid && !zink_fb_clear_full_exists(ctx, i))
|
||||
ctx->void_clears |= (PIPE_CLEAR_COLOR0 << i);
|
||||
|
|
@ -2947,7 +2947,7 @@ zink_set_framebuffer_state(struct pipe_context *pctx,
|
|||
samples = MAX3(transient ? transient->base.nr_samples : 1, psurf->texture->nr_samples, 1);
|
||||
if (zink_csurface(psurf)->info.layerCount > layers)
|
||||
ctx->fb_layer_mismatch |= BITFIELD_BIT(PIPE_MAX_COLOR_BUFS);
|
||||
zink_resource(psurf->texture)->fb_binds++;
|
||||
zink_resource(psurf->texture)->fb_bind_count++;
|
||||
switch (psurf->format) {
|
||||
case PIPE_FORMAT_Z16_UNORM:
|
||||
case PIPE_FORMAT_Z16_UNORM_S8_UINT:
|
||||
|
|
@ -3294,7 +3294,7 @@ resource_check_defer_image_barrier(struct zink_context *ctx, struct zink_resourc
|
|||
bool is_shader = is_shader_pipline_stage(pipeline);
|
||||
if ((is_shader || !res->bind_count[is_compute]) &&
|
||||
/* if no layout change is needed between gfx and compute, do nothing */
|
||||
!res->bind_count[!is_compute] && (!is_compute || !res->fb_binds))
|
||||
!res->bind_count[!is_compute] && (!is_compute || !res->fb_bind_count))
|
||||
return;
|
||||
|
||||
if (res->bind_count[!is_compute] && is_shader) {
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ zink_descriptor_util_image_layout_eval(const struct zink_context *ctx, const str
|
|||
if (res->image_bind_count[is_compute])
|
||||
return VK_IMAGE_LAYOUT_GENERAL;
|
||||
if (res->aspect & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) {
|
||||
if (!is_compute && res->fb_binds &&
|
||||
if (!is_compute && res->fb_bind_count &&
|
||||
ctx->gfx_pipeline_state.render_pass && ctx->gfx_pipeline_state.render_pass->state.rts[ctx->fb_state.nr_cbufs].mixed_zs)
|
||||
return VK_IMAGE_LAYOUT_GENERAL;
|
||||
if (res->obj->vkusage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
|
||||
|
|
|
|||
|
|
@ -1632,7 +1632,7 @@ zink_resource_invalidate(struct pipe_context *pctx, struct pipe_resource *pres)
|
|||
invalidate_buffer(zink_context(pctx), zink_resource(pres));
|
||||
else {
|
||||
struct zink_resource *res = zink_resource(pres);
|
||||
if (res->valid && res->fb_binds)
|
||||
if (res->valid && res->fb_bind_count)
|
||||
zink_context(pctx)->rp_loadop_changed = true;
|
||||
res->valid = false;
|
||||
}
|
||||
|
|
@ -2027,7 +2027,7 @@ zink_image_map(struct pipe_context *pctx,
|
|||
if (!ptr)
|
||||
goto fail;
|
||||
if (usage & PIPE_MAP_WRITE) {
|
||||
if (!res->valid && res->fb_binds)
|
||||
if (!res->valid && res->fb_bind_count)
|
||||
ctx->rp_loadop_changed = true;
|
||||
res->valid = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *re
|
|||
util_dynarray_append(&batch->state->acquires, VkSemaphore, acquire);
|
||||
}
|
||||
if (write && !res->obj->is_buffer) {
|
||||
if (!res->valid && res->fb_binds)
|
||||
if (!res->valid && res->fb_bind_count)
|
||||
batch->state->ctx->rp_loadop_changed = true;
|
||||
res->valid = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -998,7 +998,7 @@ struct zink_resource {
|
|||
bool linear;
|
||||
bool need_2D;
|
||||
bool valid;
|
||||
uint8_t fb_binds; //not counted in all_binds
|
||||
uint8_t fb_bind_count; //not counted in all_binds
|
||||
};
|
||||
};
|
||||
uint32_t sampler_binds[MESA_SHADER_STAGES];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue