something

This commit is contained in:
2025-12-14 18:00:38 +02:00
parent a583969fc3
commit 860ec0c422
6 changed files with 68 additions and 60 deletions

View File

@@ -1,22 +1,22 @@
#include "../vulkan_state.h"
BEGIN_DECLARE_VULKAN_COMMAND(ClearColor)
float r;
float g;
float b;
float a;
IImage *pImage;
END_DECLARE_VULKAN_COMMAND(ClearColor)
#include "../commands.h"
DECLARE_VULKAN_COMMAND(ClearColor)
{
CVkImage *pImage = (CVkImage*)pImage;
VkClearColorValue color = {.float32 = {1,0,1,0}};
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, pImage->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range);
vkCmdClearColorImage(hCommandBuffer, pImg->m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &color, 1, &range);
}