mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 00:23:36 +00:00
Check for transform feedback query support
Sometimes transform feedback is supported without the query type.
This commit is contained in:
parent
d4ccb6b895
commit
f636810c6c
3 changed files with 19 additions and 2 deletions
|
@ -7,6 +7,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
public bool SupportsConditionalRendering { get; }
|
||||
public bool SupportsExtendedDynamicState { get; }
|
||||
public bool SupportsTransformFeedback { get; }
|
||||
public bool SupportsTransformFeedbackQueries { get; }
|
||||
public bool SupportsGeometryShader { get; }
|
||||
public uint MinSubgroupSize { get; }
|
||||
public uint MaxSubgroupSize { get; }
|
||||
|
@ -16,6 +17,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
bool supportsConditionalRendering,
|
||||
bool supportsExtendedDynamicState,
|
||||
bool supportsTransformFeedback,
|
||||
bool supportsTransformFeedbackQueries,
|
||||
bool supportsGeometryShader,
|
||||
uint minSubgroupSize,
|
||||
uint maxSubgroupSize,
|
||||
|
@ -24,6 +26,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
SupportsConditionalRendering = supportsConditionalRendering;
|
||||
SupportsExtendedDynamicState = supportsExtendedDynamicState;
|
||||
SupportsTransformFeedback = supportsTransformFeedback;
|
||||
SupportsTransformFeedbackQueries = supportsTransformFeedbackQueries;
|
||||
SupportsGeometryShader = supportsGeometryShader;
|
||||
MinSubgroupSize = minSubgroupSize;
|
||||
MaxSubgroupSize = maxSubgroupSize;
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
|||
return type switch
|
||||
{
|
||||
CounterType.SamplesPassed => true,
|
||||
CounterType.TransformFeedbackPrimitivesWritten => gd.Capabilities.SupportsTransformFeedback,
|
||||
CounterType.TransformFeedbackPrimitivesWritten => gd.Capabilities.SupportsTransformFeedbackQueries,
|
||||
CounterType.PrimitivesGenerated => gd.Capabilities.SupportsGeometryShader,
|
||||
_ => false
|
||||
};
|
||||
|
|
|
@ -180,12 +180,26 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
properties2.PNext = &propertiesSubgroupSizeControl;
|
||||
}
|
||||
|
||||
bool supportsTransformFeedback = supportedExtensions.Contains(ExtTransformFeedback.ExtensionName);
|
||||
|
||||
PhysicalDeviceTransformFeedbackPropertiesEXT propertiesTransformFeedback = new PhysicalDeviceTransformFeedbackPropertiesEXT()
|
||||
{
|
||||
SType = StructureType.PhysicalDeviceTransformFeedbackPropertiesExt
|
||||
};
|
||||
|
||||
if (supportsTransformFeedback)
|
||||
{
|
||||
propertiesTransformFeedback.PNext = properties2.PNext;
|
||||
properties2.PNext = &propertiesTransformFeedback;
|
||||
}
|
||||
|
||||
Api.GetPhysicalDeviceProperties2(_physicalDevice, &properties2);
|
||||
|
||||
Capabilities = new HardwareCapabilities(
|
||||
supportedExtensions.Contains(ExtConditionalRendering.ExtensionName),
|
||||
supportedExtensions.Contains(ExtExtendedDynamicState.ExtensionName),
|
||||
supportedExtensions.Contains(ExtTransformFeedback.ExtensionName),
|
||||
supportsTransformFeedback,
|
||||
propertiesTransformFeedback.TransformFeedbackQueries,
|
||||
supportedFeatures.GeometryShader,
|
||||
propertiesSubgroupSizeControl.MinSubgroupSize,
|
||||
propertiesSubgroupSizeControl.MaxSubgroupSize,
|
||||
|
|
Loading…
Reference in a new issue