radv/ac: move point coord after layer/viewport.
authorDave Airlie <airlied@redhat.com>
Fri, 21 Apr 2017 02:02:46 +0000 (03:02 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 25 Apr 2017 22:24:21 +0000 (23:24 +0100)
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 <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_pipeline.c

index 5046c9f6b3613cadc60cacf9e3d40ce3717568df..aada4d2f30d71f4aad114cdf868f7f8ae1f67f1d 100644 (file)
@@ -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;