Commit 963c26b3 authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

wined3d: Fix clamping in reading rectangular YV12 textures.

The lower bound for chroma components is size.y + 1/2, not size.y - 1/2.
parent d3b14079
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment