[Mesa-dev] [PATCH v4 (part2) 36/59] glsl: Rename atomic counter functions
Timothy Arceri
t_arceri at yahoo.com.au
Wed Aug 5 02:24:45 PDT 2015
On Wed, 2015-08-05 at 10:30 +0200, Iago Toral Quiroga wrote:
> Shader Storage Buffer Object will add new atomic functions that are not
> associated with counters, so better have atomic counter-specific functions
> explicitly include the word "counter" in their names.
Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>
> ---
> src/glsl/builtin_functions.cpp | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
> index 2175c66..826524d 100644
> --- a/src/glsl/builtin_functions.cpp
> +++ b/src/glsl/builtin_functions.cpp
> @@ -696,9 +696,9 @@ private:
> B1(interpolateAtOffset)
> B1(interpolateAtSample)
>
> - ir_function_signature *_atomic_intrinsic(builtin_available_predicate
> avail);
> - ir_function_signature *_atomic_op(const char *intrinsic,
> - builtin_available_predicate avail);
> + ir_function_signature
> *_atomic_counter_intrinsic(builtin_available_predicate avail);
> + ir_function_signature *_atomic_counter_op(const char *intrinsic,
> + builtin_available_predicate
> avail);
>
> B1(min3)
> B1(max3)
> @@ -825,13 +825,13 @@ void
> builtin_builder::create_intrinsics()
> {
> add_function("__intrinsic_atomic_read",
> - _atomic_intrinsic(shader_atomic_counters),
> + _atomic_counter_intrinsic(shader_atomic_counters),
> NULL);
> add_function("__intrinsic_atomic_increment",
> - _atomic_intrinsic(shader_atomic_counters),
> + _atomic_counter_intrinsic(shader_atomic_counters),
> NULL);
> add_function("__intrinsic_atomic_predecrement",
> - _atomic_intrinsic(shader_atomic_counters),
> + _atomic_counter_intrinsic(shader_atomic_counters),
> NULL);
>
> add_image_functions(false);
> @@ -2447,16 +2447,16 @@ builtin_builder::create_builtins()
> NULL);
>
> add_function("atomicCounter",
> - _atomic_op("__intrinsic_atomic_read",
> - shader_atomic_counters),
> + _atomic_counter_op("__intrinsic_atomic_read",
> + shader_atomic_counters),
> NULL);
> add_function("atomicCounterIncrement",
> - _atomic_op("__intrinsic_atomic_increment",
> - shader_atomic_counters),
> + _atomic_counter_op("__intrinsic_atomic_increment",
> + shader_atomic_counters),
> NULL);
> add_function("atomicCounterDecrement",
> - _atomic_op("__intrinsic_atomic_predecrement",
> - shader_atomic_counters),
> + _atomic_counter_op("__intrinsic_atomic_predecrement",
> + shader_atomic_counters),
> NULL);
>
> add_function("min3",
> @@ -4706,7 +4706,7 @@ builtin_builder::_interpolateAtSample(const glsl_type
> *type)
> }
>
> ir_function_signature *
> -builtin_builder::_atomic_intrinsic(builtin_available_predicate avail)
> +builtin_builder::_atomic_counter_intrinsic(builtin_available_predicate
> avail)
> {
> ir_variable *counter = in_var(glsl_type::atomic_uint_type, "counter");
> MAKE_INTRINSIC(glsl_type::uint_type, avail, 1, counter);
> @@ -4714,8 +4714,8 @@
> builtin_builder::_atomic_intrinsic(builtin_available_predicate avail)
> }
>
> ir_function_signature *
> -builtin_builder::_atomic_op(const char *intrinsic,
> - builtin_available_predicate avail)
> +builtin_builder::_atomic_counter_op(const char *intrinsic,
> + builtin_available_predicate avail)
> {
> ir_variable *counter = in_var(glsl_type::atomic_uint_type,
> "atomic_counter");
> MAKE_SIG(glsl_type::uint_type, avail, 1, counter);
More information about the mesa-dev
mailing list