[Commits] SDL: metal: SDL_UpdateYUVTexture shouldn't swap planes based on ...

libsdl.org revision control commits-owner at libsdl.org
Sat Sep 1 21:35:25 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/be34b836f738
changeset: 12169:be34b836f738
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Sat Sep 01 20:47:12 2018 -0400
description:
metal: SDL_UpdateYUVTexture shouldn't swap planes based on format.

diffstat:

 src/render/metal/SDL_render_metal.m |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r a5459597367f -r be34b836f738 src/render/metal/SDL_render_metal.m
--- a/src/render/metal/SDL_render_metal.m	Fri Aug 31 18:10:21 2018 -0700
+++ b/src/render/metal/SDL_render_metal.m	Sat Sep 01 20:47:12 2018 -0400
@@ -956,8 +956,8 @@
                     const Uint8 *Vplane, int Vpitch)
 { @autoreleasepool {
     METAL_TextureData *texturedata = (__bridge METAL_TextureData *)texture->driverdata;
-    int Uslice = texture->format == SDL_PIXELFORMAT_YV12 ? 1 : 0;
-    int Vslice = texture->format == SDL_PIXELFORMAT_YV12 ? 0 : 1;
+    const int Uslice = 0;
+    const int Vslice = 1;
 
     /* Bail out if we're supposed to update an empty rectangle */
     if (rect->w <= 0 || rect->h <= 0) {


More information about the commits mailing list