IGpuAccessor.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. namespace Ryujinx.Graphics.Shader
  2. {
  3. public interface IGpuAccessor
  4. {
  5. void Log(string message)
  6. {
  7. // No default log output.
  8. }
  9. T MemoryRead<T>(ulong address) where T : unmanaged;
  10. bool MemoryMapped(ulong address)
  11. {
  12. return true;
  13. }
  14. int QueryComputeLocalSizeX()
  15. {
  16. return 1;
  17. }
  18. int QueryComputeLocalSizeY()
  19. {
  20. return 1;
  21. }
  22. int QueryComputeLocalSizeZ()
  23. {
  24. return 1;
  25. }
  26. int QueryComputeLocalMemorySize()
  27. {
  28. return 0x1000;
  29. }
  30. int QueryComputeSharedMemorySize()
  31. {
  32. return 0xc000;
  33. }
  34. uint QueryConstantBufferUse()
  35. {
  36. return 0;
  37. }
  38. bool QueryIsTextureBuffer(int handle, int cbufSlot = -1)
  39. {
  40. return false;
  41. }
  42. bool QueryIsTextureRectangle(int handle, int cbufSlot = -1)
  43. {
  44. return false;
  45. }
  46. InputTopology QueryPrimitiveTopology()
  47. {
  48. return InputTopology.Points;
  49. }
  50. int QueryStorageBufferOffsetAlignment()
  51. {
  52. return 16;
  53. }
  54. bool QuerySupportsImageLoadFormatted()
  55. {
  56. return true;
  57. }
  58. bool QuerySupportsNonConstantTextureOffset()
  59. {
  60. return true;
  61. }
  62. bool QuerySupportsTextureShadowLod()
  63. {
  64. return true;
  65. }
  66. TextureFormat QueryTextureFormat(int handle, int cbufSlot = -1)
  67. {
  68. return TextureFormat.R8G8B8A8Unorm;
  69. }
  70. bool QueryEarlyZForce()
  71. {
  72. return false;
  73. }
  74. }
  75. }