i965: Set MaxShaderStorageBuffers for compute shaders
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 19 Mar 2015 11:11:39 +0000 (12:11 +0100)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 Sep 2015 06:39:20 +0000 (08:39 +0200)
v2:
- Set it after the driver's MaxShaderStorageBuffers value assignment.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_context.c

index 47203c1701bf1eb58ecdfeda18f26d4fe6180ad1..9dcdaf5cd4fe6076ed3ef0b9ed934e71127c26f3 100644 (file)
@@ -591,6 +591,9 @@ brw_initialize_context_constants(struct brw_context *brw)
    ctx->Const.MaxCombinedShaderStorageBlocks = 12 * 3;
    ctx->Const.MaxShaderStorageBufferBindings = 36;
 
+   if (_mesa_extension_override_enables.ARB_compute_shader)
+      ctx->Const.MaxShaderStorageBufferBindings += 12;
+
    if (brw->gen >= 6) {
       ctx->Const.MaxVarying = 32;
       ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 128;