Yes, your patch solves my problem. Thanks.

Marek

On Wed, Jan 20, 2010 at 2:00 AM, Brian Paul <bri...@vmware.com> wrote:

> Marek Olšák wrote:
>
>> Hi Brian,
>>
>>
>> On Mon, Jan 18, 2010 at 6:18 PM, Brian Paul <bri...@vmware.com <mailto:
>> bri...@vmware.com>> wrote:
>>
>>        The second patch enables hardware-accelerated CopyTex[Sub]Image
>>        in cases when the RGB and RGBA destination formats are used
>>        regardless of source formats. The idea is that if the
>>        colorbuffer is of RGB or RGBA format, the format conversion for
>>        copying between two different surfaces is basically done in
>>        texture units (using swizzles), therefore there is no reason to
>>        use software fallback. Without this patch, openarena fallbacks
>>        to software when bloom is enabled.
>>
>>
>>    Did you read the comment at line 1498?  I remember specifically
>>    adding this check to fix some issues when copying an RGBA
>>    framebuffer to a RGB texture.
>>
>>
>> The behavior of copying an RGBA framebuffer to an RGB texture is not
>> changed by this patch, it is only generalized to support other formats. I
>> agree the diff file is a little bit confusing. See the code before:
>>
>>   else if (srcFormat == GL_RGBA &&
>>            dstLogicalFormat == GL_RGB) {
>>      /* Add a single special case to cope with RGBA->RGB transfers,
>>       * setting A to 1.0 to cope with situations where the RGB
>>       * destination is actually stored as RGBA.
>>       */
>>      return TGSI_WRITEMASK_XYZ; /* A ==> 1.0 */
>>   }
>>   else {
>>
>> The code after:
>>
>>   else if (dstLogicalFormat == GL_RGBA) {
>>      /* In theory, any format can be converted to GL_RGBA.
>>       */
>>      return TGSI_WRITEMASK_XYZW;
>>   }
>>   else if (dstLogicalFormat == GL_RGB) {
>>      /* Add a special case to cope with transfers into RGB,
>>       * setting A to 1.0 to cope with situations where the RGB
>>       * destination is actually stored as RGBA.
>>       */
>>      return TGSI_WRITEMASK_XYZ; /* A ==> 1.0 */
>>   }
>>   else {
>>
>> Are you ok with that?
>>
>
> No.  But don't feel bad, I think my original code is broken too. :(
>
> See the attached patch.  It has a bunch of comments that explain what's
> going on.
>
> If you can test this and it seems to solve your problem, I'll commit it.
>
>
>
>  BTW could you please push the first patch (and the second one if you
>> agree)? My account hasn't been created yet. Thank you.
>>
>
> Yes, done.
>
> -Brian
>
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to