mesa: add new max sample count state
authorChris Forbes <chrisf@ijw.co.nz>
Fri, 30 Nov 2012 08:19:08 +0000 (21:19 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Fri, 1 Mar 2013 22:34:58 +0000 (11:34 +1300)
- GL_MAX_COLOR_TEXTURE_SAMPLES
- GL_MAX_DEPTH_TEXTURE_SAMPLES
- GL_MAX_INTEGER_SAMPLES

V2: initialize limits to 1 in _mesa_init_constants as suggested by Brian
and Paul

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/context.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h

index 02acfc2aa5b99a9f0289fbe45c5034bb5f36ad0e..cdcf7adfa25179074fbaae514993bbd3cb0db7e1 100644 (file)
@@ -661,6 +661,11 @@ _mesa_init_constants(struct gl_context *ctx)
 
    /* ES 3.0 or ARB_ES3_compatibility */
    ctx->Const.MaxElementIndex = 0xffffffffu;
+
+   /* GL_ARB_texture_multisample */
+   ctx->Const.MaxColorTextureSamples = 1;
+   ctx->Const.MaxDepthTextureSamples = 1;
+   ctx->Const.MaxIntegerSamples = 1;
 }
 
 
index 205139dbba6107220cac1c1f775d56a16ead0386..0f900a3a8c186146c58786a0f60963446876b58d 100644 (file)
@@ -661,6 +661,9 @@ descriptor=[
 # GL_ARB_texture_multisample / GL 3.2
   [ "TEXTURE_BINDING_2D_MULTISAMPLE", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_MULTISAMPLE_INDEX, extra_ARB_texture_multisample" ],
   [ "TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX, extra_ARB_texture_multisample" ],
+  [ "MAX_COLOR_TEXTURE_SAMPLES", "CONTEXT_INT(Const.MaxColorTextureSamples), extra_ARB_texture_multisample" ],
+  [ "MAX_DEPTH_TEXTURE_SAMPLES", "CONTEXT_INT(Const.MaxDepthTextureSamples), extra_ARB_texture_multisample" ],
+  [ "MAX_INTEGER_SAMPLES", "CONTEXT_INT(Const.MaxIntegerSamples), extra_ARB_texture_multisample" ],
 
 
 # GL_ARB_sampler_objects / GL 3.3
index a292d9822a28950814a2fdf22372204ec401f27b..446f91dd9f8a7153e8e44be2d574c23010e52705 100644 (file)
@@ -3035,6 +3035,11 @@ struct gl_constants
     * backslash character ('\') in GLSL source.
     */
    GLboolean DisableGLSLLineContinuations;
+
+   /** GL_ARB_texture_multisample */
+   GLint MaxColorTextureSamples;
+   GLint MaxDepthTextureSamples;
+   GLint MaxIntegerSamples;
 };