radv: fix CLEAR_STATE packet length.
authorDave Airlie <airlied@redhat.com>
Thu, 19 Oct 2017 03:52:29 +0000 (04:52 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Oct 2017 22:56:48 +0000 (23:56 +0100)
Looking at shader traces I noticed some registers were missing,
one of them was being eaten by the wrong clear state length.

Fixes: 4f42ea4dc (radv: use CLEAR_STATE for initializing some registers)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/si_cmd_buffer.c

index 1e8b43d4fa894d436eca8947f5ad4c2730e955ff..690f30b6abc5b332531382ed4293f25f8bf3dcd2 100644 (file)
@@ -341,7 +341,7 @@ si_emit_config(struct radv_physical_device *physical_device,
        radeon_emit(cs, CONTEXT_CONTROL_SHADOW_ENABLE(1));
 
        if (physical_device->has_clear_state) {
-               radeon_emit(cs, PKT3(PKT3_CLEAR_STATE, 1, 0));
+               radeon_emit(cs, PKT3(PKT3_CLEAR_STATE, 0, 0));
                radeon_emit(cs, 0);
        }