2021-10-12 16:35:31 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Shader
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
public interface IGpuAccessor
|
|
|
|
|
{
|
2020-11-08 06:10:00 -05:00
|
|
|
|
void Log(string message)
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
// No default log output.
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 14:59:42 -04:00
|
|
|
|
uint ConstantBuffer1Read(int offset)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-12 16:35:31 -04:00
|
|
|
|
ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize);
|
2020-10-03 01:43:33 -04:00
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
int QueryComputeLocalSizeX()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
int QueryComputeLocalSizeY()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
int QueryComputeLocalSizeZ()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
int QueryComputeLocalMemorySize()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return 0x1000;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
int QueryComputeSharedMemorySize()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return 0xc000;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-08 06:10:00 -05:00
|
|
|
|
uint QueryConstantBufferUse()
|
2020-10-12 20:40:50 -04:00
|
|
|
|
{
|
2021-05-20 14:12:15 -04:00
|
|
|
|
return 0;
|
2020-10-12 20:40:50 -04:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
bool QueryHostHasFrontFacingBug()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
bool QueryHostHasVectorIndexingBug()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
int QueryHostStorageBufferOffsetAlignment()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
2021-08-11 17:01:06 -04:00
|
|
|
|
return 16;
|
2020-05-05 21:02:28 -04:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-20 06:37:21 -05:00
|
|
|
|
bool QueryHostSupportsBgraFormat()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-28 18:53:12 -04:00
|
|
|
|
bool QueryHostSupportsFragmentShaderInterlock()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool QueryHostSupportsFragmentShaderOrderingIntel()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
bool QueryHostSupportsImageLoadFormatted()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
2021-08-11 17:01:06 -04:00
|
|
|
|
return true;
|
2020-05-05 21:02:28 -04:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
bool QueryHostSupportsNonConstantTextureOffset()
|
2020-05-27 05:00:21 -04:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-19 08:38:39 -04:00
|
|
|
|
bool QueryHostSupportsShaderBallot()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-11 17:01:06 -04:00
|
|
|
|
bool QueryHostSupportsTextureShadowLod()
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2021-09-01 23:17:43 -04:00
|
|
|
|
SamplerType QuerySamplerType(int handle, int cbufSlot = -1)
|
2021-06-24 18:54:50 -04:00
|
|
|
|
{
|
2021-09-01 23:17:43 -04:00
|
|
|
|
return SamplerType.Texture2D;
|
2021-08-11 17:01:06 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool QueryIsTextureRectangle(int handle, int cbufSlot = -1)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
InputTopology QueryPrimitiveTopology()
|
|
|
|
|
{
|
|
|
|
|
return InputTopology.Points;
|
2021-06-24 18:54:50 -04:00
|
|
|
|
}
|
|
|
|
|
|
2021-10-18 17:38:04 -04:00
|
|
|
|
bool QueryTessCw()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TessPatchType QueryTessPatchType()
|
|
|
|
|
{
|
|
|
|
|
return TessPatchType.Triangles;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TessSpacing QueryTessSpacing()
|
|
|
|
|
{
|
|
|
|
|
return TessSpacing.EqualSpacing;
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-19 14:05:43 -04:00
|
|
|
|
TextureFormat QueryTextureFormat(int handle, int cbufSlot = -1)
|
2020-05-05 21:02:28 -04:00
|
|
|
|
{
|
|
|
|
|
return TextureFormat.R8G8B8A8Unorm;
|
|
|
|
|
}
|
2020-12-01 18:13:27 -05:00
|
|
|
|
|
2022-01-21 10:35:21 -05:00
|
|
|
|
bool QueryTransformFeedbackEnabled()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ReadOnlySpan<byte> QueryTransformFeedbackVaryingLocations(int bufferIndex)
|
|
|
|
|
{
|
|
|
|
|
return ReadOnlySpan<byte>.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int QueryTransformFeedbackStride(int bufferIndex)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-01 18:13:27 -05:00
|
|
|
|
bool QueryEarlyZForce()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2020-05-05 21:02:28 -04:00
|
|
|
|
}
|
|
|
|
|
}
|