From e3288c4597b4231d7f25c2e7814489bcb4b69872 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 20 Sep 2017 11:03:49 +0200 Subject: vo_gpu: simplify compute shader coordinate calculation Since the removal of FBOTEX_FUZZY, this can be made slightly simpler. --- video/out/gpu/video.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'video') diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index 286a4aa9ee..1fe6bc5d8b 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -1128,12 +1128,9 @@ static void dispatch_compute(struct gl_video *p, int w, int h, (float)s->h / s->tex->params.h, }); - PRELUDE("#define texcoord%d_raw(id) (tex_scale%d * outcoord(id))\n", n, n); - PRELUDE("#define texcoord%d_rot(id) (texture_rot%d * texcoord%d_raw(id) + " + PRELUDE("#define texmap%d_raw(id) (tex_scale%d * outcoord(id))\n", n, n); + PRELUDE("#define texmap%d(id) (texture_rot%d * texmap%d_raw(id) + " "pixel_size%d * texture_off%d)\n", n, n, n, n, n); - // Clamp the texture coordinates to prevent sampling out-of-bounds in - // threads that exceed the requested width/height - PRELUDE("#define texmap%d(id) min(texcoord%d_rot(id), vec2(1.0))\n", n, n); PRELUDE("#define texcoord%d texmap%d(gl_GlobalInvocationID)\n", n, n); } -- cgit v1.2.3