Cleanup for merge (note: disables spir-v)

This commit is contained in:
riperiperi 2022-03-09 22:40:05 +00:00
parent 6c09cfff4c
commit d45b28f6b7
6 changed files with 12 additions and 13 deletions

View file

@ -14,6 +14,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Resources
public ITexture Base; public ITexture Base;
public int Width => _info.Width; public int Width => _info.Width;
public int Height => _info.Height; public int Height => _info.Height;
public float ScaleFactor { get; } public float ScaleFactor { get; }

View file

@ -60,6 +60,6 @@ namespace Ryujinx.Graphics.Gpu
/// <summary> /// <summary>
/// Enables or disables shader SPIR-V compilation. /// Enables or disables shader SPIR-V compilation.
/// </summary> /// </summary>
public static bool EnableSpirvCompilation = true; public static bool EnableSpirvCompilation;
} }
} }

View file

@ -18,6 +18,7 @@ namespace Ryujinx.Graphics.Vulkan
protected readonly VulkanGraphicsDevice Gd; protected readonly VulkanGraphicsDevice Gd;
protected readonly Device Device; protected readonly Device Device;
public readonly PipelineCache PipelineCache;
private PipelineDynamicState _dynamicState; private PipelineDynamicState _dynamicState;
private PipelineState _newState; private PipelineState _newState;
@ -30,8 +31,6 @@ namespace Ryujinx.Graphics.Vulkan
protected PipelineBindPoint Pbp; protected PipelineBindPoint Pbp;
public PipelineCache _pipelineCache;
protected CommandBufferScoped Cbs; protected CommandBufferScoped Cbs;
protected CommandBufferScoped? PreloadCbs; protected CommandBufferScoped? PreloadCbs;
protected CommandBuffer CommandBuffer; protected CommandBuffer CommandBuffer;
@ -75,7 +74,7 @@ namespace Ryujinx.Graphics.Vulkan
SType = StructureType.PipelineCacheCreateInfo SType = StructureType.PipelineCacheCreateInfo
}; };
gd.Api.CreatePipelineCache(device, pipelineCacheCreateInfo, null, out _pipelineCache).ThrowOnError(); gd.Api.CreatePipelineCache(device, pipelineCacheCreateInfo, null, out PipelineCache).ThrowOnError();
_descriptorSetUpdater = new DescriptorSetUpdater(gd, this); _descriptorSetUpdater = new DescriptorSetUpdater(gd, this);
@ -1103,8 +1102,8 @@ namespace Ryujinx.Graphics.Vulkan
} }
var pipeline = pbp == PipelineBindPoint.Compute var pipeline = pbp == PipelineBindPoint.Compute
? _newState.CreateComputePipeline(Gd.Api, Device, _program, _pipelineCache) ? _newState.CreateComputePipeline(Gd.Api, Device, _program, PipelineCache)
: _newState.CreateGraphicsPipeline(Gd, Device, _program, _pipelineCache, _renderPass.Get(Cbs).Value); : _newState.CreateGraphicsPipeline(Gd, Device, _program, PipelineCache, _renderPass.Get(Cbs).Value);
ulong pipelineHandle = pipeline.GetUnsafe().Value.Handle; ulong pipelineHandle = pipeline.GetUnsafe().Value.Handle;
@ -1205,7 +1204,7 @@ namespace Ryujinx.Graphics.Vulkan
unsafe unsafe
{ {
Gd.Api.DestroyPipelineCache(Device, _pipelineCache, null); Gd.Api.DestroyPipelineCache(Device, PipelineCache, null);
} }
SupportBufferUpdater.Dispose(); SupportBufferUpdater.Dispose();

View file

@ -130,7 +130,7 @@ namespace Ryujinx.Graphics.Vulkan
} }
} }
public static unsafe PipelineState ToVulkanPipelineState(this ProgramPipelineState state, VulkanGraphicsDevice gd) public static PipelineState ToVulkanPipelineState(this ProgramPipelineState state, VulkanGraphicsDevice gd)
{ {
PipelineState pipeline = new PipelineState(); PipelineState pipeline = new PipelineState();
pipeline.Initialize(); pipeline.Initialize();

View file

@ -497,7 +497,6 @@ namespace Ryujinx.Graphics.Vulkan
var pipelineCreateInfo = new GraphicsPipelineCreateInfo() var pipelineCreateInfo = new GraphicsPipelineCreateInfo()
{ {
SType = StructureType.GraphicsPipelineCreateInfo, SType = StructureType.GraphicsPipelineCreateInfo,
Flags = 0,
StageCount = StagesCount, StageCount = StagesCount,
PStages = Stages.Pointer, PStages = Stages.Pointer,
PVertexInputState = &vertexInputState, PVertexInputState = &vertexInputState,

View file

@ -195,7 +195,7 @@ namespace Ryujinx.Graphics.Vulkan
return _dummyRenderPass = _state.ToRenderPass(_gd, _device); return _dummyRenderPass = _state.ToRenderPass(_gd, _device);
} }
public unsafe void CreateBackgroundComputePipeline() public void CreateBackgroundComputePipeline()
{ {
PipelineState pipeline = new PipelineState(); PipelineState pipeline = new PipelineState();
pipeline.Initialize(); pipeline.Initialize();
@ -203,10 +203,10 @@ namespace Ryujinx.Graphics.Vulkan
pipeline.Stages[0] = ((Shader)_shaders[0]).GetInfo(); pipeline.Stages[0] = ((Shader)_shaders[0]).GetInfo();
pipeline.StagesCount = 1; pipeline.StagesCount = 1;
pipeline.CreateComputePipeline(_gd.Api, _device, this, (_gd.Pipeline as PipelineBase)._pipelineCache); pipeline.CreateComputePipeline(_gd.Api, _device, this, (_gd.Pipeline as PipelineBase).PipelineCache);
} }
public unsafe void CreateBackgroundGraphicsPipeline() public void CreateBackgroundGraphicsPipeline()
{ {
// To compile shaders in the background in Vulkan, we need to create valid pipelines using the shader modules. // To compile shaders in the background in Vulkan, we need to create valid pipelines using the shader modules.
// The GPU provides pipeline state via the GAL that can be converted into our internal Vulkan pipeline state. // The GPU provides pipeline state via the GAL that can be converted into our internal Vulkan pipeline state.
@ -230,7 +230,7 @@ namespace Ryujinx.Graphics.Vulkan
pipeline.StagesCount = (uint)_shaders.Length; pipeline.StagesCount = (uint)_shaders.Length;
pipeline.PipelineLayout = PipelineLayout; pipeline.PipelineLayout = PipelineLayout;
pipeline.CreateGraphicsPipeline(_gd, _device, this, (_gd.Pipeline as PipelineBase)._pipelineCache, renderPass.Value); pipeline.CreateGraphicsPipeline(_gd, _device, this, (_gd.Pipeline as PipelineBase).PipelineCache, renderPass.Value);
} }
public ProgramLinkStatus CheckProgramLink(bool blocking) public ProgramLinkStatus CheckProgramLink(bool blocking)