Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access * Fix NVDEC project build * Address PR feedback and add missing XML comments
This commit is contained in:
parent
7f500e7cae
commit
b8eb6abecc
35 changed files with 633 additions and 684 deletions
67
Ryujinx.Graphics.Shader/IGpuAccessor.cs
Normal file
67
Ryujinx.Graphics.Shader/IGpuAccessor.cs
Normal file
|
@ -0,0 +1,67 @@
|
|||
namespace Ryujinx.Graphics.Shader
|
||||
{
|
||||
public interface IGpuAccessor
|
||||
{
|
||||
public void Log(string message)
|
||||
{
|
||||
// No default log output.
|
||||
}
|
||||
|
||||
T MemoryRead<T>(ulong address) where T : unmanaged;
|
||||
|
||||
public int QueryComputeLocalSizeX()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int QueryComputeLocalSizeY()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int QueryComputeLocalSizeZ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int QueryComputeLocalMemorySize()
|
||||
{
|
||||
return 0x1000;
|
||||
}
|
||||
|
||||
public int QueryComputeSharedMemorySize()
|
||||
{
|
||||
return 0xc000;
|
||||
}
|
||||
|
||||
public bool QueryIsTextureBuffer(int handle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool QueryIsTextureRectangle(int handle)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public InputTopology QueryPrimitiveTopology()
|
||||
{
|
||||
return InputTopology.Points;
|
||||
}
|
||||
|
||||
public int QueryStorageBufferOffsetAlignment()
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
public bool QuerySupportsNonConstantTextureOffset()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public TextureFormat QueryTextureFormat(int handle)
|
||||
{
|
||||
return TextureFormat.R8G8B8A8Unorm;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue