[Mesa-dev] [RFC PATCH 10/26] mesa: add new max sample count state

Paul Berry stereotype441 at gmail.com
Fri Jan 4 12:51:06 PST 2013


On 2 January 2013 10:01, Brian Paul <brianp at vmware.com> wrote:

> On 12/29/2012 05:35 AM, Chris Forbes wrote:
>
>> - GL_MAX_COLOR_TEXTURE_SAMPLES
>> - GL_MAX_DEPTH_TEXTURE_SAMPLES
>> - GL_MAX_INTEGER_SAMPLES
>>
>> Signed-off-by: Chris Forbes<chrisf at ijw.co.nz>
>> ---
>>   src/mesa/main/get_hash_params.**py | 5 ++++-
>>   src/mesa/main/mtypes.h           | 5 +++++
>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/get_hash_**params.py b/src/mesa/main/get_hash_
>> **params.py
>> index 40e25e7..689a7e0 100644
>> --- a/src/mesa/main/get_hash_**params.py
>> +++ b/src/mesa/main/get_hash_**params.py
>> @@ -638,9 +638,12 @@ descriptor=[
>>     [ "TEXTURE_BUFFER_FORMAT_ARB", "LOC_CUSTOM, TYPE_INT, 0,
>> extra_texture_buffer_object" ],
>>     [ "TEXTURE_BUFFER_ARB", "LOC_CUSTOM, TYPE_INT, 0,
>> extra_texture_buffer_object" ],
>>
>> -# GL_ARB_texture_multisample
>> +# 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
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index 4be1074..6f6cdaa 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -2970,6 +2970,11 @@ struct gl_constants
>>       * Drivers that support transform feedback must set this value to
>> GL_FALSE.
>>       */
>>      GLboolean DisableVaryingPacking;
>> +
>> +   /** GL_ARB_texture_multisample */
>> +   GLint MaxColorTextureSamples;
>> +   GLint MaxDepthTextureSamples;
>> +   GLint MaxIntegerSamples;
>>   };
>>
>>
>>
> You should probably also have some code to initialize these new fields to
> sensible defaults in _mesa_init_constants().
>

Agreed.  It probably makes sense to initialize them to all to 1, since
that's the minimum permissible value according to the spec.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130104/e48eebfc/attachment-0001.html>


More information about the mesa-dev mailing list