[Mesa-dev] [PATCH v5 04/70] i965: set ARB_shader_storage_buffer_object related constant values
Iago Toral Quiroga
itoral at igalia.com
Thu Sep 10 06:35:20 PDT 2015
From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
v2:
- Add tessellation shader constants assignment
v3:
- Set MaxShaderStorageBufferBindings to 36.
Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_context.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index c8e8a68..9982049 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -562,6 +562,18 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.TextureBufferOffsetAlignment = 16;
ctx->Const.MaxTextureBufferSize = 128 * 1024 * 1024;
+ /* FIXME: Tessellation stages are not yet supported in i965, so
+ * MaxCombinedShaderStorageBlocks doesn't take them into account.
+ */
+ ctx->Const.Program[MESA_SHADER_VERTEX].MaxShaderStorageBlocks = 12;
+ ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxShaderStorageBlocks = 12;
+ ctx->Const.Program[MESA_SHADER_TESS_EVAL].MaxShaderStorageBlocks = 0;
+ ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxShaderStorageBlocks = 0;
+ ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxShaderStorageBlocks = 12;
+ ctx->Const.Program[MESA_SHADER_COMPUTE].MaxShaderStorageBlocks = 12;
+ ctx->Const.MaxCombinedShaderStorageBlocks = 12 * 3;
+ ctx->Const.MaxShaderStorageBufferBindings = 36;
+
if (brw->gen >= 6) {
ctx->Const.MaxVarying = 32;
ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 128;
--
1.9.1
More information about the mesa-dev
mailing list