[Mesa-dev] [PATCH 10/17] main: Allow non-zero NUM_PROGRAM_BINARY_FORMATS
Tapani Pälli
tapani.palli at intel.com
Sat Nov 11 11:24:08 UTC 2017
On 11/11/2017 10:14 AM, Jordan Justen wrote:
> On 2017-11-09 03:16:46, Tapani Pälli wrote:
>>
>>
>> On 11/09/2017 08:42 AM, Jordan Justen wrote:
>>> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
>>> ---
>>> src/mesa/main/get_hash_params.py | 2 +-
>>> src/mesa/main/mtypes.h | 3 +++
>>> 2 files changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
>>> index acd5cd1f011..8c6193d761f 100644
>>> --- a/src/mesa/main/get_hash_params.py
>>> +++ b/src/mesa/main/get_hash_params.py
>>> @@ -324,7 +324,7 @@ descriptor=[
>>> [ "SHADER_BINARY_FORMATS", "LOC_CUSTOM, TYPE_INVALID, 0, extra_ARB_ES2_compatibility_api_es2" ],
>>>
>>> # GL_ARB_get_program_binary / GL_OES_get_program_binary
>>> - [ "NUM_PROGRAM_BINARY_FORMATS", "CONST(0), NO_EXTRA" ],
>>> + [ "NUM_PROGRAM_BINARY_FORMATS", "CONTEXT_UINT(Const.NumProgramBinaryFormats), NO_EXTRA" ],
>>> [ "PROGRAM_BINARY_FORMATS", "LOC_CUSTOM, TYPE_INVALID, 0, NO_EXTRA" ],
>>>
>>> # GL_INTEL_performance_query
>>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>>> index 023692cc0e1..f64bf0a2ad4 100644
>>> --- a/src/mesa/main/mtypes.h
>>> +++ b/src/mesa/main/mtypes.h
>>> @@ -4002,6 +4002,9 @@ struct gl_constants
>>>
>>> /** When drivers are OK with mapped buffers during draw and other calls. */
>>> bool AllowMappedBuffersDuringExecution;
>>> +
>>> + /** GL_ARB_get_program_binary */
>>> + GLuint NumProgramBinaryFormats;
>>
>> Should this be initialized at _mesa_init_constants() ?
>
> I don't think so. I think mesa main assumes that the context was
> created with zero filled memory. I checked several drivers and they
> all used calloc or rzalloc.
>
> The default for NumProgramBinaryFormats should be 0, so I don't think
> it needs to be initialized explicitly.
>
OK that's fine then, this is what I assumed but I saw there are bunch of
values initialized to 0 there, maybe those could be actually removed.
// Tapani
More information about the mesa-dev
mailing list