From 71e187430cdd1d82972554d7f9e994a41847bea1 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Thu, 13 Aug 2015 15:39:40 -0400 Subject: [PATCH] i965: add ARB_texture_barrier support Signed-off-by: Ilia Mirkin Reviewed-by: Jason Ekstrand --- docs/GL3.txt | 2 +- docs/relnotes/11.1.0.html | 1 + src/mesa/drivers/dri/i965/intel_extensions.c | 1 + src/mesa/drivers/dri/i965/intel_tex.c | 9 +++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 92941cf0d74..b0805f00ef5 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -195,7 +195,7 @@ GL 4.5, GLSL 4.50: GL_ARB_direct_state_access DONE (all drivers) GL_ARB_get_texture_sub_image DONE (all drivers) GL_ARB_shader_texture_image_samples DONE (i965, nv50, nvc0, r600, radeonsi) - GL_ARB_texture_barrier DONE (nv50, nvc0, r600, radeonsi) + GL_ARB_texture_barrier DONE (i965, nv50, nvc0, r600, radeonsi) GL_KHR_context_flush_control DONE (all - but needs GLX/EGL extension to be useful) GL_KHR_robust_buffer_access_behavior not started GL_KHR_robustness 90% done (the ARB variant) diff --git a/docs/relnotes/11.1.0.html b/docs/relnotes/11.1.0.html index 89b9a191176..e28fab6060c 100644 --- a/docs/relnotes/11.1.0.html +++ b/docs/relnotes/11.1.0.html @@ -46,6 +46,7 @@ Note: some of the new features are only available with certain drivers.
  • GL_ARB_blend_func_extended on freedreno (a3xx)
  • GL_ARB_shader_texture_image_samples on i965, nv50, nvc0, r600, radeonsi
  • +
  • GL_ARB_texture_barrier / GL_NV_texture_barrier on i965
  • GL_ARB_texture_query_lod on softpipe
  • GL_ARB_gpu_shader_fp64 on r600 for Cypress/Cayman/Aruba chips
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index e6d39e00788..1873827cacf 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -248,6 +248,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.MESA_pack_invert = true; ctx->Extensions.NV_conditional_render = true; ctx->Extensions.NV_primitive_restart = true; + ctx->Extensions.NV_texture_barrier = true; ctx->Extensions.NV_texture_env_combine4 = true; ctx->Extensions.NV_texture_rectangle = true; ctx->Extensions.TDFX_texture_compression_FXT1 = true; diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c index e16b0def0d4..cac33ac64a7 100644 --- a/src/mesa/drivers/dri/i965/intel_tex.c +++ b/src/mesa/drivers/dri/i965/intel_tex.c @@ -357,6 +357,14 @@ intel_set_texture_storage_for_buffer_object(struct gl_context *ctx, return true; } +static void +intel_texture_barrier(struct gl_context *ctx) +{ + struct brw_context *brw = brw_context(ctx); + + brw_emit_mi_flush(brw); +} + void intelInitTextureFuncs(struct dd_function_table *functions) { @@ -372,4 +380,5 @@ intelInitTextureFuncs(struct dd_function_table *functions) functions->TextureView = intel_texture_view; functions->SetTextureStorageForBufferObject = intel_set_texture_storage_for_buffer_object; + functions->TextureBarrier = intel_texture_barrier; } -- 2.30.2