[1/8] intel/genxml: Use a single field for clear color address on gen10.

Submitted by Rafael Antognolli on Dec. 15, 2017, 10:53 p.m.

Details

Message ID 20171215225335.28009-1-rafael.antognolli@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli Dec. 15, 2017, 10:53 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 Low" 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.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
---
 src/intel/genxml/gen10.xml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/genxml/gen10.xml b/src/intel/genxml/gen10.xml
index a6b8f48fda5..aeaa77871c8 100644
--- a/src/intel/genxml/gen10.xml
+++ b/src/intel/genxml/gen10.xml
@@ -801,11 +801,13 @@ 
     <field name="Quilt Height" start="325" end="329" type="uint"/>
     <field name="Quilt Width" start="320" end="324" type="uint"/>
     <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"/>
+    <!-- This address points to the lower bits of Clear Color in the case of
+         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
+    <field name="Clear Value 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"/>
+    <!-- This address points to the high bits of Clear Color in the case of
+         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
+    <field name="Clear Value 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>

Comments

On Fri, Dec 15, 2017 at 02:53:28PM -0800, Rafael Antognolli wrote:
> 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 Low" 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.
> 
> Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
> ---
>  src/intel/genxml/gen10.xml | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 

This patch is
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>

> diff --git a/src/intel/genxml/gen10.xml b/src/intel/genxml/gen10.xml
> index a6b8f48fda5..aeaa77871c8 100644
> --- a/src/intel/genxml/gen10.xml
> +++ b/src/intel/genxml/gen10.xml
> @@ -801,11 +801,13 @@
>      <field name="Quilt Height" start="325" end="329" type="uint"/>
>      <field name="Quilt Width" start="320" end="324" type="uint"/>
>      <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"/>
> +    <!-- This address points to the lower bits of Clear Color in the case of
> +         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
> +    <field name="Clear Value 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"/>
> +    <!-- This address points to the high bits of Clear Color in the case of
> +         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
> +    <field name="Clear Value 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>
> -- 
> 2.14.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On Fri, Dec 15, 2017 at 2:53 PM, Rafael Antognolli <
rafael.antognolli@intel.com> wrote:

> 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 Low" 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.
>
> Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
> ---
>  src/intel/genxml/gen10.xml | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/genxml/gen10.xml b/src/intel/genxml/gen10.xml
> index a6b8f48fda5..aeaa77871c8 100644
> --- a/src/intel/genxml/gen10.xml
> +++ b/src/intel/genxml/gen10.xml
> @@ -801,11 +801,13 @@
>      <field name="Quilt Height" start="325" end="329" type="uint"/>
>      <field name="Quilt Width" start="320" end="324" type="uint"/>
>      <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"/>
> +    <!-- This address points to the lower bits of Clear Color in the case
> of
> +         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
> +    <field name="Clear Value 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"/>
> +    <!-- This address points to the high bits of Clear Color in the case
> of
> +         CCS_D and CCS_E surfaces, and Depth Color for HiZ surfaces -->
> +    <field name="Clear Value Address High" start="416" end="431"
> type="address"/>
>

These two fields are consecutive.  We need to combine them into a single
64-bit address field so that 48-bit addresses with relocations will work
correctly.


>      <field name="Blue Clear Color" start="448" end="479" type="int"/>
>      <field name="Alpha Clear Color" start="480" end="511" type="int"/>
>    </struct>
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>