Update addrLib to support gfx11
This library was taken from public MESA library: https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/amd/addrlib with top commit: 2866ae32da0348caf71ad2d11c353321df626ff4 Removing macros.h as it is no longer used by addrlib Change-Id: I0fdabfe48b74c259b4d29d81beae89604bbc141a
This commit is contained in:
zatwierdzone przez
David Yat Sin
rodzic
c2a60a4d5d
commit
a742b7e830
@@ -1,28 +1,27 @@
|
||||
/*
|
||||
* Copyright © 2007-2019 Advanced Micro Devices, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
|
||||
* AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*/
|
||||
************************************************************************************************************************
|
||||
*
|
||||
* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#if !defined (__GFX10_GB_REG_H__)
|
||||
#define __GFX10_GB_REG_H__
|
||||
@@ -34,7 +33,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
union GB_ADDR_CONFIG
|
||||
//
|
||||
// Make sure the necessary endian defines are there.
|
||||
//
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
#else
|
||||
#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
|
||||
#endif
|
||||
|
||||
union GB_ADDR_CONFIG_GFX10
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
************************************************************************************************************************
|
||||
*
|
||||
* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#if !defined (__GFX11_GB_REG_H__)
|
||||
#define __GFX11_GB_REG_H__
|
||||
|
||||
/*
|
||||
* gfx11_gb_reg.h
|
||||
*
|
||||
* Register Spec Release: 1.0
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Make sure the necessary endian defines are there.
|
||||
//
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
#else
|
||||
#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
|
||||
#endif
|
||||
|
||||
union GB_ADDR_CONFIG_GFX11
|
||||
{
|
||||
struct
|
||||
{
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
unsigned int NUM_PIPES : 3;
|
||||
unsigned int PIPE_INTERLEAVE_SIZE : 3;
|
||||
unsigned int MAX_COMPRESSED_FRAGS : 2;
|
||||
unsigned int NUM_PKRS : 3;
|
||||
unsigned int : 8;
|
||||
unsigned int NUM_SHADER_ENGINES : 2;
|
||||
unsigned int : 5;
|
||||
unsigned int NUM_RB_PER_SE : 2;
|
||||
unsigned int : 4;
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
unsigned int : 4;
|
||||
unsigned int NUM_RB_PER_SE : 2;
|
||||
unsigned int : 5;
|
||||
unsigned int NUM_SHADER_ENGINES : 2;
|
||||
unsigned int : 8;
|
||||
unsigned int NUM_PKRS : 3;
|
||||
unsigned int MAX_COMPRESSED_FRAGS : 2;
|
||||
unsigned int PIPE_INTERLEAVE_SIZE : 3;
|
||||
unsigned int NUM_PIPES : 3;
|
||||
#endif
|
||||
} bitfields, bits;
|
||||
unsigned int u32All;
|
||||
int i32All;
|
||||
float f32All;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,28 +1,27 @@
|
||||
/*
|
||||
* Copyright © 2007-2019 Advanced Micro Devices, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
|
||||
* AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*/
|
||||
************************************************************************************************************************
|
||||
*
|
||||
* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#if !defined (__GFX9_GB_REG_H__)
|
||||
#define __GFX9_GB_REG_H__
|
||||
@@ -34,7 +33,16 @@
|
||||
*
|
||||
*/
|
||||
|
||||
union GB_ADDR_CONFIG_gfx9 {
|
||||
//
|
||||
// Make sure the necessary endian defines are there.
|
||||
//
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
#else
|
||||
#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
|
||||
#endif
|
||||
|
||||
union GB_ADDR_CONFIG_GFX9 {
|
||||
struct {
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
unsigned int NUM_PIPES : 3;
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
/*
|
||||
* Copyright © 2007-2019 Advanced Micro Devices, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sub license, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS
|
||||
* AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the
|
||||
* next paragraph) shall be included in all copies or substantial portions
|
||||
* of the Software.
|
||||
*/
|
||||
************************************************************************************************************************
|
||||
*
|
||||
* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#if !defined (__SI_GB_REG_H__)
|
||||
#define __SI_GB_REG_H__
|
||||
@@ -35,6 +34,15 @@
|
||||
*
|
||||
*****************************************************************************************************************/
|
||||
|
||||
//
|
||||
// Make sure the necessary endian defines are there.
|
||||
//
|
||||
#if defined(LITTLEENDIAN_CPU)
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
#else
|
||||
#error "BIGENDIAN_CPU or LITTLEENDIAN_CPU must be defined"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GB_ADDR_CONFIG struct
|
||||
*/
|
||||
@@ -103,7 +111,7 @@ typedef union {
|
||||
unsigned int num_banks : 2;
|
||||
unsigned int micro_tile_mode_new : 3;
|
||||
unsigned int sample_split : 2;
|
||||
unsigned int : 5;
|
||||
unsigned int alt_pipe_config : 5;
|
||||
} GB_TILE_MODE_T;
|
||||
|
||||
typedef struct _GB_MACROTILE_MODE_T {
|
||||
@@ -111,13 +119,16 @@ typedef union {
|
||||
unsigned int bank_height : 2;
|
||||
unsigned int macro_tile_aspect : 2;
|
||||
unsigned int num_banks : 2;
|
||||
unsigned int : 24;
|
||||
unsigned int alt_bank_height : 2;
|
||||
unsigned int alt_macro_tile_aspect : 2;
|
||||
unsigned int alt_num_banks : 2;
|
||||
unsigned int : 18;
|
||||
} GB_MACROTILE_MODE_T;
|
||||
|
||||
#elif defined(BIGENDIAN_CPU)
|
||||
|
||||
typedef struct _GB_TILE_MODE_T {
|
||||
unsigned int : 5;
|
||||
unsigned int alt_pipe_config : 5;
|
||||
unsigned int sample_split : 2;
|
||||
unsigned int micro_tile_mode_new : 3;
|
||||
unsigned int num_banks : 2;
|
||||
@@ -131,7 +142,10 @@ typedef union {
|
||||
} GB_TILE_MODE_T;
|
||||
|
||||
typedef struct _GB_MACROTILE_MODE_T {
|
||||
unsigned int : 24;
|
||||
unsigned int : 18;
|
||||
unsigned int alt_num_banks : 2;
|
||||
unsigned int alt_macro_tile_aspect : 2;
|
||||
unsigned int alt_bank_height : 2;
|
||||
unsigned int num_banks : 2;
|
||||
unsigned int macro_tile_aspect : 2;
|
||||
unsigned int bank_height : 2;
|
||||
|
||||
Reference in New Issue
Block a user