[Mesa-dev] Uploading PIPE_FORMAT_B8G8R8A8_UNORM to pixmap texture in PIPE_FORMAT_B8G8R8X8_UNORM
Christoph Bumiller
e0425955 at student.tuwien.ac.at
Wed Dec 15 12:38:06 PST 2010
On 12/15/2010 09:30 PM, Christoph Bumiller wrote:
> On 12/15/2010 08:20 PM, Christoph Bumiller wrote:
>> On 12/15/2010 07:55 PM, Jerome Glisse wrote:
>>> Hi,
>>>
>>> I am facing an issue which i am not sure what is the proper things to
>>> do about. piglit tfp test try to upload PIPE_FORMAT_B8G8R8A8_UNORM to
>>> texture pixmap which is PIPE_FORMAT_B8G8R8X8_UNORM r600g assert in
>>> blitter util because format are not compatible. Should all pixmap
>>> texture considered with A8 ? Should i just disable the assert in case
>>> of A->X convertion ? Other answer ?
>>>
>>
>> 1. The assertion is in the wrong place, since util_blitter_copy_region's
>> description reads:
>> "You can copy from any color format to any other color format provided
>> the former can be sampled and the latter can be rendered to. Otherwise,
>> a software fallback path is taken and both surfaces must be of the same
>> format."
>>
>> 2. The arguments to util_is_format_compatible in the assertion are
>> reversed:
>> "Whether the src format can be blitted to destation format with a simple
>> memcpy." - this is true for A8 -> X8, only X8 -> A8 cannot be done with
>> memcpy.
>>
>> assert(util_is_format_compatible(util_format_description(dst->format),
>> util_format_description(src->format)));
>>
>> boolean util_is_format_compatible(const struct util_format_description
>> *src_desc, const struct util_format_description *dst_desc);
>>
> Patch attached.
>
Sorry, don't apply this, using resource_copy_region whenever formats are
compatible (which on nv50 would be cheaper) probably leads to an endless
recursion on some drivers.
I mean this line:
if ((!ignore_stencil && is_stencil) ||
+ compatible ||
!screen->is_format_supported(screen, dst->format, dst->target,
dst->nr_samples, bind, 0) ||
>> Christoph
>>
>>> https://bugs.freedesktop.org/show_bug.cgi?id=32370
>>>
>>> Cheers,
>>> Jerome
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list