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

@@ -7,6 +7,7 @@ using System;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Result = shaderc.Result;
namespace Ryujinx.Graphics.Vulkan
{
@@ -58,7 +59,7 @@ namespace Ryujinx.Graphics.Vulkan
fixed (byte* pCode = spirv)
{
var shaderModuleCreateInfo = new ShaderModuleCreateInfo
ShaderModuleCreateInfo shaderModuleCreateInfo = new ShaderModuleCreateInfo
{
SType = StructureType.ShaderModuleCreateInfo,
CodeSize = (uint)spirv.Length,
@@ -87,7 +88,7 @@ namespace Ryujinx.Graphics.Vulkan
options.SetTargetEnvironment(TargetEnvironment.Vulkan, EnvironmentVersion.Vulkan_1_2);
Compiler compiler = new(options);
var scr = compiler.Compile(glsl, "Ryu", GetShaderCShaderStage(stage));
Result scr = compiler.Compile(glsl, "Ryu", GetShaderCShaderStage(stage));
lock (_shaderOptionsLock)
{
@@ -101,7 +102,7 @@ namespace Ryujinx.Graphics.Vulkan
return null;
}
var spirvBytes = new Span<byte>((void*)scr.CodePointer, (int)scr.CodeLength);
Span<byte> spirvBytes = new Span<byte>((void*)scr.CodePointer, (int)scr.CodeLength);
byte[] code = new byte[(scr.CodeLength + 3) & ~3];