aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/VulkanInitialization.cs')
-rw-r--r--Ryujinx.Graphics.Vulkan/VulkanInitialization.cs64
1 files changed, 45 insertions, 19 deletions
diff --git a/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs b/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
index fe9462aa..d9dcc0b2 100644
--- a/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
+++ b/Ryujinx.Graphics.Vulkan/VulkanInitialization.cs
@@ -162,7 +162,6 @@ namespace Ryujinx.Graphics.Vulkan
if (messageSeverity.HasFlag(DebugUtilsMessageSeverityFlagsEXT.ErrorBitExt))
{
Logger.Error?.Print(LogClass.Gpu, msg);
- //throw new Exception(msg);
}
else if (messageSeverity.HasFlag(DebugUtilsMessageSeverityFlagsEXT.WarningBitExt))
{
@@ -379,14 +378,34 @@ namespace Ryujinx.Graphics.Vulkan
SType = StructureType.PhysicalDeviceFeatures2
};
- PhysicalDeviceCustomBorderColorFeaturesEXT featuresCustomBorderColorSupported = new PhysicalDeviceCustomBorderColorFeaturesEXT()
+ PhysicalDeviceVulkan11Features supportedFeaturesVk11 = new PhysicalDeviceVulkan11Features()
{
- SType = StructureType.PhysicalDeviceCustomBorderColorFeaturesExt
+ SType = StructureType.PhysicalDeviceVulkan11Features,
+ PNext = features2.PNext
+ };
+
+ features2.PNext = &supportedFeaturesVk11;
+
+ PhysicalDeviceCustomBorderColorFeaturesEXT supportedFeaturesCustomBorderColor = new PhysicalDeviceCustomBorderColorFeaturesEXT()
+ {
+ SType = StructureType.PhysicalDeviceCustomBorderColorFeaturesExt,
+ PNext = features2.PNext
};
if (supportedExtensions.Contains("VK_EXT_custom_border_color"))
{
- features2.PNext = &featuresCustomBorderColorSupported;
+ features2.PNext = &supportedFeaturesCustomBorderColor;
+ }
+
+ PhysicalDeviceTransformFeedbackFeaturesEXT supportedFeaturesTransformFeedback = new PhysicalDeviceTransformFeedbackFeaturesEXT()
+ {
+ SType = StructureType.PhysicalDeviceTransformFeedbackFeaturesExt,
+ PNext = features2.PNext
+ };
+
+ if (supportedExtensions.Contains(ExtTransformFeedback.ExtensionName))
+ {
+ features2.PNext = &supportedFeaturesTransformFeedback;
}
PhysicalDeviceRobustness2FeaturesEXT supportedFeaturesRobustness2 = new PhysicalDeviceRobustness2FeaturesEXT()
@@ -408,41 +427,48 @@ namespace Ryujinx.Graphics.Vulkan
var features = new PhysicalDeviceFeatures()
{
DepthBiasClamp = true,
- DepthClamp = true,
- DualSrcBlend = true,
+ DepthClamp = supportedFeatures.DepthClamp,
+ DualSrcBlend = supportedFeatures.DualSrcBlend,
FragmentStoresAndAtomics = true,
GeometryShader = supportedFeatures.GeometryShader,
ImageCubeArray = true,
IndependentBlend = true,
LogicOp = supportedFeatures.LogicOp,
- MultiViewport = true,
+ MultiViewport = supportedFeatures.MultiViewport,
PipelineStatisticsQuery = supportedFeatures.PipelineStatisticsQuery,
SamplerAnisotropy = true,
ShaderClipDistance = true,
ShaderFloat64 = supportedFeatures.ShaderFloat64,
- ShaderImageGatherExtended = true,
+ ShaderImageGatherExtended = supportedFeatures.ShaderImageGatherExtended,
ShaderStorageImageMultisample = supportedFeatures.ShaderStorageImageMultisample,
// ShaderStorageImageReadWithoutFormat = true,
// ShaderStorageImageWriteWithoutFormat = true,
- TessellationShader = true,
+ TessellationShader = supportedFeatures.TessellationShader,
VertexPipelineStoresAndAtomics = true,
RobustBufferAccess = useRobustBufferAccess
};
void* pExtendedFeatures = null;
- var featuresTransformFeedback = new PhysicalDeviceTransformFeedbackFeaturesEXT()
+ PhysicalDeviceTransformFeedbackFeaturesEXT featuresTransformFeedback;
+
+ if (supportedExtensions.Contains(ExtTransformFeedback.ExtensionName))
{
- SType = StructureType.PhysicalDeviceTransformFeedbackFeaturesExt,
- PNext = pExtendedFeatures,
- TransformFeedback = true
- };
+ featuresTransformFeedback = new PhysicalDeviceTransformFeedbackFeaturesEXT()
+ {
+ SType = StructureType.PhysicalDeviceTransformFeedbackFeaturesExt,
+ PNext = pExtendedFeatures,
+ TransformFeedback = supportedFeaturesTransformFeedback.TransformFeedback
+ };
+
+ pExtendedFeatures = &featuresTransformFeedback;
+ }
- pExtendedFeatures = &featuresTransformFeedback;
+ PhysicalDeviceRobustness2FeaturesEXT featuresRobustness2;
if (supportedExtensions.Contains("VK_EXT_robustness2"))
{
- var featuresRobustness2 = new PhysicalDeviceRobustness2FeaturesEXT()
+ featuresRobustness2 = new PhysicalDeviceRobustness2FeaturesEXT()
{
SType = StructureType.PhysicalDeviceRobustness2FeaturesExt,
PNext = pExtendedFeatures,
@@ -465,7 +491,7 @@ namespace Ryujinx.Graphics.Vulkan
{
SType = StructureType.PhysicalDeviceVulkan11Features,
PNext = pExtendedFeatures,
- ShaderDrawParameters = true
+ ShaderDrawParameters = supportedFeaturesVk11.ShaderDrawParameters
};
pExtendedFeatures = &featuresVk11;
@@ -526,8 +552,8 @@ namespace Ryujinx.Graphics.Vulkan
PhysicalDeviceCustomBorderColorFeaturesEXT featuresCustomBorderColor;
if (supportedExtensions.Contains("VK_EXT_custom_border_color") &&
- featuresCustomBorderColorSupported.CustomBorderColors &&
- featuresCustomBorderColorSupported.CustomBorderColorWithoutFormat)
+ supportedFeaturesCustomBorderColor.CustomBorderColors &&
+ supportedFeaturesCustomBorderColor.CustomBorderColorWithoutFormat)
{
featuresCustomBorderColor = new PhysicalDeviceCustomBorderColorFeaturesEXT()
{