mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 08:30:10 +01:00
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:
parent
7688b8ae98
commit
b18b68ba18
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue