+ if (dstFormat == &_mesa_texformat_rgba) {
+ dstmap = mappings[IDX_RGBA].from_rgba;
+ components = 4;
+ }
+ else if (dstFormat == &_mesa_texformat_rgb) {
+ dstmap = mappings[IDX_RGB].from_rgba;
+ components = 3;
+ }
+ else if (dstFormat == &_mesa_texformat_alpha) {
+ dstmap = mappings[IDX_ALPHA].from_rgba;
+ components = 1;
+ }
+ else if (dstFormat == &_mesa_texformat_luminance) {
+ dstmap = mappings[IDX_LUMINANCE].from_rgba;
+ components = 1;
+ }
+ else if (dstFormat == &_mesa_texformat_luminance_alpha) {
+ dstmap = mappings[IDX_LUMINANCE_ALPHA].from_rgba;
+ components = 2;
+ }
+ else if (dstFormat == &_mesa_texformat_intensity) {
+ dstmap = mappings[IDX_INTENSITY].from_rgba;
+ components = 1;
+ }
+ else {
+ ASSERT(0);
+ dstmap = map_identity;
+ components = 4;
+ }
+