mesa: Rename MaxCombinedImageUnitsAndFragmentOutputs to MaxCombinedShaderOutputResources.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 17 Aug 2015 16:10:46 +0000 (19:10 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 20 Aug 2015 09:26:53 +0000 (12:26 +0300)
The name of both the GLSL built-in variable and the glGetInteger param
with the same value changed in GLSL ES 3.1 and GL 4.5.  Its semantics
also changed slightly, since the limit now also takes into account the
number of SSBs in use.  Switch our internal data structures to the
up-to-date name.

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/builtin_variables.cpp
src/glsl/glsl_parser_extras.cpp
src/glsl/glsl_parser_extras.h
src/glsl/linker.cpp
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h

index 53d3500b1f44d26d2149d22109f78403e1554a05..c6fdccfd721a20ee51b03d7d1a383b0db6718786 100644 (file)
@@ -749,7 +749,7 @@ builtin_variable_generator::generate_constants()
       add_const("gl_MaxImageUnits",
                 state->Const.MaxImageUnits);
       add_const("gl_MaxCombinedImageUnitsAndFragmentOutputs",
-                state->Const.MaxCombinedImageUnitsAndFragmentOutputs);
+                state->Const.MaxCombinedShaderOutputResources);
       add_const("gl_MaxImageSamples",
                 state->Const.MaxImageSamples);
       add_const("gl_MaxVertexImageUniforms",
index 46896d779990cd71514814199dca871ddae52efa..82b92b197d28506fd67900326c1fe1749c1ba673 100644 (file)
@@ -141,7 +141,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
       this->Const.MaxComputeWorkGroupSize[i] = ctx->Const.MaxComputeWorkGroupSize[i];
 
    this->Const.MaxImageUnits = ctx->Const.MaxImageUnits;
-   this->Const.MaxCombinedImageUnitsAndFragmentOutputs = ctx->Const.MaxCombinedImageUnitsAndFragmentOutputs;
+   this->Const.MaxCombinedShaderOutputResources = ctx->Const.MaxCombinedShaderOutputResources;
    this->Const.MaxImageSamples = ctx->Const.MaxImageSamples;
    this->Const.MaxVertexImageUniforms = ctx->Const.Program[MESA_SHADER_VERTEX].MaxImageUniforms;
    this->Const.MaxTessControlImageUniforms = ctx->Const.Program[MESA_SHADER_TESS_CTRL].MaxImageUniforms;
index 57a7555158a7fd86b7c6c994f14b51ba62fb5665..e3cdbc5ee2b73c740b3d66a971d2f7be8ae5a3b5 100644 (file)
@@ -395,7 +395,7 @@ struct _mesa_glsl_parse_state {
 
       /* ARB_shader_image_load_store */
       unsigned MaxImageUnits;
-      unsigned MaxCombinedImageUnitsAndFragmentOutputs;
+      unsigned MaxCombinedShaderOutputResources;
       unsigned MaxImageSamples;
       unsigned MaxVertexImageUniforms;
       unsigned MaxTessControlImageUniforms;
index a7cd82049bd1d12e1412c7ee37b59bd470f7cf8b..47f7d2574dd76aac5172a863ac0bac9510ffd69b 100644 (file)
@@ -2900,7 +2900,7 @@ check_image_resources(struct gl_context *ctx, struct gl_shader_program *prog)
       linker_error(prog, "Too many combined image uniforms\n");
 
    if (total_image_units + fragment_outputs >
-       ctx->Const.MaxCombinedImageUnitsAndFragmentOutputs)
+       ctx->Const.MaxCombinedShaderOutputResources)
       linker_error(prog, "Too many combined image uniforms and fragment outputs\n");
 }
 
index f428f58c69aa2a35165670c4a609ec9adb9b91fb..907b2a07353fbc5428df026ef876944638698706 100644 (file)
@@ -513,7 +513,7 @@ brw_initialize_context_constants(struct brw_context *brw)
       ctx->Const.Program[MESA_SHADER_COMPUTE].MaxImageUniforms =
          BRW_MAX_IMAGES;
       ctx->Const.MaxImageUnits = MAX_IMAGE_UNITS;
-      ctx->Const.MaxCombinedImageUnitsAndFragmentOutputs =
+      ctx->Const.MaxCombinedShaderOutputResources =
          MAX_IMAGE_UNITS + BRW_MAX_DRAW_BUFFERS;
       ctx->Const.MaxImageSamples = 0;
       ctx->Const.MaxCombinedImageUniforms = 3 * BRW_MAX_IMAGES;
index 7dc92f1010041ef6742163f3d2d16eb0513e9e15..517c391955d49f45667239ca12aeb3b1e4cd08c7 100644 (file)
@@ -806,7 +806,7 @@ descriptor=[
   [ "MAX_VERTEX_ATTRIB_BINDINGS", "CONTEXT_ENUM(Const.MaxVertexAttribBindings), NO_EXTRA" ],
 
 # GL_ARB_shader_image_load_store
-  [ "MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS", "CONTEXT_INT(Const.MaxCombinedImageUnitsAndFragmentOutputs), extra_ARB_shader_image_load_store" ],
+  [ "MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS", "CONTEXT_INT(Const.MaxCombinedShaderOutputResources), extra_ARB_shader_image_load_store" ],
   [ "MAX_IMAGE_SAMPLES", "CONTEXT_INT(Const.MaxImageSamples), extra_ARB_shader_image_load_store" ],
   [ "MAX_GEOMETRY_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxImageUniforms), extra_ARB_shader_image_load_store_and_geometry_shader"],
 
index f61a24510189ab2c2c592258260d47d19f4afa1f..6dd624fabb574690faa9363610b6c7bee3e888cd 100644 (file)
@@ -3675,7 +3675,7 @@ struct gl_constants
 
    /* GL_ARB_shader_image_load_store */
    GLuint MaxImageUnits;
-   GLuint MaxCombinedImageUnitsAndFragmentOutputs;
+   GLuint MaxCombinedShaderOutputResources;
    GLuint MaxImageSamples;
    GLuint MaxCombinedImageUniforms;