Vulkan compute: Refactor pbp integer setting loop

This commit is contained in:
Stephen Seo 2024-03-26 13:56:56 +09:00
parent d137dc44ff
commit 5913b7669b

View file

@ -82,10 +82,12 @@ inline bool vulkan_get_filter(
VkDeviceMemory staging_filter_buffer_mem, VkBuffer staging_filter_buffer) { VkDeviceMemory staging_filter_buffer_mem, VkBuffer staging_filter_buffer) {
vkResetCommandBuffer(command_buffer, 0); vkResetCommandBuffer(command_buffer, 0);
for (unsigned int i = 0; i < pbp.size(); ++i) {
if (reversed_pbp) { if (reversed_pbp) {
for (unsigned int i = 0; i < pbp.size(); ++i) {
pbp_mapped_int[i] = pbp[i] ? 0 : 1; pbp_mapped_int[i] = pbp[i] ? 0 : 1;
}
} else { } else {
for (unsigned int i = 0; i < pbp.size(); ++i) {
pbp_mapped_int[i] = pbp[i] ? 1 : 0; pbp_mapped_int[i] = pbp[i] ? 1 : 0;
} }
} }