[GS Docs] PSM Meaning #4313
tadanokojin
started this conversation in
GS Docs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PSM Names
I've noticed a lot of confusion around GS PSM. To begin, let's first understand what "PSM" stands for. PSM means Pixel Storage Mode and used to define the pixel format (RGBA8 vs RGB5A1) in addition to how it's stored (packed vs unpacked) and how it is swizzled.
The following table defines what which component of the PSM name stands for:
CT24 and Z24 are always aligned to CT32 but with an unused alpha channel. CT16, CT16S, Z16 and Z16S are always packed into 2 pixels inside a CT32 pixel. T8 and T4 are always packed to 4 and 8 indices inside a CT32 pixel respectively unless otherwise denoted with the H, HH and HL components. T8, CT32 and CT24 share the same block ordering. T4 shares it's block ordering with CT16. CT16S and Z16S use a different block ordering to CT16 and Z16 which splits the cache vertically instead of horizontally allowing them to be compatible with CT32, CT24, Z32 and Z24 as the framebuffer cache must share both depth and color 1.
All formats are unsigned integer formats. The GS has no support for signed or floating point formats.
Footnotes
There are exceptions to these rules but they rely on undefined behavior. ↩
Beta Was this translation helpful? Give feedback.
All reactions