mesa: Add GL/GLSL plumbing for INTEL_fragment_shader_ordering
authorKevin Rogovin <kevin.rogovin@intel.com>
Mon, 27 Aug 2018 06:54:23 +0000 (09:54 +0300)
committerPlamena Manolova <plamena.n.manolova@gmail.com>
Tue, 28 Aug 2018 14:15:10 +0000 (17:15 +0300)
commit119435c8778dd26cb7c8bcde9f04b3982239fe60
tree32ed0cc9c1fb30d72144be49574504632548d8cc
parent1b0df8a46020cc88afeaa4decb42a782ab168afb
mesa: Add GL/GLSL plumbing for INTEL_fragment_shader_ordering

This extension provides new GLSL built-in function
beginFragmentShaderOrderingIntel() that guarantees
(taking wording of GL_INTEL_fragment_shader_ordering
extension) that any memory transactions issued by
shader invocations from previous primitives mapped to
same xy window coordinates (and same sample when
per-sample shading is active), complete and are visible
to the shader invocation that called
beginFragmentShaderOrderingINTEL().

One advantage of INTEL_fragment_shader_ordering over
ARB_fragment_shader_interlock is that it provides a
function that operates as a memory barrie (instead
of a defining a critcial section) that can be called
under arbitary control flow from any function (in
contrast the begin/end of ARB_fragment_shader_interlock
may only be called once, from main(), under no control
flow.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h
src/compiler/glsl/glsl_to_nir.cpp
src/compiler/glsl/ir.h
src/compiler/nir/nir_intrinsics.py
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h