misc: chore: Use explicit types in Vulkan project

This commit is contained in:
Evan Husted
2025-01-25 14:12:17 -06:00
parent e6b393e420
commit 2d1a4c3ce5
58 changed files with 682 additions and 667 deletions

View File

@@ -47,14 +47,14 @@ namespace Ryujinx.Graphics.Vulkan
AttachmentDescription[] attachmentDescs = null;
var subpass = new SubpassDescription
SubpassDescription subpass = new SubpassDescription
{
PipelineBindPoint = PipelineBindPoint.Graphics,
};
AttachmentReference* attachmentReferences = stackalloc AttachmentReference[MaxAttachments];
var hasFramebuffer = fb != null;
bool hasFramebuffer = fb != null;
if (hasFramebuffer && fb.AttachmentsCount != 0)
{
@@ -110,11 +110,11 @@ namespace Ryujinx.Graphics.Vulkan
}
}
var subpassDependency = PipelineConverter.CreateSubpassDependency(gd);
SubpassDependency subpassDependency = PipelineConverter.CreateSubpassDependency(gd);
fixed (AttachmentDescription* pAttachmentDescs = attachmentDescs)
{
var renderPassCreateInfo = new RenderPassCreateInfo
RenderPassCreateInfo renderPassCreateInfo = new RenderPassCreateInfo
{
SType = StructureType.RenderPassCreateInfo,
PAttachments = pAttachmentDescs,
@@ -125,7 +125,7 @@ namespace Ryujinx.Graphics.Vulkan
DependencyCount = 1,
};
gd.Api.CreateRenderPass(device, in renderPassCreateInfo, null, out var renderPass).ThrowOnError();
gd.Api.CreateRenderPass(device, in renderPassCreateInfo, null, out RenderPass renderPass).ThrowOnError();
_renderPass = new Auto<DisposableRenderPass>(new DisposableRenderPass(gd.Api, device, renderPass));
}
@@ -134,9 +134,9 @@ namespace Ryujinx.Graphics.Vulkan
// Register this render pass with all render target views.
var textures = fb.GetAttachmentViews();
TextureView[] textures = fb.GetAttachmentViews();
foreach (var texture in textures)
foreach (TextureView texture in textures)
{
texture.AddRenderPass(key, this);
}
@@ -149,7 +149,7 @@ namespace Ryujinx.Graphics.Vulkan
public Auto<DisposableFramebuffer> GetFramebuffer(VulkanRenderer gd, CommandBufferScoped cbs, FramebufferParams fb)
{
var key = new FramebufferCacheKey(fb.Width, fb.Height, fb.Layers);
FramebufferCacheKey key = new FramebufferCacheKey(fb.Width, fb.Height, fb.Layers);
if (!_framebuffers.TryGetValue(ref key, out Auto<DisposableFramebuffer> result))
{
@@ -201,14 +201,14 @@ namespace Ryujinx.Graphics.Vulkan
{
// Dispose all framebuffers.
foreach (var fb in _framebuffers.Values)
foreach (Auto<DisposableFramebuffer> fb in _framebuffers.Values)
{
fb.Dispose();
}
// Notify all texture views that this render pass has been disposed.
foreach (var texture in _textures)
foreach (TextureView texture in _textures)
{
texture.RemoveRenderPass(_key);
}