IGpuAccessor.cs 1.4 KB

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