Mesa (staging/21.2): panfrost: Fix UNORM 10 sizes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 25 19:35:52 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: 22a32dcd543f52b9b670adffe26d4f6e67abd0e6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=22a32dcd543f52b9b670adffe26d4f6e67abd0e6

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Fri Jun 11 17:27:37 2021 -0400

panfrost: Fix UNORM 10 sizes

Fixes: 56047fb64d7 ("panfrost: Fix UNORM 16 rendering")
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
(cherry picked from commit 85ab479d2422c00d9397b29f46b01790f8c75f7e)

---

 .pick_status.json                                    |  2 +-
 .../drivers/panfrost/ci/deqp-panfrost-t860-fails.txt | 20 ++++++++++----------
 src/panfrost/util/pan_lower_framebuffer.c            |  8 ++++----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 83d91d12a1c..e9e0f41c210 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -373,7 +373,7 @@
         "description": "panfrost: Fix UNORM 10 sizes",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "56047fb64d713512edfb89067ef2be2fb68916b1"
     },
diff --git a/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt b/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
index 9219c97eb5b..bd49a590e45 100644
--- a/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
+++ b/src/gallium/drivers/panfrost/ci/deqp-panfrost-t860-fails.txt
@@ -42,28 +42,28 @@ dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffe
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.10,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.11,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.12,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.13,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.13,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.14,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.15,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.15,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.16,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.17,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.18,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.18,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.19,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.2,Crash
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.3,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.2,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.3,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.4,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.5,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.6,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.6,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.7,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.8,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.9,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_implementation_draw_buffers.9,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.10,Crash
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.11,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.10,Fail
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.11,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.12,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.15,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.16,Fail
-dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.17,Crash
+dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.17,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.18,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.2,Fail
 dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.3,Fail
diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c
index 998e5d68442..8c64d5cf5fe 100644
--- a/src/panfrost/util/pan_lower_framebuffer.c
+++ b/src/panfrost/util/pan_lower_framebuffer.c
@@ -37,7 +37,7 @@
  *
  * The unpacked type depends on the format:
  *
- *      - For 32-bit float formats, 32-bit floats.
+ *      - For 32-bit float formats or >8-bit UNORM, 32-bit floats.
  *      - For other floats, 16-bit floats.
  *      - For 32-bit ints, 32-bit ints.
  *      - For 8-bit ints, 8-bit ints.
@@ -377,8 +377,8 @@ pan_unpack_unorm_565(nir_builder *b, nir_ssa_def *v)
 static nir_ssa_def *
 pan_pack_unorm_1010102(nir_builder *b, nir_ssa_def *v)
 {
-        nir_ssa_def *scale = nir_imm_vec4_16(b, 1023.0, 1023.0, 1023.0, 3.0);
-        nir_ssa_def *s = nir_f2u32(b, nir_fround_even(b, nir_f2f32(b, nir_fmul(b, nir_fsat(b, v), scale))));
+        nir_ssa_def *scale = nir_imm_vec4(b, 1023.0, 1023.0, 1023.0, 3.0);
+        nir_ssa_def *s = nir_f2u32(b, nir_fround_even(b, nir_fmul(b, nir_fsat(b, v), scale)));
 
         nir_ssa_def *top8 = nir_ushr(b, s, nir_imm_ivec4(b, 0x2, 0x2, 0x2, 0x2));
         nir_ssa_def *top8_rgb = nir_pack_32_4x8(b, nir_u2u8(b, top8));
@@ -421,7 +421,7 @@ pan_unpack_unorm_1010102(nir_builder *b, nir_ssa_def *packed)
         };
 
         nir_ssa_def *scale = nir_imm_vec4(b, 1.0 / 1023.0, 1.0 / 1023.0, 1.0 / 1023.0, 1.0 / 3.0);
-        return nir_f2fmp(b, nir_fmul(b, nir_u2f32(b, nir_vec(b, chans, 4)), scale));
+        return nir_fmul(b, nir_u2f32(b, nir_vec(b, chans, 4)), scale);
 }
 
 /* On the other hand, the pure int RGB10_A2 is identical to the spec */



More information about the mesa-commit mailing list