st/mesa: skip atomics when binding UBOs

This uses the same mechanism as vertex buffers.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8298>
This commit is contained in:
Marek Olšák 2021-01-02 18:06:53 -05:00 committed by Marge Bot
parent 7688b8ae98
commit b18b68ba18

View file

@ -266,13 +266,11 @@ st_bind_ubos(struct st_context *st, struct gl_program *prog,
for (i = 0; i < prog->sh.NumUniformBlocks; i++) {
struct gl_buffer_binding *binding;
struct st_buffer_object *st_obj;
binding =
&st->ctx->UniformBufferBindings[prog->sh.UniformBlocks[i]->Binding];
st_obj = st_buffer_object(binding->BufferObject);
cb.buffer = st_obj ? st_obj->buffer : NULL;
cb.buffer = st_get_buffer_reference(st->ctx, binding->BufferObject);
if (cb.buffer) {
cb.buffer_offset = binding->Offset;
@ -289,7 +287,7 @@ st_bind_ubos(struct st_context *st, struct gl_program *prog,
cb.buffer_size = 0;
}
pipe->set_constant_buffer(pipe, shader_type, 1 + i, false, &cb);
pipe->set_constant_buffer(pipe, shader_type, 1 + i, true, &cb);
}
}