armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.23k stars 334 forks source link

Outdated/broken VKRT patch #1583

Closed lylythechosenone closed 1 year ago

lylythechosenone commented 1 year ago

When attempting to apply the VKRT patch, I get multiple errors from git. Here is the normal and verbose log:

error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h:53
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h: patch does not apply
error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h:11
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h: patch does not apply
error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h:2
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h: patch does not apply
error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h:48
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h: patch does not apply
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h...
error: while searching for:
VkDevice device;
VkFormat format;
VkRenderPass render_pass;
VkPhysicalDevice gpu;
VkCommandPool cmd_pool;
VkQueue queue;

error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h:53
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/Vulkan.c.h: patch does not apply
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h...
error: while searching for:
extern VkSwapchainKHR swapchain;
extern VkQueue queue;
extern VkFramebuffer *framebuffers;
extern VkRenderPass render_pass;
extern uint32_t current_buffer;
extern int depthBits;
extern VkSemaphore presentCompleteSemaphore;
extern kinc_g5_texture_t *vulkanTextures[16];
extern kinc_g5_render_target_t *vulkanRenderTargets[16];
VkDescriptorSet getDescriptorSet(void);
bool memory_type_from_properties(uint32_t typeBits, VkFlags requirements_mask, uint32_t *typeIndex);
void setImageLayout(VkCommandBuffer _buffer, VkImage image, VkImageAspectFlags aspectMask, VkImageLayout oldImageLayout, VkImageLayout newImageLayout);
VkCommandBuffer setup_cmd;

error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h:11
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/commandlist.c.h: patch does not apply
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/indexbuffer.c.h...
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h...
error: while searching for:
#include <kinc/graphics5/shader.h>

extern VkDevice device;
VkDescriptorSetLayout desc_layout;
extern kinc_g5_texture_t *vulkanTextures[16];
extern kinc_g5_render_target_t *vulkanRenderTargets[16];

error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h:2
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/pipeline.c.h: patch does not apply
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h...
error: while searching for:
                acceleration_structure_layout_binding.binding = 0;
                acceleration_structure_layout_binding.descriptorType = VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR;
                acceleration_structure_layout_binding.descriptorCount = 1;
                acceleration_structure_layout_binding.stageFlags = VK_SHADER_STAGE_RAYGEN_BIT_KHR;

                VkDescriptorSetLayoutBinding result_image_layout_binding = {0};
                result_image_layout_binding.binding = 1;
                result_image_layout_binding.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
                result_image_layout_binding.descriptorCount = 1;
                result_image_layout_binding.stageFlags = VK_SHADER_STAGE_RAYGEN_BIT_KHR;

                VkDescriptorSetLayoutBinding uniform_buffer_binding = {0};
                uniform_buffer_binding.binding = 2;
                uniform_buffer_binding.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER;
                uniform_buffer_binding.descriptorCount = 1;
                uniform_buffer_binding.stageFlags = VK_SHADER_STAGE_RAYGEN_BIT_KHR;

                VkDescriptorSetLayoutBinding bindings[3] = {acceleration_structure_layout_binding, result_image_layout_binding, uniform_buffer_binding};

                VkDescriptorSetLayoutCreateInfo layout_info = {0};
                layout_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
                layout_info.pNext = NULL;
                layout_info.bindingCount = 3;
                layout_info.pBindings = &bindings[0];
                vkCreateDescriptorSetLayout(device, &layout_info, NULL, &pipeline->impl.descriptor_set_layout);

error: patch failed: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h:48
error: Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/raytrace.c.h: patch does not apply
Checking patch Kinc/Backends/Graphics5/Vulkan/Sources/kinc/backend/graphics5/vertexbuffer.c.h...
Checking patch Kinc/Sources/kinc/graphics5/raytrace.h...
Hunk #1 succeeded at 35 (offset 2 lines).

I am running Arch Linux 6.3.6-zen1-1-zen, git 2.41.0, armortools commit b91d7b9.

luboslenco commented 1 year ago

Will fix at https://github.com/armory3d/armortools/issues/1449, thanks for report.