mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-11 01:37:01 +00:00
Compare commits
3 commits
c4defd46aa
...
6c7b448168
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c7b448168 | ||
|
|
3a593b6084 | ||
|
|
af7d4c586c |
8 changed files with 30 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -100,6 +100,7 @@ DocProject/Help/html
|
|||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
RyubingMaintainerTools/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ namespace Ryujinx.Graphics.GAL
|
|||
|
||||
public readonly bool HasFrontFacingBug;
|
||||
public readonly bool HasVectorIndexingBug;
|
||||
public readonly bool HasClipDistanceInitBug;
|
||||
public readonly bool NeedsFragmentOutputSpecialization;
|
||||
public readonly bool ReduceShaderPrecision;
|
||||
|
||||
|
|
@ -79,6 +80,7 @@ namespace Ryujinx.Graphics.GAL
|
|||
SystemMemoryType memoryType,
|
||||
bool hasFrontFacingBug,
|
||||
bool hasVectorIndexingBug,
|
||||
bool hasClipDistanceInitBug,
|
||||
bool needsFragmentOutputSpecialization,
|
||||
bool reduceShaderPrecision,
|
||||
bool supportsAstcCompression,
|
||||
|
|
@ -141,6 +143,7 @@ namespace Ryujinx.Graphics.GAL
|
|||
MemoryType = memoryType;
|
||||
HasFrontFacingBug = hasFrontFacingBug;
|
||||
HasVectorIndexingBug = hasVectorIndexingBug;
|
||||
HasClipDistanceInitBug = hasClipDistanceInitBug;
|
||||
NeedsFragmentOutputSpecialization = needsFragmentOutputSpecialization;
|
||||
ReduceShaderPrecision = reduceShaderPrecision;
|
||||
SupportsAstcCompression = supportsAstcCompression;
|
||||
|
|
|
|||
|
|
@ -201,6 +201,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||
|
||||
public bool QueryHostHasVectorIndexingBug() => _context.Capabilities.HasVectorIndexingBug;
|
||||
|
||||
public bool QueryHostHasClipDistanceInitBug() => _context.Capabilities.HasClipDistanceInitBug;
|
||||
|
||||
public int QueryHostStorageBufferOffsetAlignment() => _context.Capabilities.StorageBufferOffsetAlignment;
|
||||
|
||||
public int QueryHostSubgroupSize() => _context.Capabilities.ShaderSubgroupSize;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
memoryType: SystemMemoryType.BackendManaged,
|
||||
hasFrontFacingBug: intelWindows,
|
||||
hasVectorIndexingBug: amdWindows,
|
||||
hasClipDistanceInitBug: false,
|
||||
needsFragmentOutputSpecialization: false,
|
||||
reduceShaderPrecision: false,
|
||||
supportsAstcCompression: HwCapabilities.SupportsAstcCompression,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,15 @@ namespace Ryujinx.Graphics.Shader
|
|||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queries host about the presence of the clip distance initialization bug.
|
||||
/// </summary>
|
||||
/// <returns>True if the bug is present on the host device used, false otherwise</returns>
|
||||
bool QueryHostHasClipDistanceInitBug()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Queries host storage buffer alignment required.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -259,11 +259,14 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
context.Store(StorageKind.Output, IoVariable.Position, null, Const(c), ConstF(c == 3 ? 1f : 0f));
|
||||
}
|
||||
|
||||
if (context.Program.ClipDistancesWritten != 0)
|
||||
if (!context.TranslatorContext.GpuAccessor.QueryHostHasClipDistanceInitBug())
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
if (context.Program.ClipDistancesWritten != 0)
|
||||
{
|
||||
context.Store(StorageKind.Output, IoVariable.ClipDistance, null, Const(i), ConstF(0f));
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
context.Store(StorageKind.Output, IoVariable.ClipDistance, null, Const(i), ConstF(0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -744,6 +744,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
memoryType: memoryType,
|
||||
hasFrontFacingBug: IsIntelWindows,
|
||||
hasVectorIndexingBug: IsQualcommProprietary,
|
||||
hasClipDistanceInitBug: IsMoltenVk,
|
||||
needsFragmentOutputSpecialization: IsMoltenVk,
|
||||
reduceShaderPrecision: IsMoltenVk,
|
||||
supportsAstcCompression: features2.Features.TextureCompressionAstcLdr && supportsAstcFormats,
|
||||
|
|
|
|||
|
|
@ -529,7 +529,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
// The value is decremented if the number of threads waiting is less
|
||||
// or equal to the Count of threads to be signaled, or Count is zero
|
||||
// or negative. It is incremented if there are no threads waiting.
|
||||
int waitingCount = _arbiterThreads[address].Count;
|
||||
int waitingCount = 0;
|
||||
|
||||
if (_arbiterThreads.TryGetValue(address, out List<KThread> threads))
|
||||
{
|
||||
waitingCount = threads.Count;
|
||||
}
|
||||
|
||||
|
||||
if (waitingCount > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue