summaryrefslogtreecommitdiff
path: root/subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff')
-rw-r--r--subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff54
1 files changed, 54 insertions, 0 deletions
diff --git a/subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff b/subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff
new file mode 100644
index 0000000..e8b2ecf
--- /dev/null
+++ b/subprojects/packagefiles/libplacebo/android_opengl_custom_dispatch.diff
@@ -0,0 +1,54 @@
+diff --git a/src/dispatch.c b/src/dispatch.c
+index 218b556..70be9aa 100644
+--- a/src/dispatch.c
++++ b/src/dispatch.c
+@@ -1541,7 +1541,7 @@ bool pl_dispatch_vertex(pl_dispatch dp, const struct pl_dispatch_vertex_params *
+ case PL_COORDS_NORMALIZED:
+ if (params->vertex_flipped) {
+ proj.mat.m[1][1] = -proj.mat.m[1][1];
+- proj.c[1] += 2.0;
++ //proj.c[1] += 2.0;
+ }
+ break;
+ }
+@@ -1566,7 +1566,7 @@ bool pl_dispatch_vertex(pl_dispatch dp, const struct pl_dispatch_vertex_params *
+
+ // Update the scissors
+ rparams->scissors = params->scissors;
+- if (params->vertex_flipped) {
++ if (params->vertex_flipped && rparams->scissors.y0 != rparams->scissors.y1) {
+ rparams->scissors.y0 = tpars->h - rparams->scissors.y0;
+ rparams->scissors.y1 = tpars->h - rparams->scissors.y1;
+ }
+diff --git a/src/shaders/custom_mpv.c b/src/shaders/custom_mpv.c
+index 1c93da5..bd6450d 100644
+--- a/src/shaders/custom_mpv.c
++++ b/src/shaders/custom_mpv.c
+@@ -1191,10 +1191,10 @@ static bool bind_pass_tex(pl_shader sh, pl_str name,
+ GLSLH("#define HOOKED_pt %.*s_pt \n", PL_STR_FMT(name));
+ GLSLH("#define HOOKED_map %.*s_map \n", PL_STR_FMT(name));
+ GLSLH("#define HOOKED_mul %.*s_mul \n", PL_STR_FMT(name));
+- GLSLH("#define HOOKED_tex %.*s_tex \n", PL_STR_FMT(name));
+- GLSLH("#define HOOKED_texOff %.*s_texOff \n", PL_STR_FMT(name));
++ GLSLH("#define HOOKED_tex(pos) %.*s_tex(pos) \n", PL_STR_FMT(name));
++ GLSLH("#define HOOKED_texOff(off) %.*s_texOff(off) \n", PL_STR_FMT(name));
+ if (can_gather)
+- GLSLH("#define HOOKED_gather %.*s_gather \n", PL_STR_FMT(name));
++ GLSLH("#define HOOKED_gather(pos, c) %.*s_gather(pos, c) \n", PL_STR_FMT(name));
+ }
+
+ if (mainpresub) {
+@@ -1206,10 +1206,10 @@ static bool bind_pass_tex(pl_shader sh, pl_str name,
+ GLSLH("#define MAIN_pt MAINPRESUB_pt \n");
+ GLSLH("#define MAIN_map MAINPRESUB_map \n");
+ GLSLH("#define MAIN_mul MAINPRESUB_mul \n");
+- GLSLH("#define MAIN_tex MAINPRESUB_tex \n");
+- GLSLH("#define MAIN_texOff MAINPRESUB_texOff \n");
++ GLSLH("#define MAIN_tex(pos) MAINPRESUB_tex(pos) \n");
++ GLSLH("#define MAIN_texOff(off) MAINPRESUB_texOff(off) \n");
+ if (can_gather)
+- GLSLH("#define MAIN_gather MAINPRESUB_gather \n");
++ GLSLH("#define MAIN_gather(pos, c) MAINPRESUB_gather(pos, c) \n");
+ }
+
+ return true;