summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c10
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c3
2 files changed, 13 insertions, 0 deletions
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;
}