From 5626f2ca1c49342b20772224f956147df6957b5a Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 21 May 2023 14:04:21 -0300 Subject: Replace ShaderBindings with new ResourceLayout structure for Vulkan (#5025) * Introduce ResourceLayout * Part 1: Use new ResourceSegments array on UpdateAndBind * Part 2: Use ResourceLayout to build PipelineLayout * Delete old code * XML docs * Fix shader cache load NRE * Fix typo --- src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs') diff --git a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index e4ce4904..ffa1a103 100644 --- a/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/src/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -10,7 +10,6 @@ using Silk.NET.Vulkan.Extensions.EXT; using Silk.NET.Vulkan.Extensions.KHR; using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; namespace Ryujinx.Graphics.Vulkan @@ -398,17 +397,17 @@ namespace Ryujinx.Graphics.Vulkan if (info.State.HasValue || isCompute) { - return new ShaderCollection(this, _device, sources, info.State ?? default, info.FromCache); + return new ShaderCollection(this, _device, sources, info.ResourceLayout, info.State ?? default, info.FromCache); } else { - return new ShaderCollection(this, _device, sources); + return new ShaderCollection(this, _device, sources, info.ResourceLayout); } } - internal ShaderCollection CreateProgramWithMinimalLayout(ShaderSource[] sources, SpecDescription[] specDescription = null) + internal ShaderCollection CreateProgramWithMinimalLayout(ShaderSource[] sources, ResourceLayout resourceLayout, SpecDescription[] specDescription = null) { - return new ShaderCollection(this, _device, sources, specDescription: specDescription, isMinimal: true); + return new ShaderCollection(this, _device, sources, resourceLayout, specDescription, isMinimal: true); } public ISampler CreateSampler(GAL.SamplerCreateInfo info) @@ -658,7 +657,7 @@ namespace Ryujinx.Graphics.Vulkan Logger.Notice.Print(LogClass.Gpu, $"{GpuVendor} {GpuRenderer} ({GpuVersion})"); } - public GAL.PrimitiveTopology TopologyRemap(GAL.PrimitiveTopology topology) + internal GAL.PrimitiveTopology TopologyRemap(GAL.PrimitiveTopology topology) { return topology switch { @@ -669,7 +668,7 @@ namespace Ryujinx.Graphics.Vulkan }; } - public bool TopologyUnsupported(GAL.PrimitiveTopology topology) + internal bool TopologyUnsupported(GAL.PrimitiveTopology topology) { return topology switch { -- cgit v1.2.3