summaryrefslogtreecommitdiffstats
path: root/src/broadcom/cle
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-10-27 13:27:22 -0700
committerEric Anholt <[email protected]>2017-10-30 13:31:28 -0700
commit6d1809a6d6ecbefa7b1ab2e28607adc9b85e8974 (patch)
tree850afd48b11e53c740a3083233c6c003c93d3542 /src/broadcom/cle
parent2d6088f2a34570ef34d0e202c66d92dbe0f57994 (diff)
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.
Diffstat (limited to 'src/broadcom/cle')
-rw-r--r--src/broadcom/cle/v3d_packet_v33.xml22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/broadcom/cle/v3d_packet_v33.xml b/src/broadcom/cle/v3d_packet_v33.xml
index cea2ce64d39..9077dcd82ae 100644
--- a/src/broadcom/cle/v3d_packet_v33.xml
+++ b/src/broadcom/cle/v3d_packet_v33.xml
@@ -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 -->