mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
fixing vulkan image view issue
This commit is contained in:
@@ -250,8 +250,6 @@ void VulkanReturnDescriptorSetToPool(VulkanDescriptorSetPool* pool, const Vulkan
|
||||
}
|
||||
}
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void VulkanBindDescriptorSets(PulseComputePass pass)
|
||||
{
|
||||
VulkanComputePass* vulkan_pass = VULKAN_RETRIEVE_DRIVER_DATA_AS(pass, VulkanComputePass*);
|
||||
@@ -426,9 +424,7 @@ void VulkanBindDescriptorSets(PulseComputePass pass)
|
||||
vulkan_pass->should_recreate_uniform_descriptor_sets = false;
|
||||
}
|
||||
|
||||
fprintf(stderr, "test device %p, fn %p, vkdevice %p, count %d\n", vulkan_device, vulkan_device->vkUpdateDescriptorSets, vulkan_device->device, write_count);
|
||||
vulkan_device->vkUpdateDescriptorSets(vulkan_device->device, write_count, writes, 0, PULSE_NULLPTR);
|
||||
fprintf(stderr, "end test\n");
|
||||
|
||||
VkDescriptorSet sets[3];
|
||||
sets[0] = vulkan_pass->read_only_descriptor_set->set;
|
||||
|
||||
@@ -140,8 +140,6 @@ PulseImage VulkanCreateImage(PulseDevice device, const PulseImageCreateInfo* cre
|
||||
CHECK_VK_RETVAL(device->backend, vmaCreateImage(vulkan_device->allocator, &image_create_info, &allocation_create_info, &vulkan_image->image, &vulkan_image->allocation, PULSE_NULLPTR), PULSE_ERROR_INITIALIZATION_FAILED, PULSE_NULL_HANDLE);
|
||||
vmaGetAllocationInfo(vulkan_device->allocator, vulkan_image->allocation, &vulkan_image->allocation_info);
|
||||
|
||||
if(create_infos->usage & PULSE_IMAGE_USAGE_STORAGE_READ)
|
||||
{
|
||||
VkImageViewCreateInfo image_view_create_info = { 0 };
|
||||
image_view_create_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
|
||||
image_view_create_info.image = vulkan_image->image;
|
||||
@@ -165,7 +163,6 @@ PulseImage VulkanCreateImage(PulseDevice device, const PulseImageCreateInfo* cre
|
||||
image_view_create_info.viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
|
||||
CHECK_VK_RETVAL(device->backend, vulkan_device->vkCreateImageView(vulkan_device->device, &image_view_create_info, PULSE_NULLPTR, &vulkan_image->view), PULSE_ERROR_INITIALIZATION_FAILED, PULSE_NULL_HANDLE);
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include <signal.h>
|
||||
#include <backtrace.h>
|
||||
#include <unity/unity.h>
|
||||
|
||||
#include <Pulse.h>
|
||||
|
||||
#ifdef BACKTRACE
|
||||
#include <backtrace.h>
|
||||
struct backtrace_state* state = NULL;
|
||||
static size_t trace_count = 0;
|
||||
|
||||
@@ -34,6 +35,7 @@ void SignalHandler(int sig)
|
||||
fprintf(stderr, "<End of stack trace>\n==========================================================\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void TestBackend();
|
||||
extern void TestDevice();
|
||||
@@ -43,9 +45,11 @@ extern void TestPipeline();
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef BACKTRACE
|
||||
state = backtrace_create_state(NULL, 1, ErrorCallback, NULL);
|
||||
signal(SIGSEGV, SignalHandler);
|
||||
signal(SIGABRT, SignalHandler);
|
||||
#endif
|
||||
|
||||
UNITY_BEGIN();
|
||||
TestBackend();
|
||||
|
||||
@@ -108,6 +108,7 @@ if has_config("vulkan-tests") then
|
||||
if is_plat("linux") then
|
||||
add_packages("libbacktrace")
|
||||
set_extension(".x86_64")
|
||||
add_defines("BACKTRACE")
|
||||
end
|
||||
target_end()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user