[v4,03/18] intel/genxml: Use a single field for clear color address on gen10.

Submitted by Rafael Antognolli on March 8, 2018, 4:48 p.m.

Details

Message ID 20180308164911.15375-4-rafael.antognolli@intel.com
State New
Headers show
Series "Use clear color address in surface state." ( rev: 4 3 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli March 8, 2018, 4:48 p.m.
genxml does not support having two address fields with different names
but same position in the state struct. Both "Clear Color Address"
and "Clear Depth Address Low" mean the same thing, only for different
surface types.

To workaround this genxml limitation, rename "Clear Color Address"
to "Clear Value Address" and use it for both color and depth. Do the
same for the high bits.

TODO: add support for multiple addresses at the same position in the
xml.

v2: Combine high and low order bits into a single address field.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
---
 src/intel/genxml/gen10.xml | 7 +++----
 src/intel/genxml/gen11.xml | 7 +++----
 2 files changed, 6 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/genxml/gen10.xml b/src/intel/genxml/gen10.xml
index 2d36957c2a5..6302497a5e9 100644
--- a/src/intel/genxml/gen10.xml
+++ b/src/intel/genxml/gen10.xml
@@ -575,12 +575,11 @@ 
     <field name="Clear Value Address Enable" start="330" end="330" type="bool"/>
     <field name="Quilt Height" start="325" end="329" type="uint"/>
     <field name="Quilt Width" start="320" end="324" type="uint"/>
+    <!-- This address points to the address of a Clear Color in the case of
+         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
+    <field name="Clear Value Address" start="390" end="431" type="address"/>
     <field name="Red Clear Color" start="384" end="415" type="int"/>
-    <field name="Clear Color Address" start="390" end="415" type="address"/>
-    <field name="Clear Depth Address Low" start="390" end="415" type="address"/>
     <field name="Green Clear Color" start="416" end="447" type="int"/>
-    <field name="Clear Color Address High" start="416" end="431" type="address"/>
-    <field name="Clear Depth Address High" start="416" end="431" type="address"/>
     <field name="Blue Clear Color" start="448" end="479" type="int"/>
     <field name="Alpha Clear Color" start="480" end="511" type="int"/>
   </struct>
diff --git a/src/intel/genxml/gen11.xml b/src/intel/genxml/gen11.xml
index a93b62aa4cf..023b56f83f1 100644
--- a/src/intel/genxml/gen11.xml
+++ b/src/intel/genxml/gen11.xml
@@ -576,13 +576,12 @@ 
     <field name="Clear Value Address Enable" start="330" end="330" type="bool"/>
     <field name="Quilt Height" start="325" end="329" type="uint"/>
     <field name="Quilt Width" start="320" end="324" type="uint"/>
+    <!-- This address points to the address of a Clear Color in the case of
+         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
+    <field name="Clear Value Address" start="390" end="431" type="address"/>
     <field name="Red Clear Color" start="384" end="415" type="int"/>
-    <field name="Clear Color Address" start="390" end="415" type="address"/>
-    <field name="Clear Depth Address Low" start="390" end="415" type="address"/>
     <field name="Clear Color Conversion Enable" start="389" end="389" type="uint"/>
     <field name="Green Clear Color" start="416" end="447" type="int"/>
-    <field name="Clear Color Address High" start="416" end="431" type="address"/>
-    <field name="Clear Depth Address High" start="416" end="431" type="address"/>
     <field name="Blue Clear Color" start="448" end="479" type="int"/>
     <field name="Alpha Clear Color" start="480" end="511" type="int"/>
   </struct>