[Mesa-stable] [PATCH] mesa: return v.value_int64 when the requested type is TYPE_INT64

Emil Velikov emil.l.velikov at gmail.com
Thu Mar 13 13:27:10 PDT 2014


On 13/03/14 15:31, Ian Romanick wrote:
> On 03/13/2014 01:31 AM, Emil Velikov wrote:
>> Fixes "Operands don't affect result" defect reported by Coverity.
>
> D'oh.  So... we obviously don't have any piglit tests that hit these
> cases.  Would you mind whipping up something simple?
>
Considering that these were in mesa for (afaics) ~3 years I was a bit 
"d'oh" myself. Never wrote any piglits before so if you can point me to 
ones that I can butcher, I mean rework, that would be great.

-Emil

>> Cc: "9.2 10.0 10.1"  <mesa-stable at lists.freedesktop.org>
>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>> ---
>>   src/mesa/main/get.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
>> index b190851..88cf202 100644
>> --- a/src/mesa/main/get.c
>> +++ b/src/mesa/main/get.c
>> @@ -1997,7 +1997,7 @@ _mesa_GetBooleani_v( GLenum pname, GLuint index, GLboolean *params )
>>         params[3] = INT_TO_BOOLEAN(v.value_int_4[3]);
>>         break;
>>      case TYPE_INT64:
>> -      params[0] = INT64_TO_BOOLEAN(v.value_int);
>> +      params[0] = INT64_TO_BOOLEAN(v.value_int64);
>>         break;
>>      default:
>>         ; /* nothing - GL error was recorded */
>> @@ -2042,7 +2042,7 @@ _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params )
>>         params[3] = v.value_int_4[3];
>>         break;
>>      case TYPE_INT64:
>> -      params[0] = INT64_TO_INT(v.value_int);
>> +      params[0] = INT64_TO_INT(v.value_int64);
>>         break;
>>      default:
>>         ; /* nothing - GL error was recorded */
>> @@ -2067,7 +2067,7 @@ _mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params )
>>         params[3] = v.value_int_4[3];
>>         break;
>>      case TYPE_INT64:
>> -      params[0] = v.value_int;
>> +      params[0] = v.value_int64;
>>         break;
>>      default:
>>         ; /* nothing - GL error was recorded */
>>
>



More information about the mesa-stable mailing list