mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 19:13:04 +00:00
There will still be an issue with extension is supported and dynmaic state is not
This commit is contained in:
parent
09b8095584
commit
5e86d5e178
4 changed files with 13 additions and 11 deletions
|
@ -134,7 +134,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
_supportExtDynamic2 = gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2;
|
_supportExtDynamic2 = gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2;
|
||||||
|
|
||||||
_newState.Initialize(_supportExtDynamic, gd.Capabilities.SupportsExtendedDynamicState2);
|
_newState.Initialize(gd.Capabilities);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
|
|
|
@ -159,7 +159,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
var extendedDynamicState = gd.Capabilities.SupportsExtendedDynamicState;
|
var extendedDynamicState = gd.Capabilities.SupportsExtendedDynamicState;
|
||||||
|
|
||||||
PipelineState pipeline = new();
|
PipelineState pipeline = new();
|
||||||
pipeline.Initialize(extendedDynamicState, extendedDynamicState2);
|
pipeline.Initialize(gd.Capabilities);
|
||||||
|
|
||||||
// It is assumed that Dynamic State is enabled when this conversion is used.
|
// It is assumed that Dynamic State is enabled when this conversion is used.
|
||||||
pipeline.DepthBoundsTestEnable = false; // Not implemented.
|
pipeline.DepthBoundsTestEnable = false; // Not implemented.
|
||||||
|
|
|
@ -255,10 +255,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
private bool _supportsExtDynamicState;
|
private bool _supportsExtDynamicState;
|
||||||
private PhysicalDeviceExtendedDynamicState2FeaturesEXT _supportsExtDynamicState2;
|
private PhysicalDeviceExtendedDynamicState2FeaturesEXT _supportsExtDynamicState2;
|
||||||
|
private bool _supportsFeedBackLoopDynamicState;
|
||||||
|
|
||||||
|
|
||||||
public void Initialize(bool supportsExtDynamicState,
|
public void Initialize(HardwareCapabilities capabilities)
|
||||||
PhysicalDeviceExtendedDynamicState2FeaturesEXT extendedDynamicState2)
|
|
||||||
{
|
{
|
||||||
HasTessellationControlShader = false;
|
HasTessellationControlShader = false;
|
||||||
Stages = new NativeArray<PipelineShaderStageCreateInfo>(Constants.MaxShaderStages);
|
Stages = new NativeArray<PipelineShaderStageCreateInfo>(Constants.MaxShaderStages);
|
||||||
|
@ -273,10 +273,14 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
PolygonMode = PolygonMode.Fill;
|
PolygonMode = PolygonMode.Fill;
|
||||||
DepthBoundsTestEnable = false;
|
DepthBoundsTestEnable = false;
|
||||||
|
|
||||||
FeedbackLoopAspects = FeedbackLoopAspects.None;
|
_supportsExtDynamicState = capabilities.SupportsExtendedDynamicState;
|
||||||
|
_supportsExtDynamicState2 = capabilities.SupportsExtendedDynamicState2;
|
||||||
|
_supportsFeedBackLoopDynamicState = capabilities.SupportsDynamicAttachmentFeedbackLoop;
|
||||||
|
|
||||||
_supportsExtDynamicState = supportsExtDynamicState;
|
if (_supportsFeedBackLoopDynamicState || !capabilities.SupportsAttachmentFeedbackLoop)
|
||||||
_supportsExtDynamicState2 = extendedDynamicState2;
|
{
|
||||||
|
FeedbackLoopAspects = FeedbackLoopAspects.None;
|
||||||
|
}
|
||||||
|
|
||||||
if (_supportsExtDynamicState)
|
if (_supportsExtDynamicState)
|
||||||
{
|
{
|
||||||
|
@ -577,8 +581,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
colorBlendState.PNext = &colorBlendAdvancedState;
|
colorBlendState.PNext = &colorBlendAdvancedState;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool supportsFeedbackLoopDynamicState = gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop;
|
|
||||||
|
|
||||||
DynamicState* dynamicStates = stackalloc DynamicState[MaxDynamicStatesCount];
|
DynamicState* dynamicStates = stackalloc DynamicState[MaxDynamicStatesCount];
|
||||||
|
|
||||||
uint dynamicStatesCount = 7;
|
uint dynamicStatesCount = 7;
|
||||||
|
@ -633,7 +635,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportsFeedbackLoopDynamicState)
|
if (_supportsFeedBackLoopDynamicState)
|
||||||
{
|
{
|
||||||
dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt;
|
dynamicStates[dynamicStatesCount++] = DynamicState.AttachmentFeedbackLoopEnableExt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,7 +531,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
public void CreateBackgroundComputePipeline()
|
public void CreateBackgroundComputePipeline()
|
||||||
{
|
{
|
||||||
PipelineState pipeline = new();
|
PipelineState pipeline = new();
|
||||||
pipeline.Initialize(_gd.Capabilities.SupportsExtendedDynamicState, _gd.Capabilities.SupportsExtendedDynamicState2);
|
pipeline.Initialize(_gd.Capabilities);
|
||||||
|
|
||||||
pipeline.Stages[0] = _shaders[0].GetInfo();
|
pipeline.Stages[0] = _shaders[0].GetInfo();
|
||||||
pipeline.StagesCount = 1;
|
pipeline.StagesCount = 1;
|
||||||
|
|
Loading…
Reference in a new issue