Mesa (master): zink: use emit_bitcast helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 16 10:42:32 UTC 2020


Module: Mesa
Branch: master
Commit: 03ccd3c4687ae401353a72a116b0d4f7de560c88
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=03ccd3c4687ae401353a72a116b0d4f7de560c88

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Thu Dec 10 15:51:08 2020 +0100

zink: use emit_bitcast helper

We already have this helper, so let's use it. It makes the code
*slightly* shorter and easier to follow IMO.

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8049>

---

 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index 09ff563e46b..765ea1cb074 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -967,7 +967,7 @@ emit_so_outputs(struct ntv_context *ctx,
             result = spirv_builder_emit_vector_shuffle(&ctx->builder, type,
                                                              src, src,
                                                              components, so_output.num_components);
-            result = emit_unop(ctx, SpvOpBitcast, type, result);
+            result = emit_bitcast(ctx, type, result);
          } else {
              /* for arrays, we need to manually extract each desired member
               * and re-pack them into the desired output type



More information about the mesa-commit mailing list