1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-27 12:16:02 +00:00

More comments and formatting fixes

This commit is contained in:
sunshineinabox 2024-05-18 15:22:23 -07:00
parent 6345786ea5
commit 24467c3dcf
3 changed files with 13 additions and 12 deletions

View file

@ -92,7 +92,7 @@ namespace Ryujinx.Graphics.Vulkan
private const float Epsilon = 1e-6f; private const float Epsilon = 1e-6f;
private bool FloatCompare(float a, float b) private readonly bool FloatCompare(float a, float b)
{ {
return Math.Abs(a - b) < Epsilon; return Math.Abs(a - b) < Epsilon;
} }
@ -465,7 +465,7 @@ namespace Ryujinx.Graphics.Vulkan
api.CmdSetBlendConstants(commandBuffer, _blendConstants.AsSpan()); api.CmdSetBlendConstants(commandBuffer, _blendConstants.AsSpan());
} }
private void RecordDepthBias(VulkanRenderer gd, CommandBuffer commandBuffer) private readonly void RecordDepthBias(VulkanRenderer gd, CommandBuffer commandBuffer)
{ {
gd.Api.CmdSetDepthBias(commandBuffer, _depthBiasConstantFactor, _depthBiasClamp, _depthBiasSlopeFactor); gd.Api.CmdSetDepthBias(commandBuffer, _depthBiasConstantFactor, _depthBiasClamp, _depthBiasSlopeFactor);

View file

@ -490,6 +490,7 @@ namespace Ryujinx.Graphics.Vulkan
if (isMoltenVk) if (isMoltenVk)
{ {
//When widelines feature is not supported it must be 1.0f per spec.
rasterizationState.LineWidth = 1.0f; rasterizationState.LineWidth = 1.0f;
} }
@ -699,7 +700,7 @@ namespace Ryujinx.Graphics.Vulkan
{ {
if (!isMoltenVk) if (!isMoltenVk)
{ {
//Requires Metal 3.1 //Requires Metal 3.1 and new MoltenVK
dynamicStates[currentIndex++] = DynamicState.VertexInputBindingStrideExt; dynamicStates[currentIndex++] = DynamicState.VertexInputBindingStrideExt;
} }
dynamicStates[currentIndex++] = DynamicState.CullModeExt; dynamicStates[currentIndex++] = DynamicState.CullModeExt;