something
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user