update_res_bind_count(ctx, res, is_compute, true);
if (writable)
res->write_bind_count[is_compute]--;
- if (res->obj->is_buffer)
- return;
res->image_bind_count[is_compute]--;
/* if this was the last image bind, the sampler bind layouts must be updated */
- if (!res->image_bind_count[is_compute] && res->bind_count[is_compute])
+ if (!res->obj->is_buffer && !res->image_bind_count[is_compute] && res->bind_count[is_compute])
update_binds_for_samplerviews(ctx, res, is_compute);
}
if (image_view->base.access & PIPE_IMAGE_ACCESS_READ) {
access |= VK_ACCESS_SHADER_READ_BIT;
}
+ res->image_bind_count[p_stage == PIPE_SHADER_COMPUTE]++;
if (images[i].resource->target == PIPE_BUFFER) {
image_view->buffer_view = get_buffer_view(ctx, res, images[i].format, images[i].u.buf.offset, images[i].u.buf.size);
assert(image_view->buffer_view);
tmpl.u.tex.last_layer = images[i].u.tex.last_layer;
image_view->surface = zink_surface(pctx->create_surface(pctx, &res->base.b, &tmpl));
assert(image_view->surface);
- res->image_bind_count[p_stage == PIPE_SHADER_COMPUTE]++;
/* if this is the first image bind and there are sampler binds, the image's sampler layout
* must be updated to GENERAL
*/
VkImageAspectFlags aspect;
bool optimal_tiling;
uint8_t fb_binds;
- uint16_t image_bind_count[2]; //gfx, compute
};
};
uint32_t sampler_binds[PIPE_SHADER_TYPES];
+ uint16_t image_bind_count[2]; //gfx, compute
uint16_t write_bind_count[2]; //gfx, compute
uint16_t bind_count[2]; //gfx, compute