[Mesa-dev] [PATCH 23/24] i965/gen7: Expose ARB_shader_atomic_counters.
Francisco Jerez
currojerez at riseup.net
Sun Sep 15 00:19:47 PDT 2013
---
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 4fcc9fb..2060764 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -229,6 +229,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 aef7805..d4b6d47 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -169,4 +169,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;
}
--
1.8.3.4
More information about the mesa-dev
mailing list