OSDN Git Service

Use the given YV12 texture stride instead of computing it from width.
authorNicolas Capens <capn@google.com>
Fri, 20 Nov 2015 03:58:29 +0000 (22:58 -0500)
committerNicolas Capens <capn@google.com>
Thu, 31 Dec 2015 16:45:56 +0000 (16:45 +0000)
Bug 25690690

Change-Id: If25a8868effb1e55908c4041555e553b52ee789a
Reviewed-on: https://swiftshader-review.googlesource.com/4292
Reviewed-by: Keun Soo Yim <yim@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
src/Renderer/Sampler.cpp

index 3de645c..aaf6a49 100644 (file)
@@ -224,7 +224,7 @@ namespace sw
                                   internalTextureFormat == FORMAT_YV12_BT709 ||
                                   internalTextureFormat == FORMAT_YV12_JFIF)
                                {
-                                       unsigned int YStride = align(width, 16);
+                                       unsigned int YStride = pitchP;
                                        unsigned int YSize = YStride * height;
                                        unsigned int CStride = align(YStride / 2, 16);
                                        unsigned int CSize = CStride * height / 2;