mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-30 02:06:25 +02:00
misc: chore: Use explicit types in Vulkan project
This commit is contained in:
parent
e6b393e420
commit
2d1a4c3ce5
58 changed files with 682 additions and 667 deletions
|
@ -96,11 +96,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public bool BufferFormatSupports(FormatFeatureFlags flags, Format format)
|
||||
{
|
||||
var formatFeatureFlags = _bufferTable[(int)format];
|
||||
FormatFeatureFlags formatFeatureFlags = _bufferTable[(int)format];
|
||||
|
||||
if (formatFeatureFlags == 0)
|
||||
{
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, FormatTable.GetFormat(format), out var fp);
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, FormatTable.GetFormat(format), out FormatProperties fp);
|
||||
formatFeatureFlags = fp.BufferFeatures;
|
||||
_bufferTable[(int)format] = formatFeatureFlags;
|
||||
}
|
||||
|
@ -129,18 +129,18 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public bool BufferFormatSupports(FormatFeatureFlags flags, VkFormat format)
|
||||
{
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, format, out var fp);
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, format, out FormatProperties fp);
|
||||
|
||||
return (fp.BufferFeatures & flags) == flags;
|
||||
}
|
||||
|
||||
public bool OptimalFormatSupports(FormatFeatureFlags flags, Format format)
|
||||
{
|
||||
var formatFeatureFlags = _optimalTable[(int)format];
|
||||
FormatFeatureFlags formatFeatureFlags = _optimalTable[(int)format];
|
||||
|
||||
if (formatFeatureFlags == 0)
|
||||
{
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, FormatTable.GetFormat(format), out var fp);
|
||||
_api.GetPhysicalDeviceFormatProperties(_physicalDevice, FormatTable.GetFormat(format), out FormatProperties fp);
|
||||
formatFeatureFlags = fp.OptimalTilingFeatures;
|
||||
_optimalTable[(int)format] = formatFeatureFlags;
|
||||
}
|
||||
|
@ -150,11 +150,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public VkFormat ConvertToVkFormat(Format srcFormat, bool storageFeatureFlagRequired)
|
||||
{
|
||||
var format = FormatTable.GetFormat(srcFormat);
|
||||
VkFormat format = FormatTable.GetFormat(srcFormat);
|
||||
|
||||
var requiredFeatures = FormatFeatureFlags.SampledImageBit |
|
||||
FormatFeatureFlags.TransferSrcBit |
|
||||
FormatFeatureFlags.TransferDstBit;
|
||||
FormatFeatureFlags requiredFeatures = FormatFeatureFlags.SampledImageBit |
|
||||
FormatFeatureFlags.TransferSrcBit |
|
||||
FormatFeatureFlags.TransferDstBit;
|
||||
|
||||
if (srcFormat.IsDepthOrStencil())
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
public VkFormat ConvertToVertexVkFormat(Format srcFormat)
|
||||
{
|
||||
var format = FormatTable.GetFormat(srcFormat);
|
||||
VkFormat format = FormatTable.GetFormat(srcFormat);
|
||||
|
||||
if (!BufferFormatSupports(FormatFeatureFlags.VertexBufferBit, srcFormat) ||
|
||||
(IsRGB16IntFloat(srcFormat) && VulkanConfiguration.ForceRGB16IntFloatUnsupported))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue