From a586040123e76b5121dafd28d052d57ee77f623b Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 22 Dec 2020 20:22:17 -0800 Subject: [PATCH] misc fixes --- include/Refresh.h | 18 +++++++++--------- src/Refresh_Driver_Vulkan.c | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/Refresh.h b/include/Refresh.h index 149a4a8..5729084 100644 --- a/include/Refresh.h +++ b/include/Refresh.h @@ -550,15 +550,15 @@ typedef struct REFRESH_ColorBlendState typedef struct REFRESH_GraphicsPipelineCreateInfo { - const REFRESH_ShaderStageState vertexShaderState; - const REFRESH_ShaderStageState fragmentShaderState; - const REFRESH_VertexInputState vertexInputState; - const REFRESH_TopologyState topologyState; - const REFRESH_ViewportState viewportState; - const REFRESH_RasterizerState rasterizerState; - const REFRESH_MultisampleState multisampleState; - const REFRESH_DepthStencilState depthStencilState; - const REFRESH_ColorBlendState colorBlendState; + REFRESH_ShaderStageState vertexShaderState; + REFRESH_ShaderStageState fragmentShaderState; + REFRESH_VertexInputState vertexInputState; + REFRESH_TopologyState topologyState; + REFRESH_ViewportState viewportState; + REFRESH_RasterizerState rasterizerState; + REFRESH_MultisampleState multisampleState; + REFRESH_DepthStencilState depthStencilState; + REFRESH_ColorBlendState colorBlendState; REFRESH_PipelineLayoutCreateInfo pipelineLayoutCreateInfo; REFRESH_RenderPass *renderPass; } REFRESH_GraphicsPipelineCreateInfo; diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 3e5fc33..dc20df0 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -2117,7 +2117,7 @@ static uint8_t VULKAN_INTERNAL_CreateBuffer( } buffer->subBuffers[i]->resourceAccessType = resourceAccessType; - buffer->subBuffers[i]->bound = -1; + buffer->subBuffers[i]->bound = 0; VULKAN_INTERNAL_BufferMemoryBarrier( renderer, @@ -2976,6 +2976,8 @@ static REFRESH_GraphicsPipeline* VULKAN_CreateGraphicsPipeline( pipelineLayoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; pipelineLayoutCreateInfo.pNext = NULL; pipelineLayoutCreateInfo.flags = 0; + pipelineLayoutCreateInfo.pPushConstantRanges = NULL; + pipelineLayoutCreateInfo.pushConstantRangeCount = 0; pipelineLayoutCreateInfo.setLayoutCount = 4; pipelineLayoutCreateInfo.pSetLayouts = setLayouts; @@ -2995,6 +2997,7 @@ static REFRESH_GraphicsPipeline* VULKAN_CreateGraphicsPipeline( /* Pipeline */ vkPipelineCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; + vkPipelineCreateInfo.pNext = NULL; vkPipelineCreateInfo.flags = 0; vkPipelineCreateInfo.stageCount = 2; vkPipelineCreateInfo.pStages = shaderStageCreateInfos; @@ -4679,7 +4682,6 @@ static void VULKAN_BindGraphicsPipeline( VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline->pipeline )); - SDL_assert(0); } static void VULKAN_INTERNAL_MarkAsBound(