radv: move DB_COUNT_CONTROL initialization to si_emit_config()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 19 Oct 2017 14:25:59 +0000 (16:25 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Oct 2017 08:38:11 +0000 (10:38 +0200)
CLEAR_STATE will initialize DB_COUNT_CONTROL to 0 for CIK+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/si_cmd_buffer.c

index f4aa9e9b16ff979d07dd2f50589534fa06b7b0bb..8c5c75d3cb6d2671ae4e2c23d093f17759be8418 100644 (file)
@@ -2160,7 +2160,6 @@ VkResult radv_BeginCommandBuffer(
                switch (cmd_buffer->queue_family_index) {
                case RADV_QUEUE_GENERAL:
                        emit_gfx_buffer_state(cmd_buffer);
-                       radv_set_db_count_control(cmd_buffer);
                        break;
                case RADV_QUEUE_COMPUTE:
                        si_init_compute(cmd_buffer);
index 690f30b6abc5b332531382ed4293f25f8bf3dcd2..de3b3883fc8963bf2a0ea4fdcbcee77bcef12381 100644 (file)
@@ -528,6 +528,11 @@ si_emit_config(struct radv_physical_device *physical_device,
        radeon_emit(cs, S_028A04_MIN_SIZE(radv_pack_float_12p4(0)) |
                    S_028A04_MAX_SIZE(radv_pack_float_12p4(8192/2)));
 
+       if (!physical_device->has_clear_state) {
+               radeon_set_context_reg(cs, R_028004_DB_COUNT_CONTROL,
+                                      S_028004_ZPASS_INCREMENT_DISABLE(1));
+       }
+
        si_emit_compute(physical_device, cs);
 }