#include "../vulkan_state.h" #include "../commands.h" DECLARE_VULKAN_COMMAND(ClearColor) { AddDependency(pImage, DEPENDENCY_MODE_COLOR_CLEAR_DESTINATION); CVkImage *pImg; if (pImage) pImg = (CVkImage*)pImage; if (ppImage) pImg = (CVkImage*)*ppImage; VkClearColorValue color = {.float32 = {r,g,b,a}}; VkImageSubresourceRange range = { .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .levelCount = 1, .layerCount = 1, }; vkCmdClearColorImage(hCommandBuffer, pImg->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range); }