i965: Add INTEL_fragment_shader_ordering support.
authorKevin Rogovin <kevin.rogovin@intel.com>
Mon, 27 Aug 2018 06:54:24 +0000 (09:54 +0300)
committerPlamena Manolova <plamena.n.manolova@gmail.com>
Tue, 28 Aug 2018 14:15:10 +0000 (17:15 +0300)
Adds suppport for INTEL_fragment_shader_ordering. We achieve
the fragment ordering by using the same instruction as for
beginInvocationInterlockARB() which is by issuing a memory
fence via sendc.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
docs/relnotes/18.3.0.html
src/intel/compiler/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/intel_extensions.c

index afcb0448177ff5f50ce2ec0d961459f6a05fb3a2..71fb41ca86fd6e76a0f5117c25613c1bdf44f248 100644 (file)
@@ -59,6 +59,7 @@ Note: some of the new features are only available with certain drivers.
 <li>GL_EXT_vertex_attrib_64bit on i965, nvc0, radeonsi.</li>
 <li>GL_EXT_window_rectangles on radeonsi.</li>
 <li>GL_KHR_texture_compression_astc_sliced_3d on radeonsi.</li>
+<li>GL_INTEL_fragment_shader_ordering on i965.</li>
 <li>GL_NV_fragment_shader_interlock on i965.</li>
 </ul>
 
index 9c9df5ac09f8068636158f33ce1944e7c9885b2e..62bff2a323a0b8bf9ae5cd600d4f6c05ca639a40 100644 (file)
@@ -4836,6 +4836,7 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr
       break;
    }
 
+   case nir_intrinsic_begin_fragment_shader_ordering:
    case nir_intrinsic_begin_invocation_interlock: {
       const fs_builder ubld = bld.group(8, 0);
       const fs_reg tmp = ubld.vgrf(BRW_REGISTER_TYPE_UD, 2);
index 0b137664b0d593fa18d9fbeea83b7e2ff80916c2..1ea8594c348905820e26e529e4b024878fec2448 100644 (file)
@@ -247,6 +247,7 @@ intelInitExtensions(struct gl_context *ctx)
       ctx->Extensions.OES_primitive_bounding_box = true;
       ctx->Extensions.OES_texture_buffer = true;
       ctx->Extensions.ARB_fragment_shader_interlock = true;
+      ctx->Extensions.INTEL_fragment_shader_ordering = true;
 
       if (can_do_pipelined_register_writes(brw->screen)) {
          ctx->Extensions.ARB_draw_indirect = true;