metal: SDL_UpdateYUVTexture shouldn't swap planes based on format.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 01 Sep 2018 20:47:12 -0400
changeset 12169be34b836f738
parent 12168 a5459597367f
child 12170 6512477ff395
metal: SDL_UpdateYUVTexture shouldn't swap planes based on format.
src/render/metal/SDL_render_metal.m
     1.1 --- a/src/render/metal/SDL_render_metal.m	Fri Aug 31 18:10:21 2018 -0700
     1.2 +++ b/src/render/metal/SDL_render_metal.m	Sat Sep 01 20:47:12 2018 -0400
     1.3 @@ -956,8 +956,8 @@
     1.4                      const Uint8 *Vplane, int Vpitch)
     1.5  { @autoreleasepool {
     1.6      METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
     1.7 -    int Uslice = texture->format == SDL_PIXELFORMAT_YV12 ? 1 : 0;
     1.8 -    int Vslice = texture->format == SDL_PIXELFORMAT_YV12 ? 0 : 1;
     1.9 +    const int Uslice = 0;
    1.10 +    const int Vslice = 1;
    1.11  
    1.12      /* Bail out if we're supposed to update an empty rectangle */
    1.13      if (rect->w <= 0 || rect->h <= 0) {