On Mon, Aug 24, 2015 at 4:54 PM, Brian Paul <bri...@vmware.com> wrote: > On 08/24/2015 02:44 PM, Ilia Mirkin wrote: >> >> Not that I really care, but... why flip the order of bgra vs rgba? > > > Because if an 8-bit RGBA integer texture is created, we'll use the gallium > format PIPE_FORMAT_R8G8B8A8_SINT. If we create another non-integer surface > with PIPE_FORMAT_B8G8R8A8_UNORM instead of PIPE_FORMAT_R8G8B8A8_UNORM we'll > get a failure when copying image data because of the component order > difference.
You'll get that problem anyways, no? Imagine you create 2 RGBA 8-bit unorm textures -- one with glTexImage(ifmt=GL_RGBA8, fmt=GL_RGBA, type=GL_UNSIGNED_INT_8_8_8_8) and another with glTexImage(ifmt=GL_RGBA8, fmt=GL_RGBA, type=GL_UNSIGNED_INT_8_8_8_8_REV). The two textures will have the same GL internal format, but different pipe format component orderings... so when you copy between them you need to swizzle. But perhaps I should look at the rest of the series when you manage to send it :) -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev