[PATCH 2/2] wined3d: Fix clamping in reading rectangular YV12 textures
Martin Storsjo
martin at martin.st
Mon Feb 10 05:08:33 CST 2014
The lower bound for chroma components is size.y + 1/2, not
size.y - 1/2.
---
I wasn't able to test this codepath properly, but I noticed
this while reading the code.
---
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 fe00c18..b32719e 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -7006,7 +7006,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 */
--
1.8.3.4 (Apple Git-47)
More information about the wine-patches
mailing list