radv: reset the window scissor with no clear state.
authorDave Airlie <airlied@redhat.com>
Thu, 18 Jul 2019 01:19:11 +0000 (11:19 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 19 Jul 2019 01:00:44 +0000 (11:00 +1000)
If we don't have clear state (which gfx10 doesn't currently)
we will fix to reset the scissor. AMDVLK will leave it set
to something else.

Marek also has this fix for radeonsi pending.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/si_cmd_buffer.c

index 6fe447ef2e90c55a7ddc87e3ca2b757308aed877..0efa169d6748dbea05eff5ee57e8d086af5cb873 100644 (file)
@@ -202,7 +202,7 @@ si_emit_graphics(struct radv_physical_device *physical_device,
        /* CLEAR_STATE doesn't clear these correctly on certain generations.
         * I don't know why. Deduced by trial and error.
         */
-       if (physical_device->rad_info.chip_class <= GFX7) {
+       if (physical_device->rad_info.chip_class <= GFX7 || !physical_device->has_clear_state) {
                radeon_set_context_reg(cs, R_028B28_VGT_STRMOUT_DRAW_OPAQUE_OFFSET, 0);
                radeon_set_context_reg(cs, R_028204_PA_SC_WINDOW_SCISSOR_TL,
                                       S_028204_WINDOW_OFFSET_DISABLE(1));