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
This commit is contained in:
parent
402f05b8ef
commit
5626f2ca1c
24 changed files with 1047 additions and 677 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue