[Mesa-dev] [PATCH 3/3] st/mesa: implement ARB_copy_image

Marek Olšák maraeo at gmail.com
Tue Oct 27 02:19:13 PDT 2015


On Tue, Oct 27, 2015 at 4:26 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> +
>> +static void
>> +copy_image(struct pipe_context *pipe,
>> +           struct pipe_resource *dst,
>> +           unsigned dst_level,
>> +           unsigned dstx, unsigned dsty, unsigned dstz,
>> +           struct pipe_resource *src,
>> +           unsigned src_level,
>> +           const struct pipe_box *src_box)
>> +{
>> +   if (src->format == dst->format ||
>> +       util_format_is_compressed(src->format) ||
>> +       util_format_is_compressed(dst->format)) {
>
> If only :(
>
> Situation: src internal format = GL_RGBA, dst internal format =
> GL_BGRA, but both resources end up with PIPE_FORMAT_RGBA8.
>
> You end up not flipping the channels here. All of these decisions must
> be done based on the GL format, not the PIPE format...

I don't understand. The GL format doesn't specify component ordering,
only the pipe format does.

Marek


More information about the mesa-dev mailing list