diff --git a/src/util/vulkan_device.cpp b/src/util/vulkan_device.cpp index 7112bfe3c..a26d45272 100644 --- a/src/util/vulkan_device.cpp +++ b/src/util/vulkan_device.cpp @@ -2096,8 +2096,8 @@ void VulkanDevice::EndPresent() EndRenderPass(); VkCommandBuffer cmdbuf = GetCurrentCommandBuffer(); - VulkanTexture::TransitionSubresourcesToLayout(cmdbuf, m_swap_chain->GetCurrentImage(), GPUTexture::Type::RenderTarget, 0, 1, - 0, 1, VulkanTexture::Layout::ColorAttachment, + VulkanTexture::TransitionSubresourcesToLayout(cmdbuf, m_swap_chain->GetCurrentImage(), GPUTexture::Type::RenderTarget, + 0, 1, 0, 1, VulkanTexture::Layout::ColorAttachment, VulkanTexture::Layout::PresentSrc); SubmitCommandBuffer(m_swap_chain.get(), !m_swap_chain->IsPresentModeSynchronizing()); MoveToNextCommandBuffer(); @@ -2960,8 +2960,8 @@ void VulkanDevice::SetInitialPipelineState() void VulkanDevice::SetTextureSampler(u32 slot, GPUTexture* texture, GPUSampler* sampler) { - VulkanTexture* T = static_cast(texture); - const VkSampler vsampler = sampler ? static_cast(sampler)->GetSampler() : VK_NULL_HANDLE; + VulkanTexture* T = texture ? static_cast(texture) : m_null_texture.get(); + const VkSampler vsampler = static_cast(sampler ? sampler : m_nearest_sampler.get())->GetSampler(); if (m_current_textures[slot] != texture || m_current_samplers[slot] != vsampler) { m_current_textures[slot] = T; @@ -3108,8 +3108,9 @@ bool VulkanDevice::UpdateDescriptorSetsForLayout(bool new_layout, bool new_dynam m_current_samplers[i], VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); } + const u32 set = (layout == GPUPipeline::Layout::MultiTextureAndUBO) ? 1 : 0; dsub.PushUpdate(GetCurrentCommandBuffer(), VK_PIPELINE_BIND_POINT_GRAPHICS, - m_pipeline_layouts[static_cast(m_current_pipeline_layout)], false); + m_pipeline_layouts[static_cast(m_current_pipeline_layout)], set); if (num_ds == 0) return true; } diff --git a/src/util/vulkan_pipeline.cpp b/src/util/vulkan_pipeline.cpp index fdb5dbaa4..fed2e5d23 100644 --- a/src/util/vulkan_pipeline.cpp +++ b/src/util/vulkan_pipeline.cpp @@ -167,9 +167,10 @@ std::unique_ptr VulkanDevice::CreatePipeline(const GPUPipeline::Gra i, 0, format_mapping[static_cast(va.type.GetValue())][static_cast(va.components.GetValue() - 1)], va.offset); } - gpb.SetPrimitiveTopology(primitives[static_cast(config.primitive)]); } + gpb.SetPrimitiveTopology(primitives[static_cast(config.primitive)]); + // Line width? gpb.SetRasterizationState(VK_POLYGON_MODE_FILL,