File Mesa-crankup_core_limits.patch of Package Mesa

diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c
index 4670b8520a9..d96113fa9a1 100644
--- a/src/compiler/glsl/gl_nir_link_uniforms.c
+++ b/src/compiler/glsl/gl_nir_link_uniforms.c
@@ -1719,14 +1719,12 @@ gl_nir_link_uniforms(struct gl_context *ctx,
                unsigned array_size = is_interface_array ?
                   glsl_get_length(var->type) : 1;
 
-               STATIC_ASSERT(MAX_SHADER_STORAGE_BUFFERS <= 32);
-
                /* Shaders that use too many SSBOs will fail to compile, which
                 * we don't care about.
                 *
                 * This is true for shaders that do not use too many SSBOs:
                 */
-               if (buffer_block_index + array_size <= 32) {
+               if (buffer_block_index + array_size <= 64) {
                   state.shader_storage_blocks_write_access |=
                      u_bit_consecutive(buffer_block_index, array_size);
                }
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index cb1655a97e0..2de8ef5e72f 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -779,14 +779,12 @@ public:
             unsigned array_size = is_interface_array ?
                                      var->type->array_size() : 1;
 
-            STATIC_ASSERT(MAX_SHADER_STORAGE_BUFFERS <= 32);
-
             /* Shaders that use too many SSBOs will fail to compile, which
              * we don't care about.
              *
              * This is true for shaders that do not use too many SSBOs:
              */
-            if (buffer_block_index + array_size <= 32) {
+            if (buffer_block_index + array_size <= 64) {
                shader_storage_blocks_write_access |=
                   u_bit_consecutive(buffer_block_index, array_size);
             }
diff --git a/src/compiler/shader_enums.c b/src/compiler/shader_enums.c
index 7c53a09ce9b..4178f94f5ef 100644
--- a/src/compiler/shader_enums.c
+++ b/src/compiler/shader_enums.c
@@ -53,7 +53,6 @@ gl_shader_stage_name(gl_shader_stage stage)
       ENUM(MESA_SHADER_CALLABLE),
       ENUM(MESA_SHADER_KERNEL),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == MESA_ALL_SHADER_STAGES);
    return NAME(stage);
 }
 
@@ -150,7 +149,6 @@ gl_vert_attrib_name(gl_vert_attrib attrib)
       ENUM(VERT_ATTRIB_GENERIC14),
       ENUM(VERT_ATTRIB_GENERIC15),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == VERT_ATTRIB_MAX);
    return NAME(attrib);
 }
 
@@ -226,7 +224,6 @@ gl_varying_slot_name_for_stage(gl_varying_slot slot, gl_shader_stage stage)
       ENUM(VARYING_SLOT_VAR30),
       ENUM(VARYING_SLOT_VAR31),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == VARYING_SLOT_MAX);
    return NAME(slot);
 }
 
@@ -309,7 +306,6 @@ gl_system_value_name(gl_system_value sysval)
      ENUM(SYSTEM_VALUE_TCS_HEADER_IR3),
      ENUM(SYSTEM_VALUE_FRAG_SHADING_RATE),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == SYSTEM_VALUE_MAX);
    return NAME(sysval);
 }
 
@@ -324,7 +320,6 @@ glsl_interp_mode_name(enum glsl_interp_mode qual)
       ENUM(INTERP_MODE_EXPLICIT),
       ENUM(INTERP_MODE_COLOR),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == INTERP_MODE_COUNT);
    return NAME(qual);
 }
 
@@ -345,6 +340,5 @@ gl_frag_result_name(gl_frag_result result)
       ENUM(FRAG_RESULT_DATA6),
       ENUM(FRAG_RESULT_DATA7),
    };
-   STATIC_ASSERT(ARRAY_SIZE(names) == FRAG_RESULT_MAX);
    return NAME(result);
 }
diff --git a/src/gallium/auxiliary/tgsi/tgsi_lowering.c b/src/gallium/auxiliary/tgsi/tgsi_lowering.c
index 4f8f3017560..f3a59c3fd1d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_lowering.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_lowering.c
@@ -1431,9 +1431,6 @@ tgsi_transform_lowering(const struct tgsi_lowering_config *config,
    struct tgsi_token *newtoks;
    int newlen, numtmp;
 
-   /* sanity check in case limit is ever increased: */
-   STATIC_ASSERT((sizeof(config->saturate_s) * 8) >= PIPE_MAX_SAMPLERS);
-
    /* sanity check the lowering */
    assert(!(config->lower_FRC && (config->lower_FLR || config->lower_CEIL)));
    assert(!(config->lower_FRC && config->lower_TRUNC));
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 0cd4a8883ae..7d9e6b37cc1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -791,7 +791,6 @@ scan_declaration(struct tgsi_shader_info *info,
          break;
 
       case TGSI_FILE_SAMPLER:
-         STATIC_ASSERT(sizeof(info->samplers_declared) * 8 >= PIPE_MAX_SAMPLERS);
          info->samplers_declared |= 1u << reg;
          break;
 
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index acc88966ee9..3c5b7a45a14 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -246,12 +246,6 @@ const char *tgsi_memory_names[4] =
 UNUSED static inline void
 tgsi_strings_check(void)
 {
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT);
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_texture_names) == TGSI_TEXTURE_COUNT);
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_property_names) == TGSI_PROPERTY_COUNT);
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_primitive_names) == PIPE_PRIM_MAX);
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT);
-   STATIC_ASSERT(ARRAY_SIZE(tgsi_return_type_names) == TGSI_RETURN_TYPE_COUNT);
    (void) tgsi_processor_type_names;
    (void) tgsi_return_type_names;
    (void) tgsi_immediate_type_names;
diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c
index 894ba275417..e78645b9d06 100644
--- a/src/gallium/auxiliary/util/u_pstipple.c
+++ b/src/gallium/auxiliary/util/u_pstipple.c
@@ -266,8 +266,6 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx)
    int texTemp;
    int sampIdx;
 
-   STATIC_ASSERT(sizeof(pctx->samplersUsed) * 8 >= PIPE_MAX_SAMPLERS);
-
    /* find free texture sampler */
    pctx->freeSampler = free_bit(pctx->samplersUsed);
    if (pctx->freeSampler < 0 || pctx->freeSampler >= PIPE_MAX_SAMPLERS)
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index 3e2eddb98d2..40417f061fd 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3861,7 +3861,6 @@ iris_create_so_decl_list(const struct pipe_stream_output_info *info,
    int next_offset[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
    int decls[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
    int max_decls = 0;
-   STATIC_ASSERT(ARRAY_SIZE(so_decl[0]) >= MAX_PROGRAM_OUTPUTS);
 
    memset(so_decl, 0, sizeof(so_decl));
 
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 8834739198f..64f279ff036 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -1196,8 +1196,6 @@ try_update_scene_state( struct lp_setup_context *setup )
          const ubyte *current_data = NULL;
          int num_constants;
 
-         STATIC_ASSERT(DATA_BLOCK_SIZE >= LP_MAX_TGSI_CONST_BUFFER_SIZE);
-
          if (buffer) {
             /* resource buffer */
             current_data = (ubyte *) llvmpipe_resource_data(buffer);
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 81121d49fdb..b9d0ff89ea0 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -97,10 +97,6 @@ sp_create_tile_cache( struct pipe_context *pipe )
    assert(MAX_WIDTH >= pipe->screen->get_param(pipe->screen,
                                                PIPE_CAP_MAX_TEXTURE_2D_SIZE));
 
-   STATIC_ASSERT(sizeof(union tile_address) == 4);
-
-   STATIC_ASSERT((TILE_SIZE << TILE_ADDR_BITS) >= MAX_WIDTH);
-
    tc = CALLOC_STRUCT( softpipe_tile_cache );
    if (tc) {
       tc->pipe = pipe;
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index f9027908b39..90276a2c29b 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -58,27 +58,27 @@ struct gl_buffer_object;
 /**
  * Implementation limits
  */
-#define PIPE_MAX_ATTRIBS          32
-#define PIPE_MAX_CLIP_PLANES       8
-#define PIPE_MAX_COLOR_BUFS        8
-#define PIPE_MAX_CONSTANT_BUFFERS 32
+#define PIPE_MAX_ATTRIBS          1024
+#define PIPE_MAX_CLIP_PLANES      16
+#define PIPE_MAX_COLOR_BUFS       32
+#define PIPE_MAX_CONSTANT_BUFFERS 4096
 #define PIPE_MAX_SAMPLERS         32
-#define PIPE_MAX_SHADER_INPUTS    80 /* 32 GENERIC + 32 PATCH + 16 others */
-#define PIPE_MAX_SHADER_OUTPUTS   80 /* 32 GENERIC + 32 PATCH + 16 others */
-#define PIPE_MAX_SHADER_SAMPLER_VIEWS 128
-#define PIPE_MAX_SHADER_BUFFERS   32
-#define PIPE_MAX_SHADER_IMAGES    32
-#define PIPE_MAX_TEXTURE_LEVELS   16
-#define PIPE_MAX_SO_BUFFERS        4
-#define PIPE_MAX_SO_OUTPUTS       64
-#define PIPE_MAX_VIEWPORTS        16
+#define PIPE_MAX_SHADER_INPUTS    1024 /* 32 GENERIC + 32 PATCH + 16 others */
+#define PIPE_MAX_SHADER_OUTPUTS   4096 /* 32 GENERIC + 32 PATCH + 16 others */
+#define PIPE_MAX_SHADER_SAMPLER_VIEWS 1024
+#define PIPE_MAX_SHADER_BUFFERS   4096
+#define PIPE_MAX_SHADER_IMAGES    4096
+#define PIPE_MAX_TEXTURE_LEVELS   16384
+#define PIPE_MAX_SO_BUFFERS       64
+#define PIPE_MAX_SO_OUTPUTS       4096
+#define PIPE_MAX_VIEWPORTS        64
 #define PIPE_MAX_CLIP_OR_CULL_DISTANCE_COUNT 8
 #define PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT 2
-#define PIPE_MAX_WINDOW_RECTANGLES 8
-#define PIPE_MAX_SAMPLE_LOCATION_GRID_SIZE 4
+#define PIPE_MAX_WINDOW_RECTANGLES 64
+#define PIPE_MAX_SAMPLE_LOCATION_GRID_SIZE 8
 
-#define PIPE_MAX_HW_ATOMIC_BUFFERS 32
-#define PIPE_MAX_VERTEX_STREAMS   4
+#define PIPE_MAX_HW_ATOMIC_BUFFERS 512
+#define PIPE_MAX_VERTEX_STREAMS   16
 
 struct pipe_reference
 {
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 9975cf921f7..12bb34ce1ad 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -3588,7 +3588,6 @@ genX(upload_3dstate_so_decl_list)(struct brw_context *brw,
    int next_offset[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
    int decls[MAX_VERTEX_STREAMS] = {0, 0, 0, 0};
    int max_decls = 0;
-   STATIC_ASSERT(ARRAY_SIZE(so_decl[0]) >= MAX_PROGRAM_OUTPUTS);
 
    memset(so_decl, 0, sizeof(so_decl));
 
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 3571a338d58..4960eff0f59 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -39,34 +39,34 @@
 /*@{*/
 
 /** Maximum modelview matrix stack depth */
-#define MAX_MODELVIEW_STACK_DEPTH 32
+#define MAX_MODELVIEW_STACK_DEPTH 64
 
 /** Maximum projection matrix stack depth */
-#define MAX_PROJECTION_STACK_DEPTH 32
+#define MAX_PROJECTION_STACK_DEPTH 64
 
 /** Maximum texture matrix stack depth */
-#define MAX_TEXTURE_STACK_DEPTH 10
+#define MAX_TEXTURE_STACK_DEPTH 32
 
 /** Maximum attribute stack depth */
-#define MAX_ATTRIB_STACK_DEPTH 16
+#define MAX_ATTRIB_STACK_DEPTH 32
 
 /** Maximum client attribute stack depth */
-#define MAX_CLIENT_ATTRIB_STACK_DEPTH 16
+#define MAX_CLIENT_ATTRIB_STACK_DEPTH 32
 
 /** Maximum recursion depth of display list calls */
-#define MAX_LIST_NESTING 64
+#define MAX_LIST_NESTING 1024
 
 /** Maximum number of lights */
-#define MAX_LIGHTS 8
+#define MAX_LIGHTS 64
 
 /**
  * Maximum number of user-defined clipping planes supported by any driver in
  * Mesa.  This is used to size arrays.
  */
-#define MAX_CLIP_PLANES 8
+#define MAX_CLIP_PLANES 4096
 
 /** Maximum pixel map lookup table size */
-#define MAX_PIXEL_MAP_TABLE 256
+#define MAX_PIXEL_MAP_TABLE 1024
 
 /** Maximum number of auxillary color buffers */
 #define MAX_AUX_BUFFERS 1
@@ -92,10 +92,10 @@
 #define LINE_WIDTH_GRANULARITY 0.1
 
 /** Max memory to allow for a single texture image (in megabytes) */
-#define MAX_TEXTURE_MBYTES 1024
+#define MAX_TEXTURE_MBYTES 3072
 
 /** Number of texture mipmap levels */
-#define MAX_TEXTURE_LEVELS 15
+#define MAX_TEXTURE_LEVELS 256
 
 /** Maximum rectangular texture size - GL_NV_texture_rectangle */
 #define MAX_TEXTURE_RECT_SIZE 16384
@@ -103,7 +103,7 @@
 /**
  * Maximum number of layers in a 1D or 2D array texture - GL_MESA_texture_array
  */
-#define MAX_ARRAY_TEXTURE_LAYERS 64
+#define MAX_ARRAY_TEXTURE_LAYERS 256
 
 /**
  * Max number of texture image units.  Also determines number of texture
@@ -121,16 +121,16 @@
 #define MAX_TEXTURE_UNITS ((MAX_TEXTURE_COORD_UNITS > MAX_TEXTURE_IMAGE_UNITS) ? MAX_TEXTURE_COORD_UNITS : MAX_TEXTURE_IMAGE_UNITS)
 
 /** Maximum number of viewports supported with ARB_viewport_array */
-#define MAX_VIEWPORTS 16
+#define MAX_VIEWPORTS 64
 
 /** Maximum number of window rectangles supported with EXT_window_rectangles */
-#define MAX_WINDOW_RECTANGLES 8
+#define MAX_WINDOW_RECTANGLES 64
 
 /** Maximum size for CVA.  May be overridden by the drivers.  */
-#define MAX_ARRAY_LOCK_SIZE 3000
+#define MAX_ARRAY_LOCK_SIZE 65536
 
 /** Subpixel precision for antialiasing, window coordinate snapping */
-#define SUB_PIXEL_BITS 4
+#define SUB_PIXEL_BITS 13
 
 /** For GL_ARB_texture_compression */
 #define MAX_COMPRESSED_TEXTURE_FORMATS 25
@@ -139,11 +139,11 @@
 #define MAX_TEXTURE_MAX_ANISOTROPY 16.0
 
 /** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */
-#define MAX_TEXTURE_LOD_BIAS 14.0
+#define MAX_TEXTURE_LOD_BIAS 16.0
 
 /** For any program target/extension */
 /*@{*/
-#define MAX_PROGRAM_INSTRUCTIONS       (16 * 1024)
+#define MAX_PROGRAM_INSTRUCTIONS       (64 * 1024)
 
 /**
  * Per-program constants (power of two)
@@ -154,19 +154,19 @@
  * per-program parameters.
  */
 /*@{*/
-#define MAX_PROGRAM_LOCAL_PARAMS       4096
-#define MAX_UNIFORMS                   4096
-#define MAX_UNIFORM_BUFFERS            15 /* + 1 default uniform buffer */
-#define MAX_SHADER_STORAGE_BUFFERS     16
+#define MAX_PROGRAM_LOCAL_PARAMS       16384
+#define MAX_UNIFORMS                   16384
+#define MAX_UNIFORM_BUFFERS            63 /* + 1 default uniform buffer */
+#define MAX_SHADER_STORAGE_BUFFERS     64
 /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
 #define MAX_COMBINED_UNIFORM_BUFFERS   (MAX_UNIFORM_BUFFERS * 6)
 #define MAX_COMBINED_SHADER_STORAGE_BUFFERS   (MAX_SHADER_STORAGE_BUFFERS * 6)
-#define MAX_ATOMIC_COUNTERS            4096
+#define MAX_ATOMIC_COUNTERS            16384
 /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
 #define MAX_COMBINED_ATOMIC_BUFFERS    (MAX_UNIFORM_BUFFERS * 6)
 /* Size of an atomic counter in bytes according to ARB_shader_atomic_counters */
-#define ATOMIC_COUNTER_SIZE            4
-#define MAX_IMAGE_UNIFORMS             32
+#define ATOMIC_COUNTER_SIZE            16
+#define MAX_IMAGE_UNIFORMS             256
 /* 6 is for vertex, hull, domain, geometry, fragment, and compute shader. */
 #define MAX_IMAGE_UNITS                (MAX_IMAGE_UNIFORMS * 6)
 /*@}*/
@@ -179,16 +179,16 @@
  * and \c MAX_VERTEX_PROGRAM_PARAMS.  Otherwise some applications will make
  * incorrect assumptions.
  */
-#define MAX_PROGRAM_ENV_PARAMS         256
+#define MAX_PROGRAM_ENV_PARAMS         1024
 
-#define MAX_PROGRAM_MATRICES           8
-#define MAX_PROGRAM_MATRIX_STACK_DEPTH 4
-#define MAX_PROGRAM_CALL_DEPTH         8
-#define MAX_PROGRAM_TEMPS              256
+#define MAX_PROGRAM_MATRICES           64
+#define MAX_PROGRAM_MATRIX_STACK_DEPTH 32
+#define MAX_PROGRAM_CALL_DEPTH         64
+#define MAX_PROGRAM_TEMPS              1024
 #define MAX_PROGRAM_ADDRESS_REGS       1
 #define MAX_SAMPLERS                   MAX_TEXTURE_IMAGE_UNITS
-#define MAX_PROGRAM_INPUTS             32
-#define MAX_PROGRAM_OUTPUTS            64
+#define MAX_PROGRAM_INPUTS             1024
+#define MAX_PROGRAM_OUTPUTS            4096
 /*@}*/
 
 /** For GL_ARB_vertex_program */
@@ -200,8 +200,8 @@
 /** For GL_ARB_fragment_program */
 /*@{*/
 #define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0
-#define MAX_FRAGMENT_PROGRAM_PARAMS       64
-#define MAX_FRAGMENT_PROGRAM_INPUTS       12
+#define MAX_FRAGMENT_PROGRAM_PARAMS       1024
+#define MAX_FRAGMENT_PROGRAM_INPUTS       64
 /*@}*/
 
 /** For GL_ARB_vertex_shader */
@@ -214,21 +214,21 @@
 /** For GL_EXT_framebuffer_object */
 /*@{*/
 #define MAX_COLOR_ATTACHMENTS 8
-#define MAX_RENDERBUFFER_SIZE 16384
+#define MAX_RENDERBUFFER_SIZE 65536
 /*@}*/
 
 /** For GL_ATI_envmap_bump - support bump mapping on first 8 units */
 #define SUPPORTED_ATI_BUMP_UNITS 0xff
 
 /** For GL_EXT_transform_feedback */
-#define MAX_FEEDBACK_BUFFERS 4
-#define MAX_FEEDBACK_ATTRIBS 32
+#define MAX_FEEDBACK_BUFFERS 64
+#define MAX_FEEDBACK_ATTRIBS 1024
 
 /** For geometry shader */
 /*@{*/
-#define MAX_GEOMETRY_UNIFORM_COMPONENTS              512
-#define MAX_GEOMETRY_OUTPUT_VERTICES                 256
-#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS         1024
+#define MAX_GEOMETRY_UNIFORM_COMPONENTS              4096
+#define MAX_GEOMETRY_OUTPUT_VERTICES                 1024
+#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS         16384
 /*@}*/
 
 /** For GL_ARB_debug_output and GL_KHR_debug */
@@ -245,17 +245,17 @@
 
 /** For GL_ARB_gpu_shader5 */
 /*@{*/
-#define MAX_GEOMETRY_SHADER_INVOCATIONS     32
+#define MAX_GEOMETRY_SHADER_INVOCATIONS     4096
 #define MIN_FRAGMENT_INTERPOLATION_OFFSET   -0.5
 #define MAX_FRAGMENT_INTERPOLATION_OFFSET   0.5
-#define FRAGMENT_INTERPOLATION_OFFSET_BITS  4
-#define MAX_VERTEX_STREAMS                  4
+#define FRAGMENT_INTERPOLATION_OFFSET_BITS  8
+#define MAX_VERTEX_STREAMS                  16
 /*@}*/
 
 /** For GL_ARB_shader_subroutine */
 /*@{*/
-#define MAX_SUBROUTINES                   256
-#define MAX_SUBROUTINE_UNIFORM_LOCATIONS  1024
+#define MAX_SUBROUTINES                   1024
+#define MAX_SUBROUTINE_UNIFORM_LOCATIONS  4096
 /*@}*/
 
 /** For GL_INTEL_performance_query */
@@ -297,12 +297,12 @@
 
 
 /** For GL_ARB_sample_locations - maximum of SAMPLE_LOCATION_PIXEL_GRID_*_ARB */
-#define MAX_SAMPLE_LOCATION_GRID_SIZE 4
+#define MAX_SAMPLE_LOCATION_GRID_SIZE 8
 
 /* It is theoretically possible for Consts.MaxSamples to be >32 but
  * other code seems to assume that is not the case.
  */
 #define MAX_SAMPLE_LOCATION_TABLE_SIZE \
-   (MAX_SAMPLE_LOCATION_GRID_SIZE * MAX_SAMPLE_LOCATION_GRID_SIZE * 32)
+   (MAX_SAMPLE_LOCATION_GRID_SIZE * MAX_SAMPLE_LOCATION_GRID_SIZE * 64)
 
 #endif /* MESA_CONFIG_H_INCLUDED */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index aedb50eafe9..c5fdeba29e7 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -526,13 +526,13 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
    /** GL_ARB_uniform_buffer_object */
    consts->MaxCombinedUniformBlocks = 36;
    consts->MaxUniformBufferBindings = 36;
-   consts->MaxUniformBlockSize = 16384;
+   consts->MaxUniformBlockSize = 65536;
    consts->UniformBufferOffsetAlignment = 1;
 
    /** GL_ARB_shader_storage_buffer_object */
    consts->MaxCombinedShaderStorageBlocks = 8;
    consts->MaxShaderStorageBufferBindings = 8;
-   consts->MaxShaderStorageBlockSize = 128 * 1024 * 1024; /* 2^27 */
+   consts->MaxShaderStorageBlockSize = 2048 * 1024 * 1024; /* 2^27 */
    consts->ShaderStorageBufferOffsetAlignment = 256;
 
    /* GL_ARB_explicit_uniform_location, GL_MAX_UNIFORM_LOCATIONS */
@@ -646,14 +646,14 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
    consts->MaxVertexAttribBindings = MAX_VERTEX_GENERIC_ATTRIBS;
 
    /* GL_ARB_compute_shader */
-   consts->MaxComputeWorkGroupCount[0] = 65535;
-   consts->MaxComputeWorkGroupCount[1] = 65535;
-   consts->MaxComputeWorkGroupCount[2] = 65535;
-   consts->MaxComputeWorkGroupSize[0] = 1024;
-   consts->MaxComputeWorkGroupSize[1] = 1024;
-   consts->MaxComputeWorkGroupSize[2] = 64;
+   consts->MaxComputeWorkGroupCount[0] = 2147483647;
+   consts->MaxComputeWorkGroupCount[1] = 1073741824;
+   consts->MaxComputeWorkGroupCount[2] = 268435455;
+   consts->MaxComputeWorkGroupSize[0] = 4096;
+   consts->MaxComputeWorkGroupSize[1] = 2048;
+   consts->MaxComputeWorkGroupSize[2] = 512;
    /* Enables compute support for GLES 3.1 if >= 128 */
-   consts->MaxComputeWorkGroupInvocations = 0;
+   consts->MaxComputeWorkGroupInvocations = 65536;
 
    /** GL_ARB_gpu_shader5 */
    consts->MinFragmentInterpolationOffset = MIN_FRAGMENT_INTERPOLATION_OFFSET;
@@ -672,10 +672,10 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
    consts->PrimitiveRestartForPatches = false;
 
    /** GL_ARB_compute_variable_group_size */
-   consts->MaxComputeVariableGroupSize[0] = 512;
-   consts->MaxComputeVariableGroupSize[1] = 512;
-   consts->MaxComputeVariableGroupSize[2] = 64;
-   consts->MaxComputeVariableGroupInvocations = 512;
+   consts->MaxComputeVariableGroupSize[0] = 4096;
+   consts->MaxComputeVariableGroupSize[1] = 2048;
+   consts->MaxComputeVariableGroupSize[2] = 512;
+   consts->MaxComputeVariableGroupInvocations = 65536;
 
    /** GL_NV_conservative_raster */
    consts->MaxSubpixelPrecisionBiasBits = 0;
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 8e9b1def253..895f13f80fd 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -202,8 +202,6 @@ arb_input_attrib_string(GLuint index, GLenum progType)
    };
 
    /* sanity checks */
-   STATIC_ASSERT(ARRAY_SIZE(vertAttribs) == VERT_ATTRIB_MAX);
-   STATIC_ASSERT(ARRAY_SIZE(fragAttribs) == VARYING_SLOT_MAX);
    assert(strcmp(vertAttribs[VERT_ATTRIB_TEX0], "vertex.texcoord[0]") == 0);
    assert(strcmp(vertAttribs[VERT_ATTRIB_GENERIC15], "vertex.attrib[15]") == 0);
    assert(strcmp(fragAttribs[VARYING_SLOT_TEX0], "fragment.texcoord[0]") == 0);
@@ -349,8 +347,6 @@ arb_output_attrib_string(GLuint index, GLenum progType)
    };
 
    /* sanity checks */
-   STATIC_ASSERT(ARRAY_SIZE(vertResults) == VARYING_SLOT_MAX);
-   STATIC_ASSERT(ARRAY_SIZE(fragResults) == FRAG_RESULT_MAX);
    assert(strcmp(vertResults[VARYING_SLOT_POS], "result.position") == 0);
    assert(strcmp(vertResults[VARYING_SLOT_VAR0], "result.varying[0]") == 0);
    assert(strcmp(fragResults[FRAG_RESULT_DATA0], "result.color[0]") == 0);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index f3b02ac5ae1..e2be9585ac2 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -78,12 +78,6 @@ _mesa_init_program(struct gl_context *ctx)
    assert(ctx->Const.Program[MESA_SHADER_VERTEX].MaxAddressOffset <= (1 << INST_INDEX_BITS));
    assert(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxAddressOffset <= (1 << INST_INDEX_BITS));
 
-   /* If this fails, increase prog_instruction::TexSrcUnit size */
-   STATIC_ASSERT(MAX_TEXTURE_UNITS <= (1 << 5));
-
-   /* If this fails, increase prog_instruction::TexSrcTarget size */
-   STATIC_ASSERT(NUM_TEXTURE_TARGETS <= (1 << 4));
-
    ctx->Program.ErrorPos = -1;
    ctx->Program.ErrorString = strdup("");
 
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index ad6608f794e..108d8448488 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4803,8 +4803,6 @@ glsl_to_tgsi_visitor::visit(ir_barrier *ir)
 
 glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
 {
-   STATIC_ASSERT(sizeof(samplers_used) * 8 >= PIPE_MAX_SAMPLERS);
-
    result.file = PROGRAM_UNDEFINED;
    next_temp = 1;
    array_sizes = NULL;
openSUSE Build Service is sponsored by