Mesa (main): zink: bitcast extracted streamout components to uint before creating uvec

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 15 17:48:36 UTC 2022


Module: Mesa
Branch: main
Commit: 924145c7b5e0d31a3a3b59c67acd6fe1f309b58b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=924145c7b5e0d31a3a3b59c67acd6fe1f309b58b

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Jul 13 22:18:27 2022 -0400

zink: bitcast extracted streamout components to uint before creating uvec

spirv can't create a uvec from float components, so pre-cast here

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>

---

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

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 3b110073017..370dffa9b34 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
@@ -1651,6 +1651,7 @@ emit_so_outputs(struct ntv_context *ctx,
                    v = 1;
                    components[idx++] = spirv_builder_emit_composite_extract(&ctx->builder, get_uvec_type(ctx, 32, 1), val, &v, 1);
                 } else {
+                   components[idx] = emit_bitcast(ctx, spirv_builder_type_uint(&ctx->builder, 32), components[idx]);
                    idx++;
                 }
              }



More information about the mesa-commit mailing list