mesa: Implement glFramebufferFetchBarrierEXT entry point.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 12 Feb 2018 22:48:20 +0000 (14:48 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 24 Feb 2018 23:28:36 +0000 (15:28 -0800)
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
src/mesa/main/barrier.c
src/mesa/main/barrier.h
src/mesa/main/tests/dispatch_sanity.cpp

index 0f0b0a210d121c3c193dd6ddfcfb0c120bf70f21..2be30220e498521116f2f64274617a0e5903e06f 100644 (file)
@@ -127,8 +127,7 @@ _mesa_BlendBarrier(void)
 {
    GET_CURRENT_CONTEXT(ctx);
 
-   if (!ctx->Extensions.EXT_shader_framebuffer_fetch_non_coherent &&
-       !ctx->Extensions.KHR_blend_equation_advanced) {
+   if (!ctx->Extensions.KHR_blend_equation_advanced) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glBlendBarrier(not supported)");
       return;
@@ -136,3 +135,17 @@ _mesa_BlendBarrier(void)
 
    ctx->Driver.FramebufferFetchBarrier(ctx);
 }
+
+void GLAPIENTRY
+_mesa_FramebufferFetchBarrierEXT(void)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   if (!ctx->Extensions.EXT_shader_framebuffer_fetch_non_coherent) {
+      _mesa_error(ctx, GL_INVALID_OPERATION,
+                  "glFramebufferFetchBarrierEXT(not supported)");
+      return;
+   }
+
+   ctx->Driver.FramebufferFetchBarrier(ctx);
+}
index 53ecf863f0717752f045d018de99520bdc443847..acc15c677942d20b82af80b46c9ce7c336fda36c 100644 (file)
@@ -53,4 +53,7 @@ _mesa_MemoryBarrierByRegion(GLbitfield barriers);
 void GLAPIENTRY
 _mesa_BlendBarrier(void);
 
+void GLAPIENTRY
+_mesa_FramebufferFetchBarrierEXT(void);
+
 #endif /* BARRIER_H */
index d697343627e9dc8a18004f710cdd104afb30bc30..83a4b046542079931187c105fd6004d105346141 100644 (file)
@@ -1023,6 +1023,9 @@ const struct function common_desktop_functions_possible[] = {
    /* GL_ARB_gl_spirv */
    { "glSpecializeShaderARB", 45, -1 },
 
+   /* GL_EXT_shader_framebuffer_fetch_non_coherent */
+   { "glFramebufferFetchBarrierEXT", 20, -1 },
+
    { NULL, 0, -1 }
 };
 
@@ -2446,6 +2449,9 @@ const struct function gles2_functions_possible[] = {
    { "glGetQueryObjectui64vEXT", 20, -1 },
    { "glQueryCounterEXT", 20, -1 },
 
+   /* GL_EXT_shader_framebuffer_fetch_non_coherent */
+   { "glFramebufferFetchBarrierEXT", 20, -1 },
+
    { NULL, 0, -1 }
 };