[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 22:49:49 UTC 2018


> > Question: why some builtins care about "supported" while other care
> > about the extension being "enabled"?
> 
> There are actually two different things happening.  In the cases where
> we only care about the extension being supported, we're creating a
> hidden intrinsic function.  These are used internally by the compiler to
> implement various features.  In the cases where we care about the
> extension being enabled, we're creating the user-visible function.
> Usually the user-visible function will is implemented by calling the
> intrinsic.  This two level approach is used so that we can more cleanly
> support cases where multiple extensions have functions with slightly
> different names that do the same thing.  atomicCounterMaxARB and
> atomicCounterMax, for example, are both implemented using
> __intrinsic_atomic_max.

Thanks for the explanation!






More information about the mesa-dev mailing list