Mesa (master): radeonsi: allow fewer input SGPRs in 2nd shader of merged shaders
Marek Olšák
mareko at kemper.freedesktop.org
Mon Feb 26 11:01:52 UTC 2018
Module: Mesa
Branch: master
Commit: f852b24ce04431ecde639cefd5d86f64975894d5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f852b24ce04431ecde639cefd5d86f64975894d5
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Feb 7 01:09:32 2018 +0100
radeonsi: allow fewer input SGPRs in 2nd shader of merged shaders
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/gallium/drivers/radeonsi/si_shader.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 7af0bdb99c..288f7434bb 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -6600,9 +6600,13 @@ static void si_build_wrapper_function(struct si_shader_context *ctx,
if (is_sgpr)
lp_add_function_attr(parts[part], param_idx + 1, LP_FUNC_ATTR_INREG);
+ else if (out_idx < num_out_sgpr) {
+ /* Skip returned SGPRs the current part doesn't
+ * declare on the input. */
+ out_idx = num_out_sgpr;
+ }
assert(out_idx + param_size <= (is_sgpr ? num_out_sgpr : num_out));
- assert(is_sgpr || out_idx >= num_out_sgpr);
if (param_size == 1)
arg = out[out_idx];
More information about the mesa-commit
mailing list