IGpuAccessor.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. using System;
  2. namespace Ryujinx.Graphics.Shader
  3. {
  4. public interface IGpuAccessor
  5. {
  6. void Log(string message)
  7. {
  8. // No default log output.
  9. }
  10. uint ConstantBuffer1Read(int offset)
  11. {
  12. return 0;
  13. }
  14. ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize);
  15. int QueryComputeLocalSizeX()
  16. {
  17. return 1;
  18. }
  19. int QueryComputeLocalSizeY()
  20. {
  21. return 1;
  22. }
  23. int QueryComputeLocalSizeZ()
  24. {
  25. return 1;
  26. }
  27. int QueryComputeLocalMemorySize()
  28. {
  29. return 0x1000;
  30. }
  31. int QueryComputeSharedMemorySize()
  32. {
  33. return 0xc000;
  34. }
  35. uint QueryConstantBufferUse()
  36. {
  37. return 0;
  38. }
  39. bool QueryHostHasFrontFacingBug()
  40. {
  41. return false;
  42. }
  43. bool QueryHostHasVectorIndexingBug()
  44. {
  45. return false;
  46. }
  47. int QueryHostStorageBufferOffsetAlignment()
  48. {
  49. return 16;
  50. }
  51. bool QueryHostSupportsImageLoadFormatted()
  52. {
  53. return true;
  54. }
  55. bool QueryHostSupportsNonConstantTextureOffset()
  56. {
  57. return true;
  58. }
  59. bool QueryHostSupportsShaderBallot()
  60. {
  61. return true;
  62. }
  63. bool QueryHostSupportsTextureShadowLod()
  64. {
  65. return true;
  66. }
  67. SamplerType QuerySamplerType(int handle, int cbufSlot = -1)
  68. {
  69. return SamplerType.Texture2D;
  70. }
  71. bool QueryIsTextureRectangle(int handle, int cbufSlot = -1)
  72. {
  73. return false;
  74. }
  75. InputTopology QueryPrimitiveTopology()
  76. {
  77. return InputTopology.Points;
  78. }
  79. bool QueryTessCw()
  80. {
  81. return false;
  82. }
  83. TessPatchType QueryTessPatchType()
  84. {
  85. return TessPatchType.Triangles;
  86. }
  87. TessSpacing QueryTessSpacing()
  88. {
  89. return TessSpacing.EqualSpacing;
  90. }
  91. TextureFormat QueryTextureFormat(int handle, int cbufSlot = -1)
  92. {
  93. return TextureFormat.R8G8B8A8Unorm;
  94. }
  95. bool QueryEarlyZForce()
  96. {
  97. return false;
  98. }
  99. }
  100. }