anv: Disable fast clears when running with INTEL_DEBUG=nofc
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 8 Oct 2019 00:05:23 +0000 (17:05 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 9 Oct 2019 20:29:26 +0000 (13:29 -0700)
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/intel/vulkan/anv_image.c

index 66116a8a67d15d23fb4f853e005940a54d24d05d..bd00bc83e134b722f18d886493092b5a203dc2ec 100644 (file)
@@ -1181,6 +1181,9 @@ anv_layout_to_fast_clear_type(const struct gen_device_info * const devinfo,
                               const VkImageAspectFlagBits aspect,
                               const VkImageLayout layout)
 {
+   if (INTEL_DEBUG & DEBUG_NO_FAST_CLEAR)
+      return ANV_FAST_CLEAR_NONE;
+
    /* The aspect must be exactly one of the image aspects. */
    assert(util_bitcount(aspect) == 1 && (aspect & image->aspects));