From e15c663d8e80bd75331336ecba49ce6791d8d1fd Mon Sep 17 00:00:00 2001 From: Antia Puentes Date: Sat, 15 Dec 2018 18:34:11 +0100 Subject: nir/linker: Add atomic counters to the program resource list Reviewed-by: Timothy Arceri --- src/compiler/glsl/gl_nir_linker.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler/glsl') diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index 57ee435fa27..4503231c6c2 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -244,5 +244,12 @@ nir_build_program_resource_list(struct gl_context *ctx, return; } + /* Add atomic counter buffers. */ + for (unsigned i = 0; i < prog->data->NumAtomicBuffers; i++) { + if (!link_util_add_program_resource(prog, resource_set, GL_ATOMIC_COUNTER_BUFFER, + &prog->data->AtomicBuffers[i], 0)) + return; + } + _mesa_set_destroy(resource_set, NULL); } -- cgit v1.2.3