diff --git a/CMakeLists.txt b/CMakeLists.txt index a5c96d9d..5beccd69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 3.22) -set(WISDOM_VERSION "0.3.14") +set(WISDOM_VERSION "0.3.15") project("Wisdom" VERSION ${WISDOM_VERSION}) set(CMAKE_DEBUG_POSTFIX d) diff --git a/Changelog.md b/Changelog.md index a4f33eec..6f9110d6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,10 @@ # Version History +- 0.3.15 + + - Fixed Vulkan default texture barriers + - Fixed static analysis warning for blending enum, thanks to @jaw + - 0.3.14 - Finally fixed swapchain stutters on VSync for Vulkan, thanks to Sascha Willems for the ship of theseus example diff --git a/wisdom/include/wisdom/vulkan/impl/vk_command_list.cpp b/wisdom/include/wisdom/vulkan/impl/vk_command_list.cpp index d2c95426..1861cccb 100644 --- a/wisdom/include/wisdom/vulkan/impl/vk_command_list.cpp +++ b/wisdom/include/wisdom/vulkan/impl/vk_command_list.cpp @@ -163,9 +163,9 @@ inline VkImageMemoryBarrier2 to_vk(wis::TextureBarrier barrier, VkImage texture, .subresourceRange = { .aspectMask = aspect_flags(format), .baseMipLevel = subresource.base_mip_level, - .levelCount = zero_range ? subresource.level_count : VK_REMAINING_MIP_LEVELS, + .levelCount = zero_range ? VK_REMAINING_MIP_LEVELS : subresource.level_count, .baseArrayLayer = subresource.base_array_layer, - .layerCount = zero_range ? subresource.layer_count : VK_REMAINING_ARRAY_LAYERS, + .layerCount = zero_range ? VK_REMAINING_ARRAY_LAYERS : subresource.layer_count, } }; } @@ -246,8 +246,9 @@ void wis::ImplVKCommandList::BeginRenderPass(const wis::VKRenderPassDesc* pass_d auto ds_selector = pass_desc->depth_stencil ? pass_desc->depth_stencil->depth_stencil_select : DSSelect::None; auto& dtable = device.table(); - wis::detail::limited_allocator allocator(pass_desc->target_count, true); - auto* data = allocator.data(); + + uint32_t attachment_count = std::min(pass_desc->target_count, 8u); + VkRenderingAttachmentInfo data[8]{}; wis::Size2D extent = std::get<1>(pass_desc->targets[0].target); for (size_t i = 0; i < pass_desc->target_count; i++) {