Skip to content

Commit

Permalink
Change query capability check to check for pipeline statistics query …
Browse files Browse the repository at this point in the history
…rather than geometry shader support
  • Loading branch information
gdkchan committed Jan 23, 2023
1 parent 15eed67 commit fa782bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Ryujinx.Graphics.Vulkan/HardwareCapabilities.cs
Expand Up @@ -31,6 +31,7 @@ enum PortabilitySubsetFlags
public readonly bool SupportsPushDescriptors;
public readonly bool SupportsTransformFeedback;
public readonly bool SupportsTransformFeedbackQueries;
public readonly bool SupportsPipelineStatisticsQuery;
public readonly bool SupportsGeometryShader;
public readonly uint MinSubgroupSize;
public readonly uint MaxSubgroupSize;
Expand All @@ -53,6 +54,7 @@ enum PortabilitySubsetFlags
bool supportsPushDescriptors,
bool supportsTransformFeedback,
bool supportsTransformFeedbackQueries,
bool supportsPipelineStatisticsQuery,
bool supportsGeometryShader,
uint minSubgroupSize,
uint maxSubgroupSize,
Expand All @@ -74,6 +76,7 @@ enum PortabilitySubsetFlags
SupportsPushDescriptors = supportsPushDescriptors;
SupportsTransformFeedback = supportsTransformFeedback;
SupportsTransformFeedbackQueries = supportsTransformFeedbackQueries;
SupportsPipelineStatisticsQuery = supportsPipelineStatisticsQuery;
SupportsGeometryShader = supportsGeometryShader;
MinSubgroupSize = minSubgroupSize;
MaxSubgroupSize = maxSubgroupSize;
Expand Down
2 changes: 1 addition & 1 deletion Ryujinx.Graphics.Vulkan/Queries/BufferedQuery.cs
Expand Up @@ -67,8 +67,8 @@ private bool QueryTypeSupported(VulkanRenderer gd, CounterType type)
return type switch
{
CounterType.SamplesPassed => true,
CounterType.PrimitivesGenerated => gd.Capabilities.SupportsPipelineStatisticsQuery,
CounterType.TransformFeedbackPrimitivesWritten => gd.Capabilities.SupportsTransformFeedbackQueries,
CounterType.PrimitivesGenerated => gd.Capabilities.SupportsGeometryShader,
_ => false
};
}
Expand Down
5 changes: 3 additions & 2 deletions Ryujinx.Graphics.Vulkan/VulkanRenderer.cs
Expand Up @@ -270,6 +270,7 @@ private unsafe void LoadFeatures(string[] supportedExtensions, uint maxQueueCoun
supportedExtensions.Contains(KhrPushDescriptor.ExtensionName),
supportsTransformFeedback,
propertiesTransformFeedback.TransformFeedbackQueries,
supportedFeatures.PipelineStatisticsQuery,
supportedFeatures.GeometryShader,
propertiesSubgroupSizeControl.MinSubgroupSize,
propertiesSubgroupSizeControl.MaxSubgroupSize,
Expand Down Expand Up @@ -588,8 +589,8 @@ private unsafe void PrintGpuInformation()

Vendor = VendorUtils.FromId(properties.VendorID);

IsAmdWindows = Vendor == Vendor.Amd && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
IsIntelWindows = Vendor == Vendor.Intel && RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
IsAmdWindows = Vendor == Vendor.Amd && OperatingSystem.IsWindows();
IsIntelWindows = Vendor == Vendor.Intel && OperatingSystem.IsWindows();
IsTBDR = IsMoltenVk ||
Vendor == Vendor.Qualcomm ||
Vendor == Vendor.ARM ||
Expand Down

0 comments on commit fa782bf

Please sign in to comment.