0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Graphics.Shader/IGpuAccessor.cs
gdkchan 99445dd0a6
Add support for fragment shader interlock (#2768)
* Support coherent images

* Add support for fragment shader interlock

* Change to tree based match approach

* Refactor + check for branch targets and external registers

* Make detection more robust

* Use Intel fragment shader ordering if interlock is not available, use nothing if both are not available

* Remove unused field
2021-10-28 19:53:12 -03:00

134 lines
2.5 KiB
C#

using System;
namespace Ryujinx.Graphics.Shader
{
public interface IGpuAccessor
{
void Log(string message)
{
// No default log output.
}
uint ConstantBuffer1Read(int offset)
{
return 0;
}
ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize);
int QueryComputeLocalSizeX()
{
return 1;
}
int QueryComputeLocalSizeY()
{
return 1;
}
int QueryComputeLocalSizeZ()
{
return 1;
}
int QueryComputeLocalMemorySize()
{
return 0x1000;
}
int QueryComputeSharedMemorySize()
{
return 0xc000;
}
uint QueryConstantBufferUse()
{
return 0;
}
bool QueryHostHasFrontFacingBug()
{
return false;
}
bool QueryHostHasVectorIndexingBug()
{
return false;
}
int QueryHostStorageBufferOffsetAlignment()
{
return 16;
}
bool QueryHostSupportsFragmentShaderInterlock()
{
return true;
}
bool QueryHostSupportsFragmentShaderOrderingIntel()
{
return false;
}
bool QueryHostSupportsImageLoadFormatted()
{
return true;
}
bool QueryHostSupportsNonConstantTextureOffset()
{
return true;
}
bool QueryHostSupportsShaderBallot()
{
return true;
}
bool QueryHostSupportsTextureShadowLod()
{
return true;
}
SamplerType QuerySamplerType(int handle, int cbufSlot = -1)
{
return SamplerType.Texture2D;
}
bool QueryIsTextureRectangle(int handle, int cbufSlot = -1)
{
return false;
}
InputTopology QueryPrimitiveTopology()
{
return InputTopology.Points;
}
bool QueryTessCw()
{
return false;
}
TessPatchType QueryTessPatchType()
{
return TessPatchType.Triangles;
}
TessSpacing QueryTessSpacing()
{
return TessSpacing.EqualSpacing;
}
TextureFormat QueryTextureFormat(int handle, int cbufSlot = -1)
{
return TextureFormat.R8G8B8A8Unorm;
}
bool QueryEarlyZForce()
{
return false;
}
}
}