<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 23, 2013 at 4:10 PM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>On Sat, Nov 23, 2013 at 10:23 PM, Mark Mueller <<a href="mailto:markkmueller@gmail.com" target="_blank">markkmueller@gmail.com</a>> wrote:<br>


><br>
><br>
><br>
> On Sat, Nov 23, 2013 at 2:26 AM, Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>> wrote:<br>
>></div></div></blockquote><div><br></div><div>[...]</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>>><br>
</div></div><div><div>
>> >    MESA_FORMAT_RGBA1555_REV,<br>
>><br>
>> I don't think you can have R with 1 bit.<br>
>><br>
>> ><br>
>> >    /* Blue Green Red Alpha */<br>
>> >    MESA_FORMAT_BGRA_INT8,<br>
>> >    MESA_FORMAT_BGRA_INT8_REV,<br>
>> >    MESA_FORMAT_BGRA_UINT8,<br>
>> >    MESA_FORMAT_BGRA_INT16,<br>
>> >    MESA_FORMAT_BGRA_UINT16,<br>
>> >    MESA_FORMAT_BGRA_FLOAT16,<br>
>> >    MESA_FORMAT_BGRA_INT32,<br>
>> >    MESA_FORMAT_BGRA_UINT32,<br>
>> >    MESA_FORMAT_BGRA_FLOAT32,<br>
>> >    MESA_FORMAT_BGRA4444,<br>
>> >    MESA_FORMAT_BGRA4444_REV,<br>
>> >    MESA_FORMAT_BGRA5551,<br>
>><br>
>> All these look good.<br>
>><br>
>> >    MESA_FORMAT_BGRA1555_REV,<br>
>><br>
>> I don't think you can have B with 1 bit.<br></div></div></blockquote><div> </div><div>Doesn't the _REV force A to be the first component, i.e. 1 bit? This format is listed as valid in <a href="http://www.opengl.org/wiki/Pixel_Transfer">http://www.opengl.org/wiki/Pixel_Transfer</a> - see below.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
>><br>
>> >    MESA_FORMAT_BGRA1010102,<br>
>><br>
>> This one looks good.<br>
>><br>
>> >    MESA_FORMAT_BGRA2101010_REV,<br>
>><br>
>> I don't think you can have B with 2 bits.<br></div></div></blockquote><div><br></div><div>Same as above.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>
>><br>
>> >    MESA_FORMAT_BGRA5999_REV,<br>
>><br>
>> This one doesn't exist either and cannot be specified by TexImage.<br></div></div></blockquote><div><br></div><div>You are correct according to the Pixel_Transfer spec, thanks.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>
><br>
><br>
> BGRAs and RGBAs were based on this from the spec:<br>
> "GL_INVALID_OPERATION is generated if type is one of<br>
> GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,<br>
> GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,<br>
> GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,<br>
> GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, or<br>
> GL_UNSIGNED_INT_5_9_9_9_REV, and format is neither GL_RGBA nor GL_BGRA."<br>
<br>
</div></div>Nowhere can I see that B has 1 or 2 bits. Also the occurence of<br>
GL_UNSIGNED_INT_5_9_9_9_REV seems to be a spec bug, because it should<br>
be GL_RGB (the 5 bits contain a shared exponent).<br></blockquote><div><br></div><div>It does appear to be a spec bug. Here is a quote from <a href="http://www.opengl.org/wiki/Pixel_Transfer">http://www.opengl.org/wiki/Pixel_Transfer</a> which addresses that an other issues above:</div>
<div><br></div><div>"OpenGL restricts the possible sizes. They are:</div><div>* 3_3_2 (2_3_3_REV): unsigned bytes. Only used with GL_RGB.</div><div><br></div><div>* 5_6_5 (5_6_5_REV): unsigned shorts. Only used with GL_RGB.</div>
<div><br></div><div>* 4_4_4_4 (4_4_4_4_REV): unsigned shorts.</div><div><br></div><div>* 5_5_5_1 (1_5_5_5_REV): unsigned shorts.</div><div><br></div><div>* 8_8_8_8 (8_8_8_8_REV): unsigned ints.</div><div><br></div><div>* 10_10_10_2 (2_10_10_10_REV): unsigned ints.</div>
<div><br></div><div>* 24_8 (no _REV): unsigned ints. Only used with GL_DEPTH_STENCIL​.</div><div><br></div><div>* 10F_11F_11F_REV (no non-REV): unsigned ints. These represent floats, and can only be used with GL_RGB​. This should only be used with images that have the GL_R11F_G11F_B10F​ image format.</div>
<div><br></div><div>* 5_9_9_9_REV (no non-REV): unsigned ints. Only used with GL_RGB​; the last component (the 5. It's REV) does not directly map to a color value. It is a shared exponent. Only use this with images that have the GL_RGB9_E5​ image format."</div>
<div><br></div><div> </div><div>I'm working on V2 of this patch with incorporation of Marek, Brian's, and Roland's feedback. I have also made changes as a result of further development and testing on the i965 GPU texture upload work. I will be posting that shortly.</div>
<div><br></div><div>Thanks Marek.</div><div><br></div><div>Mark</div></div></div></div>