zink: track ssbo bind counts
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17192>
This commit is contained in:
committed by
Marge Bot
parent
e38b2adb88
commit
49cc3696bd
@@ -1251,6 +1251,7 @@ unbind_ssbo(struct zink_context *ctx, struct zink_resource *res, enum pipe_shade
|
||||
if (!res)
|
||||
return;
|
||||
res->ssbo_bind_mask[pstage] &= ~BITFIELD_BIT(slot);
|
||||
res->ssbo_bind_count[pstage == PIPE_SHADER_COMPUTE]--;
|
||||
update_res_bind_count(ctx, res, pstage == PIPE_SHADER_COMPUTE, true);
|
||||
if (writable)
|
||||
res->write_bind_count[pstage == PIPE_SHADER_COMPUTE]--;
|
||||
@@ -1281,6 +1282,7 @@ zink_set_shader_buffers(struct pipe_context *pctx,
|
||||
if (new_res != res) {
|
||||
unbind_ssbo(ctx, res, p_stage, i, was_writable);
|
||||
new_res->ssbo_bind_mask[p_stage] |= BITFIELD_BIT(i);
|
||||
new_res->ssbo_bind_count[p_stage == PIPE_SHADER_COMPUTE]++;
|
||||
update_res_bind_count(ctx, new_res, p_stage == PIPE_SHADER_COMPUTE, false);
|
||||
}
|
||||
VkAccessFlags access = VK_ACCESS_SHADER_READ_BIT;
|
||||
|
||||
@@ -123,6 +123,7 @@ struct zink_resource {
|
||||
struct util_range valid_buffer_range;
|
||||
uint32_t vbo_bind_mask : PIPE_MAX_ATTRIBS;
|
||||
uint8_t ubo_bind_count[2];
|
||||
uint8_t ssbo_bind_count[2];
|
||||
uint8_t vbo_bind_count;
|
||||
uint8_t so_bind_count; //not counted in all_binds
|
||||
bool so_valid;
|
||||
|
||||
Reference in New Issue
Block a user