[Mesa-dev] [PATCH] mesa: Fix Get(GL_TRANSPOSE_CURRENT_MATRIX_ARB) to transpose
Jose Fonseca
jfonseca at vmware.com
Mon Nov 24 02:00:43 PST 2014
On 24/11/14 08:53, Kenneth Graunke wrote:
> On Monday, November 24, 2014 09:44:38 PM Chris Forbes wrote:
>> This was just returning the same value as GL_CURRENT_MATRIX_ARB.
>> Spotted while investigating something else in apitrace.
>>
>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>> Cc: "10.3 10.4" <mesa-stable at lists.freedesktop.org>
>> ---
>> src/mesa/main/get_hash_params.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
>> index a931d9d..09a61ac 100644
>> --- a/src/mesa/main/get_hash_params.py
>> +++ b/src/mesa/main/get_hash_params.py
>> @@ -627,7 +627,7 @@ descriptor=[
>> # == GL_CURRENT_MATRIX_NV
>> [ "CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
>> # == GL_CURRENT_MATRIX_NV
>> - [ "TRANSPOSE_CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
>> + [ "TRANSPOSE_CURRENT_MATRIX_ARB", "LOC_CUSTOM, TYPE_MATRIX_T, 0, extra_ARB_vertex_program_ARB_fragment_program" ],
>> # == GL_PROGRAM_ERROR_POSITION_NV
>> [ "PROGRAM_ERROR_POSITION_ARB", "CONTEXT_INT(Program.ErrorPos), extra_ARB_vertex_program_ARB_fragment_program" ],
>>
>>
>
> Wow, that's been there a while...
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Yeah, good catch Chris.
It's quite clear that apitrace is the biggest (only?) user of glGet*
entry-points out there given the amount of errors it uncovers.
Not sure if this is because glGet* used to be slow before direct
rendering contexts became widespread, or merely because most of glGets
are only useful for debugging.
And it's not just Mesa -- I've seen erroneous glGet output from NVIDIA
too, among others.
So some times I wonder if it wouldn't be better if we shadowed the state
in apitrace and avoid relying on glGets for most things, but then I
think I'd be replacing one problem with an even bigger one: the bugs in
glGets with the bugs apitrace...
Jose
More information about the mesa-dev
mailing list