From b858cb4df8f7be9baa33d7e20347d2fe77822872 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 21 Apr 2017 03:02:46 +0100 Subject: [PATCH] radv/ac: move point coord after layer/viewport. These need to be ordered as per shader enum ordering, I'll rewrite this soon, but this is a bug fix. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_pipeline.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 5046c9f6b36..aada4d2f30d 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1881,12 +1881,6 @@ static void calculate_ps_inputs(struct radv_pipeline *pipeline) outinfo = &vs->info.vs.outinfo; unsigned ps_offset = 0; - if (ps->info.fs.has_pcoord) { - unsigned val; - val = S_028644_PT_SPRITE_TEX(1) | S_028644_OFFSET(0x20); - pipeline->graphics.ps_input_cntl[ps_offset] = val; - ps_offset++; - } if (ps->info.fs.prim_id_input && (outinfo->prim_id_output != 0xffffffff)) { unsigned vs_offset, flat_shade; @@ -1908,6 +1902,13 @@ static void calculate_ps_inputs(struct radv_pipeline *pipeline) ++ps_offset; } + if (ps->info.fs.has_pcoord) { + unsigned val; + val = S_028644_PT_SPRITE_TEX(1) | S_028644_OFFSET(0x20); + pipeline->graphics.ps_input_cntl[ps_offset] = val; + ps_offset++; + } + for (unsigned i = 0; i < 32 && (1u << i) <= ps->info.fs.input_mask; ++i) { unsigned vs_offset, flat_shade; unsigned val; -- 2.30.2