ó
    š3jN  ã                   ó`   • S r SSKJrJrJr  SSKJrJr  SSKrSSKJ	r	J
r
  SSK7  SSKJr  S rg)	aÈ  OpenGL extension ARB.fragment_shader_interlock

This module customises the behaviour of the 
OpenGL.raw.GL.ARB.fragment_shader_interlock to provide a more 
Python-friendly API

Overview (from the spec)
        
        In unextended OpenGL 4.5, applications may produce a
        large number of fragment shader invocations that perform loads and
        stores to memory using image uniforms, atomic counter uniforms,
        buffer variables, or pointers. The order in which loads and stores
        to common addresses are performed by different fragment shader
        invocations is largely undefined.  For algorithms that use shader
        writes and touch the same pixels more than once, one or more of the
        following techniques may be required to ensure proper execution ordering:
        
          * inserting Finish or WaitSync commands to drain the pipeline between
            different "passes" or "layers";
        
          * using only atomic memory operations to write to shader memory (which
            may be relatively slow and limits how memory may be updated); or
        
          * injecting spin loops into shaders to prevent multiple shader
            invocations from touching the same memory concurrently.
        
        This extension provides new GLSL built-in functions
        beginInvocationInterlockARB() and endInvocationInterlockARB() that delimit
        a critical section of fragment shader code.  For pairs of shader
        invocations with "overlapping" coverage in a given pixel, the OpenGL
        implementation will guarantee that the critical section of the fragment
        shader will be executed for only one fragment at a time.
        
        There are four different interlock modes supported by this extension,
        which are identified by layout qualifiers.  The qualifiers
        "pixel_interlock_ordered" and "pixel_interlock_unordered" provides mutual
        exclusion in the critical section for any pair of fragments corresponding
        to the same pixel.  When using multisampling, the qualifiers
        "sample_interlock_ordered" and "sample_interlock_unordered" only provide
        mutual exclusion for pairs of fragments that both cover at least one
        common sample in the same pixel; these are recommended for performance if
        shaders use per-sample data structures.
        
        Additionally, when the "pixel_interlock_ordered" or
        "sample_interlock_ordered" layout qualifier is used, the interlock also
        guarantees that the critical section for multiple shader invocations with
        "overlapping" coverage will be executed in the order in which the
        primitives were processed by the GL.  Such a guarantee is useful for
        applications like blending in the fragment shader, where an application
        requires that fragment values to be composited in the framebuffer in
        primitive order.
        
        This extension can be useful for algorithms that need to access per-pixel
        data structures via shader loads and stores.  Such algorithms using this
        extension can access such data structures in the critical section without
        worrying about other invocations for the same pixel accessing the data
        structures concurrently.  Additionally, the ordering guarantees are useful
        for cases where the API ordering of fragments is meaningful.  For example,
        applications may be able to execute programmable blending operations in
        the fragment shader, where the destination buffer is read via image loads
        and the final value is written via image stores.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/fragment_shader_interlock.txt
é    )ÚplatformÚconstantÚarrays)Ú
extensionsÚwrapperN)Ú_typesÚ_glgets)Ú*)Ú_EXTENSION_NAMEc                  ó:   • SSK Jn   U R                  " [        5      $ )z=Return boolean indicating whether this extension is availabler   ©r   )ÚOpenGLr   ÚhasGLExtensionr   r   s    Úa/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/GL/ARB/fragment_shader_interlock.pyÚ glInitFragmentShaderInterlockARBr   I   s   € å!Ø×$Ò$¤oÓ7Ð7ó    )Ú__doc__r   r   r   r   r   r   ÚctypesÚOpenGL.raw.GLr   r	   Ú+OpenGL.raw.GL.ARB.fragment_shader_interlockr   r   © r   r   Ú<module>r      s(   ðñ@÷B .Ñ -ß &Û ß )Ü 9Ý Gó8r   