Martin Storsjo : wined3d: Fix clamping in reading rectangular YV12 textures.

Alexandre Julliard julliard at winehq.org
Tue Feb 11 13:32:41 CST 2014


Module: wine
Branch: master
Commit: 963c26b36fd0192053dd245fadc4814af79e718d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=963c26b36fd0192053dd245fadc4814af79e718d

Author: Martin Storsjo <martin at martin.st>
Date:   Tue Feb 11 12:14:55 2014 +0100

wined3d: Fix clamping in reading rectangular YV12 textures.

The lower bound for chroma components is size.y + 1/2, not
size.y - 1/2.

---

 dlls/wined3d/arb_program_shader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 56ab15f..aa0f609 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7003,7 +7003,7 @@ static BOOL gen_yv12_read(struct wined3d_shader_buffer *buffer, GLenum textype,
         shader_addline(buffer, "MAD temp.y, size.y, coef.w, size.y;\n");
         shader_addline(buffer, "ADD temp.y, temp.y, -coef.y;\n");
         shader_addline(buffer, "MIN texcrd.y, temp.y, texcrd.y;\n");
-        shader_addline(buffer, "ADD temp.y, size.y, -coef.y;\n");
+        shader_addline(buffer, "ADD temp.y, size.y, coef.y;\n");
         shader_addline(buffer, "MAX texcrd.y, temp.y, texcrd.y;\n");
     }
     /* Read the texture, put the result into the output register */




More information about the wine-cvs mailing list