Mesa (staging/20.0): gallivm/tgsi: fix stream id regression
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 28 22:44:47 UTC 2020
Module: Mesa
Branch: staging/20.0
Commit: eb0f6e3ab81c37a465fad85acd520d1bfe942f22
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb0f6e3ab81c37a465fad85acd520d1bfe942f22
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Feb 26 07:03:33 2020 +1000
gallivm/tgsi: fix stream id regression
This broke TGSI GS shaders with llvmpipe, it wasn't looking at the
right immediates and it should be cast to an integer type.
Fixes: 163d5fde0669 (gallium/swr: Enable GL_ARB_gpu_shader5: multiple streams)
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski at intel.com>
Acked-by: Jan Zielinski <jan.zielinski at intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3949>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3949>
(cherry picked from commit 954cf8e86b6e0d52c04098604d2daa4305bf6f70)
---
.pick_status.json | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 2ca187b936a..79ad3f2d509 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1111,7 +1111,7 @@
"description": "gallivm/tgsi: fix stream id regression",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "163d5fde06696fed2e69e000a7621087c1636749"
},
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index adcf1871f8a..01a4e4b3570 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -3944,11 +3944,14 @@ emit_vertex(
LLVMBuilderRef builder = bld->bld_base.base.gallivm->builder;
if (bld->gs_iface->emit_vertex) {
- uint32_t imms_idx = emit_data->inst->Src[0].Register.SwizzleX;
- LLVMValueRef stream_id = bld->immediates[0][imms_idx];
+ uint32_t stream_reg_idx = emit_data->inst->Src[0].Register.Index;
+ uint32_t stream_reg_swiz = emit_data->inst->Src[0].Register.SwizzleX;
+ LLVMValueRef stream_id = bld->immediates[stream_reg_idx][stream_reg_swiz];
LLVMValueRef mask = mask_vec(bld_base);
LLVMValueRef total_emitted_vertices_vec =
LLVMBuildLoad(builder, bld->total_emitted_vertices_vec_ptr, "");
+
+ stream_id = LLVMBuildBitCast(builder, stream_id, bld_base->uint_bld.vec_type, "");
mask = clamp_mask_to_max_output_vertices(bld, mask,
total_emitted_vertices_vec);
gather_outputs(bld);
More information about the mesa-commit
mailing list