Mesa (main): pan/lower_framebuffer: Don't open-code pad_vec4
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 23 21:08:50 UTC 2021
Module: Mesa
Branch: main
Commit: 5fe35012c9917cde63359982c2c75de23e0dacd8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fe35012c9917cde63359982c2c75de23e0dacd8
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Tue Jun 15 12:40:29 2021 -0400
pan/lower_framebuffer: Don't open-code pad_vec4
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11383>
---
src/panfrost/util/pan_lower_framebuffer.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/panfrost/util/pan_lower_framebuffer.c b/src/panfrost/util/pan_lower_framebuffer.c
index 2f78ea769e3..abe6abada93 100644
--- a/src/panfrost/util/pan_lower_framebuffer.c
+++ b/src/panfrost/util/pan_lower_framebuffer.c
@@ -193,10 +193,7 @@ pan_unpack_pure_16(nir_builder *b, nir_ssa_def *pack, unsigned num_components)
unpacked[i + 1] = nir_channel(b, halves, 1);
}
- for (unsigned i = num_components; i < 4; ++i)
- unpacked[i] = nir_imm_intN_t(b, 0, 16);
-
- return nir_vec(b, unpacked, 4);
+ return nir_pad_vec4(b, nir_vec(b, unpacked, num_components));
}
static nir_ssa_def *
More information about the mesa-commit
mailing list