radv: gather if a vertex shaders needs the instance ID
[mesa.git] / src / amd / vulkan / radv_device.c
index 26b31cff9f14d369c5d209ebf4421a22c8772987..8d4964073cf1f76e3fa8d5df315d59560de9f9d8 100644 (file)
@@ -371,6 +371,8 @@ radv_physical_device_init(struct radv_physical_device *device,
                                       (device->rad_info.chip_class >= GFX8 &&
                                        device->rad_info.me_fw_feature >= 41);
 
+       device->has_dcc_constant_encode = device->rad_info.family == CHIP_RAVEN2;
+
        device->use_shader_ballot = device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT;
 
        radv_physical_device_init_mem_types(device);
@@ -2702,9 +2704,9 @@ radv_get_preamble_cs(struct radv_queue *queue,
                                                 queue->device->physical_device->rad_info.chip_class >= GFX7,
                                               (queue->queue_family_index == RADV_QUEUE_COMPUTE ? RADV_CMD_FLAG_CS_PARTIAL_FLUSH : (RADV_CMD_FLAG_CS_PARTIAL_FLUSH | RADV_CMD_FLAG_PS_PARTIAL_FLUSH)) |
                                               RADV_CMD_FLAG_INV_ICACHE |
-                                              RADV_CMD_FLAG_INV_SMEM_L1 |
-                                              RADV_CMD_FLAG_INV_VMEM_L1 |
-                                              RADV_CMD_FLAG_INV_GLOBAL_L2 |
+                                              RADV_CMD_FLAG_INV_SCACHE |
+                                              RADV_CMD_FLAG_INV_VCACHE |
+                                              RADV_CMD_FLAG_INV_L2 |
                                               RADV_CMD_FLAG_START_PIPELINE_STATS, 0);
                } else if (i == 1) {
                        si_cs_emit_cache_flush(cs,
@@ -2713,9 +2715,9 @@ radv_get_preamble_cs(struct radv_queue *queue,
                                               queue->queue_family_index == RING_COMPUTE &&
                                                 queue->device->physical_device->rad_info.chip_class >= GFX7,
                                               RADV_CMD_FLAG_INV_ICACHE |
-                                              RADV_CMD_FLAG_INV_SMEM_L1 |
-                                              RADV_CMD_FLAG_INV_VMEM_L1 |
-                                              RADV_CMD_FLAG_INV_GLOBAL_L2 |
+                                              RADV_CMD_FLAG_INV_SCACHE |
+                                              RADV_CMD_FLAG_INV_VCACHE |
+                                              RADV_CMD_FLAG_INV_L2 |
                                               RADV_CMD_FLAG_START_PIPELINE_STATS, 0);
                }