PixelEngine.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Copyright 2008 Dolphin Emulator Project
  2. // Licensed under GPLv2+
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "Common/CommonTypes.h"
  6. class PointerWrap;
  7. namespace MMIO { class Mapping; }
  8. // internal hardware addresses
  9. enum
  10. {
  11. PE_ZCONF = 0x00, // Z Config
  12. PE_ALPHACONF = 0x02, // Alpha Config
  13. PE_DSTALPHACONF = 0x04, // Destination Alpha Config
  14. PE_ALPHAMODE = 0x06, // Alpha Mode Config
  15. PE_ALPHAREAD = 0x08, // Alpha Read
  16. PE_CTRL_REGISTER = 0x0a, // Control
  17. PE_TOKEN_REG = 0x0e, // Token
  18. PE_BBOX_LEFT = 0x10, // Bounding Box Left Pixel
  19. PE_BBOX_RIGHT = 0x12, // Bounding Box Right Pixel
  20. PE_BBOX_TOP = 0x14, // Bounding Box Top Pixel
  21. PE_BBOX_BOTTOM = 0x16, // Bounding Box Bottom Pixel
  22. // NOTE: Order not verified
  23. // These indicate the number of quads that are being used as input/output for each particular stage
  24. PE_PERF_ZCOMP_INPUT_ZCOMPLOC_L = 0x18,
  25. PE_PERF_ZCOMP_INPUT_ZCOMPLOC_H = 0x1a,
  26. PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_L = 0x1c,
  27. PE_PERF_ZCOMP_OUTPUT_ZCOMPLOC_H = 0x1e,
  28. PE_PERF_ZCOMP_INPUT_L = 0x20,
  29. PE_PERF_ZCOMP_INPUT_H = 0x22,
  30. PE_PERF_ZCOMP_OUTPUT_L = 0x24,
  31. PE_PERF_ZCOMP_OUTPUT_H = 0x26,
  32. PE_PERF_BLEND_INPUT_L = 0x28,
  33. PE_PERF_BLEND_INPUT_H = 0x2a,
  34. PE_PERF_EFB_COPY_CLOCKS_L = 0x2c,
  35. PE_PERF_EFB_COPY_CLOCKS_H = 0x2e,
  36. };
  37. namespace PixelEngine
  38. {
  39. // ReadMode specifies the returned alpha channel for EFB peeks
  40. union UPEAlphaReadReg
  41. {
  42. u16 Hex;
  43. struct
  44. {
  45. u16 ReadMode : 2;
  46. u16 : 14;
  47. };
  48. };
  49. void Init();
  50. void DoState(PointerWrap &p);
  51. void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
  52. // gfx backend support
  53. void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
  54. void SetFinish();
  55. UPEAlphaReadReg GetAlphaReadMode();
  56. } // end of namespace PixelEngine