radv: enable location at sample when persample is forced.
authorDave Airlie <airlied@redhat.com>
Thu, 23 Feb 2017 04:24:20 +0000 (14:24 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 24 Feb 2017 00:31:30 +0000 (10:31 +1000)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index dd6deef17c8aa3eafe3fcf5fed35f5d9c1192a41..5b7564c63990cab1427d5a6c3ef1238fa8f490ce 100644 (file)
@@ -685,6 +685,9 @@ radv_emit_fragment_shader(struct radv_cmd_buffer *cmd_buffer,
        radeon_set_context_reg(cmd_buffer->cs, R_0286D0_SPI_PS_INPUT_ADDR,
                               ps->config.spi_ps_input_addr);
 
+       if (ps->info.fs.force_persample)
+               spi_baryc_cntl |= S_0286E0_POS_FLOAT_LOCATION(2);
+
        radeon_set_context_reg(cmd_buffer->cs, R_0286D8_SPI_PS_IN_CONTROL,
                               S_0286D8_NUM_INTERP(ps->info.fs.num_interp));