[Mesa-dev] [PATCH v4 02/18] genxml: Preserve fields that share dword space with addresses.
Jason Ekstrand
jason at jlekstrand.net
Tue Mar 27 17:48:42 UTC 2018
On Thu, Mar 8, 2018 at 8:48 AM, Rafael Antognolli <
rafael.antognolli at intel.com> wrote:
> Some instructions contain fields that are either an address or a value
> of some type based on the content of other fields, such as clear color
> values vs address. That works fine if these fields are in the less
> significant dword, the lower 32 bits of the address, because they get
> OR'ed with the address. But if they are in the higher 32 bits, they get
> discarded.
>
> On Gen10 we have fields that share space with the higher 16 bits of the
> address too. This commit makes sure those fields don't get discarded.
>
> Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
> src/intel/genxml/gen_pack_header.py | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/genxml/gen_pack_header.py
> b/src/intel/genxml/gen_pack_header.py
> index 7dcada86fae..2d40760588e 100644
> --- a/src/intel/genxml/gen_pack_header.py
> +++ b/src/intel/genxml/gen_pack_header.py
> @@ -494,11 +494,16 @@ class Group(object):
> v_address = "v%d_address" % index
> print(" const uint64_t %s =\n
> __gen_combine_address(data, &dw[%d], values->%s, %s);" %
> (v_address, index, dw.address.name + field.dim, v))
> - v = v_address
> -
> + if len(dw.fields) > address_count:
> + print(" dw[%d] = %s;" % (index, v_address))
> + print(" dw[%d] = (%s >> 32) | (%s >> 32);" % (index
> + 1, v_address, v))
> + continue
> + else:
> + v = v_address
> print(" dw[%d] = %s;" % (index, v))
> print(" dw[%d] = %s >> 32;" % (index + 1, v))
>
> +
>
Spurrious whitespace change
> class Value(object):
> def __init__(self, attrs):
> self.name = safe_name(attrs["name"])
> --
> 2.14.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180327/12e12cfe/attachment.html>
More information about the mesa-dev
mailing list