Mesa (main): panfrost: Only flip point sprites for GL
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 2 13:28:48 UTC 2022
Module: Mesa
Branch: main
Commit: db7d8519f9dfabdd862d062b21a42f36c51e092b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db7d8519f9dfabdd862d062b21a42f36c51e092b
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Mon Apr 25 15:11:34 2022 -0400
panfrost: Only flip point sprites for GL
Fixes dEQP-VK.glsl.builtin_var.simple.pointcoord
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16204>
---
src/gallium/drivers/panfrost/pan_cmdstream.c | 8 ++++++++
src/panfrost/ci/deqp-panfrost-g52-vk.toml | 1 +
src/panfrost/lib/pan_shader.h | 4 ----
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index a1bf4c108e8..8cf8aa83032 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -4357,6 +4357,14 @@ prepare_shader(struct panfrost_shader_state *state,
pan_pack(out, RENDERER_STATE, cfg) {
pan_shader_prepare_rsd(&state->info, state->bin.gpu, &cfg);
+
+#if PAN_ARCH >= 6
+ /* Match the mesa/st convention. If this needs to be flipped,
+ * nir_lower_pntc_ytransform will do so.
+ */
+ if (state->info.stage == MESA_SHADER_FRAGMENT)
+ cfg.properties.point_sprite_coord_origin_max_y = true;
+#endif
}
#else
assert(upload);
diff --git a/src/panfrost/ci/deqp-panfrost-g52-vk.toml b/src/panfrost/ci/deqp-panfrost-g52-vk.toml
index 0cd46e9924c..a0775789ce9 100644
--- a/src/panfrost/ci/deqp-panfrost-g52-vk.toml
+++ b/src/panfrost/ci/deqp-panfrost-g52-vk.toml
@@ -16,6 +16,7 @@ include = [
"dEQP-VK.glsl.builtin.function.*",
"dEQP-VK.glsl.builtin.precision.frexp.*",
"dEQP-VK.glsl.builtin.precision.ldexp.*",
+ "dEQP-VK.glsl.builtin_var.*",
"dEQP-VK.glsl.conversions.*",
"dEQP-VK.glsl.derivate.*.constant.*",
"dEQP-VK.glsl.derivate.*.linear.*",
diff --git a/src/panfrost/lib/pan_shader.h b/src/panfrost/lib/pan_shader.h
index 8201b32c269..17d920819d1 100644
--- a/src/panfrost/lib/pan_shader.h
+++ b/src/panfrost/lib/pan_shader.h
@@ -237,10 +237,6 @@ pan_shader_prepare_bifrost_rsd(const struct pan_shader_info *info,
rsd->properties.shader_modifies_coverage =
info->fs.writes_coverage || info->fs.can_discard;
- /* Match the mesa/st convention. If this needs to be flipped,
- * nir_lower_pntc_ytransform will do so. */
- rsd->properties.point_sprite_coord_origin_max_y = true;
-
rsd->properties.allow_forward_pixel_to_be_killed =
!info->fs.sidefx;
More information about the mesa-commit
mailing list