diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/barrier.c | 14 | ||||
-rw-r--r-- | src/mesa/main/barrier.h | 3 | ||||
-rw-r--r-- | src/mesa/main/dd.h | 12 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/mesa/main/barrier.c b/src/mesa/main/barrier.c index 7ae8fc6b0aa..42a5e0f9203 100644 --- a/src/mesa/main/barrier.c +++ b/src/mesa/main/barrier.c @@ -108,3 +108,17 @@ _mesa_MemoryBarrierByRegion(GLbitfield barriers) ctx->Driver.MemoryBarrier(ctx, barriers); } } + +void GLAPIENTRY +_mesa_BlendBarrierMESA(void) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!ctx->Extensions.MESA_shader_framebuffer_fetch_non_coherent) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBlendBarrier(not supported)"); + return; + } + + ctx->Driver.BlendBarrier(ctx); +} diff --git a/src/mesa/main/barrier.h b/src/mesa/main/barrier.h index 8eee583c7ff..21dce90d074 100644 --- a/src/mesa/main/barrier.h +++ b/src/mesa/main/barrier.h @@ -47,4 +47,7 @@ _mesa_MemoryBarrier(GLbitfield barriers); void GLAPIENTRY _mesa_MemoryBarrierByRegion(GLbitfield barriers); +void GLAPIENTRY +_mesa_BlendBarrierMESA(void); + #endif /* BARRIER_H */ diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index a3dc191b444..257dc103817 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -958,6 +958,18 @@ struct dd_function_table { /** @} */ /** + * GL_MESA_shader_framebuffer_fetch_non_coherent rendering barrier. + * + * On return from this function any framebuffer contents written by + * previous draw commands are guaranteed to be visible from subsequent + * fragment shader invocations using the + * MESA_shader_framebuffer_fetch_non_coherent interface. + */ + /** @{ */ + void (*BlendBarrier)(struct gl_context *ctx); + /** @} */ + + /** * \name GL_ARB_compute_shader interface */ /*@{*/ |