[Mesa-dev] [PATCH] add support for GL_RGBA + GL_UNSIGNED_INT_8_8_8_8 in st_fast_readpixels

Brian Paul brianp at vmware.com
Fri Apr 15 07:29:46 PDT 2011


Thanks.  I'm committing this with a minor change.  The line:

        dst[col*4+3] |= alphaORoperand;

can be:

        dst[col*4+3] = 0xff;

since alphaORoperand is known to be 0xff at this point.

-Brian


On 04/14/2011 10:31 AM, Pierre-Eric Pelloux-Prayer wrote:
> Updated patch as I was told that "an X component is supposed to result in 1.0".
>
> On Thu, Apr 14, 2011 at 5:10 PM, Pierre-Eric Pelloux-Prayer
> <pelloux at gmail.com>  wrote:
>> Another similar patch proposal : handling of
>> PIPE_FORMAT_B8G8R8X8_UNORM format in st_fast_readpixels.
>>
>> If I'm correct the 'X' of B8G8R8X8 in stands for 'whatever value' so I
>> think we could use the same code path for both
>> PIPE_FORMAT_B8G8R8A8_UNORM and PIPE_FORMAT_B8G8R8X8_UNORM.
>>
>> (Blender uses glReadPixels + PIPE_FORMAT_B8G8R8X8_UNORM when right
>> mouse clicking in Edit-Mode)
>>
>>
>> On Thu, Apr 14, 2011 at 3:52 PM, Brian Paul<brianp at vmware.com>  wrote:
>>> On 04/13/2011 05:29 AM, Pierre-Eric wrote:
>>>>
>>>> As Lightsmark seems to make use of glReadPixels with {GL_RGBA +
>>>> GL_UNSIGNED_INT_8_8_8_8} parameters,
>>>> I built a short patch to allow 'st_fast_readpixels' to handle this
>>>> combination.
>>>>
>>>> It's been tested using piglit's pixelFormat test + a custom app.
>>>>
>>>> Best regards,
>>>> --Pierre-Eric
>>>
>>> Thanks.  I'll commit it soon.
>>>
>>> -Brian
>>>
>>>
>>



More information about the mesa-dev mailing list