mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
adding shaders compilation in makefile
This commit is contained in:
@@ -100,22 +100,21 @@ namespace mlx
|
||||
subresource_range.levelCount = 1;
|
||||
subresource_range.baseArrayLayer = 0;
|
||||
|
||||
VkImageLayout old_layout = m_layout;
|
||||
TransitionLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, cmd);
|
||||
if(m_type == ImageType::Color)
|
||||
{
|
||||
VkImageLayout old_layout = m_layout;
|
||||
TransitionLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, cmd);
|
||||
subresource_range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
VkClearColorValue clear_color = VkClearColorValue({ { color.x, color.y, color.z, color.w } });
|
||||
RenderCore::Get().vkCmdClearColorImage(cmd, m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &subresource_range);
|
||||
TransitionLayout(old_layout, cmd);
|
||||
}
|
||||
else if(m_type == ImageType::Depth)
|
||||
{
|
||||
VkClearDepthStencilValue clear_depth_stencil = { 1.0f, 1 };
|
||||
subresource_range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||
TransitionLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, cmd);
|
||||
RenderCore::Get().vkCmdClearDepthStencilImage(cmd, m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_depth_stencil, 1, &subresource_range);
|
||||
}
|
||||
TransitionLayout(old_layout, cmd);
|
||||
}
|
||||
|
||||
void Image::DestroySampler() noexcept
|
||||
|
||||
Reference in New Issue
Block a user