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

Pierre-Eric Pelloux-Prayer pelloux at gmail.com
Thu Apr 14 09:31:11 PDT 2011


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
>>
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-handling-for-PIPE_FORMAT_B8G8R8X8_UNORM-in-st_fa.patch
Type: text/x-patch
Size: 3736 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110414/60fbec3f/attachment.bin>


More information about the mesa-dev mailing list