summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2014-09-09 21:22:25 +1200
committerKenneth Graunke <kenneth@whitecape.org>2015-11-04 10:18:56 -0800
commit45067f95838c4817cef2ccdf5bfba72e24328750 (patch)
treee4f5684092a516b51d045feb94759525dab0ac6a
parent4bf419a8676775f8ae31f170b98859af64f79c14 (diff)
i965: Set core tessellation-related limits
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index add84e82b8..e6b78daed8 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -341,6 +341,14 @@ brw_initialize_context_constants(struct brw_context *brw)
MIN2(ctx->Const.MaxTextureCoordUnits,
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits);
ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = max_samplers;
+
+ if (brw->gen >= 7) {
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits = max_samplers;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits = max_samplers;
+ ctx->Const.MaxCombinedUniformBlocks += ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformBlocks + ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxUniformBlocks;
+ ctx->Const.MaxUniformBufferBindings += ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxUniformBlocks + ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxUniformBlocks;
+ }
+
if (brw->gen >= 6)
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = max_samplers;
else
@@ -355,6 +363,8 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits +
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits +
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits +
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits +
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits +
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits;
ctx->Const.MaxTextureLevels = 14; /* 8192 */
@@ -511,10 +521,14 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAtomicBuffers = BRW_MAX_ABO;
ctx->Const.Program[MESA_SHADER_VERTEX].MaxAtomicBuffers = BRW_MAX_ABO;
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxAtomicBuffers = BRW_MAX_ABO;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxAtomicBuffers = BRW_MAX_ABO;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxAtomicBuffers = BRW_MAX_ABO;
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxAtomicBuffers = BRW_MAX_ABO;
ctx->Const.MaxCombinedAtomicBuffers = 3 * BRW_MAX_ABO;
@@ -587,12 +601,12 @@ brw_initialize_context_constants(struct brw_context *brw)
*/
ctx->Const.Program[MESA_SHADER_VERTEX].MaxShaderStorageBlocks = BRW_MAX_SSBO;
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxShaderStorageBlocks = BRW_MAX_SSBO;
- ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxShaderStorageBlocks = 0;
- ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxShaderStorageBlocks = 0;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxShaderStorageBlocks = BRW_MAX_SSBO;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxShaderStorageBlocks = BRW_MAX_SSBO;
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxShaderStorageBlocks = BRW_MAX_SSBO;
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxShaderStorageBlocks = BRW_MAX_SSBO;
- ctx->Const.MaxCombinedShaderStorageBlocks = BRW_MAX_SSBO * 3;
- ctx->Const.MaxShaderStorageBufferBindings = BRW_MAX_SSBO * 3;
+ ctx->Const.MaxCombinedShaderStorageBlocks = BRW_MAX_SSBO * 5;
+ ctx->Const.MaxShaderStorageBufferBindings = BRW_MAX_SSBO * 5;
if (_mesa_extension_override_enables.ARB_compute_shader)
ctx->Const.MaxShaderStorageBufferBindings += BRW_MAX_SSBO;
@@ -603,6 +617,10 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents = 64;
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents = 128;
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 128;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxInputComponents = 128;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxOutputComponents = 128;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxInputComponents = 128;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxOutputComponents = 128;
}
/* We want the GLSL compiler to emit code that uses condition codes */