From 597634556e4d24c5a3aec2da227034a733693571 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Sun, 20 Oct 2013 14:11:27 -0700 Subject: [PATCH] i965/gen7: Expose ARB_shader_atomic_counters. Reviewed-by: Paul Berry Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.c | 10 ++++++++++ src/mesa/drivers/dri/i965/intel_extensions.c | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 34b79311fe3..776d8b303e5 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -443,6 +443,16 @@ brw_initialize_context_constants(struct brw_context *brw) ctx->Const.FragmentProgram.HighInt = ctx->Const.FragmentProgram.LowInt; ctx->Const.FragmentProgram.MediumInt = ctx->Const.FragmentProgram.LowInt; + if (brw->gen >= 7) { + ctx->Const.FragmentProgram.MaxAtomicCounters = MAX_ATOMIC_COUNTERS; + ctx->Const.VertexProgram.MaxAtomicCounters = MAX_ATOMIC_COUNTERS; + ctx->Const.GeometryProgram.MaxAtomicCounters = MAX_ATOMIC_COUNTERS; + ctx->Const.FragmentProgram.MaxAtomicBuffers = BRW_MAX_ABO; + ctx->Const.VertexProgram.MaxAtomicBuffers = BRW_MAX_ABO; + ctx->Const.GeometryProgram.MaxAtomicBuffers = BRW_MAX_ABO; + ctx->Const.MaxCombinedAtomicBuffers = 3 * BRW_MAX_ABO; + } + /* Gen6 converts quads to polygon in beginning of 3D pipeline, * but we're not sure how it's actually done for vertex order, * that affect provoking vertex decision. Always use last vertex diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 7b592b53184..62c0b15c185 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -243,4 +243,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.EXT_texture_compression_s3tc = true; ctx->Extensions.ANGLE_texture_compression_dxt = true; + + if (brw->gen >= 7) + ctx->Extensions.ARB_shader_atomic_counters = true; } -- 2.30.2