summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.xyz>2017-09-20 11:03:49 +0200
committerNiklas Haas <git@haasn.xyz>2017-09-22 17:22:53 +0200
commite3288c4597b4231d7f25c2e7814489bcb4b69872 (patch)
tree73198ab9e2a4c4cb656662463bcd98585293870f /video/out/gpu/video.c
parent62ddc85d178e647e8cfbee6da4d173c661b4f1fc (diff)
downloadmpv-e3288c4597b4231d7f25c2e7814489bcb4b69872.tar.bz2
mpv-e3288c4597b4231d7f25c2e7814489bcb4b69872.tar.xz
vo_gpu: simplify compute shader coordinate calculation
Since the removal of FBOTEX_FUZZY, this can be made slightly simpler.
Diffstat (limited to 'video/out/gpu/video.c')
-rw-r--r--video/out/gpu/video.c7
1 files changed, 2 insertions, 5 deletions
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);
}