Module: Mesa
Branch: 17.3
Commit: 9f44726f9e3ccc42c0face32a7ce1d1b00e3fabf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f44726f9e3ccc42c0face32a7ce1d1b00e3fabf

Author: Dave Airlie <[email protected]>
Date:   Thu Dec 21 14:03:20 2017 +1000

radv: fix issue with multisample positions and interp_var_at_sample.

This fixes vmfaults seen on vega with:
dEQP-VK.pipeline.multisample_interpolation.sample_interpolate_at_single_sample_.128_128_1.samples_1

These were caused by the don't allocate cmask but it was just accidental.

The actual problem was the shader was trying to get the sample positions from
a buffer, but the buffer was never getting configured to contain them, as the
previous shader never needed them.

Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Fixes: 1171b304f3 (radv: overhaul fragment shader sample positions.)
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit b81f1a592b02d3d1928ab232c97675b12cad19fc)

---

 src/amd/vulkan/radv_cmd_buffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 9d2ce7b6e7..97de996ce3 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -541,7 +541,8 @@ radv_update_multisample_state(struct radv_cmd_buffer 
*cmd_buffer,
        radeon_set_context_reg(cmd_buffer->cs, R_028804_DB_EQAA, ms->db_eqaa);
        radeon_set_context_reg(cmd_buffer->cs, R_028A4C_PA_SC_MODE_CNTL_1, 
ms->pa_sc_mode_cntl_1);
 
-       if (old_pipeline && num_samples == 
old_pipeline->graphics.ms.num_samples)
+       if (old_pipeline && num_samples == 
old_pipeline->graphics.ms.num_samples &&
+           
old_pipeline->shaders[MESA_SHADER_FRAGMENT]->info.info.ps.needs_sample_positions
 == 
pipeline->shaders[MESA_SHADER_FRAGMENT]->info.info.ps.needs_sample_positions)
                return;
 
        radeon_set_context_reg_seq(cmd_buffer->cs, R_028BDC_PA_SC_LINE_CNTL, 2);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to