Module: Mesa Branch: master Commit: 49b0e8657e2228284fdb92313ee12a89050de13b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49b0e8657e2228284fdb92313ee12a89050de13b
Author: Gert Wollny <[email protected]> Date: Sun Feb 28 21:41:28 2021 +0100 r600/sfn: Fix loading TES gl_PatchVerticesIn Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330> --- src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp index d8fb6a64727..2f0e0e48989 100644 --- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_tess_io.cpp @@ -233,7 +233,13 @@ r600_lower_tess_io_impl(nir_builder *b, nir_instr *instr, enum pipe_prim_type pr switch (op->intrinsic) { case nir_intrinsic_load_patch_vertices_in: { - auto vertices_in = nir_channel(b, load_in_param_base, 2); + nir_ssa_def *vertices_in; + if (b->shader->info.stage == MESA_SHADER_TESS_CTRL) + vertices_in = nir_channel(b, load_in_param_base, 2); + else { + auto base = emit_load_param_base(b, nir_intrinsic_load_tcs_in_param_base_r600); + vertices_in = nir_channel(b, base, 2); + } nir_ssa_def_rewrite_uses(&op->dest.ssa, nir_src_for_ssa(vertices_in)); nir_instr_remove(&op->instr); return true; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
