wined3d: Simplify the odd line condition in gen_yv12_read().

Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Anton Baskanov 2021-08-31 23:26:25 +07:00 committed by Alexandre Julliard
parent f4d2bdddca
commit e3db02d0cb
1 changed files with 1 additions and 1 deletions

View File

@ -12624,7 +12624,7 @@ static void gen_yv12_read(struct wined3d_string_buffer *buffer,
/* Read odd lines from the right side (add 0.5 to the x coordinate). Keep
* in mind that each line of the chroma plane corresponds to 2 lines of the
* resulting image. */
shader_addline(buffer, " if (fract(floor(texcoord.y * size.y) * 0.25 + 1.0 / 6.0) >= 0.5)\n");
shader_addline(buffer, " if (fract(texcoord.y * size.y * 0.25) >= 0.5)\n");
shader_addline(buffer, " texcoord.x += 0.5;\n");
/* Clamp, keep the half pixel origin in mind. */