From 89dadc84534b8c4bd3f220a3383ac8683ac9e25e Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 15 Jun 2022 17:03:55 +0200 Subject: [PATCH] [dxvk] Pass new shader binding info struct to swapchain blit shaders --- src/dxvk/dxvk_swapchain_blitter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_swapchain_blitter.cpp b/src/dxvk/dxvk_swapchain_blitter.cpp index 37ea0e73..9ff2069d 100644 --- a/src/dxvk/dxvk_swapchain_blitter.cpp +++ b/src/dxvk/dxvk_swapchain_blitter.cpp @@ -317,7 +317,12 @@ namespace dxvk { SpirvCodeBuffer fsCodeCopy(dxvk_present_frag); SpirvCodeBuffer fsCodeResolve(dxvk_present_frag_ms); SpirvCodeBuffer fsCodeResolveAmd(dxvk_present_frag_ms_amd); - + + const std::array fsBindings = {{ + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, BindingIds::Image, VK_IMAGE_VIEW_TYPE_2D, 0, VK_ACCESS_SHADER_READ_BIT }, + { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, BindingIds::Gamma, VK_IMAGE_VIEW_TYPE_2D, 0, VK_ACCESS_SHADER_READ_BIT }, + }}; + const std::array fsResourceSlots = {{ { BindingIds::Image, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_IMAGE_VIEW_TYPE_2D }, { BindingIds::Gamma, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_IMAGE_VIEW_TYPE_1D }, @@ -330,6 +335,8 @@ namespace dxvk { DxvkShaderCreateInfo fsInfo; fsInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT; + fsInfo.bindingCount = fsBindings.size(); + fsInfo.bindings = fsBindings.data(); fsInfo.resourceSlotCount = fsResourceSlots.size(); fsInfo.resourceSlots = fsResourceSlots.data(); fsInfo.pushConstSize = sizeof(PresenterArgs);