[Mesa-dev] [PATCH 02/13] glsl: Add built-in functions for NV_shader_atomic_float

Caio Marcelo de Oliveira Filho caio.oliveira at intel.com
Mon Aug 20 19:10:06 UTC 2018


Hi,

> @@ -1133,6 +1159,9 @@ builtin_builder::create_intrinsics()
>                  _atomic_intrinsic2(buffer_atomics_supported,
>                                     glsl_type::int_type,
>                                     ir_intrinsic_generic_atomic_add),
> +                _atomic_intrinsic2(NV_shader_atomic_float_supported,
> +                                   glsl_type::float_type,
> +                                   ir_intrinsic_generic_atomic_add),
>                  _atomic_counter_intrinsic1(shader_atomic_counter_ops_or_v460_desktop,
>                                             ir_intrinsic_atomic_counter_add),
>                  NULL);

(...)

> @@ -3185,6 +3220,9 @@ builtin_builder::create_builtins()
>                  _atomic_op2("__intrinsic_atomic_exchange",
>                              buffer_atomics_supported,
>                              glsl_type::int_type),
> +                _atomic_op2("__intrinsic_atomic_exchange",
> +                            shader_atomic_float_exchange,
> +                            glsl_type::float_type),
>                  NULL);
>     add_function("atomicCompSwap",
>                  _atomic_op3("__intrinsic_atomic_comp_swap",

Question: why some builtins care about "supported" while other care
about the extension being "enabled"?



Thanks,
Caio


More information about the mesa-dev mailing list