broadcom/vc5: Add some comments about the texture/output format ordering.

The output formats are consistent with their channels appearing from low
to high in their name.  Textures are interpreted the same way, but their
names may have the channels swapped around.  I'm retaining the texture
names so that we are consistent with the documentation, but I want to
leave a warning for others.
This commit is contained in:
Eric Anholt 2017-10-27 13:27:22 -07:00
parent 2d6088f2a3
commit 6d1809a6d6
1 changed files with 15 additions and 7 deletions

View File

@ -463,6 +463,10 @@
<field name="BGR dithered" size="1" start="22" type="bool"/>
<field name="Output image format" size="6" start="16" type="uint" prefix="Output Image Format">
<!--
Formats appear with their channels named from the low bits to
the high bits.
-->
<value name="srgb8_alpha8" value="0"/>
<value name="srgb" value="1"/>
<value name="rgb10_a2ui" value="2"/>
@ -543,9 +547,9 @@
<field name="Output image format" size="6" start="16" type="uint" prefix="Output Image Format">
<value name="depth_component32f" value="0"/>
<value name="depth_component24" value="1"/>
<value name="depth_component24" value="1"/> <!-- depth low, pad high -->
<value name="depth_component16" value="2"/>
<value name="depth24_stencil8" value="3"/>
<value name="depth24_stencil8" value="3"/> <!-- stencil low, depth high -->
</field>
<field name="Decimate mode" size="2" start="14" type="uint"/>
@ -838,16 +842,20 @@
</struct>
<enum name="Texture Data Formats">
<!--
most formats here have R in the low bits, A in the high bits.
Exceptions noted.
-->
<value name="Texture Data Format R8" value="0"/>
<value name="Texture Data Format R8 SNORM" value="1"/>
<value name="Texture Data Format RG8" value="2"/>
<value name="Texture Data Format RG8 SNORM" value="3"/>
<value name="Texture Data Format RGBA8" value="4"/>
<value name="Texture Data Format RGBA8 SNORM" value="5"/>
<value name="Texture Data Format RGB565" value="6"/>
<value name="Texture Data Format RGBA4" value="7"/>
<value name="Texture Data Format RGB5_A1" value="8"/>
<value name="Texture Data Format RGB10_A2" value="9"/>
<value name="Texture Data Format RGB565" value="6"/> <!-- B in low bits -->
<value name="Texture Data Format RGBA4" value="7"/> <!-- A low, R high -->
<value name="Texture Data Format RGB5_A1" value="8"/> <!-- A low, R high -->
<value name="Texture Data Format RGB10_A2" value="9"/> <!-- R low, A high -->
<value name="Texture Data Format R16" value="10"/>
<value name="Texture Data Format R16 SNORM" value="11"/>
<value name="Texture Data Format RG16" value="12"/>
@ -862,7 +870,7 @@
<value name="Texture Data Format DEPTH COMP16" value="21"/>
<value name="Texture Data Format DEPTH COMP24" value="22"/>
<value name="Texture Data Format DEPTH COMP32F" value="23"/>
<value name="Texture Data Format DEPTH24_X8" value="24"/>
<value name="Texture Data Format DEPTH24_X8" value="24"/> <!-- X low, D high -->
<value name="Texture Data Format R4" value="25"/>
<value name="Texture Data Format R1" value="26"/>
<!-- generic unfiltered 8-bit sample -->