110e230b6Smaya/* 210e230b6Smaya * Copyright (C) 2016 Intel Corporation 310e230b6Smaya * 410e230b6Smaya * Permission is hereby granted, free of charge, to any person obtaining a 510e230b6Smaya * copy of this software and associated documentation files (the "Software"), 610e230b6Smaya * to deal in the Software without restriction, including without limitation 710e230b6Smaya * the rights to use, copy, modify, merge, publish, distribute, sublicense, 810e230b6Smaya * and/or sell copies of the Software, and to permit persons to whom the 910e230b6Smaya * Software is furnished to do so, subject to the following conditions: 1010e230b6Smaya * 1110e230b6Smaya * The above copyright notice and this permission notice (including the next 1210e230b6Smaya * paragraph) shall be included in all copies or substantial portions of the 1310e230b6Smaya * Software. 1410e230b6Smaya * 1510e230b6Smaya * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1610e230b6Smaya * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1710e230b6Smaya * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1810e230b6Smaya * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1910e230b6Smaya * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 2010e230b6Smaya * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 2110e230b6Smaya * IN THE SOFTWARE. 2210e230b6Smaya */ 2310e230b6Smaya 2410e230b6Smaya 2510e230b6Smaya/* Instructions, enums and structures for HSW. 2610e230b6Smaya * 2710e230b6Smaya * This file has been generated, do not hand edit. 2810e230b6Smaya */ 2910e230b6Smaya 3096c5ddc4Srjs#ifndef GFX75_PACK_H 3196c5ddc4Srjs#define GFX75_PACK_H 3210e230b6Smaya 3310e230b6Smaya#include <stdio.h> 3410e230b6Smaya#include <stdint.h> 3510e230b6Smaya#include <stdbool.h> 3610e230b6Smaya#include <assert.h> 3710e230b6Smaya#include <math.h> 3810e230b6Smaya 3910e230b6Smaya#ifndef __gen_validate_value 4010e230b6Smaya#define __gen_validate_value(x) 4110e230b6Smaya#endif 4210e230b6Smaya 4396c5ddc4Srjs#ifndef __intel_field_functions 4496c5ddc4Srjs#define __intel_field_functions 4510e230b6Smaya 4610e230b6Smaya#ifdef NDEBUG 4710e230b6Smaya#define NDEBUG_UNUSED __attribute__((unused)) 4810e230b6Smaya#else 4910e230b6Smaya#define NDEBUG_UNUSED 5010e230b6Smaya#endif 5110e230b6Smaya 5296c5ddc4Srjsunion __intel_value { 5310e230b6Smaya float f; 5410e230b6Smaya uint32_t dw; 5510e230b6Smaya}; 5610e230b6Smaya 5796c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 5810e230b6Smaya__gen_mbo(uint32_t start, uint32_t end) 5910e230b6Smaya{ 6010e230b6Smaya return (~0ull >> (64 - (end - start + 1))) << start; 6110e230b6Smaya} 6210e230b6Smaya 6396c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 6410e230b6Smaya__gen_uint(uint64_t v, uint32_t start, NDEBUG_UNUSED uint32_t end) 6510e230b6Smaya{ 6610e230b6Smaya __gen_validate_value(v); 6710e230b6Smaya 6810e230b6Smaya#ifndef NDEBUG 6910e230b6Smaya const int width = end - start + 1; 7010e230b6Smaya if (width < 64) { 7110e230b6Smaya const uint64_t max = (1ull << width) - 1; 7210e230b6Smaya assert(v <= max); 7310e230b6Smaya } 7410e230b6Smaya#endif 7510e230b6Smaya 7610e230b6Smaya return v << start; 7710e230b6Smaya} 7810e230b6Smaya 7996c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 8010e230b6Smaya__gen_sint(int64_t v, uint32_t start, uint32_t end) 8110e230b6Smaya{ 8210e230b6Smaya const int width = end - start + 1; 8310e230b6Smaya 8410e230b6Smaya __gen_validate_value(v); 8510e230b6Smaya 8610e230b6Smaya#ifndef NDEBUG 8710e230b6Smaya if (width < 64) { 8810e230b6Smaya const int64_t max = (1ll << (width - 1)) - 1; 8910e230b6Smaya const int64_t min = -(1ll << (width - 1)); 9010e230b6Smaya assert(min <= v && v <= max); 9110e230b6Smaya } 9210e230b6Smaya#endif 9310e230b6Smaya 9410e230b6Smaya const uint64_t mask = ~0ull >> (64 - width); 9510e230b6Smaya 9610e230b6Smaya return (v & mask) << start; 9710e230b6Smaya} 9810e230b6Smaya 9996c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 10010e230b6Smaya__gen_offset(uint64_t v, NDEBUG_UNUSED uint32_t start, NDEBUG_UNUSED uint32_t end) 10110e230b6Smaya{ 10210e230b6Smaya __gen_validate_value(v); 10310e230b6Smaya#ifndef NDEBUG 10410e230b6Smaya uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; 10510e230b6Smaya 10610e230b6Smaya assert((v & ~mask) == 0); 10710e230b6Smaya#endif 10810e230b6Smaya 10910e230b6Smaya return v; 11010e230b6Smaya} 11110e230b6Smaya 11296c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 11396c5ddc4Srjs__gen_address(__gen_user_data *data, void *location, 11496c5ddc4Srjs __gen_address_type address, uint32_t delta, 11596c5ddc4Srjs __attribute__((unused)) uint32_t start, uint32_t end) 11696c5ddc4Srjs{ 11796c5ddc4Srjs uint64_t addr_u64 = __gen_combine_address(data, location, address, delta); 11896c5ddc4Srjs if (end == 31) { 11996c5ddc4Srjs return addr_u64; 12096c5ddc4Srjs } else if (end < 63) { 12196c5ddc4Srjs const unsigned shift = 63 - end; 12296c5ddc4Srjs return (addr_u64 << shift) >> shift; 12396c5ddc4Srjs } else { 12496c5ddc4Srjs return addr_u64; 12596c5ddc4Srjs } 12696c5ddc4Srjs} 12796c5ddc4Srjs 12896c5ddc4Srjsstatic inline __attribute__((always_inline)) uint32_t 12910e230b6Smaya__gen_float(float v) 13010e230b6Smaya{ 13110e230b6Smaya __gen_validate_value(v); 13296c5ddc4Srjs return ((union __intel_value) { .f = (v) }).dw; 13310e230b6Smaya} 13410e230b6Smaya 13596c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 13610e230b6Smaya__gen_sfixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits) 13710e230b6Smaya{ 13810e230b6Smaya __gen_validate_value(v); 13910e230b6Smaya 14010e230b6Smaya const float factor = (1 << fract_bits); 14110e230b6Smaya 14210e230b6Smaya#ifndef NDEBUG 14310e230b6Smaya const float max = ((1 << (end - start)) - 1) / factor; 14410e230b6Smaya const float min = -(1 << (end - start)) / factor; 14510e230b6Smaya assert(min <= v && v <= max); 14610e230b6Smaya#endif 14710e230b6Smaya 14810e230b6Smaya const int64_t int_val = llroundf(v * factor); 14910e230b6Smaya const uint64_t mask = ~0ull >> (64 - (end - start + 1)); 15010e230b6Smaya 15110e230b6Smaya return (int_val & mask) << start; 15210e230b6Smaya} 15310e230b6Smaya 15496c5ddc4Srjsstatic inline __attribute__((always_inline)) uint64_t 15510e230b6Smaya__gen_ufixed(float v, uint32_t start, NDEBUG_UNUSED uint32_t end, uint32_t fract_bits) 15610e230b6Smaya{ 15710e230b6Smaya __gen_validate_value(v); 15810e230b6Smaya 15910e230b6Smaya const float factor = (1 << fract_bits); 16010e230b6Smaya 16110e230b6Smaya#ifndef NDEBUG 16210e230b6Smaya const float max = ((1 << (end - start + 1)) - 1) / factor; 16310e230b6Smaya const float min = 0.0f; 16410e230b6Smaya assert(min <= v && v <= max); 16510e230b6Smaya#endif 16610e230b6Smaya 16710e230b6Smaya const uint64_t uint_val = llroundf(v * factor); 16810e230b6Smaya 16910e230b6Smaya return uint_val << start; 17010e230b6Smaya} 17110e230b6Smaya 17210e230b6Smaya#ifndef __gen_address_type 17310e230b6Smaya#error #define __gen_address_type before including this file 17410e230b6Smaya#endif 17510e230b6Smaya 17610e230b6Smaya#ifndef __gen_user_data 17710e230b6Smaya#error #define __gen_combine_address before including this file 17810e230b6Smaya#endif 17910e230b6Smaya 18010e230b6Smaya#undef NDEBUG_UNUSED 18110e230b6Smaya 18210e230b6Smaya#endif 18310e230b6Smaya 18410e230b6Smaya 18596c5ddc4Srjsenum GFX75_3D_Color_Buffer_Blend_Factor { 18610e230b6Smaya BLENDFACTOR_ONE = 1, 18710e230b6Smaya BLENDFACTOR_SRC_COLOR = 2, 18810e230b6Smaya BLENDFACTOR_SRC_ALPHA = 3, 18910e230b6Smaya BLENDFACTOR_DST_ALPHA = 4, 19010e230b6Smaya BLENDFACTOR_DST_COLOR = 5, 19110e230b6Smaya BLENDFACTOR_SRC_ALPHA_SATURATE = 6, 19210e230b6Smaya BLENDFACTOR_CONST_COLOR = 7, 19310e230b6Smaya BLENDFACTOR_CONST_ALPHA = 8, 19410e230b6Smaya BLENDFACTOR_SRC1_COLOR = 9, 19510e230b6Smaya BLENDFACTOR_SRC1_ALPHA = 10, 19610e230b6Smaya BLENDFACTOR_ZERO = 17, 19710e230b6Smaya BLENDFACTOR_INV_SRC_COLOR = 18, 19810e230b6Smaya BLENDFACTOR_INV_SRC_ALPHA = 19, 19910e230b6Smaya BLENDFACTOR_INV_DST_ALPHA = 20, 20010e230b6Smaya BLENDFACTOR_INV_DST_COLOR = 21, 20110e230b6Smaya BLENDFACTOR_INV_CONST_COLOR = 23, 20210e230b6Smaya BLENDFACTOR_INV_CONST_ALPHA = 24, 20310e230b6Smaya BLENDFACTOR_INV_SRC1_COLOR = 25, 20410e230b6Smaya BLENDFACTOR_INV_SRC1_ALPHA = 26, 20510e230b6Smaya}; 20610e230b6Smaya 20796c5ddc4Srjsenum GFX75_3D_Color_Buffer_Blend_Function { 20810e230b6Smaya BLENDFUNCTION_ADD = 0, 20910e230b6Smaya BLENDFUNCTION_SUBTRACT = 1, 21010e230b6Smaya BLENDFUNCTION_REVERSE_SUBTRACT = 2, 21110e230b6Smaya BLENDFUNCTION_MIN = 3, 21210e230b6Smaya BLENDFUNCTION_MAX = 4, 21310e230b6Smaya}; 21410e230b6Smaya 21596c5ddc4Srjsenum GFX75_3D_Compare_Function { 21610e230b6Smaya COMPAREFUNCTION_ALWAYS = 0, 21710e230b6Smaya COMPAREFUNCTION_NEVER = 1, 21810e230b6Smaya COMPAREFUNCTION_LESS = 2, 21910e230b6Smaya COMPAREFUNCTION_EQUAL = 3, 22010e230b6Smaya COMPAREFUNCTION_LEQUAL = 4, 22110e230b6Smaya COMPAREFUNCTION_GREATER = 5, 22210e230b6Smaya COMPAREFUNCTION_NOTEQUAL = 6, 22310e230b6Smaya COMPAREFUNCTION_GEQUAL = 7, 22410e230b6Smaya}; 22510e230b6Smaya 22696c5ddc4Srjsenum GFX75_3D_Logic_Op_Function { 22710e230b6Smaya LOGICOP_CLEAR = 0, 22810e230b6Smaya LOGICOP_NOR = 1, 22910e230b6Smaya LOGICOP_AND_INVERTED = 2, 23010e230b6Smaya LOGICOP_COPY_INVERTED = 3, 23110e230b6Smaya LOGICOP_AND_REVERSE = 4, 23210e230b6Smaya LOGICOP_INVERT = 5, 23310e230b6Smaya LOGICOP_XOR = 6, 23410e230b6Smaya LOGICOP_NAND = 7, 23510e230b6Smaya LOGICOP_AND = 8, 23610e230b6Smaya LOGICOP_EQUIV = 9, 23710e230b6Smaya LOGICOP_NOOP = 10, 23810e230b6Smaya LOGICOP_OR_INVERTED = 11, 23910e230b6Smaya LOGICOP_COPY = 12, 24010e230b6Smaya LOGICOP_OR_REVERSE = 13, 24110e230b6Smaya LOGICOP_OR = 14, 24210e230b6Smaya LOGICOP_SET = 15, 24310e230b6Smaya}; 24410e230b6Smaya 24596c5ddc4Srjsenum GFX75_3D_Prim_Topo_Type { 24610e230b6Smaya _3DPRIM_POINTLIST = 1, 24710e230b6Smaya _3DPRIM_LINELIST = 2, 24810e230b6Smaya _3DPRIM_LINESTRIP = 3, 24910e230b6Smaya _3DPRIM_TRILIST = 4, 25010e230b6Smaya _3DPRIM_TRISTRIP = 5, 25110e230b6Smaya _3DPRIM_TRIFAN = 6, 25210e230b6Smaya _3DPRIM_QUADLIST = 7, 25310e230b6Smaya _3DPRIM_QUADSTRIP = 8, 25410e230b6Smaya _3DPRIM_LINELIST_ADJ = 9, 25510e230b6Smaya _3DPRIM_LINESTRIP_ADJ = 10, 25610e230b6Smaya _3DPRIM_TRILIST_ADJ = 11, 25710e230b6Smaya _3DPRIM_TRISTRIP_ADJ = 12, 25810e230b6Smaya _3DPRIM_TRISTRIP_REVERSE = 13, 25910e230b6Smaya _3DPRIM_POLYGON = 14, 26010e230b6Smaya _3DPRIM_RECTLIST = 15, 26110e230b6Smaya _3DPRIM_LINELOOP = 16, 26210e230b6Smaya _3DPRIM_POINTLIST_BF = 17, 26310e230b6Smaya _3DPRIM_LINESTRIP_CONT = 18, 26410e230b6Smaya _3DPRIM_LINESTRIP_BF = 19, 26510e230b6Smaya _3DPRIM_LINESTRIP_CONT_BF = 20, 26610e230b6Smaya _3DPRIM_TRIFAN_NOSTIPPLE = 22, 26710e230b6Smaya _3DPRIM_PATCHLIST_1 = 32, 26810e230b6Smaya _3DPRIM_PATCHLIST_2 = 33, 26910e230b6Smaya _3DPRIM_PATCHLIST_3 = 34, 27010e230b6Smaya _3DPRIM_PATCHLIST_4 = 35, 27110e230b6Smaya _3DPRIM_PATCHLIST_5 = 36, 27210e230b6Smaya _3DPRIM_PATCHLIST_6 = 37, 27310e230b6Smaya _3DPRIM_PATCHLIST_7 = 38, 27410e230b6Smaya _3DPRIM_PATCHLIST_8 = 39, 27510e230b6Smaya _3DPRIM_PATCHLIST_9 = 40, 27610e230b6Smaya _3DPRIM_PATCHLIST_10 = 41, 27710e230b6Smaya _3DPRIM_PATCHLIST_11 = 42, 27810e230b6Smaya _3DPRIM_PATCHLIST_12 = 43, 27910e230b6Smaya _3DPRIM_PATCHLIST_13 = 44, 28010e230b6Smaya _3DPRIM_PATCHLIST_14 = 45, 28110e230b6Smaya _3DPRIM_PATCHLIST_15 = 46, 28210e230b6Smaya _3DPRIM_PATCHLIST_16 = 47, 28310e230b6Smaya _3DPRIM_PATCHLIST_17 = 48, 28410e230b6Smaya _3DPRIM_PATCHLIST_18 = 49, 28510e230b6Smaya _3DPRIM_PATCHLIST_19 = 50, 28610e230b6Smaya _3DPRIM_PATCHLIST_20 = 51, 28710e230b6Smaya _3DPRIM_PATCHLIST_21 = 52, 28810e230b6Smaya _3DPRIM_PATCHLIST_22 = 53, 28910e230b6Smaya _3DPRIM_PATCHLIST_23 = 54, 29010e230b6Smaya _3DPRIM_PATCHLIST_24 = 55, 29110e230b6Smaya _3DPRIM_PATCHLIST_25 = 56, 29210e230b6Smaya _3DPRIM_PATCHLIST_26 = 57, 29310e230b6Smaya _3DPRIM_PATCHLIST_27 = 58, 29410e230b6Smaya _3DPRIM_PATCHLIST_28 = 59, 29510e230b6Smaya _3DPRIM_PATCHLIST_29 = 60, 29610e230b6Smaya _3DPRIM_PATCHLIST_30 = 61, 29710e230b6Smaya _3DPRIM_PATCHLIST_31 = 62, 29810e230b6Smaya _3DPRIM_PATCHLIST_32 = 63, 29910e230b6Smaya}; 30010e230b6Smaya 30196c5ddc4Srjsenum GFX75_3D_Stencil_Operation { 30210e230b6Smaya STENCILOP_KEEP = 0, 30310e230b6Smaya STENCILOP_ZERO = 1, 30410e230b6Smaya STENCILOP_REPLACE = 2, 30510e230b6Smaya STENCILOP_INCRSAT = 3, 30610e230b6Smaya STENCILOP_DECRSAT = 4, 30710e230b6Smaya STENCILOP_INCR = 5, 30810e230b6Smaya STENCILOP_DECR = 6, 30910e230b6Smaya STENCILOP_INVERT = 7, 31010e230b6Smaya}; 31110e230b6Smaya 31296c5ddc4Srjsenum GFX75_3D_Vertex_Component_Control { 31310e230b6Smaya VFCOMP_NOSTORE = 0, 31410e230b6Smaya VFCOMP_STORE_SRC = 1, 31510e230b6Smaya VFCOMP_STORE_0 = 2, 31610e230b6Smaya VFCOMP_STORE_1_FP = 3, 31710e230b6Smaya VFCOMP_STORE_1_INT = 4, 31810e230b6Smaya VFCOMP_STORE_VID = 5, 31910e230b6Smaya VFCOMP_STORE_IID = 6, 32010e230b6Smaya VFCOMP_STORE_PID = 7, 32110e230b6Smaya}; 32210e230b6Smaya 32396c5ddc4Srjsenum GFX75_ShaderChannelSelect { 32410e230b6Smaya SCS_ZERO = 0, 32510e230b6Smaya SCS_ONE = 1, 32610e230b6Smaya SCS_RED = 4, 32710e230b6Smaya SCS_GREEN = 5, 32810e230b6Smaya SCS_BLUE = 6, 32910e230b6Smaya SCS_ALPHA = 7, 33010e230b6Smaya}; 33110e230b6Smaya 33296c5ddc4Srjsenum GFX75_TextureCoordinateMode { 33310e230b6Smaya TCM_WRAP = 0, 33410e230b6Smaya TCM_MIRROR = 1, 33510e230b6Smaya TCM_CLAMP = 2, 33610e230b6Smaya TCM_CUBE = 3, 33710e230b6Smaya TCM_CLAMP_BORDER = 4, 33810e230b6Smaya TCM_MIRROR_ONCE = 5, 33910e230b6Smaya}; 34010e230b6Smaya 34196c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_BODY_length 6 34296c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_BODY { 34310e230b6Smaya uint32_t ReadLength[4]; 34410e230b6Smaya uint32_t MOCS; 34510e230b6Smaya __gen_address_type Buffer[4]; 34610e230b6Smaya}; 34710e230b6Smaya 34896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 34996c5ddc4SrjsGFX75_3DSTATE_CONSTANT_BODY_pack(__attribute__((unused)) __gen_user_data *data, 35010e230b6Smaya __attribute__((unused)) void * restrict dst, 35196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_BODY * restrict values) 35210e230b6Smaya{ 35310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 35410e230b6Smaya 35510e230b6Smaya dw[0] = 35610e230b6Smaya __gen_uint(values->ReadLength[0], 0, 15) | 35710e230b6Smaya __gen_uint(values->ReadLength[1], 16, 31); 35810e230b6Smaya 35910e230b6Smaya dw[1] = 36010e230b6Smaya __gen_uint(values->ReadLength[2], 0, 15) | 36110e230b6Smaya __gen_uint(values->ReadLength[3], 16, 31); 36210e230b6Smaya 36310e230b6Smaya const uint32_t v2 = 36410e230b6Smaya __gen_uint(values->MOCS, 0, 4); 36596c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->Buffer[0], v2, 5, 31); 36610e230b6Smaya 36796c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->Buffer[1], 0, 5, 31); 36810e230b6Smaya 36996c5ddc4Srjs dw[4] = __gen_address(data, &dw[4], values->Buffer[2], 0, 5, 31); 37010e230b6Smaya 37196c5ddc4Srjs dw[5] = __gen_address(data, &dw[5], values->Buffer[3], 0, 5, 31); 37210e230b6Smaya} 37310e230b6Smaya 37496c5ddc4Srjs#define GFX75_BINDING_TABLE_EDIT_ENTRY_length 1 37596c5ddc4Srjsstruct GFX75_BINDING_TABLE_EDIT_ENTRY { 37610e230b6Smaya uint64_t SurfaceStatePointer; 37710e230b6Smaya uint32_t BindingTableIndex; 37810e230b6Smaya}; 37910e230b6Smaya 38096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 38196c5ddc4SrjsGFX75_BINDING_TABLE_EDIT_ENTRY_pack(__attribute__((unused)) __gen_user_data *data, 38210e230b6Smaya __attribute__((unused)) void * restrict dst, 38396c5ddc4Srjs __attribute__((unused)) const struct GFX75_BINDING_TABLE_EDIT_ENTRY * restrict values) 38410e230b6Smaya{ 38510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 38610e230b6Smaya 38710e230b6Smaya dw[0] = 38810e230b6Smaya __gen_offset(values->SurfaceStatePointer, 0, 15) | 38910e230b6Smaya __gen_uint(values->BindingTableIndex, 16, 23); 39010e230b6Smaya} 39110e230b6Smaya 39296c5ddc4Srjs#define GFX75_BINDING_TABLE_STATE_length 1 39396c5ddc4Srjsstruct GFX75_BINDING_TABLE_STATE { 39410e230b6Smaya uint64_t SurfaceStatePointer; 39510e230b6Smaya}; 39610e230b6Smaya 39796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 39896c5ddc4SrjsGFX75_BINDING_TABLE_STATE_pack(__attribute__((unused)) __gen_user_data *data, 39910e230b6Smaya __attribute__((unused)) void * restrict dst, 40096c5ddc4Srjs __attribute__((unused)) const struct GFX75_BINDING_TABLE_STATE * restrict values) 40110e230b6Smaya{ 40210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 40310e230b6Smaya 40410e230b6Smaya dw[0] = 40510e230b6Smaya __gen_offset(values->SurfaceStatePointer, 5, 31); 40610e230b6Smaya} 40710e230b6Smaya 40896c5ddc4Srjs#define GFX75_BLEND_STATE_ENTRY_length 2 40996c5ddc4Srjsstruct GFX75_BLEND_STATE_ENTRY { 41096c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Factor DestinationBlendFactor; 41196c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Factor SourceBlendFactor; 41296c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Function ColorBlendFunction; 41396c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Factor DestinationAlphaBlendFactor; 41496c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Factor SourceAlphaBlendFactor; 41596c5ddc4Srjs enum GFX75_3D_Color_Buffer_Blend_Function AlphaBlendFunction; 41610e230b6Smaya bool IndependentAlphaBlendEnable; 41710e230b6Smaya bool ColorBufferBlendEnable; 41810e230b6Smaya bool PostBlendColorClampEnable; 41910e230b6Smaya bool PreBlendColorClampEnable; 42010e230b6Smaya uint32_t ColorClampRange; 42110e230b6Smaya#define COLORCLAMP_UNORM 0 42210e230b6Smaya#define COLORCLAMP_SNORM 1 42310e230b6Smaya#define COLORCLAMP_RTFORMAT 2 42410e230b6Smaya uint32_t YDitherOffset; 42510e230b6Smaya uint32_t XDitherOffset; 42610e230b6Smaya bool ColorDitherEnable; 42796c5ddc4Srjs enum GFX75_3D_Compare_Function AlphaTestFunction; 42810e230b6Smaya bool AlphaTestEnable; 42996c5ddc4Srjs enum GFX75_3D_Logic_Op_Function LogicOpFunction; 43010e230b6Smaya bool LogicOpEnable; 43110e230b6Smaya bool WriteDisableBlue; 43210e230b6Smaya bool WriteDisableGreen; 43310e230b6Smaya bool WriteDisableRed; 43410e230b6Smaya bool WriteDisableAlpha; 43510e230b6Smaya bool AlphaToCoverageDitherEnable; 43610e230b6Smaya bool AlphaToOneEnable; 43710e230b6Smaya bool AlphaToCoverageEnable; 43810e230b6Smaya}; 43910e230b6Smaya 44096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 44196c5ddc4SrjsGFX75_BLEND_STATE_ENTRY_pack(__attribute__((unused)) __gen_user_data *data, 44210e230b6Smaya __attribute__((unused)) void * restrict dst, 44396c5ddc4Srjs __attribute__((unused)) const struct GFX75_BLEND_STATE_ENTRY * restrict values) 44410e230b6Smaya{ 44510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 44610e230b6Smaya 44710e230b6Smaya dw[0] = 44810e230b6Smaya __gen_uint(values->DestinationBlendFactor, 0, 4) | 44910e230b6Smaya __gen_uint(values->SourceBlendFactor, 5, 9) | 45010e230b6Smaya __gen_uint(values->ColorBlendFunction, 11, 13) | 45110e230b6Smaya __gen_uint(values->DestinationAlphaBlendFactor, 15, 19) | 45210e230b6Smaya __gen_uint(values->SourceAlphaBlendFactor, 20, 24) | 45310e230b6Smaya __gen_uint(values->AlphaBlendFunction, 26, 28) | 45410e230b6Smaya __gen_uint(values->IndependentAlphaBlendEnable, 30, 30) | 45510e230b6Smaya __gen_uint(values->ColorBufferBlendEnable, 31, 31); 45610e230b6Smaya 45710e230b6Smaya dw[1] = 45810e230b6Smaya __gen_uint(values->PostBlendColorClampEnable, 0, 0) | 45910e230b6Smaya __gen_uint(values->PreBlendColorClampEnable, 1, 1) | 46010e230b6Smaya __gen_uint(values->ColorClampRange, 2, 3) | 46110e230b6Smaya __gen_uint(values->YDitherOffset, 8, 9) | 46210e230b6Smaya __gen_uint(values->XDitherOffset, 10, 11) | 46310e230b6Smaya __gen_uint(values->ColorDitherEnable, 12, 12) | 46410e230b6Smaya __gen_uint(values->AlphaTestFunction, 13, 15) | 46510e230b6Smaya __gen_uint(values->AlphaTestEnable, 16, 16) | 46610e230b6Smaya __gen_uint(values->LogicOpFunction, 18, 21) | 46710e230b6Smaya __gen_uint(values->LogicOpEnable, 22, 22) | 46810e230b6Smaya __gen_uint(values->WriteDisableBlue, 24, 24) | 46910e230b6Smaya __gen_uint(values->WriteDisableGreen, 25, 25) | 47010e230b6Smaya __gen_uint(values->WriteDisableRed, 26, 26) | 47110e230b6Smaya __gen_uint(values->WriteDisableAlpha, 27, 27) | 47210e230b6Smaya __gen_uint(values->AlphaToCoverageDitherEnable, 29, 29) | 47310e230b6Smaya __gen_uint(values->AlphaToOneEnable, 30, 30) | 47410e230b6Smaya __gen_uint(values->AlphaToCoverageEnable, 31, 31); 47510e230b6Smaya} 47610e230b6Smaya 47796c5ddc4Srjs#define GFX75_BLEND_STATE_length 0 47896c5ddc4Srjsstruct GFX75_BLEND_STATE { 47910e230b6Smaya /* variable length fields follow */ 48010e230b6Smaya}; 48110e230b6Smaya 48296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 48396c5ddc4SrjsGFX75_BLEND_STATE_pack(__attribute__((unused)) __gen_user_data *data, 48410e230b6Smaya __attribute__((unused)) void * restrict dst, 48596c5ddc4Srjs __attribute__((unused)) const struct GFX75_BLEND_STATE * restrict values) 48610e230b6Smaya{ 48710e230b6Smaya} 48810e230b6Smaya 48996c5ddc4Srjs#define GFX75_CC_VIEWPORT_length 2 49096c5ddc4Srjsstruct GFX75_CC_VIEWPORT { 49110e230b6Smaya float MinimumDepth; 49210e230b6Smaya float MaximumDepth; 49310e230b6Smaya}; 49410e230b6Smaya 49596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 49696c5ddc4SrjsGFX75_CC_VIEWPORT_pack(__attribute__((unused)) __gen_user_data *data, 49710e230b6Smaya __attribute__((unused)) void * restrict dst, 49896c5ddc4Srjs __attribute__((unused)) const struct GFX75_CC_VIEWPORT * restrict values) 49910e230b6Smaya{ 50010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 50110e230b6Smaya 50210e230b6Smaya dw[0] = 50310e230b6Smaya __gen_float(values->MinimumDepth); 50410e230b6Smaya 50510e230b6Smaya dw[1] = 50610e230b6Smaya __gen_float(values->MaximumDepth); 50710e230b6Smaya} 50810e230b6Smaya 50996c5ddc4Srjs#define GFX75_COLOR_CALC_STATE_length 6 51096c5ddc4Srjsstruct GFX75_COLOR_CALC_STATE { 51110e230b6Smaya uint32_t AlphaTestFormat; 51210e230b6Smaya#define ALPHATEST_UNORM8 0 51310e230b6Smaya#define ALPHATEST_FLOAT32 1 51410e230b6Smaya bool RoundDisableFunctionDisable; 51510e230b6Smaya uint32_t BackfaceStencilReferenceValue; 51610e230b6Smaya uint32_t StencilReferenceValue; 51710e230b6Smaya uint32_t AlphaReferenceValueAsUNORM8; 51810e230b6Smaya float AlphaReferenceValueAsFLOAT32; 51910e230b6Smaya float BlendConstantColorRed; 52010e230b6Smaya float BlendConstantColorGreen; 52110e230b6Smaya float BlendConstantColorBlue; 52210e230b6Smaya float BlendConstantColorAlpha; 52310e230b6Smaya}; 52410e230b6Smaya 52596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 52696c5ddc4SrjsGFX75_COLOR_CALC_STATE_pack(__attribute__((unused)) __gen_user_data *data, 52710e230b6Smaya __attribute__((unused)) void * restrict dst, 52896c5ddc4Srjs __attribute__((unused)) const struct GFX75_COLOR_CALC_STATE * restrict values) 52910e230b6Smaya{ 53010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 53110e230b6Smaya 53210e230b6Smaya dw[0] = 53310e230b6Smaya __gen_uint(values->AlphaTestFormat, 0, 0) | 53410e230b6Smaya __gen_uint(values->RoundDisableFunctionDisable, 15, 15) | 53510e230b6Smaya __gen_uint(values->BackfaceStencilReferenceValue, 16, 23) | 53610e230b6Smaya __gen_uint(values->StencilReferenceValue, 24, 31); 53710e230b6Smaya 53810e230b6Smaya dw[1] = 53910e230b6Smaya __gen_uint(values->AlphaReferenceValueAsUNORM8, 0, 31) | 54010e230b6Smaya __gen_float(values->AlphaReferenceValueAsFLOAT32); 54110e230b6Smaya 54210e230b6Smaya dw[2] = 54310e230b6Smaya __gen_float(values->BlendConstantColorRed); 54410e230b6Smaya 54510e230b6Smaya dw[3] = 54610e230b6Smaya __gen_float(values->BlendConstantColorGreen); 54710e230b6Smaya 54810e230b6Smaya dw[4] = 54910e230b6Smaya __gen_float(values->BlendConstantColorBlue); 55010e230b6Smaya 55110e230b6Smaya dw[5] = 55210e230b6Smaya __gen_float(values->BlendConstantColorAlpha); 55310e230b6Smaya} 55410e230b6Smaya 55596c5ddc4Srjs#define GFX75_DEPTH_STENCIL_STATE_length 3 55696c5ddc4Srjsstruct GFX75_DEPTH_STENCIL_STATE { 55796c5ddc4Srjs enum GFX75_3D_Stencil_Operation BackfaceStencilPassDepthPassOp; 55896c5ddc4Srjs enum GFX75_3D_Stencil_Operation BackfaceStencilPassDepthFailOp; 55996c5ddc4Srjs enum GFX75_3D_Stencil_Operation BackfaceStencilFailOp; 56096c5ddc4Srjs enum GFX75_3D_Compare_Function BackfaceStencilTestFunction; 56110e230b6Smaya bool DoubleSidedStencilEnable; 56210e230b6Smaya bool StencilBufferWriteEnable; 56396c5ddc4Srjs enum GFX75_3D_Stencil_Operation StencilPassDepthPassOp; 56496c5ddc4Srjs enum GFX75_3D_Stencil_Operation StencilPassDepthFailOp; 56596c5ddc4Srjs enum GFX75_3D_Stencil_Operation StencilFailOp; 56696c5ddc4Srjs enum GFX75_3D_Compare_Function StencilTestFunction; 56710e230b6Smaya bool StencilTestEnable; 56810e230b6Smaya uint32_t BackfaceStencilWriteMask; 56910e230b6Smaya uint32_t BackfaceStencilTestMask; 57010e230b6Smaya uint32_t StencilWriteMask; 57110e230b6Smaya uint32_t StencilTestMask; 57210e230b6Smaya bool DepthBufferWriteEnable; 57396c5ddc4Srjs enum GFX75_3D_Compare_Function DepthTestFunction; 57410e230b6Smaya bool DepthTestEnable; 57510e230b6Smaya}; 57610e230b6Smaya 57796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 57896c5ddc4SrjsGFX75_DEPTH_STENCIL_STATE_pack(__attribute__((unused)) __gen_user_data *data, 57910e230b6Smaya __attribute__((unused)) void * restrict dst, 58096c5ddc4Srjs __attribute__((unused)) const struct GFX75_DEPTH_STENCIL_STATE * restrict values) 58110e230b6Smaya{ 58210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 58310e230b6Smaya 58410e230b6Smaya dw[0] = 58510e230b6Smaya __gen_uint(values->BackfaceStencilPassDepthPassOp, 3, 5) | 58610e230b6Smaya __gen_uint(values->BackfaceStencilPassDepthFailOp, 6, 8) | 58710e230b6Smaya __gen_uint(values->BackfaceStencilFailOp, 9, 11) | 58810e230b6Smaya __gen_uint(values->BackfaceStencilTestFunction, 12, 14) | 58910e230b6Smaya __gen_uint(values->DoubleSidedStencilEnable, 15, 15) | 59010e230b6Smaya __gen_uint(values->StencilBufferWriteEnable, 18, 18) | 59110e230b6Smaya __gen_uint(values->StencilPassDepthPassOp, 19, 21) | 59210e230b6Smaya __gen_uint(values->StencilPassDepthFailOp, 22, 24) | 59310e230b6Smaya __gen_uint(values->StencilFailOp, 25, 27) | 59410e230b6Smaya __gen_uint(values->StencilTestFunction, 28, 30) | 59510e230b6Smaya __gen_uint(values->StencilTestEnable, 31, 31); 59610e230b6Smaya 59710e230b6Smaya dw[1] = 59810e230b6Smaya __gen_uint(values->BackfaceStencilWriteMask, 0, 7) | 59910e230b6Smaya __gen_uint(values->BackfaceStencilTestMask, 8, 15) | 60010e230b6Smaya __gen_uint(values->StencilWriteMask, 16, 23) | 60110e230b6Smaya __gen_uint(values->StencilTestMask, 24, 31); 60210e230b6Smaya 60310e230b6Smaya dw[2] = 60410e230b6Smaya __gen_uint(values->DepthBufferWriteEnable, 26, 26) | 60510e230b6Smaya __gen_uint(values->DepthTestFunction, 27, 29) | 60610e230b6Smaya __gen_uint(values->DepthTestEnable, 31, 31); 60710e230b6Smaya} 60810e230b6Smaya 60996c5ddc4Srjs#define GFX75_GATHER_CONSTANT_ENTRY_length 1 61096c5ddc4Srjsstruct GFX75_GATHER_CONSTANT_ENTRY { 61110e230b6Smaya uint32_t BindingTableIndexOffset; 61210e230b6Smaya uint32_t ChannelMask; 61310e230b6Smaya uint64_t ConstantBufferOffset; 61410e230b6Smaya}; 61510e230b6Smaya 61696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 61796c5ddc4SrjsGFX75_GATHER_CONSTANT_ENTRY_pack(__attribute__((unused)) __gen_user_data *data, 61810e230b6Smaya __attribute__((unused)) void * restrict dst, 61996c5ddc4Srjs __attribute__((unused)) const struct GFX75_GATHER_CONSTANT_ENTRY * restrict values) 62010e230b6Smaya{ 62110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 62210e230b6Smaya 62310e230b6Smaya dw[0] = 62410e230b6Smaya __gen_uint(values->BindingTableIndexOffset, 0, 3) | 62510e230b6Smaya __gen_uint(values->ChannelMask, 4, 7) | 62610e230b6Smaya __gen_offset(values->ConstantBufferOffset, 8, 15); 62710e230b6Smaya} 62810e230b6Smaya 62996c5ddc4Srjs#define GFX75_INLINE_DATA_DESCRIPTION_FOR_MFD_AVC_BSD_OBJECT_length 3 63096c5ddc4Srjsstruct GFX75_INLINE_DATA_DESCRIPTION_FOR_MFD_AVC_BSD_OBJECT { 63110e230b6Smaya bool MBErrorConcealmentPSliceWeightPredictionDisable; 63210e230b6Smaya bool MBErrorConcealmentPSliceMotionVectorsOverrideDisable; 63310e230b6Smaya bool MBErrorConcealmentBSpatialWeightPredictionDisable; 63410e230b6Smaya bool MBErrorConcealmentBSpatialMotionVectorsOverrideDisable; 63510e230b6Smaya uint32_t MBErrorConcealmentBSpatialPredictionMode; 63610e230b6Smaya bool MBHeaderErrorHandling; 63710e230b6Smaya bool EntropyErrorHandling; 63810e230b6Smaya bool MPRErrorHandling; 63910e230b6Smaya bool BSDPrematureCompleteErrorHandling; 64010e230b6Smaya uint32_t ConcealmentPictureID; 64110e230b6Smaya bool MBErrorConcealmentBTemporalWeightPredictionDisable; 64210e230b6Smaya bool MBErrorConcealmentBTemporalMotionVectorsOverrideEnable; 64310e230b6Smaya uint32_t MBErrorConcealmentBTemporalPredictionMode; 64410e230b6Smaya bool IntraPredMode4x48x8LumaErrorControl; 64510e230b6Smaya uint32_t InitCurrentMBNumber; 64610e230b6Smaya uint32_t ConcealmentMethod; 64710e230b6Smaya uint32_t FirstMBBitOffset; 64810e230b6Smaya bool LastSlice; 64910e230b6Smaya bool EmulationPreventionBytePresent; 65010e230b6Smaya bool FixPrevMBSkipped; 65110e230b6Smaya uint32_t FirstMBByteOffsetofSliceDataorSliceHeader; 65210e230b6Smaya bool IntraPredictionErrorControl; 65310e230b6Smaya bool Intra8x84x4PredictionErrorConcealmentControl; 65410e230b6Smaya uint32_t BSliceTemporalInterConcealmentMode; 65510e230b6Smaya uint32_t BSliceSpatialInterConcealmentMode; 65610e230b6Smaya uint32_t BSliceInterDirectTypeConcealmentMode; 65710e230b6Smaya uint32_t BSliceConcealmentMode; 65810e230b6Smaya#define IntraConcealment 1 65910e230b6Smaya#define InterConcealment 0 66010e230b6Smaya uint32_t PSliceInterConcealmentMode; 66110e230b6Smaya uint32_t PSliceConcealmentMode; 66210e230b6Smaya#define IntraConcealment 1 66310e230b6Smaya#define InterConcealment 0 66410e230b6Smaya uint32_t ConcealmentReferencePictureFieldBit; 66510e230b6Smaya uint32_t ISliceConcealmentMode; 66610e230b6Smaya#define IntraConcealment 1 66710e230b6Smaya#define InterConcealment 0 66810e230b6Smaya}; 66910e230b6Smaya 67096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 67196c5ddc4SrjsGFX75_INLINE_DATA_DESCRIPTION_FOR_MFD_AVC_BSD_OBJECT_pack(__attribute__((unused)) __gen_user_data *data, 67210e230b6Smaya __attribute__((unused)) void * restrict dst, 67396c5ddc4Srjs __attribute__((unused)) const struct GFX75_INLINE_DATA_DESCRIPTION_FOR_MFD_AVC_BSD_OBJECT * restrict values) 67410e230b6Smaya{ 67510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 67610e230b6Smaya 67710e230b6Smaya dw[0] = 67810e230b6Smaya __gen_uint(values->MBErrorConcealmentPSliceWeightPredictionDisable, 0, 0) | 67910e230b6Smaya __gen_uint(values->MBErrorConcealmentPSliceMotionVectorsOverrideDisable, 1, 1) | 68010e230b6Smaya __gen_uint(values->MBErrorConcealmentBSpatialWeightPredictionDisable, 3, 3) | 68110e230b6Smaya __gen_uint(values->MBErrorConcealmentBSpatialMotionVectorsOverrideDisable, 4, 4) | 68210e230b6Smaya __gen_uint(values->MBErrorConcealmentBSpatialPredictionMode, 6, 7) | 68310e230b6Smaya __gen_uint(values->MBHeaderErrorHandling, 8, 8) | 68410e230b6Smaya __gen_uint(values->EntropyErrorHandling, 10, 10) | 68510e230b6Smaya __gen_uint(values->MPRErrorHandling, 12, 12) | 68610e230b6Smaya __gen_uint(values->BSDPrematureCompleteErrorHandling, 14, 14) | 68710e230b6Smaya __gen_uint(values->ConcealmentPictureID, 16, 21) | 68810e230b6Smaya __gen_uint(values->MBErrorConcealmentBTemporalWeightPredictionDisable, 24, 24) | 68910e230b6Smaya __gen_uint(values->MBErrorConcealmentBTemporalMotionVectorsOverrideEnable, 25, 25) | 69010e230b6Smaya __gen_uint(values->MBErrorConcealmentBTemporalPredictionMode, 27, 28) | 69110e230b6Smaya __gen_uint(values->IntraPredMode4x48x8LumaErrorControl, 29, 29) | 69210e230b6Smaya __gen_uint(values->InitCurrentMBNumber, 30, 30) | 69310e230b6Smaya __gen_uint(values->ConcealmentMethod, 31, 31); 69410e230b6Smaya 69510e230b6Smaya dw[1] = 69610e230b6Smaya __gen_uint(values->FirstMBBitOffset, 0, 2) | 69710e230b6Smaya __gen_uint(values->LastSlice, 3, 3) | 69810e230b6Smaya __gen_uint(values->EmulationPreventionBytePresent, 4, 4) | 69910e230b6Smaya __gen_uint(values->FixPrevMBSkipped, 7, 7) | 70010e230b6Smaya __gen_uint(values->FirstMBByteOffsetofSliceDataorSliceHeader, 16, 31); 70110e230b6Smaya 70210e230b6Smaya dw[2] = 70310e230b6Smaya __gen_uint(values->IntraPredictionErrorControl, 0, 0) | 70410e230b6Smaya __gen_uint(values->Intra8x84x4PredictionErrorConcealmentControl, 1, 1) | 70510e230b6Smaya __gen_uint(values->BSliceTemporalInterConcealmentMode, 4, 6) | 70610e230b6Smaya __gen_uint(values->BSliceSpatialInterConcealmentMode, 8, 10) | 70710e230b6Smaya __gen_uint(values->BSliceInterDirectTypeConcealmentMode, 12, 13) | 70810e230b6Smaya __gen_uint(values->BSliceConcealmentMode, 15, 15) | 70910e230b6Smaya __gen_uint(values->PSliceInterConcealmentMode, 16, 18) | 71010e230b6Smaya __gen_uint(values->PSliceConcealmentMode, 23, 23) | 71110e230b6Smaya __gen_uint(values->ConcealmentReferencePictureFieldBit, 24, 29) | 71210e230b6Smaya __gen_uint(values->ISliceConcealmentMode, 31, 31); 71310e230b6Smaya} 71410e230b6Smaya 71596c5ddc4Srjs#define GFX75_INTERFACE_DESCRIPTOR_DATA_length 8 71696c5ddc4Srjsstruct GFX75_INTERFACE_DESCRIPTOR_DATA { 71710e230b6Smaya uint64_t KernelStartPointer; 71810e230b6Smaya bool SoftwareExceptionEnable; 71910e230b6Smaya bool MaskStackExceptionEnable; 72010e230b6Smaya bool IllegalOpcodeExceptionEnable; 72110e230b6Smaya uint32_t FloatingPointMode; 72210e230b6Smaya#define IEEE754 0 72310e230b6Smaya#define Alternate 1 72410e230b6Smaya uint32_t ThreadPriority; 72510e230b6Smaya#define NormalPriority 0 72610e230b6Smaya#define HighPriority 1 72710e230b6Smaya bool SingleProgramFlow; 72810e230b6Smaya uint32_t SamplerCount; 72910e230b6Smaya#define Nosamplersused 0 73010e230b6Smaya#define Between1and4samplersused 1 73110e230b6Smaya#define Between5and8samplersused 2 73210e230b6Smaya#define Between9and12samplersused 3 73310e230b6Smaya#define Between13and16samplersused 4 73410e230b6Smaya uint64_t SamplerStatePointer; 73510e230b6Smaya uint32_t BindingTableEntryCount; 73610e230b6Smaya uint64_t BindingTablePointer; 73710e230b6Smaya uint32_t ConstantURBEntryReadLength; 73810e230b6Smaya uint32_t NumberofThreadsinGPGPUThreadGroup; 73910e230b6Smaya uint32_t SharedLocalMemorySize; 74010e230b6Smaya bool BarrierEnable; 74110e230b6Smaya uint32_t RoundingMode; 74210e230b6Smaya#define RTNE 0 74310e230b6Smaya#define RU 1 74410e230b6Smaya#define RD 2 74510e230b6Smaya#define RTZ 3 74610e230b6Smaya uint32_t CrossThreadConstantDataReadLength; 74710e230b6Smaya}; 74810e230b6Smaya 74996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 75096c5ddc4SrjsGFX75_INTERFACE_DESCRIPTOR_DATA_pack(__attribute__((unused)) __gen_user_data *data, 75110e230b6Smaya __attribute__((unused)) void * restrict dst, 75296c5ddc4Srjs __attribute__((unused)) const struct GFX75_INTERFACE_DESCRIPTOR_DATA * restrict values) 75310e230b6Smaya{ 75410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 75510e230b6Smaya 75610e230b6Smaya dw[0] = 75710e230b6Smaya __gen_offset(values->KernelStartPointer, 6, 31); 75810e230b6Smaya 75910e230b6Smaya dw[1] = 76010e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 7, 7) | 76110e230b6Smaya __gen_uint(values->MaskStackExceptionEnable, 11, 11) | 76210e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 76310e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 76410e230b6Smaya __gen_uint(values->ThreadPriority, 17, 17) | 76510e230b6Smaya __gen_uint(values->SingleProgramFlow, 18, 18); 76610e230b6Smaya 76710e230b6Smaya dw[2] = 76810e230b6Smaya __gen_uint(values->SamplerCount, 2, 4) | 76910e230b6Smaya __gen_offset(values->SamplerStatePointer, 5, 31); 77010e230b6Smaya 77110e230b6Smaya dw[3] = 77210e230b6Smaya __gen_uint(values->BindingTableEntryCount, 0, 4) | 77310e230b6Smaya __gen_offset(values->BindingTablePointer, 5, 15); 77410e230b6Smaya 77510e230b6Smaya dw[4] = 77610e230b6Smaya __gen_uint(values->ConstantURBEntryReadLength, 16, 31); 77710e230b6Smaya 77810e230b6Smaya dw[5] = 77910e230b6Smaya __gen_uint(values->NumberofThreadsinGPGPUThreadGroup, 0, 7) | 78010e230b6Smaya __gen_uint(values->SharedLocalMemorySize, 16, 20) | 78110e230b6Smaya __gen_uint(values->BarrierEnable, 21, 21) | 78210e230b6Smaya __gen_uint(values->RoundingMode, 22, 23); 78310e230b6Smaya 78410e230b6Smaya dw[6] = 78510e230b6Smaya __gen_uint(values->CrossThreadConstantDataReadLength, 0, 7); 78610e230b6Smaya 78710e230b6Smaya dw[7] = 0; 78810e230b6Smaya} 78910e230b6Smaya 79096c5ddc4Srjs#define GFX75_MEMORY_OBJECT_CONTROL_STATE_length 1 79196c5ddc4Srjsstruct GFX75_MEMORY_OBJECT_CONTROL_STATE { 79210e230b6Smaya uint32_t L3CacheabilityControlL3CC; 79310e230b6Smaya uint32_t LLCeLLCCacheabilityControlLLCCC; 79410e230b6Smaya}; 79510e230b6Smaya 79696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 79796c5ddc4SrjsGFX75_MEMORY_OBJECT_CONTROL_STATE_pack(__attribute__((unused)) __gen_user_data *data, 79810e230b6Smaya __attribute__((unused)) void * restrict dst, 79996c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEMORY_OBJECT_CONTROL_STATE * restrict values) 80010e230b6Smaya{ 80110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 80210e230b6Smaya 80310e230b6Smaya dw[0] = 80410e230b6Smaya __gen_uint(values->L3CacheabilityControlL3CC, 0, 0) | 80510e230b6Smaya __gen_uint(values->LLCeLLCCacheabilityControlLLCCC, 1, 2); 80610e230b6Smaya} 80710e230b6Smaya 80896c5ddc4Srjs#define GFX75_MFD_MPEG2_BSD_OBJECT_INLINE_DATA_DESCRIPTION_length 2 80996c5ddc4Srjsstruct GFX75_MFD_MPEG2_BSD_OBJECT_INLINE_DATA_DESCRIPTION { 81010e230b6Smaya uint32_t FirstMBBitOffset; 81110e230b6Smaya bool LastMB; 81210e230b6Smaya bool LastPicSlice; 81310e230b6Smaya uint32_t SliceConcealmentType; 81410e230b6Smaya uint32_t SliceConcealmentOverride; 81510e230b6Smaya uint32_t MBCount; 81610e230b6Smaya uint32_t SliceVerticalPosition; 81710e230b6Smaya uint32_t SliceHorizontalPosition; 81810e230b6Smaya uint32_t NextSliceHorizontalPosition; 81910e230b6Smaya uint32_t NextSliceVerticalPosition; 82010e230b6Smaya uint32_t QuantizerScaleCode; 82110e230b6Smaya}; 82210e230b6Smaya 82396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 82496c5ddc4SrjsGFX75_MFD_MPEG2_BSD_OBJECT_INLINE_DATA_DESCRIPTION_pack(__attribute__((unused)) __gen_user_data *data, 82510e230b6Smaya __attribute__((unused)) void * restrict dst, 82696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MFD_MPEG2_BSD_OBJECT_INLINE_DATA_DESCRIPTION * restrict values) 82710e230b6Smaya{ 82810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 82910e230b6Smaya 83010e230b6Smaya dw[0] = 83110e230b6Smaya __gen_uint(values->FirstMBBitOffset, 0, 2) | 83210e230b6Smaya __gen_uint(values->LastMB, 3, 3) | 83310e230b6Smaya __gen_uint(values->LastPicSlice, 5, 5) | 83410e230b6Smaya __gen_uint(values->SliceConcealmentType, 6, 6) | 83510e230b6Smaya __gen_uint(values->SliceConcealmentOverride, 7, 7) | 83610e230b6Smaya __gen_uint(values->MBCount, 8, 15) | 83710e230b6Smaya __gen_uint(values->SliceVerticalPosition, 16, 23) | 83810e230b6Smaya __gen_uint(values->SliceHorizontalPosition, 24, 31); 83910e230b6Smaya 84010e230b6Smaya dw[1] = 84110e230b6Smaya __gen_uint(values->NextSliceHorizontalPosition, 0, 7) | 84210e230b6Smaya __gen_uint(values->NextSliceVerticalPosition, 8, 16) | 84310e230b6Smaya __gen_uint(values->QuantizerScaleCode, 24, 28); 84410e230b6Smaya} 84510e230b6Smaya 84696c5ddc4Srjs#define GFX75_MI_MATH_ALU_INSTRUCTION_length 1 84796c5ddc4Srjsstruct GFX75_MI_MATH_ALU_INSTRUCTION { 84810e230b6Smaya uint32_t Operand2; 84910e230b6Smaya#define MI_ALU_REG0 0 85010e230b6Smaya#define MI_ALU_REG1 1 85110e230b6Smaya#define MI_ALU_REG2 2 85210e230b6Smaya#define MI_ALU_REG3 3 85310e230b6Smaya#define MI_ALU_REG4 4 85410e230b6Smaya#define MI_ALU_REG5 5 85510e230b6Smaya#define MI_ALU_REG6 6 85610e230b6Smaya#define MI_ALU_REG7 7 85710e230b6Smaya#define MI_ALU_REG8 8 85810e230b6Smaya#define MI_ALU_REG9 9 85910e230b6Smaya#define MI_ALU_REG10 10 86010e230b6Smaya#define MI_ALU_REG11 11 86110e230b6Smaya#define MI_ALU_REG12 12 86210e230b6Smaya#define MI_ALU_REG13 13 86310e230b6Smaya#define MI_ALU_REG14 14 86410e230b6Smaya#define MI_ALU_REG15 15 86510e230b6Smaya#define MI_ALU_SRCA 32 86610e230b6Smaya#define MI_ALU_SRCB 33 86710e230b6Smaya#define MI_ALU_ACCU 49 86810e230b6Smaya#define MI_ALU_ZF 50 86910e230b6Smaya#define MI_ALU_CF 51 87010e230b6Smaya uint32_t Operand1; 87110e230b6Smaya#define MI_ALU_REG0 0 87210e230b6Smaya#define MI_ALU_REG1 1 87310e230b6Smaya#define MI_ALU_REG2 2 87410e230b6Smaya#define MI_ALU_REG3 3 87510e230b6Smaya#define MI_ALU_REG4 4 87610e230b6Smaya#define MI_ALU_REG5 5 87710e230b6Smaya#define MI_ALU_REG6 6 87810e230b6Smaya#define MI_ALU_REG7 7 87910e230b6Smaya#define MI_ALU_REG8 8 88010e230b6Smaya#define MI_ALU_REG9 9 88110e230b6Smaya#define MI_ALU_REG10 10 88210e230b6Smaya#define MI_ALU_REG11 11 88310e230b6Smaya#define MI_ALU_REG12 12 88410e230b6Smaya#define MI_ALU_REG13 13 88510e230b6Smaya#define MI_ALU_REG14 14 88610e230b6Smaya#define MI_ALU_REG15 15 88710e230b6Smaya#define MI_ALU_SRCA 32 88810e230b6Smaya#define MI_ALU_SRCB 33 88910e230b6Smaya#define MI_ALU_ACCU 49 89010e230b6Smaya#define MI_ALU_ZF 50 89110e230b6Smaya#define MI_ALU_CF 51 89210e230b6Smaya uint32_t ALUOpcode; 89310e230b6Smaya#define MI_ALU_NOOP 0 89410e230b6Smaya#define MI_ALU_LOAD 128 89510e230b6Smaya#define MI_ALU_LOADINV 1152 89610e230b6Smaya#define MI_ALU_LOAD0 129 89710e230b6Smaya#define MI_ALU_LOAD1 1153 89810e230b6Smaya#define MI_ALU_ADD 256 89910e230b6Smaya#define MI_ALU_SUB 257 90010e230b6Smaya#define MI_ALU_AND 258 90110e230b6Smaya#define MI_ALU_OR 259 90210e230b6Smaya#define MI_ALU_XOR 260 90310e230b6Smaya#define MI_ALU_STORE 384 90410e230b6Smaya#define MI_ALU_STOREINV 1408 90510e230b6Smaya}; 90610e230b6Smaya 90796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 90896c5ddc4SrjsGFX75_MI_MATH_ALU_INSTRUCTION_pack(__attribute__((unused)) __gen_user_data *data, 90910e230b6Smaya __attribute__((unused)) void * restrict dst, 91096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_MATH_ALU_INSTRUCTION * restrict values) 91110e230b6Smaya{ 91210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 91310e230b6Smaya 91410e230b6Smaya dw[0] = 91510e230b6Smaya __gen_uint(values->Operand2, 0, 9) | 91610e230b6Smaya __gen_uint(values->Operand1, 10, 19) | 91710e230b6Smaya __gen_uint(values->ALUOpcode, 20, 31); 91810e230b6Smaya} 91910e230b6Smaya 92096c5ddc4Srjs#define GFX75_PALETTE_ENTRY_length 1 92196c5ddc4Srjsstruct GFX75_PALETTE_ENTRY { 92210e230b6Smaya uint32_t Blue; 92310e230b6Smaya uint32_t Green; 92410e230b6Smaya uint32_t Red; 92510e230b6Smaya uint32_t Alpha; 92610e230b6Smaya}; 92710e230b6Smaya 92896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 92996c5ddc4SrjsGFX75_PALETTE_ENTRY_pack(__attribute__((unused)) __gen_user_data *data, 93010e230b6Smaya __attribute__((unused)) void * restrict dst, 93196c5ddc4Srjs __attribute__((unused)) const struct GFX75_PALETTE_ENTRY * restrict values) 93210e230b6Smaya{ 93310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 93410e230b6Smaya 93510e230b6Smaya dw[0] = 93610e230b6Smaya __gen_uint(values->Blue, 0, 7) | 93710e230b6Smaya __gen_uint(values->Green, 8, 15) | 93810e230b6Smaya __gen_uint(values->Red, 16, 23) | 93910e230b6Smaya __gen_uint(values->Alpha, 24, 31); 94010e230b6Smaya} 94110e230b6Smaya 94296c5ddc4Srjs#define GFX75_RENDER_SURFACE_STATE_length 8 94396c5ddc4Srjsstruct GFX75_RENDER_SURFACE_STATE { 94410e230b6Smaya bool CubeFaceEnablePositiveZ; 94510e230b6Smaya bool CubeFaceEnableNegativeZ; 94610e230b6Smaya bool CubeFaceEnablePositiveY; 94710e230b6Smaya bool CubeFaceEnableNegativeY; 94810e230b6Smaya bool CubeFaceEnablePositiveX; 94910e230b6Smaya bool CubeFaceEnableNegativeX; 95010e230b6Smaya uint32_t MediaBoundaryPixelMode; 95110e230b6Smaya#define NORMAL_MODE 0 95210e230b6Smaya#define PROGRESSIVE_FRAME 2 95310e230b6Smaya#define INTERLACED_FRAME 3 95410e230b6Smaya uint32_t RenderCacheReadWriteMode; 95510e230b6Smaya uint32_t SurfaceArraySpacing; 95610e230b6Smaya#define ARYSPC_FULL 0 95710e230b6Smaya#define ARYSPC_LOD0 1 95810e230b6Smaya uint32_t VerticalLineStrideOffset; 95910e230b6Smaya uint32_t VerticalLineStride; 96010e230b6Smaya uint32_t TileWalk; 96110e230b6Smaya#define TILEWALK_XMAJOR 0 96210e230b6Smaya#define TILEWALK_YMAJOR 1 96310e230b6Smaya bool TiledSurface; 96410e230b6Smaya uint32_t SurfaceHorizontalAlignment; 96510e230b6Smaya#define HALIGN_4 0 96610e230b6Smaya#define HALIGN_8 1 96710e230b6Smaya uint32_t SurfaceVerticalAlignment; 96810e230b6Smaya#define VALIGN_2 0 96910e230b6Smaya#define VALIGN_4 1 97010e230b6Smaya uint32_t SurfaceFormat; 97110e230b6Smaya bool SurfaceArray; 97210e230b6Smaya uint32_t SurfaceType; 97310e230b6Smaya#define SURFTYPE_1D 0 97410e230b6Smaya#define SURFTYPE_2D 1 97510e230b6Smaya#define SURFTYPE_3D 2 97610e230b6Smaya#define SURFTYPE_CUBE 3 97710e230b6Smaya#define SURFTYPE_BUFFER 4 97810e230b6Smaya#define SURFTYPE_STRBUF 5 97910e230b6Smaya#define SURFTYPE_NULL 7 98010e230b6Smaya __gen_address_type SurfaceBaseAddress; 98110e230b6Smaya uint32_t Width; 98210e230b6Smaya uint32_t Height; 98310e230b6Smaya uint32_t SurfacePitch; 98410e230b6Smaya uint32_t IntegerSurfaceFormat; 98510e230b6Smaya uint32_t Depth; 98610e230b6Smaya uint32_t MultisamplePositionPaletteIndex; 98710e230b6Smaya uint32_t StrbufMinimumArrayElement; 98810e230b6Smaya uint32_t NumberofMultisamples; 98910e230b6Smaya#define MULTISAMPLECOUNT_1 0 99010e230b6Smaya#define MULTISAMPLECOUNT_4 2 99110e230b6Smaya#define MULTISAMPLECOUNT_8 3 99210e230b6Smaya uint32_t MultisampledSurfaceStorageFormat; 99310e230b6Smaya#define MSFMT_MSS 0 99410e230b6Smaya#define MSFMT_DEPTH_STENCIL 1 99510e230b6Smaya uint32_t RenderTargetViewExtent; 99610e230b6Smaya uint32_t MinimumArrayElement; 99710e230b6Smaya uint32_t RenderTargetRotation; 99810e230b6Smaya#define RTROTATE_0DEG 0 99910e230b6Smaya#define RTROTATE_90DEG 1 100010e230b6Smaya#define RTROTATE_270DEG 3 100110e230b6Smaya uint32_t MIPCountLOD; 100210e230b6Smaya uint32_t SurfaceMinLOD; 100310e230b6Smaya uint32_t MOCS; 100410e230b6Smaya uint32_t YOffset; 100510e230b6Smaya uint32_t XOffset; 100610e230b6Smaya bool MCSEnable; 100710e230b6Smaya uint32_t YOffsetforUVPlane; 100810e230b6Smaya bool AppendCounterEnable; 100910e230b6Smaya uint32_t AuxiliarySurfacePitch; 101010e230b6Smaya __gen_address_type AppendCounterAddress; 101110e230b6Smaya __gen_address_type AuxiliarySurfaceBaseAddress; 101210e230b6Smaya uint32_t XOffsetforUVPlane; 101310e230b6Smaya uint32_t ReservedMBZ; 101410e230b6Smaya float ResourceMinLOD; 101596c5ddc4Srjs enum GFX75_ShaderChannelSelect ShaderChannelSelectAlpha; 101696c5ddc4Srjs enum GFX75_ShaderChannelSelect ShaderChannelSelectBlue; 101796c5ddc4Srjs enum GFX75_ShaderChannelSelect ShaderChannelSelectGreen; 101896c5ddc4Srjs enum GFX75_ShaderChannelSelect ShaderChannelSelectRed; 101910e230b6Smaya uint32_t AlphaClearColor; 102010e230b6Smaya uint32_t BlueClearColor; 102110e230b6Smaya uint32_t GreenClearColor; 102210e230b6Smaya uint32_t RedClearColor; 102310e230b6Smaya}; 102410e230b6Smaya 102596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 102696c5ddc4SrjsGFX75_RENDER_SURFACE_STATE_pack(__attribute__((unused)) __gen_user_data *data, 102710e230b6Smaya __attribute__((unused)) void * restrict dst, 102896c5ddc4Srjs __attribute__((unused)) const struct GFX75_RENDER_SURFACE_STATE * restrict values) 102910e230b6Smaya{ 103010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 103110e230b6Smaya 103210e230b6Smaya dw[0] = 103310e230b6Smaya __gen_uint(values->CubeFaceEnablePositiveZ, 0, 0) | 103410e230b6Smaya __gen_uint(values->CubeFaceEnableNegativeZ, 1, 1) | 103510e230b6Smaya __gen_uint(values->CubeFaceEnablePositiveY, 2, 2) | 103610e230b6Smaya __gen_uint(values->CubeFaceEnableNegativeY, 3, 3) | 103710e230b6Smaya __gen_uint(values->CubeFaceEnablePositiveX, 4, 4) | 103810e230b6Smaya __gen_uint(values->CubeFaceEnableNegativeX, 5, 5) | 103910e230b6Smaya __gen_uint(values->MediaBoundaryPixelMode, 6, 7) | 104010e230b6Smaya __gen_uint(values->RenderCacheReadWriteMode, 8, 8) | 104110e230b6Smaya __gen_uint(values->SurfaceArraySpacing, 10, 10) | 104210e230b6Smaya __gen_uint(values->VerticalLineStrideOffset, 11, 11) | 104310e230b6Smaya __gen_uint(values->VerticalLineStride, 12, 12) | 104410e230b6Smaya __gen_uint(values->TileWalk, 13, 13) | 104510e230b6Smaya __gen_uint(values->TiledSurface, 14, 14) | 104610e230b6Smaya __gen_uint(values->SurfaceHorizontalAlignment, 15, 15) | 104710e230b6Smaya __gen_uint(values->SurfaceVerticalAlignment, 16, 17) | 104810e230b6Smaya __gen_uint(values->SurfaceFormat, 18, 26) | 104910e230b6Smaya __gen_uint(values->SurfaceArray, 28, 28) | 105010e230b6Smaya __gen_uint(values->SurfaceType, 29, 31); 105110e230b6Smaya 105296c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->SurfaceBaseAddress, 0, 0, 31); 105310e230b6Smaya 105410e230b6Smaya dw[2] = 105510e230b6Smaya __gen_uint(values->Width, 0, 13) | 105610e230b6Smaya __gen_uint(values->Height, 16, 29); 105710e230b6Smaya 105810e230b6Smaya dw[3] = 105910e230b6Smaya __gen_uint(values->SurfacePitch, 0, 17) | 106010e230b6Smaya __gen_uint(values->IntegerSurfaceFormat, 18, 20) | 106110e230b6Smaya __gen_uint(values->Depth, 21, 31); 106210e230b6Smaya 106310e230b6Smaya dw[4] = 106410e230b6Smaya __gen_uint(values->MultisamplePositionPaletteIndex, 0, 2) | 106510e230b6Smaya __gen_uint(values->StrbufMinimumArrayElement, 0, 26) | 106610e230b6Smaya __gen_uint(values->NumberofMultisamples, 3, 5) | 106710e230b6Smaya __gen_uint(values->MultisampledSurfaceStorageFormat, 6, 6) | 106810e230b6Smaya __gen_uint(values->RenderTargetViewExtent, 7, 17) | 106910e230b6Smaya __gen_uint(values->MinimumArrayElement, 18, 28) | 107010e230b6Smaya __gen_uint(values->RenderTargetRotation, 29, 30); 107110e230b6Smaya 107210e230b6Smaya dw[5] = 107310e230b6Smaya __gen_uint(values->MIPCountLOD, 0, 3) | 107410e230b6Smaya __gen_uint(values->SurfaceMinLOD, 4, 7) | 107510e230b6Smaya __gen_uint(values->MOCS, 16, 19) | 107610e230b6Smaya __gen_uint(values->YOffset, 20, 23) | 107710e230b6Smaya __gen_uint(values->XOffset, 25, 31); 107810e230b6Smaya 107910e230b6Smaya const uint32_t v6 = 108010e230b6Smaya __gen_uint(values->MCSEnable, 0, 0) | 108110e230b6Smaya __gen_uint(values->YOffsetforUVPlane, 0, 13) | 108210e230b6Smaya __gen_uint(values->AppendCounterEnable, 1, 1) | 108310e230b6Smaya __gen_uint(values->AuxiliarySurfacePitch, 3, 11) | 108410e230b6Smaya __gen_uint(values->XOffsetforUVPlane, 16, 29) | 108510e230b6Smaya __gen_uint(values->ReservedMBZ, 30, 31); 108696c5ddc4Srjs dw[6] = __gen_address(data, &dw[6], values->AuxiliarySurfaceBaseAddress, v6, 12, 31); 108710e230b6Smaya 108810e230b6Smaya dw[7] = 108910e230b6Smaya __gen_ufixed(values->ResourceMinLOD, 0, 11, 8) | 109010e230b6Smaya __gen_uint(values->ShaderChannelSelectAlpha, 16, 18) | 109110e230b6Smaya __gen_uint(values->ShaderChannelSelectBlue, 19, 21) | 109210e230b6Smaya __gen_uint(values->ShaderChannelSelectGreen, 22, 24) | 109310e230b6Smaya __gen_uint(values->ShaderChannelSelectRed, 25, 27) | 109410e230b6Smaya __gen_uint(values->AlphaClearColor, 28, 28) | 109510e230b6Smaya __gen_uint(values->BlueClearColor, 29, 29) | 109610e230b6Smaya __gen_uint(values->GreenClearColor, 30, 30) | 109710e230b6Smaya __gen_uint(values->RedClearColor, 31, 31); 109810e230b6Smaya} 109910e230b6Smaya 110096c5ddc4Srjs#define GFX75_SAMPLER_BORDER_COLOR_STATE_length 20 110196c5ddc4Srjsstruct GFX75_SAMPLER_BORDER_COLOR_STATE { 110210e230b6Smaya float BorderColorFloatRed; 110310e230b6Smaya float BorderColorFloatGreen; 110410e230b6Smaya float BorderColorFloatBlue; 110510e230b6Smaya float BorderColorFloatAlpha; 110610e230b6Smaya uint32_t BorderColor8bitRed; 110710e230b6Smaya uint32_t BorderColor16bitRed; 110810e230b6Smaya uint32_t BorderColor32bitRed; 110910e230b6Smaya uint32_t BorderColor8bitGreen; 111010e230b6Smaya uint32_t BorderColor8bitBlue; 111110e230b6Smaya uint32_t BorderColor16bitGreen; 111210e230b6Smaya uint32_t BorderColor8bitAlpha; 111310e230b6Smaya uint32_t BorderColor32bitGreen; 111410e230b6Smaya uint32_t BorderColor16bitBlue; 111510e230b6Smaya uint32_t BorderColor32bitBlue; 111610e230b6Smaya uint32_t BorderColor16bitAlpha; 111710e230b6Smaya uint32_t BorderColor32bitAlpha; 111810e230b6Smaya}; 111910e230b6Smaya 112096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 112196c5ddc4SrjsGFX75_SAMPLER_BORDER_COLOR_STATE_pack(__attribute__((unused)) __gen_user_data *data, 112210e230b6Smaya __attribute__((unused)) void * restrict dst, 112396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SAMPLER_BORDER_COLOR_STATE * restrict values) 112410e230b6Smaya{ 112510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 112610e230b6Smaya 112710e230b6Smaya dw[0] = 112810e230b6Smaya __gen_float(values->BorderColorFloatRed); 112910e230b6Smaya 113010e230b6Smaya dw[1] = 113110e230b6Smaya __gen_float(values->BorderColorFloatGreen); 113210e230b6Smaya 113310e230b6Smaya dw[2] = 113410e230b6Smaya __gen_float(values->BorderColorFloatBlue); 113510e230b6Smaya 113610e230b6Smaya dw[3] = 113710e230b6Smaya __gen_float(values->BorderColorFloatAlpha); 113810e230b6Smaya 113910e230b6Smaya dw[4] = 0; 114010e230b6Smaya 114110e230b6Smaya dw[5] = 0; 114210e230b6Smaya 114310e230b6Smaya dw[6] = 0; 114410e230b6Smaya 114510e230b6Smaya dw[7] = 0; 114610e230b6Smaya 114710e230b6Smaya dw[8] = 0; 114810e230b6Smaya 114910e230b6Smaya dw[9] = 0; 115010e230b6Smaya 115110e230b6Smaya dw[10] = 0; 115210e230b6Smaya 115310e230b6Smaya dw[11] = 0; 115410e230b6Smaya 115510e230b6Smaya dw[12] = 0; 115610e230b6Smaya 115710e230b6Smaya dw[13] = 0; 115810e230b6Smaya 115910e230b6Smaya dw[14] = 0; 116010e230b6Smaya 116110e230b6Smaya dw[15] = 0; 116210e230b6Smaya 116310e230b6Smaya dw[16] = 116410e230b6Smaya __gen_uint(values->BorderColor8bitRed, 0, 7) | 116510e230b6Smaya __gen_uint(values->BorderColor16bitRed, 0, 15) | 116610e230b6Smaya __gen_uint(values->BorderColor32bitRed, 0, 31) | 116710e230b6Smaya __gen_uint(values->BorderColor8bitGreen, 8, 15) | 116810e230b6Smaya __gen_uint(values->BorderColor8bitBlue, 16, 23) | 116910e230b6Smaya __gen_uint(values->BorderColor16bitGreen, 16, 31) | 117010e230b6Smaya __gen_uint(values->BorderColor8bitAlpha, 24, 31); 117110e230b6Smaya 117210e230b6Smaya dw[17] = 117310e230b6Smaya __gen_uint(values->BorderColor32bitGreen, 0, 31); 117410e230b6Smaya 117510e230b6Smaya dw[18] = 117610e230b6Smaya __gen_uint(values->BorderColor16bitBlue, 0, 15) | 117710e230b6Smaya __gen_uint(values->BorderColor32bitBlue, 0, 31) | 117810e230b6Smaya __gen_uint(values->BorderColor16bitAlpha, 16, 31); 117910e230b6Smaya 118010e230b6Smaya dw[19] = 118110e230b6Smaya __gen_uint(values->BorderColor32bitAlpha, 0, 31); 118210e230b6Smaya} 118310e230b6Smaya 118496c5ddc4Srjs#define GFX75_SAMPLER_STATE_length 4 118596c5ddc4Srjsstruct GFX75_SAMPLER_STATE { 118610e230b6Smaya uint32_t AnisotropicAlgorithm; 118710e230b6Smaya#define LEGACY 0 118810e230b6Smaya#define EWAApproximation 1 118910e230b6Smaya float TextureLODBias; 119010e230b6Smaya uint32_t MinModeFilter; 119110e230b6Smaya#define MAPFILTER_NEAREST 0 119210e230b6Smaya#define MAPFILTER_LINEAR 1 119310e230b6Smaya#define MAPFILTER_ANISOTROPIC 2 119410e230b6Smaya#define MAPFILTER_MONO 6 119510e230b6Smaya uint32_t MagModeFilter; 119610e230b6Smaya#define MAPFILTER_NEAREST 0 119710e230b6Smaya#define MAPFILTER_LINEAR 1 119810e230b6Smaya#define MAPFILTER_ANISOTROPIC 2 119910e230b6Smaya#define MAPFILTER_MONO 6 120010e230b6Smaya uint32_t MipModeFilter; 120110e230b6Smaya#define MIPFILTER_NONE 0 120210e230b6Smaya#define MIPFILTER_NEAREST 1 120310e230b6Smaya#define MIPFILTER_LINEAR 3 120410e230b6Smaya float BaseMipLevel; 120510e230b6Smaya uint32_t LODPreClampEnable; 120610e230b6Smaya#define CLAMP_ENABLE_OGL 1 120710e230b6Smaya uint32_t TextureBorderColorMode; 120810e230b6Smaya#define DX10OGL 0 120910e230b6Smaya#define DX9 1 121010e230b6Smaya bool SamplerDisable; 121110e230b6Smaya uint32_t CubeSurfaceControlMode; 121210e230b6Smaya#define PROGRAMMED 0 121310e230b6Smaya#define OVERRIDE 1 121410e230b6Smaya uint32_t ShadowFunction; 121596c5ddc4Srjs#define PREFILTEROP_ALWAYS 0 121696c5ddc4Srjs#define PREFILTEROP_NEVER 1 121796c5ddc4Srjs#define PREFILTEROP_LESS 2 121896c5ddc4Srjs#define PREFILTEROP_EQUAL 3 121996c5ddc4Srjs#define PREFILTEROP_LEQUAL 4 122096c5ddc4Srjs#define PREFILTEROP_GREATER 5 122196c5ddc4Srjs#define PREFILTEROP_NOTEQUAL 6 122296c5ddc4Srjs#define PREFILTEROP_GEQUAL 7 122310e230b6Smaya float MaxLOD; 122410e230b6Smaya float MinLOD; 122510e230b6Smaya uint64_t BorderColorPointer; 122696c5ddc4Srjs enum GFX75_TextureCoordinateMode TCZAddressControlMode; 122796c5ddc4Srjs enum GFX75_TextureCoordinateMode TCYAddressControlMode; 122896c5ddc4Srjs enum GFX75_TextureCoordinateMode TCXAddressControlMode; 122910e230b6Smaya bool NonnormalizedCoordinateEnable; 123010e230b6Smaya uint32_t TrilinearFilterQuality; 123110e230b6Smaya#define FULL 0 123210e230b6Smaya#define TRIQUAL_HIGHMAG_CLAMP_MIPFILTER 1 123310e230b6Smaya#define MED 2 123410e230b6Smaya#define LOW 3 123510e230b6Smaya bool RAddressMinFilterRoundingEnable; 123610e230b6Smaya bool RAddressMagFilterRoundingEnable; 123710e230b6Smaya bool VAddressMinFilterRoundingEnable; 123810e230b6Smaya bool VAddressMagFilterRoundingEnable; 123910e230b6Smaya bool UAddressMinFilterRoundingEnable; 124010e230b6Smaya bool UAddressMagFilterRoundingEnable; 124110e230b6Smaya uint32_t MaximumAnisotropy; 124210e230b6Smaya#define RATIO21 0 124310e230b6Smaya#define RATIO41 1 124410e230b6Smaya#define RATIO61 2 124510e230b6Smaya#define RATIO81 3 124610e230b6Smaya#define RATIO101 4 124710e230b6Smaya#define RATIO121 5 124810e230b6Smaya#define RATIO141 6 124910e230b6Smaya#define RATIO161 7 125010e230b6Smaya uint32_t ChromaKeyMode; 125110e230b6Smaya#define KEYFILTER_KILL_ON_ANY_MATCH 0 125210e230b6Smaya#define KEYFILTER_REPLACE_BLACK 1 125310e230b6Smaya uint32_t ChromaKeyIndex; 125410e230b6Smaya bool ChromaKeyEnable; 125510e230b6Smaya}; 125610e230b6Smaya 125796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 125896c5ddc4SrjsGFX75_SAMPLER_STATE_pack(__attribute__((unused)) __gen_user_data *data, 125910e230b6Smaya __attribute__((unused)) void * restrict dst, 126096c5ddc4Srjs __attribute__((unused)) const struct GFX75_SAMPLER_STATE * restrict values) 126110e230b6Smaya{ 126210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 126310e230b6Smaya 126410e230b6Smaya dw[0] = 126510e230b6Smaya __gen_uint(values->AnisotropicAlgorithm, 0, 0) | 126610e230b6Smaya __gen_sfixed(values->TextureLODBias, 1, 13, 8) | 126710e230b6Smaya __gen_uint(values->MinModeFilter, 14, 16) | 126810e230b6Smaya __gen_uint(values->MagModeFilter, 17, 19) | 126910e230b6Smaya __gen_uint(values->MipModeFilter, 20, 21) | 127010e230b6Smaya __gen_ufixed(values->BaseMipLevel, 22, 26, 1) | 127110e230b6Smaya __gen_uint(values->LODPreClampEnable, 28, 28) | 127210e230b6Smaya __gen_uint(values->TextureBorderColorMode, 29, 29) | 127310e230b6Smaya __gen_uint(values->SamplerDisable, 31, 31); 127410e230b6Smaya 127510e230b6Smaya dw[1] = 127610e230b6Smaya __gen_uint(values->CubeSurfaceControlMode, 0, 0) | 127710e230b6Smaya __gen_uint(values->ShadowFunction, 1, 3) | 127810e230b6Smaya __gen_ufixed(values->MaxLOD, 8, 19, 8) | 127910e230b6Smaya __gen_ufixed(values->MinLOD, 20, 31, 8); 128010e230b6Smaya 128110e230b6Smaya dw[2] = 128210e230b6Smaya __gen_offset(values->BorderColorPointer, 5, 31); 128310e230b6Smaya 128410e230b6Smaya dw[3] = 128510e230b6Smaya __gen_uint(values->TCZAddressControlMode, 0, 2) | 128610e230b6Smaya __gen_uint(values->TCYAddressControlMode, 3, 5) | 128710e230b6Smaya __gen_uint(values->TCXAddressControlMode, 6, 8) | 128810e230b6Smaya __gen_uint(values->NonnormalizedCoordinateEnable, 10, 10) | 128910e230b6Smaya __gen_uint(values->TrilinearFilterQuality, 11, 12) | 129010e230b6Smaya __gen_uint(values->RAddressMinFilterRoundingEnable, 13, 13) | 129110e230b6Smaya __gen_uint(values->RAddressMagFilterRoundingEnable, 14, 14) | 129210e230b6Smaya __gen_uint(values->VAddressMinFilterRoundingEnable, 15, 15) | 129310e230b6Smaya __gen_uint(values->VAddressMagFilterRoundingEnable, 16, 16) | 129410e230b6Smaya __gen_uint(values->UAddressMinFilterRoundingEnable, 17, 17) | 129510e230b6Smaya __gen_uint(values->UAddressMagFilterRoundingEnable, 18, 18) | 129610e230b6Smaya __gen_uint(values->MaximumAnisotropy, 19, 21) | 129710e230b6Smaya __gen_uint(values->ChromaKeyMode, 22, 22) | 129810e230b6Smaya __gen_uint(values->ChromaKeyIndex, 23, 24) | 129910e230b6Smaya __gen_uint(values->ChromaKeyEnable, 25, 25); 130010e230b6Smaya} 130110e230b6Smaya 130296c5ddc4Srjs#define GFX75_SCISSOR_RECT_length 2 130396c5ddc4Srjsstruct GFX75_SCISSOR_RECT { 130410e230b6Smaya uint32_t ScissorRectangleXMin; 130510e230b6Smaya uint32_t ScissorRectangleYMin; 130610e230b6Smaya uint32_t ScissorRectangleXMax; 130710e230b6Smaya uint32_t ScissorRectangleYMax; 130810e230b6Smaya}; 130910e230b6Smaya 131096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 131196c5ddc4SrjsGFX75_SCISSOR_RECT_pack(__attribute__((unused)) __gen_user_data *data, 131210e230b6Smaya __attribute__((unused)) void * restrict dst, 131396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SCISSOR_RECT * restrict values) 131410e230b6Smaya{ 131510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 131610e230b6Smaya 131710e230b6Smaya dw[0] = 131810e230b6Smaya __gen_uint(values->ScissorRectangleXMin, 0, 15) | 131910e230b6Smaya __gen_uint(values->ScissorRectangleYMin, 16, 31); 132010e230b6Smaya 132110e230b6Smaya dw[1] = 132210e230b6Smaya __gen_uint(values->ScissorRectangleXMax, 0, 15) | 132310e230b6Smaya __gen_uint(values->ScissorRectangleYMax, 16, 31); 132410e230b6Smaya} 132510e230b6Smaya 132696c5ddc4Srjs#define GFX75_SF_CLIP_VIEWPORT_length 16 132796c5ddc4Srjsstruct GFX75_SF_CLIP_VIEWPORT { 132810e230b6Smaya float ViewportMatrixElementm00; 132910e230b6Smaya float ViewportMatrixElementm11; 133010e230b6Smaya float ViewportMatrixElementm22; 133110e230b6Smaya float ViewportMatrixElementm30; 133210e230b6Smaya float ViewportMatrixElementm31; 133310e230b6Smaya float ViewportMatrixElementm32; 133410e230b6Smaya float XMinClipGuardband; 133510e230b6Smaya float XMaxClipGuardband; 133610e230b6Smaya float YMinClipGuardband; 133710e230b6Smaya float YMaxClipGuardband; 133810e230b6Smaya}; 133910e230b6Smaya 134096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 134196c5ddc4SrjsGFX75_SF_CLIP_VIEWPORT_pack(__attribute__((unused)) __gen_user_data *data, 134210e230b6Smaya __attribute__((unused)) void * restrict dst, 134396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SF_CLIP_VIEWPORT * restrict values) 134410e230b6Smaya{ 134510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 134610e230b6Smaya 134710e230b6Smaya dw[0] = 134810e230b6Smaya __gen_float(values->ViewportMatrixElementm00); 134910e230b6Smaya 135010e230b6Smaya dw[1] = 135110e230b6Smaya __gen_float(values->ViewportMatrixElementm11); 135210e230b6Smaya 135310e230b6Smaya dw[2] = 135410e230b6Smaya __gen_float(values->ViewportMatrixElementm22); 135510e230b6Smaya 135610e230b6Smaya dw[3] = 135710e230b6Smaya __gen_float(values->ViewportMatrixElementm30); 135810e230b6Smaya 135910e230b6Smaya dw[4] = 136010e230b6Smaya __gen_float(values->ViewportMatrixElementm31); 136110e230b6Smaya 136210e230b6Smaya dw[5] = 136310e230b6Smaya __gen_float(values->ViewportMatrixElementm32); 136410e230b6Smaya 136510e230b6Smaya dw[6] = 0; 136610e230b6Smaya 136710e230b6Smaya dw[7] = 0; 136810e230b6Smaya 136910e230b6Smaya dw[8] = 137010e230b6Smaya __gen_float(values->XMinClipGuardband); 137110e230b6Smaya 137210e230b6Smaya dw[9] = 137310e230b6Smaya __gen_float(values->XMaxClipGuardband); 137410e230b6Smaya 137510e230b6Smaya dw[10] = 137610e230b6Smaya __gen_float(values->YMinClipGuardband); 137710e230b6Smaya 137810e230b6Smaya dw[11] = 137910e230b6Smaya __gen_float(values->YMaxClipGuardband); 138010e230b6Smaya 138110e230b6Smaya dw[12] = 0; 138210e230b6Smaya 138310e230b6Smaya dw[13] = 0; 138410e230b6Smaya 138510e230b6Smaya dw[14] = 0; 138610e230b6Smaya 138710e230b6Smaya dw[15] = 0; 138810e230b6Smaya} 138910e230b6Smaya 139096c5ddc4Srjs#define GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_length 1 139196c5ddc4Srjsstruct GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL { 139210e230b6Smaya uint32_t SourceAttribute; 139310e230b6Smaya uint32_t SwizzleSelect; 139410e230b6Smaya#define INPUTATTR 0 139510e230b6Smaya#define INPUTATTR_FACING 1 139610e230b6Smaya#define INPUTATTR_W 2 139710e230b6Smaya#define INPUTATTR_FACING_W 3 139810e230b6Smaya uint32_t ConstantSource; 139910e230b6Smaya#define CONST_0000 0 140010e230b6Smaya#define CONST_0001_FLOAT 1 140110e230b6Smaya#define CONST_1111_FLOAT 2 140210e230b6Smaya#define PRIM_ID 3 140310e230b6Smaya uint32_t SwizzleControlMode; 140410e230b6Smaya bool ComponentOverrideX; 140510e230b6Smaya bool ComponentOverrideY; 140610e230b6Smaya bool ComponentOverrideZ; 140710e230b6Smaya bool ComponentOverrideW; 140810e230b6Smaya}; 140910e230b6Smaya 141096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 141196c5ddc4SrjsGFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(__attribute__((unused)) __gen_user_data *data, 141210e230b6Smaya __attribute__((unused)) void * restrict dst, 141396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL * restrict values) 141410e230b6Smaya{ 141510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 141610e230b6Smaya 141710e230b6Smaya dw[0] = 141810e230b6Smaya __gen_uint(values->SourceAttribute, 0, 4) | 141910e230b6Smaya __gen_uint(values->SwizzleSelect, 6, 7) | 142010e230b6Smaya __gen_uint(values->ConstantSource, 9, 10) | 142110e230b6Smaya __gen_uint(values->SwizzleControlMode, 11, 11) | 142210e230b6Smaya __gen_uint(values->ComponentOverrideX, 12, 12) | 142310e230b6Smaya __gen_uint(values->ComponentOverrideY, 13, 13) | 142410e230b6Smaya __gen_uint(values->ComponentOverrideZ, 14, 14) | 142510e230b6Smaya __gen_uint(values->ComponentOverrideW, 15, 15); 142610e230b6Smaya} 142710e230b6Smaya 142896c5ddc4Srjs#define GFX75_SO_DECL_length 1 142996c5ddc4Srjsstruct GFX75_SO_DECL { 143010e230b6Smaya uint32_t ComponentMask; 143110e230b6Smaya uint32_t RegisterIndex; 143296c5ddc4Srjs bool HoleFlag; 143310e230b6Smaya uint32_t OutputBufferSlot; 143410e230b6Smaya}; 143510e230b6Smaya 143696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 143796c5ddc4SrjsGFX75_SO_DECL_pack(__attribute__((unused)) __gen_user_data *data, 143810e230b6Smaya __attribute__((unused)) void * restrict dst, 143996c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_DECL * restrict values) 144010e230b6Smaya{ 144110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 144210e230b6Smaya 144310e230b6Smaya dw[0] = 144410e230b6Smaya __gen_uint(values->ComponentMask, 0, 3) | 144510e230b6Smaya __gen_uint(values->RegisterIndex, 4, 9) | 144610e230b6Smaya __gen_uint(values->HoleFlag, 11, 11) | 144710e230b6Smaya __gen_uint(values->OutputBufferSlot, 12, 13); 144810e230b6Smaya} 144910e230b6Smaya 145096c5ddc4Srjs#define GFX75_SO_DECL_ENTRY_length 2 145196c5ddc4Srjsstruct GFX75_SO_DECL_ENTRY { 145296c5ddc4Srjs struct GFX75_SO_DECL Stream0Decl; 145396c5ddc4Srjs struct GFX75_SO_DECL Stream1Decl; 145496c5ddc4Srjs struct GFX75_SO_DECL Stream2Decl; 145596c5ddc4Srjs struct GFX75_SO_DECL Stream3Decl; 145610e230b6Smaya}; 145710e230b6Smaya 145896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 145996c5ddc4SrjsGFX75_SO_DECL_ENTRY_pack(__attribute__((unused)) __gen_user_data *data, 146010e230b6Smaya __attribute__((unused)) void * restrict dst, 146196c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_DECL_ENTRY * restrict values) 146210e230b6Smaya{ 146310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 146410e230b6Smaya 146510e230b6Smaya uint32_t v0_0; 146696c5ddc4Srjs GFX75_SO_DECL_pack(data, &v0_0, &values->Stream0Decl); 146710e230b6Smaya 146810e230b6Smaya uint32_t v0_1; 146996c5ddc4Srjs GFX75_SO_DECL_pack(data, &v0_1, &values->Stream1Decl); 147010e230b6Smaya 147110e230b6Smaya dw[0] = 147210e230b6Smaya __gen_uint(v0_0, 0, 15) | 147310e230b6Smaya __gen_uint(v0_1, 16, 31); 147410e230b6Smaya 147510e230b6Smaya uint32_t v1_0; 147696c5ddc4Srjs GFX75_SO_DECL_pack(data, &v1_0, &values->Stream2Decl); 147710e230b6Smaya 147810e230b6Smaya uint32_t v1_1; 147996c5ddc4Srjs GFX75_SO_DECL_pack(data, &v1_1, &values->Stream3Decl); 148010e230b6Smaya 148110e230b6Smaya dw[1] = 148210e230b6Smaya __gen_uint(v1_0, 0, 15) | 148310e230b6Smaya __gen_uint(v1_1, 16, 31); 148410e230b6Smaya} 148510e230b6Smaya 148696c5ddc4Srjs#define GFX75_VERTEX_BUFFER_STATE_length 4 148796c5ddc4Srjsstruct GFX75_VERTEX_BUFFER_STATE { 148810e230b6Smaya uint32_t BufferPitch; 148910e230b6Smaya bool VertexFetchInvalidate; 149010e230b6Smaya bool NullVertexBuffer; 149110e230b6Smaya bool AddressModifyEnable; 149210e230b6Smaya uint32_t MOCS; 149310e230b6Smaya uint32_t BufferAccessType; 149410e230b6Smaya#define VERTEXDATA 0 149510e230b6Smaya#define INSTANCEDATA 1 149610e230b6Smaya uint32_t VertexBufferIndex; 149710e230b6Smaya __gen_address_type BufferStartingAddress; 149810e230b6Smaya __gen_address_type EndAddress; 149910e230b6Smaya uint32_t InstanceDataStepRate; 150010e230b6Smaya}; 150110e230b6Smaya 150296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 150396c5ddc4SrjsGFX75_VERTEX_BUFFER_STATE_pack(__attribute__((unused)) __gen_user_data *data, 150410e230b6Smaya __attribute__((unused)) void * restrict dst, 150596c5ddc4Srjs __attribute__((unused)) const struct GFX75_VERTEX_BUFFER_STATE * restrict values) 150610e230b6Smaya{ 150710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 150810e230b6Smaya 150910e230b6Smaya dw[0] = 151010e230b6Smaya __gen_uint(values->BufferPitch, 0, 11) | 151110e230b6Smaya __gen_uint(values->VertexFetchInvalidate, 12, 12) | 151210e230b6Smaya __gen_uint(values->NullVertexBuffer, 13, 13) | 151310e230b6Smaya __gen_uint(values->AddressModifyEnable, 14, 14) | 151410e230b6Smaya __gen_uint(values->MOCS, 16, 19) | 151510e230b6Smaya __gen_uint(values->BufferAccessType, 20, 20) | 151610e230b6Smaya __gen_uint(values->VertexBufferIndex, 26, 31); 151710e230b6Smaya 151896c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->BufferStartingAddress, 0, 0, 31); 151910e230b6Smaya 152096c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->EndAddress, 0, 0, 31); 152110e230b6Smaya 152210e230b6Smaya dw[3] = 152310e230b6Smaya __gen_uint(values->InstanceDataStepRate, 0, 31); 152410e230b6Smaya} 152510e230b6Smaya 152696c5ddc4Srjs#define GFX75_VERTEX_ELEMENT_STATE_length 2 152796c5ddc4Srjsstruct GFX75_VERTEX_ELEMENT_STATE { 152810e230b6Smaya uint32_t SourceElementOffset; 152910e230b6Smaya bool EdgeFlagEnable; 153010e230b6Smaya uint32_t SourceElementFormat; 153110e230b6Smaya bool Valid; 153210e230b6Smaya uint32_t VertexBufferIndex; 153396c5ddc4Srjs enum GFX75_3D_Vertex_Component_Control Component3Control; 153496c5ddc4Srjs enum GFX75_3D_Vertex_Component_Control Component2Control; 153596c5ddc4Srjs enum GFX75_3D_Vertex_Component_Control Component1Control; 153696c5ddc4Srjs enum GFX75_3D_Vertex_Component_Control Component0Control; 153710e230b6Smaya}; 153810e230b6Smaya 153996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 154096c5ddc4SrjsGFX75_VERTEX_ELEMENT_STATE_pack(__attribute__((unused)) __gen_user_data *data, 154110e230b6Smaya __attribute__((unused)) void * restrict dst, 154296c5ddc4Srjs __attribute__((unused)) const struct GFX75_VERTEX_ELEMENT_STATE * restrict values) 154310e230b6Smaya{ 154410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 154510e230b6Smaya 154610e230b6Smaya dw[0] = 154710e230b6Smaya __gen_uint(values->SourceElementOffset, 0, 11) | 154810e230b6Smaya __gen_uint(values->EdgeFlagEnable, 15, 15) | 154910e230b6Smaya __gen_uint(values->SourceElementFormat, 16, 24) | 155010e230b6Smaya __gen_uint(values->Valid, 25, 25) | 155110e230b6Smaya __gen_uint(values->VertexBufferIndex, 26, 31); 155210e230b6Smaya 155310e230b6Smaya dw[1] = 155410e230b6Smaya __gen_uint(values->Component3Control, 16, 18) | 155510e230b6Smaya __gen_uint(values->Component2Control, 20, 22) | 155610e230b6Smaya __gen_uint(values->Component1Control, 24, 26) | 155710e230b6Smaya __gen_uint(values->Component0Control, 28, 30); 155810e230b6Smaya} 155910e230b6Smaya 156096c5ddc4Srjs#define GFX75_3DPRIMITIVE_length 7 156196c5ddc4Srjs#define GFX75_3DPRIMITIVE_length_bias 2 156296c5ddc4Srjs#define GFX75_3DPRIMITIVE_header \ 156310e230b6Smaya .DWordLength = 5, \ 156410e230b6Smaya ._3DCommandSubOpcode = 0, \ 156510e230b6Smaya ._3DCommandOpcode = 3, \ 156610e230b6Smaya .CommandSubType = 3, \ 156710e230b6Smaya .CommandType = 3 156810e230b6Smaya 156996c5ddc4Srjsstruct GFX75_3DPRIMITIVE { 157010e230b6Smaya uint32_t DWordLength; 157110e230b6Smaya bool PredicateEnable; 157210e230b6Smaya bool UAVCoherencyRequired; 157310e230b6Smaya bool IndirectParameterEnable; 157410e230b6Smaya uint32_t _3DCommandSubOpcode; 157510e230b6Smaya uint32_t _3DCommandOpcode; 157610e230b6Smaya uint32_t CommandSubType; 157710e230b6Smaya uint32_t CommandType; 157896c5ddc4Srjs enum GFX75_3D_Prim_Topo_Type PrimitiveTopologyType; 157910e230b6Smaya uint32_t VertexAccessType; 158010e230b6Smaya#define SEQUENTIAL 0 158110e230b6Smaya#define RANDOM 1 158210e230b6Smaya bool EndOffsetEnable; 158310e230b6Smaya uint32_t VertexCountPerInstance; 158410e230b6Smaya uint32_t StartVertexLocation; 158510e230b6Smaya uint32_t InstanceCount; 158610e230b6Smaya uint32_t StartInstanceLocation; 158710e230b6Smaya int32_t BaseVertexLocation; 158810e230b6Smaya}; 158910e230b6Smaya 159096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 159196c5ddc4SrjsGFX75_3DPRIMITIVE_pack(__attribute__((unused)) __gen_user_data *data, 159210e230b6Smaya __attribute__((unused)) void * restrict dst, 159396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DPRIMITIVE * restrict values) 159410e230b6Smaya{ 159510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 159610e230b6Smaya 159710e230b6Smaya dw[0] = 159810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 159910e230b6Smaya __gen_uint(values->PredicateEnable, 8, 8) | 160010e230b6Smaya __gen_uint(values->UAVCoherencyRequired, 9, 9) | 160110e230b6Smaya __gen_uint(values->IndirectParameterEnable, 10, 10) | 160210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 160310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 160410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 160510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 160610e230b6Smaya 160710e230b6Smaya dw[1] = 160810e230b6Smaya __gen_uint(values->PrimitiveTopologyType, 0, 5) | 160910e230b6Smaya __gen_uint(values->VertexAccessType, 8, 8) | 161010e230b6Smaya __gen_uint(values->EndOffsetEnable, 9, 9); 161110e230b6Smaya 161210e230b6Smaya dw[2] = 161310e230b6Smaya __gen_uint(values->VertexCountPerInstance, 0, 31); 161410e230b6Smaya 161510e230b6Smaya dw[3] = 161610e230b6Smaya __gen_uint(values->StartVertexLocation, 0, 31); 161710e230b6Smaya 161810e230b6Smaya dw[4] = 161910e230b6Smaya __gen_uint(values->InstanceCount, 0, 31); 162010e230b6Smaya 162110e230b6Smaya dw[5] = 162210e230b6Smaya __gen_uint(values->StartInstanceLocation, 0, 31); 162310e230b6Smaya 162410e230b6Smaya dw[6] = 162510e230b6Smaya __gen_sint(values->BaseVertexLocation, 0, 31); 162610e230b6Smaya} 162710e230b6Smaya 162896c5ddc4Srjs#define GFX75_3DSTATE_AA_LINE_PARAMETERS_length 3 162996c5ddc4Srjs#define GFX75_3DSTATE_AA_LINE_PARAMETERS_length_bias 2 163096c5ddc4Srjs#define GFX75_3DSTATE_AA_LINE_PARAMETERS_header \ 163110e230b6Smaya .DWordLength = 1, \ 163210e230b6Smaya ._3DCommandSubOpcode = 10, \ 163310e230b6Smaya ._3DCommandOpcode = 1, \ 163410e230b6Smaya .CommandSubType = 3, \ 163510e230b6Smaya .CommandType = 3 163610e230b6Smaya 163796c5ddc4Srjsstruct GFX75_3DSTATE_AA_LINE_PARAMETERS { 163810e230b6Smaya uint32_t DWordLength; 163910e230b6Smaya uint32_t _3DCommandSubOpcode; 164010e230b6Smaya uint32_t _3DCommandOpcode; 164110e230b6Smaya uint32_t CommandSubType; 164210e230b6Smaya uint32_t CommandType; 164310e230b6Smaya float AACoverageSlope; 164410e230b6Smaya float AACoverageBias; 164510e230b6Smaya float AACoverageEndCapSlope; 164610e230b6Smaya float AACoverageEndCapBias; 164710e230b6Smaya}; 164810e230b6Smaya 164996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 165096c5ddc4SrjsGFX75_3DSTATE_AA_LINE_PARAMETERS_pack(__attribute__((unused)) __gen_user_data *data, 165110e230b6Smaya __attribute__((unused)) void * restrict dst, 165296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_AA_LINE_PARAMETERS * restrict values) 165310e230b6Smaya{ 165410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 165510e230b6Smaya 165610e230b6Smaya dw[0] = 165710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 165810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 165910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 166010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 166110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 166210e230b6Smaya 166310e230b6Smaya dw[1] = 166410e230b6Smaya __gen_ufixed(values->AACoverageSlope, 0, 7, 8) | 166510e230b6Smaya __gen_ufixed(values->AACoverageBias, 16, 23, 8); 166610e230b6Smaya 166710e230b6Smaya dw[2] = 166810e230b6Smaya __gen_ufixed(values->AACoverageEndCapSlope, 0, 7, 8) | 166910e230b6Smaya __gen_ufixed(values->AACoverageEndCapBias, 16, 23, 8); 167010e230b6Smaya} 167110e230b6Smaya 167296c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_DS_length_bias 2 167396c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_DS_header\ 167410e230b6Smaya .DWordLength = 0, \ 167510e230b6Smaya ._3DCommandSubOpcode = 70, \ 167610e230b6Smaya ._3DCommandOpcode = 0, \ 167710e230b6Smaya .CommandSubType = 3, \ 167810e230b6Smaya .CommandType = 3 167910e230b6Smaya 168096c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_EDIT_DS { 168110e230b6Smaya uint32_t DWordLength; 168210e230b6Smaya uint32_t _3DCommandSubOpcode; 168310e230b6Smaya uint32_t _3DCommandOpcode; 168410e230b6Smaya uint32_t CommandSubType; 168510e230b6Smaya uint32_t CommandType; 168610e230b6Smaya uint32_t BindingTableEditTarget; 168710e230b6Smaya#define AllCores 3 168810e230b6Smaya#define Core1 2 168910e230b6Smaya#define Core0 1 169010e230b6Smaya uint32_t BindingTableBlockClear; 169110e230b6Smaya /* variable length fields follow */ 169210e230b6Smaya}; 169310e230b6Smaya 169496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 169596c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_EDIT_DS_pack(__attribute__((unused)) __gen_user_data *data, 169610e230b6Smaya __attribute__((unused)) void * restrict dst, 169796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values) 169810e230b6Smaya{ 169910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 170010e230b6Smaya 170110e230b6Smaya dw[0] = 170210e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 170310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 170410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 170510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 170610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 170710e230b6Smaya 170810e230b6Smaya dw[1] = 170910e230b6Smaya __gen_uint(values->BindingTableEditTarget, 0, 1) | 171010e230b6Smaya __gen_uint(values->BindingTableBlockClear, 16, 31); 171110e230b6Smaya} 171210e230b6Smaya 171396c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_GS_length_bias 2 171496c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_GS_header\ 171510e230b6Smaya .DWordLength = 0, \ 171610e230b6Smaya ._3DCommandSubOpcode = 68, \ 171710e230b6Smaya ._3DCommandOpcode = 0, \ 171810e230b6Smaya .CommandSubType = 3, \ 171910e230b6Smaya .CommandType = 3 172010e230b6Smaya 172196c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_EDIT_GS { 172210e230b6Smaya uint32_t DWordLength; 172310e230b6Smaya uint32_t _3DCommandSubOpcode; 172410e230b6Smaya uint32_t _3DCommandOpcode; 172510e230b6Smaya uint32_t CommandSubType; 172610e230b6Smaya uint32_t CommandType; 172710e230b6Smaya uint32_t BindingTableEditTarget; 172810e230b6Smaya#define AllCores 3 172910e230b6Smaya#define Core1 2 173010e230b6Smaya#define Core0 1 173110e230b6Smaya uint32_t BindingTableBlockClear; 173210e230b6Smaya /* variable length fields follow */ 173310e230b6Smaya}; 173410e230b6Smaya 173596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 173696c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_EDIT_GS_pack(__attribute__((unused)) __gen_user_data *data, 173710e230b6Smaya __attribute__((unused)) void * restrict dst, 173896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values) 173910e230b6Smaya{ 174010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 174110e230b6Smaya 174210e230b6Smaya dw[0] = 174310e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 174410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 174510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 174610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 174710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 174810e230b6Smaya 174910e230b6Smaya dw[1] = 175010e230b6Smaya __gen_uint(values->BindingTableEditTarget, 0, 1) | 175110e230b6Smaya __gen_uint(values->BindingTableBlockClear, 16, 31); 175210e230b6Smaya} 175310e230b6Smaya 175496c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_HS_length_bias 2 175596c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_HS_header\ 175610e230b6Smaya .DWordLength = 0, \ 175710e230b6Smaya ._3DCommandSubOpcode = 69, \ 175810e230b6Smaya ._3DCommandOpcode = 0, \ 175910e230b6Smaya .CommandSubType = 3, \ 176010e230b6Smaya .CommandType = 3 176110e230b6Smaya 176296c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_EDIT_HS { 176310e230b6Smaya uint32_t DWordLength; 176410e230b6Smaya uint32_t _3DCommandSubOpcode; 176510e230b6Smaya uint32_t _3DCommandOpcode; 176610e230b6Smaya uint32_t CommandSubType; 176710e230b6Smaya uint32_t CommandType; 176810e230b6Smaya uint32_t BindingTableEditTarget; 176910e230b6Smaya#define AllCores 3 177010e230b6Smaya#define Core1 2 177110e230b6Smaya#define Core0 1 177210e230b6Smaya uint32_t BindingTableBlockClear; 177310e230b6Smaya /* variable length fields follow */ 177410e230b6Smaya}; 177510e230b6Smaya 177696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 177796c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_EDIT_HS_pack(__attribute__((unused)) __gen_user_data *data, 177810e230b6Smaya __attribute__((unused)) void * restrict dst, 177996c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values) 178010e230b6Smaya{ 178110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 178210e230b6Smaya 178310e230b6Smaya dw[0] = 178410e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 178510e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 178610e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 178710e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 178810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 178910e230b6Smaya 179010e230b6Smaya dw[1] = 179110e230b6Smaya __gen_uint(values->BindingTableEditTarget, 0, 1) | 179210e230b6Smaya __gen_uint(values->BindingTableBlockClear, 16, 31); 179310e230b6Smaya} 179410e230b6Smaya 179596c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_PS_length_bias 2 179696c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_PS_header\ 179710e230b6Smaya .DWordLength = 0, \ 179810e230b6Smaya ._3DCommandSubOpcode = 71, \ 179910e230b6Smaya ._3DCommandOpcode = 0, \ 180010e230b6Smaya .CommandSubType = 3, \ 180110e230b6Smaya .CommandType = 3 180210e230b6Smaya 180396c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_EDIT_PS { 180410e230b6Smaya uint32_t DWordLength; 180510e230b6Smaya uint32_t _3DCommandSubOpcode; 180610e230b6Smaya uint32_t _3DCommandOpcode; 180710e230b6Smaya uint32_t CommandSubType; 180810e230b6Smaya uint32_t CommandType; 180910e230b6Smaya uint32_t BindingTableEditTarget; 181010e230b6Smaya#define AllCores 3 181110e230b6Smaya#define Core1 2 181210e230b6Smaya#define Core0 1 181310e230b6Smaya uint32_t BindingTableBlockClear; 181410e230b6Smaya /* variable length fields follow */ 181510e230b6Smaya}; 181610e230b6Smaya 181796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 181896c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_EDIT_PS_pack(__attribute__((unused)) __gen_user_data *data, 181910e230b6Smaya __attribute__((unused)) void * restrict dst, 182096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values) 182110e230b6Smaya{ 182210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 182310e230b6Smaya 182410e230b6Smaya dw[0] = 182510e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 182610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 182710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 182810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 182910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 183010e230b6Smaya 183110e230b6Smaya dw[1] = 183210e230b6Smaya __gen_uint(values->BindingTableEditTarget, 0, 1) | 183310e230b6Smaya __gen_uint(values->BindingTableBlockClear, 16, 31); 183410e230b6Smaya} 183510e230b6Smaya 183696c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_VS_length_bias 2 183796c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_EDIT_VS_header\ 183810e230b6Smaya .DWordLength = 0, \ 183910e230b6Smaya ._3DCommandSubOpcode = 67, \ 184010e230b6Smaya ._3DCommandOpcode = 0, \ 184110e230b6Smaya .CommandSubType = 3, \ 184210e230b6Smaya .CommandType = 3 184310e230b6Smaya 184496c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_EDIT_VS { 184510e230b6Smaya uint32_t DWordLength; 184610e230b6Smaya uint32_t _3DCommandSubOpcode; 184710e230b6Smaya uint32_t _3DCommandOpcode; 184810e230b6Smaya uint32_t CommandSubType; 184910e230b6Smaya uint32_t CommandType; 185010e230b6Smaya uint32_t BindingTableEditTarget; 185110e230b6Smaya#define AllCores 3 185210e230b6Smaya#define Core1 2 185310e230b6Smaya#define Core0 1 185410e230b6Smaya uint32_t BindingTableBlockClear; 185510e230b6Smaya /* variable length fields follow */ 185610e230b6Smaya}; 185710e230b6Smaya 185896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 185996c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_EDIT_VS_pack(__attribute__((unused)) __gen_user_data *data, 186010e230b6Smaya __attribute__((unused)) void * restrict dst, 186196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values) 186210e230b6Smaya{ 186310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 186410e230b6Smaya 186510e230b6Smaya dw[0] = 186610e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 186710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 186810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 186910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 187010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 187110e230b6Smaya 187210e230b6Smaya dw[1] = 187310e230b6Smaya __gen_uint(values->BindingTableEditTarget, 0, 1) | 187410e230b6Smaya __gen_uint(values->BindingTableBlockClear, 16, 31); 187510e230b6Smaya} 187610e230b6Smaya 187796c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_DS_length 2 187896c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 2 187996c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_DS_header\ 188010e230b6Smaya .DWordLength = 0, \ 188110e230b6Smaya ._3DCommandSubOpcode = 40, \ 188210e230b6Smaya ._3DCommandOpcode = 0, \ 188310e230b6Smaya .CommandSubType = 3, \ 188410e230b6Smaya .CommandType = 3 188510e230b6Smaya 188696c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POINTERS_DS { 188710e230b6Smaya uint32_t DWordLength; 188810e230b6Smaya uint32_t _3DCommandSubOpcode; 188910e230b6Smaya uint32_t _3DCommandOpcode; 189010e230b6Smaya uint32_t CommandSubType; 189110e230b6Smaya uint32_t CommandType; 189210e230b6Smaya uint64_t PointertoDSBindingTable; 189310e230b6Smaya}; 189410e230b6Smaya 189596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 189696c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__attribute__((unused)) __gen_user_data *data, 189710e230b6Smaya __attribute__((unused)) void * restrict dst, 189896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values) 189910e230b6Smaya{ 190010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 190110e230b6Smaya 190210e230b6Smaya dw[0] = 190310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 190410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 190510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 190610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 190710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 190810e230b6Smaya 190910e230b6Smaya dw[1] = 191010e230b6Smaya __gen_offset(values->PointertoDSBindingTable, 5, 15); 191110e230b6Smaya} 191210e230b6Smaya 191396c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_GS_length 2 191496c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 2 191596c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_GS_header\ 191610e230b6Smaya .DWordLength = 0, \ 191710e230b6Smaya ._3DCommandSubOpcode = 41, \ 191810e230b6Smaya ._3DCommandOpcode = 0, \ 191910e230b6Smaya .CommandSubType = 3, \ 192010e230b6Smaya .CommandType = 3 192110e230b6Smaya 192296c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POINTERS_GS { 192310e230b6Smaya uint32_t DWordLength; 192410e230b6Smaya uint32_t _3DCommandSubOpcode; 192510e230b6Smaya uint32_t _3DCommandOpcode; 192610e230b6Smaya uint32_t CommandSubType; 192710e230b6Smaya uint32_t CommandType; 192810e230b6Smaya uint64_t PointertoGSBindingTable; 192910e230b6Smaya}; 193010e230b6Smaya 193196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 193296c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__attribute__((unused)) __gen_user_data *data, 193310e230b6Smaya __attribute__((unused)) void * restrict dst, 193496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values) 193510e230b6Smaya{ 193610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 193710e230b6Smaya 193810e230b6Smaya dw[0] = 193910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 194010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 194110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 194210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 194310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 194410e230b6Smaya 194510e230b6Smaya dw[1] = 194610e230b6Smaya __gen_offset(values->PointertoGSBindingTable, 5, 15); 194710e230b6Smaya} 194810e230b6Smaya 194996c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_HS_length 2 195096c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 2 195196c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_HS_header\ 195210e230b6Smaya .DWordLength = 0, \ 195310e230b6Smaya ._3DCommandSubOpcode = 39, \ 195410e230b6Smaya ._3DCommandOpcode = 0, \ 195510e230b6Smaya .CommandSubType = 3, \ 195610e230b6Smaya .CommandType = 3 195710e230b6Smaya 195896c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POINTERS_HS { 195910e230b6Smaya uint32_t DWordLength; 196010e230b6Smaya uint32_t _3DCommandSubOpcode; 196110e230b6Smaya uint32_t _3DCommandOpcode; 196210e230b6Smaya uint32_t CommandSubType; 196310e230b6Smaya uint32_t CommandType; 196410e230b6Smaya uint64_t PointertoHSBindingTable; 196510e230b6Smaya}; 196610e230b6Smaya 196796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 196896c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__attribute__((unused)) __gen_user_data *data, 196910e230b6Smaya __attribute__((unused)) void * restrict dst, 197096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values) 197110e230b6Smaya{ 197210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 197310e230b6Smaya 197410e230b6Smaya dw[0] = 197510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 197610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 197710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 197810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 197910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 198010e230b6Smaya 198110e230b6Smaya dw[1] = 198210e230b6Smaya __gen_offset(values->PointertoHSBindingTable, 5, 15); 198310e230b6Smaya} 198410e230b6Smaya 198596c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_PS_length 2 198696c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 2 198796c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_PS_header\ 198810e230b6Smaya .DWordLength = 0, \ 198910e230b6Smaya ._3DCommandSubOpcode = 42, \ 199010e230b6Smaya ._3DCommandOpcode = 0, \ 199110e230b6Smaya .CommandSubType = 3, \ 199210e230b6Smaya .CommandType = 3 199310e230b6Smaya 199496c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POINTERS_PS { 199510e230b6Smaya uint32_t DWordLength; 199610e230b6Smaya uint32_t _3DCommandSubOpcode; 199710e230b6Smaya uint32_t _3DCommandOpcode; 199810e230b6Smaya uint32_t CommandSubType; 199910e230b6Smaya uint32_t CommandType; 200010e230b6Smaya uint64_t PointertoPSBindingTable; 200110e230b6Smaya}; 200210e230b6Smaya 200396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 200496c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__attribute__((unused)) __gen_user_data *data, 200510e230b6Smaya __attribute__((unused)) void * restrict dst, 200696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values) 200710e230b6Smaya{ 200810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 200910e230b6Smaya 201010e230b6Smaya dw[0] = 201110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 201210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 201310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 201410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 201510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 201610e230b6Smaya 201710e230b6Smaya dw[1] = 201810e230b6Smaya __gen_offset(values->PointertoPSBindingTable, 5, 15); 201910e230b6Smaya} 202010e230b6Smaya 202196c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_VS_length 2 202296c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 2 202396c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POINTERS_VS_header\ 202410e230b6Smaya .DWordLength = 0, \ 202510e230b6Smaya ._3DCommandSubOpcode = 38, \ 202610e230b6Smaya ._3DCommandOpcode = 0, \ 202710e230b6Smaya .CommandSubType = 3, \ 202810e230b6Smaya .CommandType = 3 202910e230b6Smaya 203096c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POINTERS_VS { 203110e230b6Smaya uint32_t DWordLength; 203210e230b6Smaya uint32_t _3DCommandSubOpcode; 203310e230b6Smaya uint32_t _3DCommandOpcode; 203410e230b6Smaya uint32_t CommandSubType; 203510e230b6Smaya uint32_t CommandType; 203610e230b6Smaya uint64_t PointertoVSBindingTable; 203710e230b6Smaya}; 203810e230b6Smaya 203996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 204096c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__attribute__((unused)) __gen_user_data *data, 204110e230b6Smaya __attribute__((unused)) void * restrict dst, 204296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values) 204310e230b6Smaya{ 204410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 204510e230b6Smaya 204610e230b6Smaya dw[0] = 204710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 204810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 204910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 205010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 205110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 205210e230b6Smaya 205310e230b6Smaya dw[1] = 205410e230b6Smaya __gen_offset(values->PointertoVSBindingTable, 5, 15); 205510e230b6Smaya} 205610e230b6Smaya 205796c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 3 205896c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC_length_bias 2 205996c5ddc4Srjs#define GFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC_header\ 206010e230b6Smaya .DWordLength = 1, \ 206110e230b6Smaya ._3DCommandSubOpcode = 25, \ 206210e230b6Smaya ._3DCommandOpcode = 1, \ 206310e230b6Smaya .CommandSubType = 3, \ 206410e230b6Smaya .CommandType = 3 206510e230b6Smaya 206696c5ddc4Srjsstruct GFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC { 206710e230b6Smaya uint32_t DWordLength; 206810e230b6Smaya uint32_t _3DCommandSubOpcode; 206910e230b6Smaya uint32_t _3DCommandOpcode; 207010e230b6Smaya uint32_t CommandSubType; 207110e230b6Smaya uint32_t CommandType; 207210e230b6Smaya uint32_t MOCS; 207396c5ddc4Srjs bool BindingTablePoolEnable; 207410e230b6Smaya __gen_address_type BindingTablePoolBaseAddress; 207510e230b6Smaya __gen_address_type BindingTablePoolUpperBound; 207610e230b6Smaya}; 207710e230b6Smaya 207896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 207996c5ddc4SrjsGFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC_pack(__attribute__((unused)) __gen_user_data *data, 208010e230b6Smaya __attribute__((unused)) void * restrict dst, 208196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values) 208210e230b6Smaya{ 208310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 208410e230b6Smaya 208510e230b6Smaya dw[0] = 208610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 208710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 208810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 208910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 209010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 209110e230b6Smaya 209210e230b6Smaya const uint32_t v1 = 209310e230b6Smaya __gen_uint(values->MOCS, 7, 10) | 209410e230b6Smaya __gen_uint(values->BindingTablePoolEnable, 11, 11); 209596c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->BindingTablePoolBaseAddress, v1, 12, 31); 209610e230b6Smaya 209796c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->BindingTablePoolUpperBound, 0, 12, 31); 209810e230b6Smaya} 209910e230b6Smaya 210096c5ddc4Srjs#define GFX75_3DSTATE_BLEND_STATE_POINTERS_length 2 210196c5ddc4Srjs#define GFX75_3DSTATE_BLEND_STATE_POINTERS_length_bias 2 210296c5ddc4Srjs#define GFX75_3DSTATE_BLEND_STATE_POINTERS_header\ 210310e230b6Smaya .DWordLength = 0, \ 210410e230b6Smaya ._3DCommandSubOpcode = 36, \ 210510e230b6Smaya ._3DCommandOpcode = 0, \ 210610e230b6Smaya .CommandSubType = 3, \ 210710e230b6Smaya .CommandType = 3 210810e230b6Smaya 210996c5ddc4Srjsstruct GFX75_3DSTATE_BLEND_STATE_POINTERS { 211010e230b6Smaya uint32_t DWordLength; 211110e230b6Smaya uint32_t _3DCommandSubOpcode; 211210e230b6Smaya uint32_t _3DCommandOpcode; 211310e230b6Smaya uint32_t CommandSubType; 211410e230b6Smaya uint32_t CommandType; 211510e230b6Smaya uint64_t BlendStatePointer; 211610e230b6Smaya}; 211710e230b6Smaya 211896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 211996c5ddc4SrjsGFX75_3DSTATE_BLEND_STATE_POINTERS_pack(__attribute__((unused)) __gen_user_data *data, 212010e230b6Smaya __attribute__((unused)) void * restrict dst, 212196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_BLEND_STATE_POINTERS * restrict values) 212210e230b6Smaya{ 212310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 212410e230b6Smaya 212510e230b6Smaya dw[0] = 212610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 212710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 212810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 212910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 213010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 213110e230b6Smaya 213210e230b6Smaya dw[1] = 213310e230b6Smaya __gen_mbo(0, 0) | 213410e230b6Smaya __gen_offset(values->BlendStatePointer, 6, 31); 213510e230b6Smaya} 213610e230b6Smaya 213796c5ddc4Srjs#define GFX75_3DSTATE_CC_STATE_POINTERS_length 2 213896c5ddc4Srjs#define GFX75_3DSTATE_CC_STATE_POINTERS_length_bias 2 213996c5ddc4Srjs#define GFX75_3DSTATE_CC_STATE_POINTERS_header \ 214010e230b6Smaya .DWordLength = 0, \ 214110e230b6Smaya ._3DCommandSubOpcode = 14, \ 214210e230b6Smaya ._3DCommandOpcode = 0, \ 214310e230b6Smaya .CommandSubType = 3, \ 214410e230b6Smaya .CommandType = 3 214510e230b6Smaya 214696c5ddc4Srjsstruct GFX75_3DSTATE_CC_STATE_POINTERS { 214710e230b6Smaya uint32_t DWordLength; 214810e230b6Smaya uint32_t _3DCommandSubOpcode; 214910e230b6Smaya uint32_t _3DCommandOpcode; 215010e230b6Smaya uint32_t CommandSubType; 215110e230b6Smaya uint32_t CommandType; 215210e230b6Smaya uint64_t ColorCalcStatePointer; 215310e230b6Smaya}; 215410e230b6Smaya 215596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 215696c5ddc4SrjsGFX75_3DSTATE_CC_STATE_POINTERS_pack(__attribute__((unused)) __gen_user_data *data, 215710e230b6Smaya __attribute__((unused)) void * restrict dst, 215896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CC_STATE_POINTERS * restrict values) 215910e230b6Smaya{ 216010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 216110e230b6Smaya 216210e230b6Smaya dw[0] = 216310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 216410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 216510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 216610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 216710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 216810e230b6Smaya 216910e230b6Smaya dw[1] = 217010e230b6Smaya __gen_mbo(0, 0) | 217110e230b6Smaya __gen_offset(values->ColorCalcStatePointer, 6, 31); 217210e230b6Smaya} 217310e230b6Smaya 217496c5ddc4Srjs#define GFX75_3DSTATE_CHROMA_KEY_length 4 217596c5ddc4Srjs#define GFX75_3DSTATE_CHROMA_KEY_length_bias 2 217696c5ddc4Srjs#define GFX75_3DSTATE_CHROMA_KEY_header \ 217710e230b6Smaya .DWordLength = 2, \ 217810e230b6Smaya ._3DCommandSubOpcode = 4, \ 217910e230b6Smaya ._3DCommandOpcode = 1, \ 218010e230b6Smaya .CommandSubType = 3, \ 218110e230b6Smaya .CommandType = 3 218210e230b6Smaya 218396c5ddc4Srjsstruct GFX75_3DSTATE_CHROMA_KEY { 218410e230b6Smaya uint32_t DWordLength; 218510e230b6Smaya uint32_t _3DCommandSubOpcode; 218610e230b6Smaya uint32_t _3DCommandOpcode; 218710e230b6Smaya uint32_t CommandSubType; 218810e230b6Smaya uint32_t CommandType; 218910e230b6Smaya uint32_t ChromaKeyTableIndex; 219010e230b6Smaya uint32_t ChromaKeyLowValue; 219110e230b6Smaya uint32_t ChromaKeyHighValue; 219210e230b6Smaya}; 219310e230b6Smaya 219496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 219596c5ddc4SrjsGFX75_3DSTATE_CHROMA_KEY_pack(__attribute__((unused)) __gen_user_data *data, 219610e230b6Smaya __attribute__((unused)) void * restrict dst, 219796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CHROMA_KEY * restrict values) 219810e230b6Smaya{ 219910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 220010e230b6Smaya 220110e230b6Smaya dw[0] = 220210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 220310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 220410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 220510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 220610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 220710e230b6Smaya 220810e230b6Smaya dw[1] = 220910e230b6Smaya __gen_uint(values->ChromaKeyTableIndex, 30, 31); 221010e230b6Smaya 221110e230b6Smaya dw[2] = 221210e230b6Smaya __gen_uint(values->ChromaKeyLowValue, 0, 31); 221310e230b6Smaya 221410e230b6Smaya dw[3] = 221510e230b6Smaya __gen_uint(values->ChromaKeyHighValue, 0, 31); 221610e230b6Smaya} 221710e230b6Smaya 221896c5ddc4Srjs#define GFX75_3DSTATE_CLEAR_PARAMS_length 3 221996c5ddc4Srjs#define GFX75_3DSTATE_CLEAR_PARAMS_length_bias 2 222096c5ddc4Srjs#define GFX75_3DSTATE_CLEAR_PARAMS_header \ 222110e230b6Smaya .DWordLength = 1, \ 222210e230b6Smaya ._3DCommandSubOpcode = 4, \ 222310e230b6Smaya ._3DCommandOpcode = 0, \ 222410e230b6Smaya .CommandSubType = 3, \ 222510e230b6Smaya .CommandType = 3 222610e230b6Smaya 222796c5ddc4Srjsstruct GFX75_3DSTATE_CLEAR_PARAMS { 222810e230b6Smaya uint32_t DWordLength; 222910e230b6Smaya uint32_t _3DCommandSubOpcode; 223010e230b6Smaya uint32_t _3DCommandOpcode; 223110e230b6Smaya uint32_t CommandSubType; 223210e230b6Smaya uint32_t CommandType; 223310e230b6Smaya uint32_t DepthClearValue; 223410e230b6Smaya bool DepthClearValueValid; 223510e230b6Smaya}; 223610e230b6Smaya 223796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 223896c5ddc4SrjsGFX75_3DSTATE_CLEAR_PARAMS_pack(__attribute__((unused)) __gen_user_data *data, 223910e230b6Smaya __attribute__((unused)) void * restrict dst, 224096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CLEAR_PARAMS * restrict values) 224110e230b6Smaya{ 224210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 224310e230b6Smaya 224410e230b6Smaya dw[0] = 224510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 224610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 224710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 224810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 224910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 225010e230b6Smaya 225110e230b6Smaya dw[1] = 225210e230b6Smaya __gen_uint(values->DepthClearValue, 0, 31); 225310e230b6Smaya 225410e230b6Smaya dw[2] = 225510e230b6Smaya __gen_uint(values->DepthClearValueValid, 0, 0); 225610e230b6Smaya} 225710e230b6Smaya 225896c5ddc4Srjs#define GFX75_3DSTATE_CLIP_length 4 225996c5ddc4Srjs#define GFX75_3DSTATE_CLIP_length_bias 2 226096c5ddc4Srjs#define GFX75_3DSTATE_CLIP_header \ 226110e230b6Smaya .DWordLength = 2, \ 226210e230b6Smaya ._3DCommandSubOpcode = 18, \ 226310e230b6Smaya ._3DCommandOpcode = 0, \ 226410e230b6Smaya .CommandSubType = 3, \ 226510e230b6Smaya .CommandType = 3 226610e230b6Smaya 226796c5ddc4Srjsstruct GFX75_3DSTATE_CLIP { 226810e230b6Smaya uint32_t DWordLength; 226910e230b6Smaya uint32_t _3DCommandSubOpcode; 227010e230b6Smaya uint32_t _3DCommandOpcode; 227110e230b6Smaya uint32_t CommandSubType; 227210e230b6Smaya uint32_t CommandType; 227310e230b6Smaya uint32_t UserClipDistanceCullTestEnableBitmask; 227410e230b6Smaya bool StatisticsEnable; 227510e230b6Smaya uint32_t CullMode; 227610e230b6Smaya#define CULLMODE_BOTH 0 227710e230b6Smaya#define CULLMODE_NONE 1 227810e230b6Smaya#define CULLMODE_FRONT 2 227910e230b6Smaya#define CULLMODE_BACK 3 228010e230b6Smaya bool EarlyCullEnable; 228110e230b6Smaya uint32_t VertexSubPixelPrecisionSelect; 228210e230b6Smaya uint32_t FrontWinding; 228310e230b6Smaya uint32_t TriangleFanProvokingVertexSelect; 228410e230b6Smaya#define Vertex0 0 228510e230b6Smaya#define Vertex1 1 228610e230b6Smaya#define Vertex2 2 228710e230b6Smaya uint32_t LineStripListProvokingVertexSelect; 228810e230b6Smaya#define Vertex0 0 228910e230b6Smaya#define Vertex1 1 229010e230b6Smaya uint32_t TriangleStripListProvokingVertexSelect; 229110e230b6Smaya#define Vertex0 0 229210e230b6Smaya#define Vertex1 1 229310e230b6Smaya#define Vertex2 2 229410e230b6Smaya bool NonPerspectiveBarycentricEnable; 229510e230b6Smaya bool PerspectiveDivideDisable; 229610e230b6Smaya uint32_t ClipMode; 229710e230b6Smaya#define CLIPMODE_NORMAL 0 229810e230b6Smaya#define CLIPMODE_REJECT_ALL 3 229910e230b6Smaya#define CLIPMODE_ACCEPT_ALL 4 230010e230b6Smaya uint32_t UserClipDistanceClipTestEnableBitmask; 230110e230b6Smaya bool GuardbandClipTestEnable; 230210e230b6Smaya bool ViewportZClipTestEnable; 230310e230b6Smaya bool ViewportXYClipTestEnable; 230410e230b6Smaya uint32_t APIMode; 230510e230b6Smaya#define APIMODE_OGL 0 230610e230b6Smaya#define APIMODE_D3D 1 230710e230b6Smaya bool ClipEnable; 230810e230b6Smaya uint32_t MaximumVPIndex; 230910e230b6Smaya bool ForceZeroRTAIndexEnable; 231010e230b6Smaya float MaximumPointWidth; 231110e230b6Smaya float MinimumPointWidth; 231210e230b6Smaya}; 231310e230b6Smaya 231496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 231596c5ddc4SrjsGFX75_3DSTATE_CLIP_pack(__attribute__((unused)) __gen_user_data *data, 231610e230b6Smaya __attribute__((unused)) void * restrict dst, 231796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CLIP * restrict values) 231810e230b6Smaya{ 231910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 232010e230b6Smaya 232110e230b6Smaya dw[0] = 232210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 232310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 232410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 232510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 232610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 232710e230b6Smaya 232810e230b6Smaya dw[1] = 232910e230b6Smaya __gen_uint(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | 233010e230b6Smaya __gen_uint(values->StatisticsEnable, 10, 10) | 233110e230b6Smaya __gen_uint(values->CullMode, 16, 17) | 233210e230b6Smaya __gen_uint(values->EarlyCullEnable, 18, 18) | 233310e230b6Smaya __gen_uint(values->VertexSubPixelPrecisionSelect, 19, 19) | 233410e230b6Smaya __gen_uint(values->FrontWinding, 20, 20); 233510e230b6Smaya 233610e230b6Smaya dw[2] = 233710e230b6Smaya __gen_uint(values->TriangleFanProvokingVertexSelect, 0, 1) | 233810e230b6Smaya __gen_uint(values->LineStripListProvokingVertexSelect, 2, 3) | 233910e230b6Smaya __gen_uint(values->TriangleStripListProvokingVertexSelect, 4, 5) | 234010e230b6Smaya __gen_uint(values->NonPerspectiveBarycentricEnable, 8, 8) | 234110e230b6Smaya __gen_uint(values->PerspectiveDivideDisable, 9, 9) | 234210e230b6Smaya __gen_uint(values->ClipMode, 13, 15) | 234310e230b6Smaya __gen_uint(values->UserClipDistanceClipTestEnableBitmask, 16, 23) | 234410e230b6Smaya __gen_uint(values->GuardbandClipTestEnable, 26, 26) | 234510e230b6Smaya __gen_uint(values->ViewportZClipTestEnable, 27, 27) | 234610e230b6Smaya __gen_uint(values->ViewportXYClipTestEnable, 28, 28) | 234710e230b6Smaya __gen_uint(values->APIMode, 30, 30) | 234810e230b6Smaya __gen_uint(values->ClipEnable, 31, 31); 234910e230b6Smaya 235010e230b6Smaya dw[3] = 235110e230b6Smaya __gen_uint(values->MaximumVPIndex, 0, 3) | 235210e230b6Smaya __gen_uint(values->ForceZeroRTAIndexEnable, 5, 5) | 235310e230b6Smaya __gen_ufixed(values->MaximumPointWidth, 6, 16, 3) | 235410e230b6Smaya __gen_ufixed(values->MinimumPointWidth, 17, 27, 3); 235510e230b6Smaya} 235610e230b6Smaya 235796c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_DS_length 7 235896c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_DS_length_bias 2 235996c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_DS_header \ 236010e230b6Smaya .DWordLength = 5, \ 236110e230b6Smaya ._3DCommandSubOpcode = 26, \ 236210e230b6Smaya ._3DCommandOpcode = 0, \ 236310e230b6Smaya .CommandSubType = 3, \ 236410e230b6Smaya .CommandType = 3 236510e230b6Smaya 236696c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_DS { 236710e230b6Smaya uint32_t DWordLength; 236810e230b6Smaya uint32_t _3DCommandSubOpcode; 236910e230b6Smaya uint32_t _3DCommandOpcode; 237010e230b6Smaya uint32_t CommandSubType; 237110e230b6Smaya uint32_t CommandType; 237296c5ddc4Srjs struct GFX75_3DSTATE_CONSTANT_BODY ConstantBody; 237310e230b6Smaya}; 237410e230b6Smaya 237596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 237696c5ddc4SrjsGFX75_3DSTATE_CONSTANT_DS_pack(__attribute__((unused)) __gen_user_data *data, 237710e230b6Smaya __attribute__((unused)) void * restrict dst, 237896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_DS * restrict values) 237910e230b6Smaya{ 238010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 238110e230b6Smaya 238210e230b6Smaya dw[0] = 238310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 238410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 238510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 238610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 238710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 238810e230b6Smaya 238996c5ddc4Srjs GFX75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); 239010e230b6Smaya} 239110e230b6Smaya 239296c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_GS_length 7 239396c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_GS_length_bias 2 239496c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_GS_header \ 239510e230b6Smaya .DWordLength = 5, \ 239610e230b6Smaya ._3DCommandSubOpcode = 22, \ 239710e230b6Smaya ._3DCommandOpcode = 0, \ 239810e230b6Smaya .CommandSubType = 3, \ 239910e230b6Smaya .CommandType = 3 240010e230b6Smaya 240196c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_GS { 240210e230b6Smaya uint32_t DWordLength; 240310e230b6Smaya uint32_t _3DCommandSubOpcode; 240410e230b6Smaya uint32_t _3DCommandOpcode; 240510e230b6Smaya uint32_t CommandSubType; 240610e230b6Smaya uint32_t CommandType; 240796c5ddc4Srjs struct GFX75_3DSTATE_CONSTANT_BODY ConstantBody; 240810e230b6Smaya}; 240910e230b6Smaya 241096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 241196c5ddc4SrjsGFX75_3DSTATE_CONSTANT_GS_pack(__attribute__((unused)) __gen_user_data *data, 241210e230b6Smaya __attribute__((unused)) void * restrict dst, 241396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_GS * restrict values) 241410e230b6Smaya{ 241510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 241610e230b6Smaya 241710e230b6Smaya dw[0] = 241810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 241910e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 242010e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 242110e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 242210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 242310e230b6Smaya 242496c5ddc4Srjs GFX75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); 242510e230b6Smaya} 242610e230b6Smaya 242796c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_HS_length 7 242896c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_HS_length_bias 2 242996c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_HS_header \ 243010e230b6Smaya .DWordLength = 5, \ 243110e230b6Smaya ._3DCommandSubOpcode = 25, \ 243210e230b6Smaya ._3DCommandOpcode = 0, \ 243310e230b6Smaya .CommandSubType = 3, \ 243410e230b6Smaya .CommandType = 3 243510e230b6Smaya 243696c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_HS { 243710e230b6Smaya uint32_t DWordLength; 243810e230b6Smaya uint32_t _3DCommandSubOpcode; 243910e230b6Smaya uint32_t _3DCommandOpcode; 244010e230b6Smaya uint32_t CommandSubType; 244110e230b6Smaya uint32_t CommandType; 244296c5ddc4Srjs struct GFX75_3DSTATE_CONSTANT_BODY ConstantBody; 244310e230b6Smaya}; 244410e230b6Smaya 244596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 244696c5ddc4SrjsGFX75_3DSTATE_CONSTANT_HS_pack(__attribute__((unused)) __gen_user_data *data, 244710e230b6Smaya __attribute__((unused)) void * restrict dst, 244896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_HS * restrict values) 244910e230b6Smaya{ 245010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 245110e230b6Smaya 245210e230b6Smaya dw[0] = 245310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 245410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 245510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 245610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 245710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 245810e230b6Smaya 245996c5ddc4Srjs GFX75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); 246010e230b6Smaya} 246110e230b6Smaya 246296c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_PS_length 7 246396c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_PS_length_bias 2 246496c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_PS_header \ 246510e230b6Smaya .DWordLength = 5, \ 246610e230b6Smaya ._3DCommandSubOpcode = 23, \ 246710e230b6Smaya ._3DCommandOpcode = 0, \ 246810e230b6Smaya .CommandSubType = 3, \ 246910e230b6Smaya .CommandType = 3 247010e230b6Smaya 247196c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_PS { 247210e230b6Smaya uint32_t DWordLength; 247310e230b6Smaya uint32_t _3DCommandSubOpcode; 247410e230b6Smaya uint32_t _3DCommandOpcode; 247510e230b6Smaya uint32_t CommandSubType; 247610e230b6Smaya uint32_t CommandType; 247796c5ddc4Srjs struct GFX75_3DSTATE_CONSTANT_BODY ConstantBody; 247810e230b6Smaya}; 247910e230b6Smaya 248096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 248196c5ddc4SrjsGFX75_3DSTATE_CONSTANT_PS_pack(__attribute__((unused)) __gen_user_data *data, 248210e230b6Smaya __attribute__((unused)) void * restrict dst, 248396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_PS * restrict values) 248410e230b6Smaya{ 248510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 248610e230b6Smaya 248710e230b6Smaya dw[0] = 248810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 248910e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 249010e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 249110e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 249210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 249310e230b6Smaya 249496c5ddc4Srjs GFX75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); 249510e230b6Smaya} 249610e230b6Smaya 249796c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_VS_length 7 249896c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_VS_length_bias 2 249996c5ddc4Srjs#define GFX75_3DSTATE_CONSTANT_VS_header \ 250010e230b6Smaya .DWordLength = 5, \ 250110e230b6Smaya ._3DCommandSubOpcode = 21, \ 250210e230b6Smaya ._3DCommandOpcode = 0, \ 250310e230b6Smaya .CommandSubType = 3, \ 250410e230b6Smaya .CommandType = 3 250510e230b6Smaya 250696c5ddc4Srjsstruct GFX75_3DSTATE_CONSTANT_VS { 250710e230b6Smaya uint32_t DWordLength; 250810e230b6Smaya uint32_t _3DCommandSubOpcode; 250910e230b6Smaya uint32_t _3DCommandOpcode; 251010e230b6Smaya uint32_t CommandSubType; 251110e230b6Smaya uint32_t CommandType; 251296c5ddc4Srjs struct GFX75_3DSTATE_CONSTANT_BODY ConstantBody; 251310e230b6Smaya}; 251410e230b6Smaya 251596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 251696c5ddc4SrjsGFX75_3DSTATE_CONSTANT_VS_pack(__attribute__((unused)) __gen_user_data *data, 251710e230b6Smaya __attribute__((unused)) void * restrict dst, 251896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_CONSTANT_VS * restrict values) 251910e230b6Smaya{ 252010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 252110e230b6Smaya 252210e230b6Smaya dw[0] = 252310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 252410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 252510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 252610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 252710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 252810e230b6Smaya 252996c5ddc4Srjs GFX75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); 253010e230b6Smaya} 253110e230b6Smaya 253296c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_BUFFER_length 7 253396c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_BUFFER_length_bias 2 253496c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_BUFFER_header \ 253510e230b6Smaya .DWordLength = 5, \ 253610e230b6Smaya ._3DCommandSubOpcode = 5, \ 253710e230b6Smaya ._3DCommandOpcode = 0, \ 253810e230b6Smaya .CommandSubType = 3, \ 253910e230b6Smaya .CommandType = 3 254010e230b6Smaya 254196c5ddc4Srjsstruct GFX75_3DSTATE_DEPTH_BUFFER { 254210e230b6Smaya uint32_t DWordLength; 254310e230b6Smaya uint32_t _3DCommandSubOpcode; 254410e230b6Smaya uint32_t _3DCommandOpcode; 254510e230b6Smaya uint32_t CommandSubType; 254610e230b6Smaya uint32_t CommandType; 254710e230b6Smaya uint32_t SurfacePitch; 254810e230b6Smaya uint32_t SurfaceFormat; 254910e230b6Smaya#define D32_FLOAT 1 255010e230b6Smaya#define D24_UNORM_X8_UINT 3 255110e230b6Smaya#define D16_UNORM 5 255210e230b6Smaya bool HierarchicalDepthBufferEnable; 255310e230b6Smaya bool StencilWriteEnable; 255410e230b6Smaya bool DepthWriteEnable; 255510e230b6Smaya uint32_t SurfaceType; 255610e230b6Smaya#define SURFTYPE_1D 0 255710e230b6Smaya#define SURFTYPE_2D 1 255810e230b6Smaya#define SURFTYPE_3D 2 255910e230b6Smaya#define SURFTYPE_CUBE 3 256010e230b6Smaya#define SURFTYPE_NULL 7 256110e230b6Smaya __gen_address_type SurfaceBaseAddress; 256210e230b6Smaya uint32_t LOD; 256310e230b6Smaya uint32_t Width; 256410e230b6Smaya uint32_t Height; 256510e230b6Smaya uint32_t MOCS; 256610e230b6Smaya uint32_t MinimumArrayElement; 256710e230b6Smaya uint32_t Depth; 256810e230b6Smaya#define SURFTYPE_CUBEmustbezero 0 256910e230b6Smaya int32_t DepthCoordinateOffsetX; 257010e230b6Smaya int32_t DepthCoordinateOffsetY; 257110e230b6Smaya uint32_t RenderTargetViewExtent; 257210e230b6Smaya}; 257310e230b6Smaya 257496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 257596c5ddc4SrjsGFX75_3DSTATE_DEPTH_BUFFER_pack(__attribute__((unused)) __gen_user_data *data, 257610e230b6Smaya __attribute__((unused)) void * restrict dst, 257796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_DEPTH_BUFFER * restrict values) 257810e230b6Smaya{ 257910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 258010e230b6Smaya 258110e230b6Smaya dw[0] = 258210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 258310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 258410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 258510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 258610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 258710e230b6Smaya 258810e230b6Smaya dw[1] = 258910e230b6Smaya __gen_uint(values->SurfacePitch, 0, 17) | 259010e230b6Smaya __gen_uint(values->SurfaceFormat, 18, 20) | 259110e230b6Smaya __gen_uint(values->HierarchicalDepthBufferEnable, 22, 22) | 259210e230b6Smaya __gen_uint(values->StencilWriteEnable, 27, 27) | 259310e230b6Smaya __gen_uint(values->DepthWriteEnable, 28, 28) | 259410e230b6Smaya __gen_uint(values->SurfaceType, 29, 31); 259510e230b6Smaya 259696c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->SurfaceBaseAddress, 0, 0, 31); 259710e230b6Smaya 259810e230b6Smaya dw[3] = 259910e230b6Smaya __gen_uint(values->LOD, 0, 3) | 260010e230b6Smaya __gen_uint(values->Width, 4, 17) | 260110e230b6Smaya __gen_uint(values->Height, 18, 31); 260210e230b6Smaya 260310e230b6Smaya dw[4] = 260410e230b6Smaya __gen_uint(values->MOCS, 0, 3) | 260510e230b6Smaya __gen_uint(values->MinimumArrayElement, 10, 20) | 260610e230b6Smaya __gen_uint(values->Depth, 21, 31); 260710e230b6Smaya 260810e230b6Smaya dw[5] = 260910e230b6Smaya __gen_sint(values->DepthCoordinateOffsetX, 0, 15) | 261010e230b6Smaya __gen_sint(values->DepthCoordinateOffsetY, 16, 31); 261110e230b6Smaya 261210e230b6Smaya dw[6] = 261310e230b6Smaya __gen_uint(values->RenderTargetViewExtent, 21, 31); 261410e230b6Smaya} 261510e230b6Smaya 261696c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length 2 261796c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length_bias 2 261896c5ddc4Srjs#define GFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_header\ 261910e230b6Smaya .DWordLength = 0, \ 262010e230b6Smaya ._3DCommandSubOpcode = 37, \ 262110e230b6Smaya ._3DCommandOpcode = 0, \ 262210e230b6Smaya .CommandSubType = 3, \ 262310e230b6Smaya .CommandType = 3 262410e230b6Smaya 262596c5ddc4Srjsstruct GFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS { 262610e230b6Smaya uint32_t DWordLength; 262710e230b6Smaya uint32_t _3DCommandSubOpcode; 262810e230b6Smaya uint32_t _3DCommandOpcode; 262910e230b6Smaya uint32_t CommandSubType; 263010e230b6Smaya uint32_t CommandType; 263110e230b6Smaya uint64_t PointertoDEPTH_STENCIL_STATE; 263210e230b6Smaya}; 263310e230b6Smaya 263496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 263596c5ddc4SrjsGFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_pack(__attribute__((unused)) __gen_user_data *data, 263610e230b6Smaya __attribute__((unused)) void * restrict dst, 263796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS * restrict values) 263810e230b6Smaya{ 263910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 264010e230b6Smaya 264110e230b6Smaya dw[0] = 264210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 264310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 264410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 264510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 264610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 264710e230b6Smaya 264810e230b6Smaya dw[1] = 264910e230b6Smaya __gen_mbo(0, 0) | 265010e230b6Smaya __gen_offset(values->PointertoDEPTH_STENCIL_STATE, 6, 31); 265110e230b6Smaya} 265210e230b6Smaya 265396c5ddc4Srjs#define GFX75_3DSTATE_DRAWING_RECTANGLE_length 4 265496c5ddc4Srjs#define GFX75_3DSTATE_DRAWING_RECTANGLE_length_bias 2 265596c5ddc4Srjs#define GFX75_3DSTATE_DRAWING_RECTANGLE_header \ 265610e230b6Smaya .DWordLength = 2, \ 265710e230b6Smaya ._3DCommandSubOpcode = 0, \ 265810e230b6Smaya ._3DCommandOpcode = 1, \ 265910e230b6Smaya .CommandSubType = 3, \ 266010e230b6Smaya .CommandType = 3 266110e230b6Smaya 266296c5ddc4Srjsstruct GFX75_3DSTATE_DRAWING_RECTANGLE { 266310e230b6Smaya uint32_t DWordLength; 266410e230b6Smaya uint32_t CoreModeSelect; 266510e230b6Smaya#define Legacy 0 266610e230b6Smaya#define Core0Enabled 1 266710e230b6Smaya#define Core1Enabled 2 266810e230b6Smaya uint32_t _3DCommandSubOpcode; 266910e230b6Smaya uint32_t _3DCommandOpcode; 267010e230b6Smaya uint32_t CommandSubType; 267110e230b6Smaya uint32_t CommandType; 267210e230b6Smaya uint32_t ClippedDrawingRectangleXMin; 267310e230b6Smaya uint32_t ClippedDrawingRectangleYMin; 267410e230b6Smaya uint32_t ClippedDrawingRectangleXMax; 267510e230b6Smaya uint32_t ClippedDrawingRectangleYMax; 267610e230b6Smaya int32_t DrawingRectangleOriginX; 267710e230b6Smaya int32_t DrawingRectangleOriginY; 267810e230b6Smaya}; 267910e230b6Smaya 268096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 268196c5ddc4SrjsGFX75_3DSTATE_DRAWING_RECTANGLE_pack(__attribute__((unused)) __gen_user_data *data, 268210e230b6Smaya __attribute__((unused)) void * restrict dst, 268396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_DRAWING_RECTANGLE * restrict values) 268410e230b6Smaya{ 268510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 268610e230b6Smaya 268710e230b6Smaya dw[0] = 268810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 268910e230b6Smaya __gen_uint(values->CoreModeSelect, 14, 15) | 269010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 269110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 269210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 269310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 269410e230b6Smaya 269510e230b6Smaya dw[1] = 269610e230b6Smaya __gen_uint(values->ClippedDrawingRectangleXMin, 0, 15) | 269710e230b6Smaya __gen_uint(values->ClippedDrawingRectangleYMin, 16, 31); 269810e230b6Smaya 269910e230b6Smaya dw[2] = 270010e230b6Smaya __gen_uint(values->ClippedDrawingRectangleXMax, 0, 15) | 270110e230b6Smaya __gen_uint(values->ClippedDrawingRectangleYMax, 16, 31); 270210e230b6Smaya 270310e230b6Smaya dw[3] = 270410e230b6Smaya __gen_sint(values->DrawingRectangleOriginX, 0, 15) | 270510e230b6Smaya __gen_sint(values->DrawingRectangleOriginY, 16, 31); 270610e230b6Smaya} 270710e230b6Smaya 270896c5ddc4Srjs#define GFX75_3DSTATE_DS_length 6 270996c5ddc4Srjs#define GFX75_3DSTATE_DS_length_bias 2 271096c5ddc4Srjs#define GFX75_3DSTATE_DS_header \ 271110e230b6Smaya .DWordLength = 4, \ 271210e230b6Smaya ._3DCommandSubOpcode = 29, \ 271310e230b6Smaya ._3DCommandOpcode = 0, \ 271410e230b6Smaya .CommandSubType = 3, \ 271510e230b6Smaya .CommandType = 3 271610e230b6Smaya 271796c5ddc4Srjsstruct GFX75_3DSTATE_DS { 271810e230b6Smaya uint32_t DWordLength; 271910e230b6Smaya uint32_t _3DCommandSubOpcode; 272010e230b6Smaya uint32_t _3DCommandOpcode; 272110e230b6Smaya uint32_t CommandSubType; 272210e230b6Smaya uint32_t CommandType; 272310e230b6Smaya uint64_t KernelStartPointer; 272410e230b6Smaya bool SoftwareExceptionEnable; 272510e230b6Smaya bool IllegalOpcodeExceptionEnable; 272610e230b6Smaya bool AccessesUAV; 272710e230b6Smaya uint32_t FloatingPointMode; 272810e230b6Smaya#define IEEE754 0 272910e230b6Smaya#define Alternate 1 273010e230b6Smaya uint32_t ThreadDispatchPriority; 273110e230b6Smaya#define High 1 273210e230b6Smaya uint32_t BindingTableEntryCount; 273310e230b6Smaya uint32_t SamplerCount; 273410e230b6Smaya#define NoSamplers 0 273510e230b6Smaya#define _14Samplers 1 273610e230b6Smaya#define _58Samplers 2 273710e230b6Smaya#define _912Samplers 3 273810e230b6Smaya#define _1316Samplers 4 273910e230b6Smaya bool VectorMaskEnable; 274010e230b6Smaya uint32_t SingleDomainPointDispatch; 274110e230b6Smaya uint32_t PerThreadScratchSpace; 274210e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 274310e230b6Smaya uint32_t PatchURBEntryReadOffset; 274410e230b6Smaya uint32_t PatchURBEntryReadLength; 274510e230b6Smaya uint32_t DispatchGRFStartRegisterForURBData; 274610e230b6Smaya bool Enable; 274710e230b6Smaya bool DSCacheDisable; 274810e230b6Smaya bool ComputeWCoordinateEnable; 274910e230b6Smaya bool StatisticsEnable; 275010e230b6Smaya uint32_t MaximumNumberofThreads; 275110e230b6Smaya}; 275210e230b6Smaya 275396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 275496c5ddc4SrjsGFX75_3DSTATE_DS_pack(__attribute__((unused)) __gen_user_data *data, 275510e230b6Smaya __attribute__((unused)) void * restrict dst, 275696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_DS * restrict values) 275710e230b6Smaya{ 275810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 275910e230b6Smaya 276010e230b6Smaya dw[0] = 276110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 276210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 276310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 276410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 276510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 276610e230b6Smaya 276710e230b6Smaya dw[1] = 276810e230b6Smaya __gen_offset(values->KernelStartPointer, 6, 31); 276910e230b6Smaya 277010e230b6Smaya dw[2] = 277110e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 7, 7) | 277210e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 277310e230b6Smaya __gen_uint(values->AccessesUAV, 14, 14) | 277410e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 277510e230b6Smaya __gen_uint(values->ThreadDispatchPriority, 17, 17) | 277610e230b6Smaya __gen_uint(values->BindingTableEntryCount, 18, 25) | 277710e230b6Smaya __gen_uint(values->SamplerCount, 27, 29) | 277810e230b6Smaya __gen_uint(values->VectorMaskEnable, 30, 30) | 277910e230b6Smaya __gen_uint(values->SingleDomainPointDispatch, 31, 31); 278010e230b6Smaya 278110e230b6Smaya const uint32_t v3 = 278210e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3); 278396c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->ScratchSpaceBasePointer, v3, 10, 31); 278410e230b6Smaya 278510e230b6Smaya dw[4] = 278610e230b6Smaya __gen_uint(values->PatchURBEntryReadOffset, 4, 9) | 278710e230b6Smaya __gen_uint(values->PatchURBEntryReadLength, 11, 17) | 278810e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForURBData, 20, 24); 278910e230b6Smaya 279010e230b6Smaya dw[5] = 279110e230b6Smaya __gen_uint(values->Enable, 0, 0) | 279210e230b6Smaya __gen_uint(values->DSCacheDisable, 1, 1) | 279310e230b6Smaya __gen_uint(values->ComputeWCoordinateEnable, 2, 2) | 279410e230b6Smaya __gen_uint(values->StatisticsEnable, 10, 10) | 279510e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 21, 29); 279610e230b6Smaya} 279710e230b6Smaya 279896c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_DS_length_bias 2 279996c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_DS_header \ 280010e230b6Smaya .DWordLength = 1, \ 280110e230b6Smaya ._3DCommandSubOpcode = 55, \ 280210e230b6Smaya ._3DCommandOpcode = 0, \ 280310e230b6Smaya .CommandSubType = 3, \ 280410e230b6Smaya .CommandType = 3 280510e230b6Smaya 280696c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_CONSTANT_DS { 280710e230b6Smaya uint32_t DWordLength; 280810e230b6Smaya uint32_t _3DCommandSubOpcode; 280910e230b6Smaya uint32_t _3DCommandOpcode; 281010e230b6Smaya uint32_t CommandSubType; 281110e230b6Smaya uint32_t CommandType; 281210e230b6Smaya uint32_t ConstantBufferBindingTableBlock; 281310e230b6Smaya uint32_t ConstantBufferValid; 281410e230b6Smaya uint64_t GatherBufferOffset; 281510e230b6Smaya /* variable length fields follow */ 281610e230b6Smaya}; 281710e230b6Smaya 281896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 281996c5ddc4SrjsGFX75_3DSTATE_GATHER_CONSTANT_DS_pack(__attribute__((unused)) __gen_user_data *data, 282010e230b6Smaya __attribute__((unused)) void * restrict dst, 282196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_CONSTANT_DS * restrict values) 282210e230b6Smaya{ 282310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 282410e230b6Smaya 282510e230b6Smaya dw[0] = 282610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 282710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 282810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 282910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 283010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 283110e230b6Smaya 283210e230b6Smaya dw[1] = 283310e230b6Smaya __gen_uint(values->ConstantBufferBindingTableBlock, 12, 15) | 283410e230b6Smaya __gen_uint(values->ConstantBufferValid, 16, 31); 283510e230b6Smaya 283610e230b6Smaya dw[2] = 283710e230b6Smaya __gen_offset(values->GatherBufferOffset, 6, 22); 283810e230b6Smaya} 283910e230b6Smaya 284096c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_GS_length_bias 2 284196c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_GS_header \ 284210e230b6Smaya .DWordLength = 1, \ 284310e230b6Smaya ._3DCommandSubOpcode = 53, \ 284410e230b6Smaya ._3DCommandOpcode = 0, \ 284510e230b6Smaya .CommandSubType = 3, \ 284610e230b6Smaya .CommandType = 3 284710e230b6Smaya 284896c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_CONSTANT_GS { 284910e230b6Smaya uint32_t DWordLength; 285010e230b6Smaya uint32_t _3DCommandSubOpcode; 285110e230b6Smaya uint32_t _3DCommandOpcode; 285210e230b6Smaya uint32_t CommandSubType; 285310e230b6Smaya uint32_t CommandType; 285410e230b6Smaya uint32_t ConstantBufferBindingTableBlock; 285510e230b6Smaya uint32_t ConstantBufferValid; 285610e230b6Smaya uint64_t GatherBufferOffset; 285710e230b6Smaya /* variable length fields follow */ 285810e230b6Smaya}; 285910e230b6Smaya 286096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 286196c5ddc4SrjsGFX75_3DSTATE_GATHER_CONSTANT_GS_pack(__attribute__((unused)) __gen_user_data *data, 286210e230b6Smaya __attribute__((unused)) void * restrict dst, 286396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_CONSTANT_GS * restrict values) 286410e230b6Smaya{ 286510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 286610e230b6Smaya 286710e230b6Smaya dw[0] = 286810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 286910e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 287010e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 287110e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 287210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 287310e230b6Smaya 287410e230b6Smaya dw[1] = 287510e230b6Smaya __gen_uint(values->ConstantBufferBindingTableBlock, 12, 15) | 287610e230b6Smaya __gen_uint(values->ConstantBufferValid, 16, 31); 287710e230b6Smaya 287810e230b6Smaya dw[2] = 287910e230b6Smaya __gen_offset(values->GatherBufferOffset, 6, 22); 288010e230b6Smaya} 288110e230b6Smaya 288296c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_HS_length_bias 2 288396c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_HS_header \ 288410e230b6Smaya .DWordLength = 1, \ 288510e230b6Smaya ._3DCommandSubOpcode = 54, \ 288610e230b6Smaya ._3DCommandOpcode = 0, \ 288710e230b6Smaya .CommandSubType = 3, \ 288810e230b6Smaya .CommandType = 3 288910e230b6Smaya 289096c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_CONSTANT_HS { 289110e230b6Smaya uint32_t DWordLength; 289210e230b6Smaya uint32_t _3DCommandSubOpcode; 289310e230b6Smaya uint32_t _3DCommandOpcode; 289410e230b6Smaya uint32_t CommandSubType; 289510e230b6Smaya uint32_t CommandType; 289610e230b6Smaya uint32_t ConstantBufferBindingTableBlock; 289710e230b6Smaya uint32_t ConstantBufferValid; 289810e230b6Smaya uint64_t GatherBufferOffset; 289910e230b6Smaya /* variable length fields follow */ 290010e230b6Smaya}; 290110e230b6Smaya 290296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 290396c5ddc4SrjsGFX75_3DSTATE_GATHER_CONSTANT_HS_pack(__attribute__((unused)) __gen_user_data *data, 290410e230b6Smaya __attribute__((unused)) void * restrict dst, 290596c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_CONSTANT_HS * restrict values) 290610e230b6Smaya{ 290710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 290810e230b6Smaya 290910e230b6Smaya dw[0] = 291010e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 291110e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 291210e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 291310e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 291410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 291510e230b6Smaya 291610e230b6Smaya dw[1] = 291710e230b6Smaya __gen_uint(values->ConstantBufferBindingTableBlock, 12, 15) | 291810e230b6Smaya __gen_uint(values->ConstantBufferValid, 16, 31); 291910e230b6Smaya 292010e230b6Smaya dw[2] = 292110e230b6Smaya __gen_offset(values->GatherBufferOffset, 6, 22); 292210e230b6Smaya} 292310e230b6Smaya 292496c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_PS_length_bias 2 292596c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_PS_header \ 292610e230b6Smaya .DWordLength = 1, \ 292710e230b6Smaya ._3DCommandSubOpcode = 56, \ 292810e230b6Smaya ._3DCommandOpcode = 0, \ 292910e230b6Smaya .CommandSubType = 3, \ 293010e230b6Smaya .CommandType = 3 293110e230b6Smaya 293296c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_CONSTANT_PS { 293310e230b6Smaya uint32_t DWordLength; 293410e230b6Smaya uint32_t _3DCommandSubOpcode; 293510e230b6Smaya uint32_t _3DCommandOpcode; 293610e230b6Smaya uint32_t CommandSubType; 293710e230b6Smaya uint32_t CommandType; 293810e230b6Smaya uint32_t ConstantBufferBindingTableBlock; 293910e230b6Smaya uint32_t ConstantBufferValid; 294010e230b6Smaya bool ConstantBufferDx9Enable; 294110e230b6Smaya uint64_t GatherBufferOffset; 294210e230b6Smaya /* variable length fields follow */ 294310e230b6Smaya}; 294410e230b6Smaya 294596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 294696c5ddc4SrjsGFX75_3DSTATE_GATHER_CONSTANT_PS_pack(__attribute__((unused)) __gen_user_data *data, 294710e230b6Smaya __attribute__((unused)) void * restrict dst, 294896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_CONSTANT_PS * restrict values) 294910e230b6Smaya{ 295010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 295110e230b6Smaya 295210e230b6Smaya dw[0] = 295310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 295410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 295510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 295610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 295710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 295810e230b6Smaya 295910e230b6Smaya dw[1] = 296010e230b6Smaya __gen_uint(values->ConstantBufferBindingTableBlock, 12, 15) | 296110e230b6Smaya __gen_uint(values->ConstantBufferValid, 16, 31); 296210e230b6Smaya 296310e230b6Smaya dw[2] = 296410e230b6Smaya __gen_uint(values->ConstantBufferDx9Enable, 4, 4) | 296510e230b6Smaya __gen_offset(values->GatherBufferOffset, 6, 22); 296610e230b6Smaya} 296710e230b6Smaya 296896c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_VS_length_bias 2 296996c5ddc4Srjs#define GFX75_3DSTATE_GATHER_CONSTANT_VS_header \ 297010e230b6Smaya .DWordLength = 0, \ 297110e230b6Smaya ._3DCommandSubOpcode = 52, \ 297210e230b6Smaya ._3DCommandOpcode = 0, \ 297310e230b6Smaya .CommandSubType = 3, \ 297410e230b6Smaya .CommandType = 3 297510e230b6Smaya 297696c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_CONSTANT_VS { 297710e230b6Smaya uint32_t DWordLength; 297810e230b6Smaya uint32_t _3DCommandSubOpcode; 297910e230b6Smaya uint32_t _3DCommandOpcode; 298010e230b6Smaya uint32_t CommandSubType; 298110e230b6Smaya uint32_t CommandType; 298210e230b6Smaya uint32_t ConstantBufferBindingTableBlock; 298310e230b6Smaya uint32_t ConstantBufferValid; 298410e230b6Smaya bool ConstantBufferDx9Enable; 298510e230b6Smaya uint64_t GatherBufferOffset; 298610e230b6Smaya /* variable length fields follow */ 298710e230b6Smaya}; 298810e230b6Smaya 298996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 299096c5ddc4SrjsGFX75_3DSTATE_GATHER_CONSTANT_VS_pack(__attribute__((unused)) __gen_user_data *data, 299110e230b6Smaya __attribute__((unused)) void * restrict dst, 299296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_CONSTANT_VS * restrict values) 299310e230b6Smaya{ 299410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 299510e230b6Smaya 299610e230b6Smaya dw[0] = 299710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 299810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 299910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 300010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 300110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 300210e230b6Smaya 300310e230b6Smaya dw[1] = 300410e230b6Smaya __gen_uint(values->ConstantBufferBindingTableBlock, 12, 15) | 300510e230b6Smaya __gen_uint(values->ConstantBufferValid, 16, 31); 300610e230b6Smaya 300710e230b6Smaya dw[2] = 300810e230b6Smaya __gen_uint(values->ConstantBufferDx9Enable, 4, 4) | 300910e230b6Smaya __gen_offset(values->GatherBufferOffset, 6, 22); 301010e230b6Smaya} 301110e230b6Smaya 301296c5ddc4Srjs#define GFX75_3DSTATE_GATHER_POOL_ALLOC_length 3 301396c5ddc4Srjs#define GFX75_3DSTATE_GATHER_POOL_ALLOC_length_bias 2 301496c5ddc4Srjs#define GFX75_3DSTATE_GATHER_POOL_ALLOC_header \ 301510e230b6Smaya .DWordLength = 1, \ 301610e230b6Smaya ._3DCommandSubOpcode = 26, \ 301710e230b6Smaya ._3DCommandOpcode = 1, \ 301810e230b6Smaya .CommandSubType = 3, \ 301910e230b6Smaya .CommandType = 3 302010e230b6Smaya 302196c5ddc4Srjsstruct GFX75_3DSTATE_GATHER_POOL_ALLOC { 302210e230b6Smaya uint32_t DWordLength; 302310e230b6Smaya uint32_t _3DCommandSubOpcode; 302410e230b6Smaya uint32_t _3DCommandOpcode; 302510e230b6Smaya uint32_t CommandSubType; 302610e230b6Smaya uint32_t CommandType; 302710e230b6Smaya uint32_t MOCS; 302810e230b6Smaya bool GatherPoolEnable; 302910e230b6Smaya __gen_address_type GatherPoolBaseAddress; 303010e230b6Smaya __gen_address_type GatherPoolUpperBound; 303110e230b6Smaya}; 303210e230b6Smaya 303396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 303496c5ddc4SrjsGFX75_3DSTATE_GATHER_POOL_ALLOC_pack(__attribute__((unused)) __gen_user_data *data, 303510e230b6Smaya __attribute__((unused)) void * restrict dst, 303696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GATHER_POOL_ALLOC * restrict values) 303710e230b6Smaya{ 303810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 303910e230b6Smaya 304010e230b6Smaya dw[0] = 304110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 304210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 304310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 304410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 304510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 304610e230b6Smaya 304710e230b6Smaya const uint32_t v1 = 304810e230b6Smaya __gen_uint(values->MOCS, 0, 3) | 304910e230b6Smaya __gen_mbo(4, 5) | 305010e230b6Smaya __gen_uint(values->GatherPoolEnable, 11, 11); 305196c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->GatherPoolBaseAddress, v1, 12, 31); 305210e230b6Smaya 305396c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->GatherPoolUpperBound, 0, 12, 31); 305410e230b6Smaya} 305510e230b6Smaya 305696c5ddc4Srjs#define GFX75_3DSTATE_GS_length 7 305796c5ddc4Srjs#define GFX75_3DSTATE_GS_length_bias 2 305896c5ddc4Srjs#define GFX75_3DSTATE_GS_header \ 305910e230b6Smaya .DWordLength = 5, \ 306010e230b6Smaya ._3DCommandSubOpcode = 17, \ 306110e230b6Smaya ._3DCommandOpcode = 0, \ 306210e230b6Smaya .CommandSubType = 3, \ 306310e230b6Smaya .CommandType = 3 306410e230b6Smaya 306596c5ddc4Srjsstruct GFX75_3DSTATE_GS { 306610e230b6Smaya uint32_t DWordLength; 306710e230b6Smaya uint32_t _3DCommandSubOpcode; 306810e230b6Smaya uint32_t _3DCommandOpcode; 306910e230b6Smaya uint32_t CommandSubType; 307010e230b6Smaya uint32_t CommandType; 307110e230b6Smaya uint64_t KernelStartPointer; 307210e230b6Smaya bool SoftwareExceptionEnable; 307310e230b6Smaya bool MaskStackExceptionEnable; 307410e230b6Smaya uint32_t GSaccessesUAV; 307510e230b6Smaya bool IllegalOpcodeExceptionEnable; 307610e230b6Smaya uint32_t FloatingPointMode; 307710e230b6Smaya#define IEEE754 0 307810e230b6Smaya#define Alternate 1 307910e230b6Smaya uint32_t ThreadPriority; 308010e230b6Smaya#define NormalPriority 0 308110e230b6Smaya#define HighPriority 1 308210e230b6Smaya uint32_t BindingTableEntryCount; 308310e230b6Smaya uint32_t SamplerCount; 308410e230b6Smaya#define NoSamplers 0 308510e230b6Smaya#define _14Samplers 1 308610e230b6Smaya#define _58Samplers 2 308710e230b6Smaya#define _912Samplers 3 308810e230b6Smaya#define _1316Samplers 4 308910e230b6Smaya bool VectorMaskEnable; 309010e230b6Smaya bool SingleProgramFlow; 309110e230b6Smaya uint32_t PerThreadScratchSpace; 309210e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 309310e230b6Smaya uint32_t DispatchGRFStartRegisterForURBData; 309410e230b6Smaya uint32_t VertexURBEntryReadOffset; 309510e230b6Smaya bool IncludeVertexHandles; 309610e230b6Smaya uint32_t VertexURBEntryReadLength; 309796c5ddc4Srjs enum GFX75_3D_Prim_Topo_Type OutputTopology; 309810e230b6Smaya uint32_t OutputVertexSize; 309910e230b6Smaya bool Enable; 310010e230b6Smaya bool DiscardAdjacency; 310110e230b6Smaya uint32_t ReorderMode; 310210e230b6Smaya#define LEADING 0 310310e230b6Smaya#define TRAILING 1 310410e230b6Smaya uint32_t Hint; 310510e230b6Smaya bool IncludePrimitiveID; 310610e230b6Smaya uint32_t GSInvocationsIncrementValue; 310710e230b6Smaya uint32_t StatisticsEnable; 310810e230b6Smaya uint32_t DispatchMode; 310910e230b6Smaya#define DISPATCH_MODE_SINGLE 0 311010e230b6Smaya#define DISPATCH_MODE_DUAL_INSTANCE 1 311110e230b6Smaya#define DISPATCH_MODE_DUAL_OBJECT 2 311210e230b6Smaya uint32_t DefaultStreamID; 311310e230b6Smaya uint32_t InstanceControl; 311410e230b6Smaya uint32_t ControlDataHeaderSize; 311510e230b6Smaya uint32_t MaximumNumberofThreads; 311610e230b6Smaya uint64_t SemaphoreHandle; 311710e230b6Smaya uint32_t ControlDataFormat; 311810e230b6Smaya#define GSCTL_CUT 0 311910e230b6Smaya#define GSCTL_SID 1 312010e230b6Smaya}; 312110e230b6Smaya 312296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 312396c5ddc4SrjsGFX75_3DSTATE_GS_pack(__attribute__((unused)) __gen_user_data *data, 312410e230b6Smaya __attribute__((unused)) void * restrict dst, 312596c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_GS * restrict values) 312610e230b6Smaya{ 312710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 312810e230b6Smaya 312910e230b6Smaya dw[0] = 313010e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 313110e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 313210e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 313310e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 313410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 313510e230b6Smaya 313610e230b6Smaya dw[1] = 313710e230b6Smaya __gen_offset(values->KernelStartPointer, 6, 31); 313810e230b6Smaya 313910e230b6Smaya dw[2] = 314010e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 7, 7) | 314110e230b6Smaya __gen_uint(values->MaskStackExceptionEnable, 11, 11) | 314210e230b6Smaya __gen_uint(values->GSaccessesUAV, 12, 12) | 314310e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 314410e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 314510e230b6Smaya __gen_uint(values->ThreadPriority, 17, 17) | 314610e230b6Smaya __gen_uint(values->BindingTableEntryCount, 18, 25) | 314710e230b6Smaya __gen_uint(values->SamplerCount, 27, 29) | 314810e230b6Smaya __gen_uint(values->VectorMaskEnable, 30, 30) | 314910e230b6Smaya __gen_uint(values->SingleProgramFlow, 31, 31); 315010e230b6Smaya 315110e230b6Smaya const uint32_t v3 = 315210e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3); 315396c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->ScratchSpaceBasePointer, v3, 10, 31); 315410e230b6Smaya 315510e230b6Smaya dw[4] = 315610e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForURBData, 0, 3) | 315710e230b6Smaya __gen_uint(values->VertexURBEntryReadOffset, 4, 9) | 315810e230b6Smaya __gen_uint(values->IncludeVertexHandles, 10, 10) | 315910e230b6Smaya __gen_uint(values->VertexURBEntryReadLength, 11, 16) | 316010e230b6Smaya __gen_uint(values->OutputTopology, 17, 22) | 316110e230b6Smaya __gen_uint(values->OutputVertexSize, 23, 28); 316210e230b6Smaya 316310e230b6Smaya dw[5] = 316410e230b6Smaya __gen_uint(values->Enable, 0, 0) | 316510e230b6Smaya __gen_uint(values->DiscardAdjacency, 1, 1) | 316610e230b6Smaya __gen_uint(values->ReorderMode, 2, 2) | 316710e230b6Smaya __gen_uint(values->Hint, 3, 3) | 316810e230b6Smaya __gen_uint(values->IncludePrimitiveID, 4, 4) | 316910e230b6Smaya __gen_uint(values->GSInvocationsIncrementValue, 5, 9) | 317010e230b6Smaya __gen_uint(values->StatisticsEnable, 10, 10) | 317110e230b6Smaya __gen_uint(values->DispatchMode, 11, 12) | 317210e230b6Smaya __gen_uint(values->DefaultStreamID, 13, 14) | 317310e230b6Smaya __gen_uint(values->InstanceControl, 15, 19) | 317410e230b6Smaya __gen_uint(values->ControlDataHeaderSize, 20, 23) | 317510e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 24, 31); 317610e230b6Smaya 317710e230b6Smaya dw[6] = 317810e230b6Smaya __gen_offset(values->SemaphoreHandle, 0, 12) | 317910e230b6Smaya __gen_uint(values->ControlDataFormat, 31, 31); 318010e230b6Smaya} 318110e230b6Smaya 318296c5ddc4Srjs#define GFX75_3DSTATE_HIER_DEPTH_BUFFER_length 3 318396c5ddc4Srjs#define GFX75_3DSTATE_HIER_DEPTH_BUFFER_length_bias 2 318496c5ddc4Srjs#define GFX75_3DSTATE_HIER_DEPTH_BUFFER_header \ 318510e230b6Smaya .DWordLength = 1, \ 318610e230b6Smaya ._3DCommandSubOpcode = 7, \ 318710e230b6Smaya ._3DCommandOpcode = 0, \ 318810e230b6Smaya .CommandSubType = 3, \ 318910e230b6Smaya .CommandType = 3 319010e230b6Smaya 319196c5ddc4Srjsstruct GFX75_3DSTATE_HIER_DEPTH_BUFFER { 319210e230b6Smaya uint32_t DWordLength; 319310e230b6Smaya uint32_t _3DCommandSubOpcode; 319410e230b6Smaya uint32_t _3DCommandOpcode; 319510e230b6Smaya uint32_t CommandSubType; 319610e230b6Smaya uint32_t CommandType; 319710e230b6Smaya uint32_t SurfacePitch; 319810e230b6Smaya uint32_t MOCS; 319910e230b6Smaya __gen_address_type SurfaceBaseAddress; 320010e230b6Smaya}; 320110e230b6Smaya 320296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 320396c5ddc4SrjsGFX75_3DSTATE_HIER_DEPTH_BUFFER_pack(__attribute__((unused)) __gen_user_data *data, 320410e230b6Smaya __attribute__((unused)) void * restrict dst, 320596c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_HIER_DEPTH_BUFFER * restrict values) 320610e230b6Smaya{ 320710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 320810e230b6Smaya 320910e230b6Smaya dw[0] = 321010e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 321110e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 321210e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 321310e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 321410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 321510e230b6Smaya 321610e230b6Smaya dw[1] = 321710e230b6Smaya __gen_uint(values->SurfacePitch, 0, 16) | 321810e230b6Smaya __gen_uint(values->MOCS, 25, 28); 321910e230b6Smaya 322096c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->SurfaceBaseAddress, 0, 0, 31); 322110e230b6Smaya} 322210e230b6Smaya 322396c5ddc4Srjs#define GFX75_3DSTATE_HS_length 7 322496c5ddc4Srjs#define GFX75_3DSTATE_HS_length_bias 2 322596c5ddc4Srjs#define GFX75_3DSTATE_HS_header \ 322610e230b6Smaya .DWordLength = 5, \ 322710e230b6Smaya ._3DCommandSubOpcode = 27, \ 322810e230b6Smaya ._3DCommandOpcode = 0, \ 322910e230b6Smaya .CommandSubType = 3, \ 323010e230b6Smaya .CommandType = 3 323110e230b6Smaya 323296c5ddc4Srjsstruct GFX75_3DSTATE_HS { 323310e230b6Smaya uint32_t DWordLength; 323410e230b6Smaya uint32_t _3DCommandSubOpcode; 323510e230b6Smaya uint32_t _3DCommandOpcode; 323610e230b6Smaya uint32_t CommandSubType; 323710e230b6Smaya uint32_t CommandType; 323810e230b6Smaya uint32_t MaximumNumberofThreads; 323910e230b6Smaya bool SoftwareExceptionEnable; 324010e230b6Smaya bool IllegalOpcodeExceptionEnable; 324110e230b6Smaya uint32_t FloatingPointMode; 324210e230b6Smaya#define IEEE754 0 324310e230b6Smaya#define Alternate 1 324410e230b6Smaya uint32_t ThreadDispatchPriority; 324510e230b6Smaya#define High 1 324610e230b6Smaya uint32_t BindingTableEntryCount; 324710e230b6Smaya uint32_t SamplerCount; 324810e230b6Smaya#define NoSamplers 0 324910e230b6Smaya#define _14Samplers 1 325010e230b6Smaya#define _58Samplers 2 325110e230b6Smaya#define _912Samplers 3 325210e230b6Smaya#define _1316Samplers 4 325310e230b6Smaya uint32_t InstanceCount; 325410e230b6Smaya bool StatisticsEnable; 325510e230b6Smaya bool Enable; 325610e230b6Smaya uint64_t KernelStartPointer; 325710e230b6Smaya uint32_t PerThreadScratchSpace; 325810e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 325910e230b6Smaya uint32_t VertexURBEntryReadOffset; 326010e230b6Smaya uint32_t VertexURBEntryReadLength; 326110e230b6Smaya uint32_t DispatchGRFStartRegisterForURBData; 326210e230b6Smaya bool IncludeVertexHandles; 326310e230b6Smaya bool HSaccessesUAV; 326410e230b6Smaya bool VectorMaskEnable; 326510e230b6Smaya bool SingleProgramFlow; 326610e230b6Smaya uint64_t SemaphoreHandle; 326710e230b6Smaya}; 326810e230b6Smaya 326996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 327096c5ddc4SrjsGFX75_3DSTATE_HS_pack(__attribute__((unused)) __gen_user_data *data, 327110e230b6Smaya __attribute__((unused)) void * restrict dst, 327296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_HS * restrict values) 327310e230b6Smaya{ 327410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 327510e230b6Smaya 327610e230b6Smaya dw[0] = 327710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 327810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 327910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 328010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 328110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 328210e230b6Smaya 328310e230b6Smaya dw[1] = 328410e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 0, 7) | 328510e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 12, 12) | 328610e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 328710e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 328810e230b6Smaya __gen_uint(values->ThreadDispatchPriority, 17, 17) | 328910e230b6Smaya __gen_uint(values->BindingTableEntryCount, 18, 25) | 329010e230b6Smaya __gen_uint(values->SamplerCount, 27, 29); 329110e230b6Smaya 329210e230b6Smaya dw[2] = 329310e230b6Smaya __gen_uint(values->InstanceCount, 0, 3) | 329410e230b6Smaya __gen_uint(values->StatisticsEnable, 29, 29) | 329510e230b6Smaya __gen_uint(values->Enable, 31, 31); 329610e230b6Smaya 329710e230b6Smaya dw[3] = 329810e230b6Smaya __gen_offset(values->KernelStartPointer, 6, 31); 329910e230b6Smaya 330010e230b6Smaya const uint32_t v4 = 330110e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3); 330296c5ddc4Srjs dw[4] = __gen_address(data, &dw[4], values->ScratchSpaceBasePointer, v4, 10, 31); 330310e230b6Smaya 330410e230b6Smaya dw[5] = 330510e230b6Smaya __gen_uint(values->VertexURBEntryReadOffset, 4, 9) | 330610e230b6Smaya __gen_uint(values->VertexURBEntryReadLength, 11, 16) | 330710e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForURBData, 19, 23) | 330810e230b6Smaya __gen_uint(values->IncludeVertexHandles, 24, 24) | 330910e230b6Smaya __gen_uint(values->HSaccessesUAV, 25, 25) | 331010e230b6Smaya __gen_uint(values->VectorMaskEnable, 26, 26) | 331110e230b6Smaya __gen_uint(values->SingleProgramFlow, 27, 27); 331210e230b6Smaya 331310e230b6Smaya dw[6] = 331410e230b6Smaya __gen_offset(values->SemaphoreHandle, 0, 12); 331510e230b6Smaya} 331610e230b6Smaya 331796c5ddc4Srjs#define GFX75_3DSTATE_INDEX_BUFFER_length 3 331896c5ddc4Srjs#define GFX75_3DSTATE_INDEX_BUFFER_length_bias 2 331996c5ddc4Srjs#define GFX75_3DSTATE_INDEX_BUFFER_header \ 332010e230b6Smaya .DWordLength = 1, \ 332110e230b6Smaya ._3DCommandSubOpcode = 10, \ 332210e230b6Smaya ._3DCommandOpcode = 0, \ 332310e230b6Smaya .CommandSubType = 3, \ 332410e230b6Smaya .CommandType = 3 332510e230b6Smaya 332696c5ddc4Srjsstruct GFX75_3DSTATE_INDEX_BUFFER { 332710e230b6Smaya uint32_t DWordLength; 332810e230b6Smaya uint32_t IndexFormat; 332910e230b6Smaya#define INDEX_BYTE 0 333010e230b6Smaya#define INDEX_WORD 1 333110e230b6Smaya#define INDEX_DWORD 2 333210e230b6Smaya uint32_t MOCS; 333310e230b6Smaya uint32_t _3DCommandSubOpcode; 333410e230b6Smaya uint32_t _3DCommandOpcode; 333510e230b6Smaya uint32_t CommandSubType; 333610e230b6Smaya uint32_t CommandType; 333710e230b6Smaya __gen_address_type BufferStartingAddress; 333810e230b6Smaya __gen_address_type BufferEndingAddress; 333910e230b6Smaya}; 334010e230b6Smaya 334196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 334296c5ddc4SrjsGFX75_3DSTATE_INDEX_BUFFER_pack(__attribute__((unused)) __gen_user_data *data, 334310e230b6Smaya __attribute__((unused)) void * restrict dst, 334496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_INDEX_BUFFER * restrict values) 334510e230b6Smaya{ 334610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 334710e230b6Smaya 334810e230b6Smaya dw[0] = 334910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 335010e230b6Smaya __gen_uint(values->IndexFormat, 8, 9) | 335110e230b6Smaya __gen_uint(values->MOCS, 12, 15) | 335210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 335310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 335410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 335510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 335610e230b6Smaya 335796c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->BufferStartingAddress, 0, 0, 31); 335810e230b6Smaya 335996c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->BufferEndingAddress, 0, 0, 31); 336010e230b6Smaya} 336110e230b6Smaya 336296c5ddc4Srjs#define GFX75_3DSTATE_LINE_STIPPLE_length 3 336396c5ddc4Srjs#define GFX75_3DSTATE_LINE_STIPPLE_length_bias 2 336496c5ddc4Srjs#define GFX75_3DSTATE_LINE_STIPPLE_header \ 336510e230b6Smaya .DWordLength = 1, \ 336610e230b6Smaya ._3DCommandSubOpcode = 8, \ 336710e230b6Smaya ._3DCommandOpcode = 1, \ 336810e230b6Smaya .CommandSubType = 3, \ 336910e230b6Smaya .CommandType = 3 337010e230b6Smaya 337196c5ddc4Srjsstruct GFX75_3DSTATE_LINE_STIPPLE { 337210e230b6Smaya uint32_t DWordLength; 337310e230b6Smaya uint32_t _3DCommandSubOpcode; 337410e230b6Smaya uint32_t _3DCommandOpcode; 337510e230b6Smaya uint32_t CommandSubType; 337610e230b6Smaya uint32_t CommandType; 337710e230b6Smaya uint32_t LineStipplePattern; 337810e230b6Smaya uint32_t CurrentStippleIndex; 337910e230b6Smaya uint32_t CurrentRepeatCounter; 338010e230b6Smaya bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; 338110e230b6Smaya uint32_t LineStippleRepeatCount; 338210e230b6Smaya float LineStippleInverseRepeatCount; 338310e230b6Smaya}; 338410e230b6Smaya 338596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 338696c5ddc4SrjsGFX75_3DSTATE_LINE_STIPPLE_pack(__attribute__((unused)) __gen_user_data *data, 338710e230b6Smaya __attribute__((unused)) void * restrict dst, 338896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_LINE_STIPPLE * restrict values) 338910e230b6Smaya{ 339010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 339110e230b6Smaya 339210e230b6Smaya dw[0] = 339310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 339410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 339510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 339610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 339710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 339810e230b6Smaya 339910e230b6Smaya dw[1] = 340010e230b6Smaya __gen_uint(values->LineStipplePattern, 0, 15) | 340110e230b6Smaya __gen_uint(values->CurrentStippleIndex, 16, 19) | 340210e230b6Smaya __gen_uint(values->CurrentRepeatCounter, 21, 29) | 340310e230b6Smaya __gen_uint(values->ModifyEnableCurrentRepeatCounterCurrentStippleIndex, 31, 31); 340410e230b6Smaya 340510e230b6Smaya dw[2] = 340610e230b6Smaya __gen_uint(values->LineStippleRepeatCount, 0, 8) | 340710e230b6Smaya __gen_ufixed(values->LineStippleInverseRepeatCount, 15, 31, 16); 340810e230b6Smaya} 340910e230b6Smaya 341096c5ddc4Srjs#define GFX75_3DSTATE_MONOFILTER_SIZE_length 2 341196c5ddc4Srjs#define GFX75_3DSTATE_MONOFILTER_SIZE_length_bias 2 341296c5ddc4Srjs#define GFX75_3DSTATE_MONOFILTER_SIZE_header \ 341310e230b6Smaya .DWordLength = 0, \ 341410e230b6Smaya ._3DCommandSubOpcode = 17, \ 341510e230b6Smaya ._3DCommandOpcode = 1, \ 341610e230b6Smaya .CommandSubType = 3, \ 341710e230b6Smaya .CommandType = 3 341810e230b6Smaya 341996c5ddc4Srjsstruct GFX75_3DSTATE_MONOFILTER_SIZE { 342010e230b6Smaya uint32_t DWordLength; 342110e230b6Smaya uint32_t _3DCommandSubOpcode; 342210e230b6Smaya uint32_t _3DCommandOpcode; 342310e230b6Smaya uint32_t CommandSubType; 342410e230b6Smaya uint32_t CommandType; 342510e230b6Smaya uint32_t MonochromeFilterHeight; 342610e230b6Smaya uint32_t MonochromeFilterWidth; 342710e230b6Smaya}; 342810e230b6Smaya 342996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 343096c5ddc4SrjsGFX75_3DSTATE_MONOFILTER_SIZE_pack(__attribute__((unused)) __gen_user_data *data, 343110e230b6Smaya __attribute__((unused)) void * restrict dst, 343296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_MONOFILTER_SIZE * restrict values) 343310e230b6Smaya{ 343410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 343510e230b6Smaya 343610e230b6Smaya dw[0] = 343710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 343810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 343910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 344010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 344110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 344210e230b6Smaya 344310e230b6Smaya dw[1] = 344410e230b6Smaya __gen_uint(values->MonochromeFilterHeight, 0, 2) | 344510e230b6Smaya __gen_uint(values->MonochromeFilterWidth, 3, 5); 344610e230b6Smaya} 344710e230b6Smaya 344896c5ddc4Srjs#define GFX75_3DSTATE_MULTISAMPLE_length 4 344996c5ddc4Srjs#define GFX75_3DSTATE_MULTISAMPLE_length_bias 2 345096c5ddc4Srjs#define GFX75_3DSTATE_MULTISAMPLE_header \ 345110e230b6Smaya .DWordLength = 2, \ 345210e230b6Smaya ._3DCommandSubOpcode = 13, \ 345310e230b6Smaya ._3DCommandOpcode = 1, \ 345410e230b6Smaya .CommandSubType = 3, \ 345510e230b6Smaya .CommandType = 3 345610e230b6Smaya 345796c5ddc4Srjsstruct GFX75_3DSTATE_MULTISAMPLE { 345810e230b6Smaya uint32_t DWordLength; 345910e230b6Smaya uint32_t _3DCommandSubOpcode; 346010e230b6Smaya uint32_t _3DCommandOpcode; 346110e230b6Smaya uint32_t CommandSubType; 346210e230b6Smaya uint32_t CommandType; 346310e230b6Smaya uint32_t NumberofMultisamples; 346410e230b6Smaya#define NUMSAMPLES_1 0 346510e230b6Smaya#define NUMSAMPLES_4 2 346610e230b6Smaya#define NUMSAMPLES_8 3 346710e230b6Smaya uint32_t PixelLocation; 346810e230b6Smaya#define CENTER 0 346910e230b6Smaya#define UL_CORNER 1 347010e230b6Smaya bool MultiSampleEnable; 347110e230b6Smaya float Sample0YOffset; 347210e230b6Smaya float Sample0XOffset; 347310e230b6Smaya float Sample1YOffset; 347410e230b6Smaya float Sample1XOffset; 347510e230b6Smaya float Sample2YOffset; 347610e230b6Smaya float Sample2XOffset; 347710e230b6Smaya float Sample3YOffset; 347810e230b6Smaya float Sample3XOffset; 347910e230b6Smaya float Sample4YOffset; 348010e230b6Smaya float Sample4XOffset; 348110e230b6Smaya float Sample5YOffset; 348210e230b6Smaya float Sample5XOffset; 348310e230b6Smaya float Sample6YOffset; 348410e230b6Smaya float Sample6XOffset; 348510e230b6Smaya float Sample7YOffset; 348610e230b6Smaya float Sample7XOffset; 348710e230b6Smaya}; 348810e230b6Smaya 348996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 349096c5ddc4SrjsGFX75_3DSTATE_MULTISAMPLE_pack(__attribute__((unused)) __gen_user_data *data, 349110e230b6Smaya __attribute__((unused)) void * restrict dst, 349296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_MULTISAMPLE * restrict values) 349310e230b6Smaya{ 349410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 349510e230b6Smaya 349610e230b6Smaya dw[0] = 349710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 349810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 349910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 350010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 350110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 350210e230b6Smaya 350310e230b6Smaya dw[1] = 350410e230b6Smaya __gen_uint(values->NumberofMultisamples, 1, 3) | 350510e230b6Smaya __gen_uint(values->PixelLocation, 4, 4) | 350610e230b6Smaya __gen_uint(values->MultiSampleEnable, 5, 5); 350710e230b6Smaya 350810e230b6Smaya dw[2] = 350910e230b6Smaya __gen_ufixed(values->Sample0YOffset, 0, 3, 4) | 351010e230b6Smaya __gen_ufixed(values->Sample0XOffset, 4, 7, 4) | 351110e230b6Smaya __gen_ufixed(values->Sample1YOffset, 8, 11, 4) | 351210e230b6Smaya __gen_ufixed(values->Sample1XOffset, 12, 15, 4) | 351310e230b6Smaya __gen_ufixed(values->Sample2YOffset, 16, 19, 4) | 351410e230b6Smaya __gen_ufixed(values->Sample2XOffset, 20, 23, 4) | 351510e230b6Smaya __gen_ufixed(values->Sample3YOffset, 24, 27, 4) | 351610e230b6Smaya __gen_ufixed(values->Sample3XOffset, 28, 31, 4); 351710e230b6Smaya 351810e230b6Smaya dw[3] = 351910e230b6Smaya __gen_ufixed(values->Sample4YOffset, 0, 3, 4) | 352010e230b6Smaya __gen_ufixed(values->Sample4XOffset, 4, 7, 4) | 352110e230b6Smaya __gen_ufixed(values->Sample5YOffset, 8, 11, 4) | 352210e230b6Smaya __gen_ufixed(values->Sample5XOffset, 12, 15, 4) | 352310e230b6Smaya __gen_ufixed(values->Sample6YOffset, 16, 19, 4) | 352410e230b6Smaya __gen_ufixed(values->Sample6XOffset, 20, 23, 4) | 352510e230b6Smaya __gen_ufixed(values->Sample7YOffset, 24, 27, 4) | 352610e230b6Smaya __gen_ufixed(values->Sample7XOffset, 28, 31, 4); 352710e230b6Smaya} 352810e230b6Smaya 352996c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_OFFSET_length 2 353096c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 2 353196c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_OFFSET_header\ 353210e230b6Smaya .DWordLength = 0, \ 353310e230b6Smaya ._3DCommandSubOpcode = 6, \ 353410e230b6Smaya ._3DCommandOpcode = 1, \ 353510e230b6Smaya .CommandSubType = 3, \ 353610e230b6Smaya .CommandType = 3 353710e230b6Smaya 353896c5ddc4Srjsstruct GFX75_3DSTATE_POLY_STIPPLE_OFFSET { 353910e230b6Smaya uint32_t DWordLength; 354010e230b6Smaya uint32_t _3DCommandSubOpcode; 354110e230b6Smaya uint32_t _3DCommandOpcode; 354210e230b6Smaya uint32_t CommandSubType; 354310e230b6Smaya uint32_t CommandType; 354410e230b6Smaya uint32_t PolygonStippleYOffset; 354510e230b6Smaya uint32_t PolygonStippleXOffset; 354610e230b6Smaya}; 354710e230b6Smaya 354896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 354996c5ddc4SrjsGFX75_3DSTATE_POLY_STIPPLE_OFFSET_pack(__attribute__((unused)) __gen_user_data *data, 355010e230b6Smaya __attribute__((unused)) void * restrict dst, 355196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_POLY_STIPPLE_OFFSET * restrict values) 355210e230b6Smaya{ 355310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 355410e230b6Smaya 355510e230b6Smaya dw[0] = 355610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 355710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 355810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 355910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 356010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 356110e230b6Smaya 356210e230b6Smaya dw[1] = 356310e230b6Smaya __gen_uint(values->PolygonStippleYOffset, 0, 4) | 356410e230b6Smaya __gen_uint(values->PolygonStippleXOffset, 8, 12); 356510e230b6Smaya} 356610e230b6Smaya 356796c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_PATTERN_length 33 356896c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 2 356996c5ddc4Srjs#define GFX75_3DSTATE_POLY_STIPPLE_PATTERN_header\ 357010e230b6Smaya .DWordLength = 31, \ 357110e230b6Smaya ._3DCommandSubOpcode = 7, \ 357210e230b6Smaya ._3DCommandOpcode = 1, \ 357310e230b6Smaya .CommandSubType = 3, \ 357410e230b6Smaya .CommandType = 3 357510e230b6Smaya 357696c5ddc4Srjsstruct GFX75_3DSTATE_POLY_STIPPLE_PATTERN { 357710e230b6Smaya uint32_t DWordLength; 357810e230b6Smaya uint32_t _3DCommandSubOpcode; 357910e230b6Smaya uint32_t _3DCommandOpcode; 358010e230b6Smaya uint32_t CommandSubType; 358110e230b6Smaya uint32_t CommandType; 358210e230b6Smaya uint32_t PatternRow[32]; 358310e230b6Smaya}; 358410e230b6Smaya 358596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 358696c5ddc4SrjsGFX75_3DSTATE_POLY_STIPPLE_PATTERN_pack(__attribute__((unused)) __gen_user_data *data, 358710e230b6Smaya __attribute__((unused)) void * restrict dst, 358896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_POLY_STIPPLE_PATTERN * restrict values) 358910e230b6Smaya{ 359010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 359110e230b6Smaya 359210e230b6Smaya dw[0] = 359310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 359410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 359510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 359610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 359710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 359810e230b6Smaya 359910e230b6Smaya dw[1] = 360010e230b6Smaya __gen_uint(values->PatternRow[0], 0, 31); 360110e230b6Smaya 360210e230b6Smaya dw[2] = 360310e230b6Smaya __gen_uint(values->PatternRow[1], 0, 31); 360410e230b6Smaya 360510e230b6Smaya dw[3] = 360610e230b6Smaya __gen_uint(values->PatternRow[2], 0, 31); 360710e230b6Smaya 360810e230b6Smaya dw[4] = 360910e230b6Smaya __gen_uint(values->PatternRow[3], 0, 31); 361010e230b6Smaya 361110e230b6Smaya dw[5] = 361210e230b6Smaya __gen_uint(values->PatternRow[4], 0, 31); 361310e230b6Smaya 361410e230b6Smaya dw[6] = 361510e230b6Smaya __gen_uint(values->PatternRow[5], 0, 31); 361610e230b6Smaya 361710e230b6Smaya dw[7] = 361810e230b6Smaya __gen_uint(values->PatternRow[6], 0, 31); 361910e230b6Smaya 362010e230b6Smaya dw[8] = 362110e230b6Smaya __gen_uint(values->PatternRow[7], 0, 31); 362210e230b6Smaya 362310e230b6Smaya dw[9] = 362410e230b6Smaya __gen_uint(values->PatternRow[8], 0, 31); 362510e230b6Smaya 362610e230b6Smaya dw[10] = 362710e230b6Smaya __gen_uint(values->PatternRow[9], 0, 31); 362810e230b6Smaya 362910e230b6Smaya dw[11] = 363010e230b6Smaya __gen_uint(values->PatternRow[10], 0, 31); 363110e230b6Smaya 363210e230b6Smaya dw[12] = 363310e230b6Smaya __gen_uint(values->PatternRow[11], 0, 31); 363410e230b6Smaya 363510e230b6Smaya dw[13] = 363610e230b6Smaya __gen_uint(values->PatternRow[12], 0, 31); 363710e230b6Smaya 363810e230b6Smaya dw[14] = 363910e230b6Smaya __gen_uint(values->PatternRow[13], 0, 31); 364010e230b6Smaya 364110e230b6Smaya dw[15] = 364210e230b6Smaya __gen_uint(values->PatternRow[14], 0, 31); 364310e230b6Smaya 364410e230b6Smaya dw[16] = 364510e230b6Smaya __gen_uint(values->PatternRow[15], 0, 31); 364610e230b6Smaya 364710e230b6Smaya dw[17] = 364810e230b6Smaya __gen_uint(values->PatternRow[16], 0, 31); 364910e230b6Smaya 365010e230b6Smaya dw[18] = 365110e230b6Smaya __gen_uint(values->PatternRow[17], 0, 31); 365210e230b6Smaya 365310e230b6Smaya dw[19] = 365410e230b6Smaya __gen_uint(values->PatternRow[18], 0, 31); 365510e230b6Smaya 365610e230b6Smaya dw[20] = 365710e230b6Smaya __gen_uint(values->PatternRow[19], 0, 31); 365810e230b6Smaya 365910e230b6Smaya dw[21] = 366010e230b6Smaya __gen_uint(values->PatternRow[20], 0, 31); 366110e230b6Smaya 366210e230b6Smaya dw[22] = 366310e230b6Smaya __gen_uint(values->PatternRow[21], 0, 31); 366410e230b6Smaya 366510e230b6Smaya dw[23] = 366610e230b6Smaya __gen_uint(values->PatternRow[22], 0, 31); 366710e230b6Smaya 366810e230b6Smaya dw[24] = 366910e230b6Smaya __gen_uint(values->PatternRow[23], 0, 31); 367010e230b6Smaya 367110e230b6Smaya dw[25] = 367210e230b6Smaya __gen_uint(values->PatternRow[24], 0, 31); 367310e230b6Smaya 367410e230b6Smaya dw[26] = 367510e230b6Smaya __gen_uint(values->PatternRow[25], 0, 31); 367610e230b6Smaya 367710e230b6Smaya dw[27] = 367810e230b6Smaya __gen_uint(values->PatternRow[26], 0, 31); 367910e230b6Smaya 368010e230b6Smaya dw[28] = 368110e230b6Smaya __gen_uint(values->PatternRow[27], 0, 31); 368210e230b6Smaya 368310e230b6Smaya dw[29] = 368410e230b6Smaya __gen_uint(values->PatternRow[28], 0, 31); 368510e230b6Smaya 368610e230b6Smaya dw[30] = 368710e230b6Smaya __gen_uint(values->PatternRow[29], 0, 31); 368810e230b6Smaya 368910e230b6Smaya dw[31] = 369010e230b6Smaya __gen_uint(values->PatternRow[30], 0, 31); 369110e230b6Smaya 369210e230b6Smaya dw[32] = 369310e230b6Smaya __gen_uint(values->PatternRow[31], 0, 31); 369410e230b6Smaya} 369510e230b6Smaya 369696c5ddc4Srjs#define GFX75_3DSTATE_PS_length 8 369796c5ddc4Srjs#define GFX75_3DSTATE_PS_length_bias 2 369896c5ddc4Srjs#define GFX75_3DSTATE_PS_header \ 369910e230b6Smaya .DWordLength = 6, \ 370010e230b6Smaya ._3DCommandSubOpcode = 32, \ 370110e230b6Smaya ._3DCommandOpcode = 0, \ 370210e230b6Smaya .CommandSubType = 3, \ 370310e230b6Smaya .CommandType = 3 370410e230b6Smaya 370596c5ddc4Srjsstruct GFX75_3DSTATE_PS { 370610e230b6Smaya uint32_t DWordLength; 370710e230b6Smaya uint32_t _3DCommandSubOpcode; 370810e230b6Smaya uint32_t _3DCommandOpcode; 370910e230b6Smaya uint32_t CommandSubType; 371010e230b6Smaya uint32_t CommandType; 371110e230b6Smaya uint64_t KernelStartPointer0; 371210e230b6Smaya bool SoftwareExceptionEnable; 371310e230b6Smaya bool MaskStackExceptionEnable; 371410e230b6Smaya bool IllegalOpcodeExceptionEnable; 371510e230b6Smaya uint32_t RoundingMode; 371610e230b6Smaya#define RTNE 0 371710e230b6Smaya#define RU 1 371810e230b6Smaya#define RD 2 371910e230b6Smaya#define RTZ 3 372010e230b6Smaya uint32_t FloatingPointMode; 372110e230b6Smaya#define IEEE754 0 372210e230b6Smaya#define Alternate 1 372310e230b6Smaya uint32_t ThreadPriority; 372410e230b6Smaya#define High 1 372510e230b6Smaya uint32_t BindingTableEntryCount; 372610e230b6Smaya uint32_t DenormalMode; 372710e230b6Smaya#define FTZ 0 372810e230b6Smaya#define RET 1 372910e230b6Smaya uint32_t SamplerCount; 373010e230b6Smaya bool VectorMaskEnable; 373110e230b6Smaya bool SingleProgramFlow; 373210e230b6Smaya uint32_t PerThreadScratchSpace; 373310e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 373410e230b6Smaya bool _8PixelDispatchEnable; 373510e230b6Smaya bool _16PixelDispatchEnable; 373610e230b6Smaya bool _32PixelDispatchEnable; 373710e230b6Smaya uint32_t PositionXYOffsetSelect; 373810e230b6Smaya#define POSOFFSET_NONE 0 373910e230b6Smaya#define POSOFFSET_CENTROID 2 374010e230b6Smaya#define POSOFFSET_SAMPLE 3 374110e230b6Smaya bool PSAccessesUAV; 374210e230b6Smaya bool RenderTargetResolveEnable; 374310e230b6Smaya bool DualSourceBlendEnable; 374410e230b6Smaya bool RenderTargetFastClearEnable; 374510e230b6Smaya bool oMaskPresenttoRenderTarget; 374610e230b6Smaya bool AttributeEnable; 374710e230b6Smaya bool PushConstantEnable; 374810e230b6Smaya uint32_t SampleMask; 374910e230b6Smaya uint32_t MaximumNumberofThreads; 375010e230b6Smaya uint32_t DispatchGRFStartRegisterForConstantSetupData2; 375110e230b6Smaya uint32_t DispatchGRFStartRegisterForConstantSetupData1; 375210e230b6Smaya uint32_t DispatchGRFStartRegisterForConstantSetupData0; 375310e230b6Smaya uint64_t KernelStartPointer1; 375410e230b6Smaya uint64_t KernelStartPointer2; 375510e230b6Smaya}; 375610e230b6Smaya 375796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 375896c5ddc4SrjsGFX75_3DSTATE_PS_pack(__attribute__((unused)) __gen_user_data *data, 375910e230b6Smaya __attribute__((unused)) void * restrict dst, 376096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PS * restrict values) 376110e230b6Smaya{ 376210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 376310e230b6Smaya 376410e230b6Smaya dw[0] = 376510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 376610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 376710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 376810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 376910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 377010e230b6Smaya 377110e230b6Smaya dw[1] = 377210e230b6Smaya __gen_offset(values->KernelStartPointer0, 6, 31); 377310e230b6Smaya 377410e230b6Smaya dw[2] = 377510e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 7, 7) | 377610e230b6Smaya __gen_uint(values->MaskStackExceptionEnable, 11, 11) | 377710e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 377810e230b6Smaya __gen_uint(values->RoundingMode, 14, 15) | 377910e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 378010e230b6Smaya __gen_uint(values->ThreadPriority, 17, 17) | 378110e230b6Smaya __gen_uint(values->BindingTableEntryCount, 18, 25) | 378210e230b6Smaya __gen_uint(values->DenormalMode, 26, 26) | 378310e230b6Smaya __gen_uint(values->SamplerCount, 27, 29) | 378410e230b6Smaya __gen_uint(values->VectorMaskEnable, 30, 30) | 378510e230b6Smaya __gen_uint(values->SingleProgramFlow, 31, 31); 378610e230b6Smaya 378710e230b6Smaya const uint32_t v3 = 378810e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3); 378996c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->ScratchSpaceBasePointer, v3, 10, 31); 379010e230b6Smaya 379110e230b6Smaya dw[4] = 379210e230b6Smaya __gen_uint(values->_8PixelDispatchEnable, 0, 0) | 379310e230b6Smaya __gen_uint(values->_16PixelDispatchEnable, 1, 1) | 379410e230b6Smaya __gen_uint(values->_32PixelDispatchEnable, 2, 2) | 379510e230b6Smaya __gen_uint(values->PositionXYOffsetSelect, 3, 4) | 379610e230b6Smaya __gen_uint(values->PSAccessesUAV, 5, 5) | 379710e230b6Smaya __gen_uint(values->RenderTargetResolveEnable, 6, 6) | 379810e230b6Smaya __gen_uint(values->DualSourceBlendEnable, 7, 7) | 379910e230b6Smaya __gen_uint(values->RenderTargetFastClearEnable, 8, 8) | 380010e230b6Smaya __gen_uint(values->oMaskPresenttoRenderTarget, 9, 9) | 380110e230b6Smaya __gen_uint(values->AttributeEnable, 10, 10) | 380210e230b6Smaya __gen_uint(values->PushConstantEnable, 11, 11) | 380310e230b6Smaya __gen_uint(values->SampleMask, 12, 19) | 380410e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 23, 31); 380510e230b6Smaya 380610e230b6Smaya dw[5] = 380710e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForConstantSetupData2, 0, 6) | 380810e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForConstantSetupData1, 8, 14) | 380910e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForConstantSetupData0, 16, 22); 381010e230b6Smaya 381110e230b6Smaya dw[6] = 381210e230b6Smaya __gen_offset(values->KernelStartPointer1, 6, 31); 381310e230b6Smaya 381410e230b6Smaya dw[7] = 381510e230b6Smaya __gen_offset(values->KernelStartPointer2, 6, 31); 381610e230b6Smaya} 381710e230b6Smaya 381896c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 2 381996c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 2 382096c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\ 382110e230b6Smaya .DWordLength = 0, \ 382210e230b6Smaya ._3DCommandSubOpcode = 20, \ 382310e230b6Smaya ._3DCommandOpcode = 1, \ 382410e230b6Smaya .CommandSubType = 3, \ 382510e230b6Smaya .CommandType = 3 382610e230b6Smaya 382796c5ddc4Srjsstruct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS { 382810e230b6Smaya uint32_t DWordLength; 382910e230b6Smaya uint32_t _3DCommandSubOpcode; 383010e230b6Smaya uint32_t _3DCommandOpcode; 383110e230b6Smaya uint32_t CommandSubType; 383210e230b6Smaya uint32_t CommandType; 383310e230b6Smaya uint32_t ConstantBufferSize; 383410e230b6Smaya uint32_t ConstantBufferOffset; 383510e230b6Smaya}; 383610e230b6Smaya 383796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 383896c5ddc4SrjsGFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__attribute__((unused)) __gen_user_data *data, 383910e230b6Smaya __attribute__((unused)) void * restrict dst, 384096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values) 384110e230b6Smaya{ 384210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 384310e230b6Smaya 384410e230b6Smaya dw[0] = 384510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 384610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 384710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 384810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 384910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 385010e230b6Smaya 385110e230b6Smaya dw[1] = 385210e230b6Smaya __gen_uint(values->ConstantBufferSize, 0, 5) | 385310e230b6Smaya __gen_uint(values->ConstantBufferOffset, 16, 20); 385410e230b6Smaya} 385510e230b6Smaya 385696c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 2 385796c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 2 385896c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\ 385910e230b6Smaya .DWordLength = 0, \ 386010e230b6Smaya ._3DCommandSubOpcode = 21, \ 386110e230b6Smaya ._3DCommandOpcode = 1, \ 386210e230b6Smaya .CommandSubType = 3, \ 386310e230b6Smaya .CommandType = 3 386410e230b6Smaya 386596c5ddc4Srjsstruct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS { 386610e230b6Smaya uint32_t DWordLength; 386710e230b6Smaya uint32_t _3DCommandSubOpcode; 386810e230b6Smaya uint32_t _3DCommandOpcode; 386910e230b6Smaya uint32_t CommandSubType; 387010e230b6Smaya uint32_t CommandType; 387110e230b6Smaya uint32_t ConstantBufferSize; 387210e230b6Smaya uint32_t ConstantBufferOffset; 387310e230b6Smaya}; 387410e230b6Smaya 387596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 387696c5ddc4SrjsGFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__attribute__((unused)) __gen_user_data *data, 387710e230b6Smaya __attribute__((unused)) void * restrict dst, 387896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values) 387910e230b6Smaya{ 388010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 388110e230b6Smaya 388210e230b6Smaya dw[0] = 388310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 388410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 388510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 388610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 388710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 388810e230b6Smaya 388910e230b6Smaya dw[1] = 389010e230b6Smaya __gen_uint(values->ConstantBufferSize, 0, 5) | 389110e230b6Smaya __gen_uint(values->ConstantBufferOffset, 16, 20); 389210e230b6Smaya} 389310e230b6Smaya 389496c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 2 389596c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 2 389696c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\ 389710e230b6Smaya .DWordLength = 0, \ 389810e230b6Smaya ._3DCommandSubOpcode = 19, \ 389910e230b6Smaya ._3DCommandOpcode = 1, \ 390010e230b6Smaya .CommandSubType = 3, \ 390110e230b6Smaya .CommandType = 3 390210e230b6Smaya 390396c5ddc4Srjsstruct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS { 390410e230b6Smaya uint32_t DWordLength; 390510e230b6Smaya uint32_t _3DCommandSubOpcode; 390610e230b6Smaya uint32_t _3DCommandOpcode; 390710e230b6Smaya uint32_t CommandSubType; 390810e230b6Smaya uint32_t CommandType; 390910e230b6Smaya uint32_t ConstantBufferSize; 391010e230b6Smaya uint32_t ConstantBufferOffset; 391110e230b6Smaya}; 391210e230b6Smaya 391396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 391496c5ddc4SrjsGFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__attribute__((unused)) __gen_user_data *data, 391510e230b6Smaya __attribute__((unused)) void * restrict dst, 391696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values) 391710e230b6Smaya{ 391810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 391910e230b6Smaya 392010e230b6Smaya dw[0] = 392110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 392210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 392310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 392410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 392510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 392610e230b6Smaya 392710e230b6Smaya dw[1] = 392810e230b6Smaya __gen_uint(values->ConstantBufferSize, 0, 5) | 392910e230b6Smaya __gen_uint(values->ConstantBufferOffset, 16, 20); 393010e230b6Smaya} 393110e230b6Smaya 393296c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 2 393396c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 2 393496c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\ 393510e230b6Smaya .DWordLength = 0, \ 393610e230b6Smaya ._3DCommandSubOpcode = 22, \ 393710e230b6Smaya ._3DCommandOpcode = 1, \ 393810e230b6Smaya .CommandSubType = 3, \ 393910e230b6Smaya .CommandType = 3 394010e230b6Smaya 394196c5ddc4Srjsstruct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS { 394210e230b6Smaya uint32_t DWordLength; 394310e230b6Smaya uint32_t _3DCommandSubOpcode; 394410e230b6Smaya uint32_t _3DCommandOpcode; 394510e230b6Smaya uint32_t CommandSubType; 394610e230b6Smaya uint32_t CommandType; 394710e230b6Smaya uint32_t ConstantBufferSize; 394810e230b6Smaya uint32_t ConstantBufferOffset; 394910e230b6Smaya}; 395010e230b6Smaya 395196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 395296c5ddc4SrjsGFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__attribute__((unused)) __gen_user_data *data, 395310e230b6Smaya __attribute__((unused)) void * restrict dst, 395496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values) 395510e230b6Smaya{ 395610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 395710e230b6Smaya 395810e230b6Smaya dw[0] = 395910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 396010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 396110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 396210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 396310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 396410e230b6Smaya 396510e230b6Smaya dw[1] = 396610e230b6Smaya __gen_uint(values->ConstantBufferSize, 0, 5) | 396710e230b6Smaya __gen_uint(values->ConstantBufferOffset, 16, 20); 396810e230b6Smaya} 396910e230b6Smaya 397096c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 2 397196c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 2 397296c5ddc4Srjs#define GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\ 397310e230b6Smaya .DWordLength = 0, \ 397410e230b6Smaya ._3DCommandSubOpcode = 18, \ 397510e230b6Smaya ._3DCommandOpcode = 1, \ 397610e230b6Smaya .CommandSubType = 3, \ 397710e230b6Smaya .CommandType = 3 397810e230b6Smaya 397996c5ddc4Srjsstruct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS { 398010e230b6Smaya uint32_t DWordLength; 398110e230b6Smaya uint32_t _3DCommandSubOpcode; 398210e230b6Smaya uint32_t _3DCommandOpcode; 398310e230b6Smaya uint32_t CommandSubType; 398410e230b6Smaya uint32_t CommandType; 398510e230b6Smaya uint32_t ConstantBufferSize; 398610e230b6Smaya uint32_t ConstantBufferOffset; 398710e230b6Smaya}; 398810e230b6Smaya 398996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 399096c5ddc4SrjsGFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__attribute__((unused)) __gen_user_data *data, 399110e230b6Smaya __attribute__((unused)) void * restrict dst, 399296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values) 399310e230b6Smaya{ 399410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 399510e230b6Smaya 399610e230b6Smaya dw[0] = 399710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 399810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 399910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 400010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 400110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 400210e230b6Smaya 400310e230b6Smaya dw[1] = 400410e230b6Smaya __gen_uint(values->ConstantBufferSize, 0, 5) | 400510e230b6Smaya __gen_uint(values->ConstantBufferOffset, 16, 20); 400610e230b6Smaya} 400710e230b6Smaya 400896c5ddc4Srjs#define GFX75_3DSTATE_RAST_MULTISAMPLE_length 6 400996c5ddc4Srjs#define GFX75_3DSTATE_RAST_MULTISAMPLE_length_bias 2 401096c5ddc4Srjs#define GFX75_3DSTATE_RAST_MULTISAMPLE_header \ 401110e230b6Smaya .DWordLength = 4, \ 401210e230b6Smaya ._3DCommandSubOpcode = 14, \ 401310e230b6Smaya ._3DCommandOpcode = 1, \ 401410e230b6Smaya .CommandSubType = 3, \ 401510e230b6Smaya .CommandType = 3 401610e230b6Smaya 401796c5ddc4Srjsstruct GFX75_3DSTATE_RAST_MULTISAMPLE { 401810e230b6Smaya uint32_t DWordLength; 401910e230b6Smaya uint32_t _3DCommandSubOpcode; 402010e230b6Smaya uint32_t _3DCommandOpcode; 402110e230b6Smaya uint32_t CommandSubType; 402210e230b6Smaya uint32_t CommandType; 402310e230b6Smaya uint32_t NumberofRasterizationMultisamples; 402410e230b6Smaya#define NRM_NUMRASTSAMPLES_1 0 402510e230b6Smaya#define NRM_NUMRASTSAMPLES_2 1 402610e230b6Smaya#define NRM_NUMRASTSAMPLES_4 2 402710e230b6Smaya#define NRM_NUMRASTSAMPLES_8 3 402810e230b6Smaya#define NRM_NUMRASTSAMPLES_16 4 402910e230b6Smaya float Sample0YOffset; 403010e230b6Smaya float Sample0XOffset; 403110e230b6Smaya float Sample1YOffset; 403210e230b6Smaya float Sample1XOffset; 403310e230b6Smaya float Sample2YOffset; 403410e230b6Smaya float Sample2XOffset; 403510e230b6Smaya float Sample3YOffset; 403610e230b6Smaya float Sample3XOffset; 403710e230b6Smaya float Sample4YOffset; 403810e230b6Smaya float Sample4XOffset; 403910e230b6Smaya float Sample5YOffset; 404010e230b6Smaya float Sample5XOffset; 404110e230b6Smaya float Sample6YOffset; 404210e230b6Smaya float Sample6XOffset; 404310e230b6Smaya float Sample7YOffset; 404410e230b6Smaya float Sample7XOffset; 404510e230b6Smaya float Sample8YOffset; 404610e230b6Smaya float Sample8XOffset; 404710e230b6Smaya float Sample9YOffset; 404810e230b6Smaya float Sample9XOffset; 404910e230b6Smaya float Sample10YOffset; 405010e230b6Smaya float Sample10XOffset; 405110e230b6Smaya float Sample11YOffset; 405210e230b6Smaya float Sample11XOffset; 405310e230b6Smaya float Sample12YOffset; 405410e230b6Smaya float Sample12XOffset; 405510e230b6Smaya float Sample13YOffset; 405610e230b6Smaya float Sample13XOffset; 405710e230b6Smaya float Sample14YOffset; 405810e230b6Smaya float Sample14XOffset; 405910e230b6Smaya float Sample15YOffset; 406010e230b6Smaya float Sample15XOffset; 406110e230b6Smaya}; 406210e230b6Smaya 406396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 406496c5ddc4SrjsGFX75_3DSTATE_RAST_MULTISAMPLE_pack(__attribute__((unused)) __gen_user_data *data, 406510e230b6Smaya __attribute__((unused)) void * restrict dst, 406696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_RAST_MULTISAMPLE * restrict values) 406710e230b6Smaya{ 406810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 406910e230b6Smaya 407010e230b6Smaya dw[0] = 407110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 407210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 407310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 407410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 407510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 407610e230b6Smaya 407710e230b6Smaya dw[1] = 407810e230b6Smaya __gen_uint(values->NumberofRasterizationMultisamples, 1, 3); 407910e230b6Smaya 408010e230b6Smaya dw[2] = 408110e230b6Smaya __gen_ufixed(values->Sample0YOffset, 0, 3, 4) | 408210e230b6Smaya __gen_ufixed(values->Sample0XOffset, 4, 7, 4) | 408310e230b6Smaya __gen_ufixed(values->Sample1YOffset, 8, 11, 4) | 408410e230b6Smaya __gen_ufixed(values->Sample1XOffset, 12, 15, 4) | 408510e230b6Smaya __gen_ufixed(values->Sample2YOffset, 16, 19, 4) | 408610e230b6Smaya __gen_ufixed(values->Sample2XOffset, 20, 23, 4) | 408710e230b6Smaya __gen_ufixed(values->Sample3YOffset, 24, 27, 4) | 408810e230b6Smaya __gen_ufixed(values->Sample3XOffset, 28, 31, 4); 408910e230b6Smaya 409010e230b6Smaya dw[3] = 409110e230b6Smaya __gen_ufixed(values->Sample4YOffset, 0, 3, 4) | 409210e230b6Smaya __gen_ufixed(values->Sample4XOffset, 4, 7, 4) | 409310e230b6Smaya __gen_ufixed(values->Sample5YOffset, 8, 11, 4) | 409410e230b6Smaya __gen_ufixed(values->Sample5XOffset, 12, 15, 4) | 409510e230b6Smaya __gen_ufixed(values->Sample6YOffset, 16, 19, 4) | 409610e230b6Smaya __gen_ufixed(values->Sample6XOffset, 20, 23, 4) | 409710e230b6Smaya __gen_ufixed(values->Sample7YOffset, 24, 27, 4) | 409810e230b6Smaya __gen_ufixed(values->Sample7XOffset, 28, 31, 4); 409910e230b6Smaya 410010e230b6Smaya dw[4] = 410110e230b6Smaya __gen_ufixed(values->Sample8YOffset, 0, 3, 4) | 410210e230b6Smaya __gen_ufixed(values->Sample8XOffset, 4, 7, 4) | 410310e230b6Smaya __gen_ufixed(values->Sample9YOffset, 8, 11, 4) | 410410e230b6Smaya __gen_ufixed(values->Sample9XOffset, 12, 15, 4) | 410510e230b6Smaya __gen_ufixed(values->Sample10YOffset, 16, 19, 4) | 410610e230b6Smaya __gen_ufixed(values->Sample10XOffset, 20, 23, 4) | 410710e230b6Smaya __gen_ufixed(values->Sample11YOffset, 24, 27, 4) | 410810e230b6Smaya __gen_ufixed(values->Sample11XOffset, 28, 31, 4); 410910e230b6Smaya 411010e230b6Smaya dw[5] = 411110e230b6Smaya __gen_ufixed(values->Sample12YOffset, 0, 3, 4) | 411210e230b6Smaya __gen_ufixed(values->Sample12XOffset, 4, 7, 4) | 411310e230b6Smaya __gen_ufixed(values->Sample13YOffset, 8, 11, 4) | 411410e230b6Smaya __gen_ufixed(values->Sample13XOffset, 12, 15, 4) | 411510e230b6Smaya __gen_ufixed(values->Sample14YOffset, 16, 19, 4) | 411610e230b6Smaya __gen_ufixed(values->Sample14XOffset, 20, 23, 4) | 411710e230b6Smaya __gen_ufixed(values->Sample15YOffset, 24, 27, 4) | 411810e230b6Smaya __gen_ufixed(values->Sample15XOffset, 28, 31, 4); 411910e230b6Smaya} 412010e230b6Smaya 412196c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_PALETTE_LOAD0_length_bias 2 412296c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_PALETTE_LOAD0_header\ 412310e230b6Smaya ._3DCommandSubOpcode = 2, \ 412410e230b6Smaya ._3DCommandOpcode = 1, \ 412510e230b6Smaya .CommandSubType = 3, \ 412610e230b6Smaya .CommandType = 3 412710e230b6Smaya 412896c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_PALETTE_LOAD0 { 412910e230b6Smaya uint32_t DWordLength; 413010e230b6Smaya uint32_t _3DCommandSubOpcode; 413110e230b6Smaya uint32_t _3DCommandOpcode; 413210e230b6Smaya uint32_t CommandSubType; 413310e230b6Smaya uint32_t CommandType; 413410e230b6Smaya /* variable length fields follow */ 413510e230b6Smaya}; 413610e230b6Smaya 413796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 413896c5ddc4SrjsGFX75_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__attribute__((unused)) __gen_user_data *data, 413910e230b6Smaya __attribute__((unused)) void * restrict dst, 414096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values) 414110e230b6Smaya{ 414210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 414310e230b6Smaya 414410e230b6Smaya dw[0] = 414510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 414610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 414710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 414810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 414910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 415010e230b6Smaya} 415110e230b6Smaya 415296c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_PALETTE_LOAD1_length_bias 2 415396c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_PALETTE_LOAD1_header\ 415410e230b6Smaya .DWordLength = 0, \ 415510e230b6Smaya ._3DCommandSubOpcode = 12, \ 415610e230b6Smaya ._3DCommandOpcode = 1, \ 415710e230b6Smaya .CommandSubType = 3, \ 415810e230b6Smaya .CommandType = 3 415910e230b6Smaya 416096c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_PALETTE_LOAD1 { 416110e230b6Smaya uint32_t DWordLength; 416210e230b6Smaya uint32_t _3DCommandSubOpcode; 416310e230b6Smaya uint32_t _3DCommandOpcode; 416410e230b6Smaya uint32_t CommandSubType; 416510e230b6Smaya uint32_t CommandType; 416610e230b6Smaya /* variable length fields follow */ 416710e230b6Smaya}; 416810e230b6Smaya 416996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 417096c5ddc4SrjsGFX75_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__attribute__((unused)) __gen_user_data *data, 417110e230b6Smaya __attribute__((unused)) void * restrict dst, 417296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values) 417310e230b6Smaya{ 417410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 417510e230b6Smaya 417610e230b6Smaya dw[0] = 417710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 417810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 417910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 418010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 418110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 418210e230b6Smaya} 418310e230b6Smaya 418496c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 2 418596c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 2 418696c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\ 418710e230b6Smaya .DWordLength = 0, \ 418810e230b6Smaya ._3DCommandSubOpcode = 45, \ 418910e230b6Smaya ._3DCommandOpcode = 0, \ 419010e230b6Smaya .CommandSubType = 3, \ 419110e230b6Smaya .CommandType = 3 419210e230b6Smaya 419396c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS { 419410e230b6Smaya uint32_t DWordLength; 419510e230b6Smaya uint32_t _3DCommandSubOpcode; 419610e230b6Smaya uint32_t _3DCommandOpcode; 419710e230b6Smaya uint32_t CommandSubType; 419810e230b6Smaya uint32_t CommandType; 419910e230b6Smaya uint64_t PointertoDSSamplerState; 420010e230b6Smaya}; 420110e230b6Smaya 420296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 420396c5ddc4SrjsGFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__attribute__((unused)) __gen_user_data *data, 420410e230b6Smaya __attribute__((unused)) void * restrict dst, 420596c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values) 420610e230b6Smaya{ 420710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 420810e230b6Smaya 420910e230b6Smaya dw[0] = 421010e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 421110e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 421210e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 421310e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 421410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 421510e230b6Smaya 421610e230b6Smaya dw[1] = 421710e230b6Smaya __gen_offset(values->PointertoDSSamplerState, 5, 31); 421810e230b6Smaya} 421910e230b6Smaya 422096c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 2 422196c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 2 422296c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\ 422310e230b6Smaya .DWordLength = 0, \ 422410e230b6Smaya ._3DCommandSubOpcode = 46, \ 422510e230b6Smaya ._3DCommandOpcode = 0, \ 422610e230b6Smaya .CommandSubType = 3, \ 422710e230b6Smaya .CommandType = 3 422810e230b6Smaya 422996c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS { 423010e230b6Smaya uint32_t DWordLength; 423110e230b6Smaya uint32_t _3DCommandSubOpcode; 423210e230b6Smaya uint32_t _3DCommandOpcode; 423310e230b6Smaya uint32_t CommandSubType; 423410e230b6Smaya uint32_t CommandType; 423510e230b6Smaya uint64_t PointertoGSSamplerState; 423610e230b6Smaya}; 423710e230b6Smaya 423896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 423996c5ddc4SrjsGFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__attribute__((unused)) __gen_user_data *data, 424010e230b6Smaya __attribute__((unused)) void * restrict dst, 424196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values) 424210e230b6Smaya{ 424310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 424410e230b6Smaya 424510e230b6Smaya dw[0] = 424610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 424710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 424810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 424910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 425010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 425110e230b6Smaya 425210e230b6Smaya dw[1] = 425310e230b6Smaya __gen_offset(values->PointertoGSSamplerState, 5, 31); 425410e230b6Smaya} 425510e230b6Smaya 425696c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 2 425796c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 2 425896c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\ 425910e230b6Smaya .DWordLength = 0, \ 426010e230b6Smaya ._3DCommandSubOpcode = 44, \ 426110e230b6Smaya ._3DCommandOpcode = 0, \ 426210e230b6Smaya .CommandSubType = 3, \ 426310e230b6Smaya .CommandType = 3 426410e230b6Smaya 426596c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS { 426610e230b6Smaya uint32_t DWordLength; 426710e230b6Smaya uint32_t _3DCommandSubOpcode; 426810e230b6Smaya uint32_t _3DCommandOpcode; 426910e230b6Smaya uint32_t CommandSubType; 427010e230b6Smaya uint32_t CommandType; 427110e230b6Smaya uint64_t PointertoHSSamplerState; 427210e230b6Smaya}; 427310e230b6Smaya 427496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 427596c5ddc4SrjsGFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__attribute__((unused)) __gen_user_data *data, 427610e230b6Smaya __attribute__((unused)) void * restrict dst, 427796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values) 427810e230b6Smaya{ 427910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 428010e230b6Smaya 428110e230b6Smaya dw[0] = 428210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 428310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 428410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 428510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 428610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 428710e230b6Smaya 428810e230b6Smaya dw[1] = 428910e230b6Smaya __gen_offset(values->PointertoHSSamplerState, 5, 31); 429010e230b6Smaya} 429110e230b6Smaya 429296c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 2 429396c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 2 429496c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\ 429510e230b6Smaya .DWordLength = 0, \ 429610e230b6Smaya ._3DCommandSubOpcode = 47, \ 429710e230b6Smaya ._3DCommandOpcode = 0, \ 429810e230b6Smaya .CommandSubType = 3, \ 429910e230b6Smaya .CommandType = 3 430010e230b6Smaya 430196c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS { 430210e230b6Smaya uint32_t DWordLength; 430310e230b6Smaya uint32_t _3DCommandSubOpcode; 430410e230b6Smaya uint32_t _3DCommandOpcode; 430510e230b6Smaya uint32_t CommandSubType; 430610e230b6Smaya uint32_t CommandType; 430710e230b6Smaya uint64_t PointertoPSSamplerState; 430810e230b6Smaya}; 430910e230b6Smaya 431096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 431196c5ddc4SrjsGFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__attribute__((unused)) __gen_user_data *data, 431210e230b6Smaya __attribute__((unused)) void * restrict dst, 431396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values) 431410e230b6Smaya{ 431510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 431610e230b6Smaya 431710e230b6Smaya dw[0] = 431810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 431910e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 432010e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 432110e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 432210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 432310e230b6Smaya 432410e230b6Smaya dw[1] = 432510e230b6Smaya __gen_offset(values->PointertoPSSamplerState, 5, 31); 432610e230b6Smaya} 432710e230b6Smaya 432896c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 2 432996c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 2 433096c5ddc4Srjs#define GFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\ 433110e230b6Smaya .DWordLength = 0, \ 433210e230b6Smaya ._3DCommandSubOpcode = 43, \ 433310e230b6Smaya ._3DCommandOpcode = 0, \ 433410e230b6Smaya .CommandSubType = 3, \ 433510e230b6Smaya .CommandType = 3 433610e230b6Smaya 433796c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS { 433810e230b6Smaya uint32_t DWordLength; 433910e230b6Smaya uint32_t _3DCommandSubOpcode; 434010e230b6Smaya uint32_t _3DCommandOpcode; 434110e230b6Smaya uint32_t CommandSubType; 434210e230b6Smaya uint32_t CommandType; 434310e230b6Smaya uint64_t PointertoVSSamplerState; 434410e230b6Smaya}; 434510e230b6Smaya 434696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 434796c5ddc4SrjsGFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__attribute__((unused)) __gen_user_data *data, 434810e230b6Smaya __attribute__((unused)) void * restrict dst, 434996c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values) 435010e230b6Smaya{ 435110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 435210e230b6Smaya 435310e230b6Smaya dw[0] = 435410e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 435510e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 435610e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 435710e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 435810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 435910e230b6Smaya 436010e230b6Smaya dw[1] = 436110e230b6Smaya __gen_offset(values->PointertoVSSamplerState, 5, 31); 436210e230b6Smaya} 436310e230b6Smaya 436496c5ddc4Srjs#define GFX75_3DSTATE_SAMPLE_MASK_length 2 436596c5ddc4Srjs#define GFX75_3DSTATE_SAMPLE_MASK_length_bias 2 436696c5ddc4Srjs#define GFX75_3DSTATE_SAMPLE_MASK_header \ 436710e230b6Smaya .DWordLength = 0, \ 436810e230b6Smaya ._3DCommandSubOpcode = 24, \ 436910e230b6Smaya ._3DCommandOpcode = 0, \ 437010e230b6Smaya .CommandSubType = 3, \ 437110e230b6Smaya .CommandType = 3 437210e230b6Smaya 437396c5ddc4Srjsstruct GFX75_3DSTATE_SAMPLE_MASK { 437410e230b6Smaya uint32_t DWordLength; 437510e230b6Smaya uint32_t _3DCommandSubOpcode; 437610e230b6Smaya uint32_t _3DCommandOpcode; 437710e230b6Smaya uint32_t CommandSubType; 437810e230b6Smaya uint32_t CommandType; 437910e230b6Smaya uint32_t SampleMask; 438010e230b6Smaya}; 438110e230b6Smaya 438296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 438396c5ddc4SrjsGFX75_3DSTATE_SAMPLE_MASK_pack(__attribute__((unused)) __gen_user_data *data, 438410e230b6Smaya __attribute__((unused)) void * restrict dst, 438596c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SAMPLE_MASK * restrict values) 438610e230b6Smaya{ 438710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 438810e230b6Smaya 438910e230b6Smaya dw[0] = 439010e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 439110e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 439210e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 439310e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 439410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 439510e230b6Smaya 439610e230b6Smaya dw[1] = 439710e230b6Smaya __gen_uint(values->SampleMask, 0, 7); 439810e230b6Smaya} 439910e230b6Smaya 440096c5ddc4Srjs#define GFX75_3DSTATE_SBE_length 14 440196c5ddc4Srjs#define GFX75_3DSTATE_SBE_length_bias 2 440296c5ddc4Srjs#define GFX75_3DSTATE_SBE_header \ 440310e230b6Smaya .DWordLength = 12, \ 440410e230b6Smaya ._3DCommandSubOpcode = 31, \ 440510e230b6Smaya ._3DCommandOpcode = 0, \ 440610e230b6Smaya .CommandSubType = 3, \ 440710e230b6Smaya .CommandType = 3 440810e230b6Smaya 440996c5ddc4Srjsstruct GFX75_3DSTATE_SBE { 441010e230b6Smaya uint32_t DWordLength; 441110e230b6Smaya uint32_t _3DCommandSubOpcode; 441210e230b6Smaya uint32_t _3DCommandOpcode; 441310e230b6Smaya uint32_t CommandSubType; 441410e230b6Smaya uint32_t CommandType; 441510e230b6Smaya uint32_t VertexURBEntryReadOffset; 441610e230b6Smaya uint32_t VertexURBEntryReadLength; 441710e230b6Smaya uint32_t PointSpriteTextureCoordinateOrigin; 441810e230b6Smaya#define UPPERLEFT 0 441910e230b6Smaya#define LOWERLEFT 1 442010e230b6Smaya bool AttributeSwizzleEnable; 442110e230b6Smaya uint32_t NumberofSFOutputAttributes; 442210e230b6Smaya uint32_t AttributeSwizzleControlMode; 442396c5ddc4Srjs struct GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL Attribute[16]; 442410e230b6Smaya uint32_t PointSpriteTextureCoordinateEnable; 442510e230b6Smaya uint32_t ConstantInterpolationEnable; 442610e230b6Smaya uint32_t Attribute0WrapShortestEnables; 442710e230b6Smaya uint32_t Attribute1WrapShortestEnables; 442810e230b6Smaya uint32_t Attribute2WrapShortestEnables; 442910e230b6Smaya uint32_t Attribute3WrapShortestEnables; 443010e230b6Smaya uint32_t Attribute4WrapShortestEnables; 443110e230b6Smaya uint32_t Attribute5WrapShortestEnables; 443210e230b6Smaya uint32_t Attribute6WrapShortestEnables; 443310e230b6Smaya uint32_t Attribute7WrapShortestEnables; 443410e230b6Smaya uint32_t Attribute8WrapShortestEnables; 443510e230b6Smaya uint32_t Attribute9WrapShortestEnables; 443610e230b6Smaya uint32_t Attribute10WrapShortestEnables; 443710e230b6Smaya uint32_t Attribute11WrapShortestEnables; 443810e230b6Smaya uint32_t Attribute12WrapShortestEnables; 443910e230b6Smaya uint32_t Attribute13WrapShortestEnables; 444010e230b6Smaya uint32_t Attribute14WrapShortestEnables; 444110e230b6Smaya uint32_t Attribute15WrapShortestEnables; 444210e230b6Smaya}; 444310e230b6Smaya 444496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 444596c5ddc4SrjsGFX75_3DSTATE_SBE_pack(__attribute__((unused)) __gen_user_data *data, 444610e230b6Smaya __attribute__((unused)) void * restrict dst, 444796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SBE * restrict values) 444810e230b6Smaya{ 444910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 445010e230b6Smaya 445110e230b6Smaya dw[0] = 445210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 445310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 445410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 445510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 445610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 445710e230b6Smaya 445810e230b6Smaya dw[1] = 445910e230b6Smaya __gen_uint(values->VertexURBEntryReadOffset, 4, 9) | 446010e230b6Smaya __gen_uint(values->VertexURBEntryReadLength, 11, 15) | 446110e230b6Smaya __gen_uint(values->PointSpriteTextureCoordinateOrigin, 20, 20) | 446210e230b6Smaya __gen_uint(values->AttributeSwizzleEnable, 21, 21) | 446310e230b6Smaya __gen_uint(values->NumberofSFOutputAttributes, 22, 27) | 446410e230b6Smaya __gen_uint(values->AttributeSwizzleControlMode, 28, 28); 446510e230b6Smaya 446610e230b6Smaya uint32_t v2_0; 446796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v2_0, &values->Attribute[0]); 446810e230b6Smaya 446910e230b6Smaya uint32_t v2_1; 447096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v2_1, &values->Attribute[1]); 447110e230b6Smaya 447210e230b6Smaya dw[2] = 447310e230b6Smaya __gen_uint(v2_0, 0, 15) | 447410e230b6Smaya __gen_uint(v2_1, 16, 31); 447510e230b6Smaya 447610e230b6Smaya uint32_t v3_0; 447796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v3_0, &values->Attribute[2]); 447810e230b6Smaya 447910e230b6Smaya uint32_t v3_1; 448096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v3_1, &values->Attribute[3]); 448110e230b6Smaya 448210e230b6Smaya dw[3] = 448310e230b6Smaya __gen_uint(v3_0, 0, 15) | 448410e230b6Smaya __gen_uint(v3_1, 16, 31); 448510e230b6Smaya 448610e230b6Smaya uint32_t v4_0; 448796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v4_0, &values->Attribute[4]); 448810e230b6Smaya 448910e230b6Smaya uint32_t v4_1; 449096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v4_1, &values->Attribute[5]); 449110e230b6Smaya 449210e230b6Smaya dw[4] = 449310e230b6Smaya __gen_uint(v4_0, 0, 15) | 449410e230b6Smaya __gen_uint(v4_1, 16, 31); 449510e230b6Smaya 449610e230b6Smaya uint32_t v5_0; 449796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v5_0, &values->Attribute[6]); 449810e230b6Smaya 449910e230b6Smaya uint32_t v5_1; 450096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v5_1, &values->Attribute[7]); 450110e230b6Smaya 450210e230b6Smaya dw[5] = 450310e230b6Smaya __gen_uint(v5_0, 0, 15) | 450410e230b6Smaya __gen_uint(v5_1, 16, 31); 450510e230b6Smaya 450610e230b6Smaya uint32_t v6_0; 450796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v6_0, &values->Attribute[8]); 450810e230b6Smaya 450910e230b6Smaya uint32_t v6_1; 451096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v6_1, &values->Attribute[9]); 451110e230b6Smaya 451210e230b6Smaya dw[6] = 451310e230b6Smaya __gen_uint(v6_0, 0, 15) | 451410e230b6Smaya __gen_uint(v6_1, 16, 31); 451510e230b6Smaya 451610e230b6Smaya uint32_t v7_0; 451796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v7_0, &values->Attribute[10]); 451810e230b6Smaya 451910e230b6Smaya uint32_t v7_1; 452096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v7_1, &values->Attribute[11]); 452110e230b6Smaya 452210e230b6Smaya dw[7] = 452310e230b6Smaya __gen_uint(v7_0, 0, 15) | 452410e230b6Smaya __gen_uint(v7_1, 16, 31); 452510e230b6Smaya 452610e230b6Smaya uint32_t v8_0; 452796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v8_0, &values->Attribute[12]); 452810e230b6Smaya 452910e230b6Smaya uint32_t v8_1; 453096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v8_1, &values->Attribute[13]); 453110e230b6Smaya 453210e230b6Smaya dw[8] = 453310e230b6Smaya __gen_uint(v8_0, 0, 15) | 453410e230b6Smaya __gen_uint(v8_1, 16, 31); 453510e230b6Smaya 453610e230b6Smaya uint32_t v9_0; 453796c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v9_0, &values->Attribute[14]); 453810e230b6Smaya 453910e230b6Smaya uint32_t v9_1; 454096c5ddc4Srjs GFX75_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &v9_1, &values->Attribute[15]); 454110e230b6Smaya 454210e230b6Smaya dw[9] = 454310e230b6Smaya __gen_uint(v9_0, 0, 15) | 454410e230b6Smaya __gen_uint(v9_1, 16, 31); 454510e230b6Smaya 454610e230b6Smaya dw[10] = 454710e230b6Smaya __gen_uint(values->PointSpriteTextureCoordinateEnable, 0, 31); 454810e230b6Smaya 454910e230b6Smaya dw[11] = 455010e230b6Smaya __gen_uint(values->ConstantInterpolationEnable, 0, 31); 455110e230b6Smaya 455210e230b6Smaya dw[12] = 455310e230b6Smaya __gen_uint(values->Attribute0WrapShortestEnables, 0, 3) | 455410e230b6Smaya __gen_uint(values->Attribute1WrapShortestEnables, 4, 7) | 455510e230b6Smaya __gen_uint(values->Attribute2WrapShortestEnables, 8, 11) | 455610e230b6Smaya __gen_uint(values->Attribute3WrapShortestEnables, 12, 15) | 455710e230b6Smaya __gen_uint(values->Attribute4WrapShortestEnables, 16, 19) | 455810e230b6Smaya __gen_uint(values->Attribute5WrapShortestEnables, 20, 23) | 455910e230b6Smaya __gen_uint(values->Attribute6WrapShortestEnables, 24, 27) | 456010e230b6Smaya __gen_uint(values->Attribute7WrapShortestEnables, 28, 31); 456110e230b6Smaya 456210e230b6Smaya dw[13] = 456310e230b6Smaya __gen_uint(values->Attribute8WrapShortestEnables, 0, 3) | 456410e230b6Smaya __gen_uint(values->Attribute9WrapShortestEnables, 4, 7) | 456510e230b6Smaya __gen_uint(values->Attribute10WrapShortestEnables, 8, 11) | 456610e230b6Smaya __gen_uint(values->Attribute11WrapShortestEnables, 12, 15) | 456710e230b6Smaya __gen_uint(values->Attribute12WrapShortestEnables, 16, 19) | 456810e230b6Smaya __gen_uint(values->Attribute13WrapShortestEnables, 20, 23) | 456910e230b6Smaya __gen_uint(values->Attribute14WrapShortestEnables, 24, 27) | 457010e230b6Smaya __gen_uint(values->Attribute15WrapShortestEnables, 28, 31); 457110e230b6Smaya} 457210e230b6Smaya 457396c5ddc4Srjs#define GFX75_3DSTATE_SCISSOR_STATE_POINTERS_length 2 457496c5ddc4Srjs#define GFX75_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 2 457596c5ddc4Srjs#define GFX75_3DSTATE_SCISSOR_STATE_POINTERS_header\ 457610e230b6Smaya .DWordLength = 0, \ 457710e230b6Smaya ._3DCommandSubOpcode = 15, \ 457810e230b6Smaya ._3DCommandOpcode = 0, \ 457910e230b6Smaya .CommandSubType = 3, \ 458010e230b6Smaya .CommandType = 3 458110e230b6Smaya 458296c5ddc4Srjsstruct GFX75_3DSTATE_SCISSOR_STATE_POINTERS { 458310e230b6Smaya uint32_t DWordLength; 458410e230b6Smaya uint32_t _3DCommandSubOpcode; 458510e230b6Smaya uint32_t _3DCommandOpcode; 458610e230b6Smaya uint32_t CommandSubType; 458710e230b6Smaya uint32_t CommandType; 458810e230b6Smaya uint64_t ScissorRectPointer; 458910e230b6Smaya}; 459010e230b6Smaya 459196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 459296c5ddc4SrjsGFX75_3DSTATE_SCISSOR_STATE_POINTERS_pack(__attribute__((unused)) __gen_user_data *data, 459310e230b6Smaya __attribute__((unused)) void * restrict dst, 459496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SCISSOR_STATE_POINTERS * restrict values) 459510e230b6Smaya{ 459610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 459710e230b6Smaya 459810e230b6Smaya dw[0] = 459910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 460010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 460110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 460210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 460310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 460410e230b6Smaya 460510e230b6Smaya dw[1] = 460610e230b6Smaya __gen_offset(values->ScissorRectPointer, 5, 31); 460710e230b6Smaya} 460810e230b6Smaya 460996c5ddc4Srjs#define GFX75_3DSTATE_SF_length 7 461096c5ddc4Srjs#define GFX75_3DSTATE_SF_length_bias 2 461196c5ddc4Srjs#define GFX75_3DSTATE_SF_header \ 461210e230b6Smaya .DWordLength = 5, \ 461310e230b6Smaya ._3DCommandSubOpcode = 19, \ 461410e230b6Smaya ._3DCommandOpcode = 0, \ 461510e230b6Smaya .CommandSubType = 3, \ 461610e230b6Smaya .CommandType = 3 461710e230b6Smaya 461896c5ddc4Srjsstruct GFX75_3DSTATE_SF { 461910e230b6Smaya uint32_t DWordLength; 462010e230b6Smaya uint32_t _3DCommandSubOpcode; 462110e230b6Smaya uint32_t _3DCommandOpcode; 462210e230b6Smaya uint32_t CommandSubType; 462310e230b6Smaya uint32_t CommandType; 462410e230b6Smaya uint32_t FrontWinding; 462510e230b6Smaya bool ViewportTransformEnable; 462610e230b6Smaya uint32_t BackFaceFillMode; 462710e230b6Smaya#define FILL_MODE_SOLID 0 462810e230b6Smaya#define FILL_MODE_WIREFRAME 1 462910e230b6Smaya#define FILL_MODE_POINT 2 463010e230b6Smaya uint32_t FrontFaceFillMode; 463110e230b6Smaya#define FILL_MODE_SOLID 0 463210e230b6Smaya#define FILL_MODE_WIREFRAME 1 463310e230b6Smaya#define FILL_MODE_POINT 2 463410e230b6Smaya bool GlobalDepthOffsetEnablePoint; 463510e230b6Smaya bool GlobalDepthOffsetEnableWireframe; 463610e230b6Smaya bool GlobalDepthOffsetEnableSolid; 463710e230b6Smaya bool StatisticsEnable; 463810e230b6Smaya bool LegacyGlobalDepthBiasEnable; 463910e230b6Smaya uint32_t DepthBufferSurfaceFormat; 464010e230b6Smaya#define D32_FLOAT_S8X24_UINT 0 464110e230b6Smaya#define D32_FLOAT 1 464210e230b6Smaya#define D24_UNORM_S8_UINT 2 464310e230b6Smaya#define D24_UNORM_X8_UINT 3 464410e230b6Smaya#define D16_UNORM 5 464510e230b6Smaya uint32_t MultisampleRasterizationMode; 464610e230b6Smaya bool RTIndependentRasterizationEnable; 464710e230b6Smaya bool ScissorRectangleEnable; 464810e230b6Smaya bool LineStippleEnable; 464910e230b6Smaya uint32_t LineEndCapAntialiasingRegionWidth; 465010e230b6Smaya#define _05pixels 0 465110e230b6Smaya#define _10pixels 1 465210e230b6Smaya#define _20pixels 2 465310e230b6Smaya#define _40pixels 3 465410e230b6Smaya float LineWidth; 465510e230b6Smaya uint32_t CullMode; 465610e230b6Smaya#define CULLMODE_BOTH 0 465710e230b6Smaya#define CULLMODE_NONE 1 465810e230b6Smaya#define CULLMODE_FRONT 2 465910e230b6Smaya#define CULLMODE_BACK 3 466096c5ddc4Srjs bool AntialiasingEnable; 466110e230b6Smaya float PointWidth; 466210e230b6Smaya uint32_t PointWidthSource; 466310e230b6Smaya#define Vertex 0 466410e230b6Smaya#define State 1 466510e230b6Smaya uint32_t VertexSubPixelPrecisionSelect; 466610e230b6Smaya#define _8Bit 0 466710e230b6Smaya#define _4Bit 1 466810e230b6Smaya uint32_t AALineDistanceMode; 466910e230b6Smaya#define AALINEDISTANCE_TRUE 1 467010e230b6Smaya uint32_t TriangleFanProvokingVertexSelect; 467110e230b6Smaya#define Vertex0 0 467210e230b6Smaya#define Vertex1 1 467310e230b6Smaya#define Vertex2 2 467410e230b6Smaya uint32_t LineStripListProvokingVertexSelect; 467510e230b6Smaya uint32_t TriangleStripListProvokingVertexSelect; 467610e230b6Smaya#define Vertex0 0 467710e230b6Smaya#define Vertex1 1 467810e230b6Smaya#define Vertex2 2 467910e230b6Smaya bool LastPixelEnable; 468010e230b6Smaya float GlobalDepthOffsetConstant; 468110e230b6Smaya float GlobalDepthOffsetScale; 468210e230b6Smaya float GlobalDepthOffsetClamp; 468310e230b6Smaya}; 468410e230b6Smaya 468596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 468696c5ddc4SrjsGFX75_3DSTATE_SF_pack(__attribute__((unused)) __gen_user_data *data, 468710e230b6Smaya __attribute__((unused)) void * restrict dst, 468896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SF * restrict values) 468910e230b6Smaya{ 469010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 469110e230b6Smaya 469210e230b6Smaya dw[0] = 469310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 469410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 469510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 469610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 469710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 469810e230b6Smaya 469910e230b6Smaya dw[1] = 470010e230b6Smaya __gen_uint(values->FrontWinding, 0, 0) | 470110e230b6Smaya __gen_uint(values->ViewportTransformEnable, 1, 1) | 470210e230b6Smaya __gen_uint(values->BackFaceFillMode, 3, 4) | 470310e230b6Smaya __gen_uint(values->FrontFaceFillMode, 5, 6) | 470410e230b6Smaya __gen_uint(values->GlobalDepthOffsetEnablePoint, 7, 7) | 470510e230b6Smaya __gen_uint(values->GlobalDepthOffsetEnableWireframe, 8, 8) | 470610e230b6Smaya __gen_uint(values->GlobalDepthOffsetEnableSolid, 9, 9) | 470710e230b6Smaya __gen_uint(values->StatisticsEnable, 10, 10) | 470810e230b6Smaya __gen_uint(values->LegacyGlobalDepthBiasEnable, 11, 11) | 470910e230b6Smaya __gen_uint(values->DepthBufferSurfaceFormat, 12, 14); 471010e230b6Smaya 471110e230b6Smaya dw[2] = 471210e230b6Smaya __gen_uint(values->MultisampleRasterizationMode, 8, 9) | 471310e230b6Smaya __gen_uint(values->RTIndependentRasterizationEnable, 10, 10) | 471410e230b6Smaya __gen_uint(values->ScissorRectangleEnable, 11, 11) | 471510e230b6Smaya __gen_uint(values->LineStippleEnable, 14, 14) | 471610e230b6Smaya __gen_uint(values->LineEndCapAntialiasingRegionWidth, 16, 17) | 471710e230b6Smaya __gen_ufixed(values->LineWidth, 18, 27, 7) | 471810e230b6Smaya __gen_uint(values->CullMode, 29, 30) | 471996c5ddc4Srjs __gen_uint(values->AntialiasingEnable, 31, 31); 472010e230b6Smaya 472110e230b6Smaya dw[3] = 472210e230b6Smaya __gen_ufixed(values->PointWidth, 0, 10, 3) | 472310e230b6Smaya __gen_uint(values->PointWidthSource, 11, 11) | 472410e230b6Smaya __gen_uint(values->VertexSubPixelPrecisionSelect, 12, 12) | 472510e230b6Smaya __gen_uint(values->AALineDistanceMode, 14, 14) | 472610e230b6Smaya __gen_uint(values->TriangleFanProvokingVertexSelect, 25, 26) | 472710e230b6Smaya __gen_uint(values->LineStripListProvokingVertexSelect, 27, 28) | 472810e230b6Smaya __gen_uint(values->TriangleStripListProvokingVertexSelect, 29, 30) | 472910e230b6Smaya __gen_uint(values->LastPixelEnable, 31, 31); 473010e230b6Smaya 473110e230b6Smaya dw[4] = 473210e230b6Smaya __gen_float(values->GlobalDepthOffsetConstant); 473310e230b6Smaya 473410e230b6Smaya dw[5] = 473510e230b6Smaya __gen_float(values->GlobalDepthOffsetScale); 473610e230b6Smaya 473710e230b6Smaya dw[6] = 473810e230b6Smaya __gen_float(values->GlobalDepthOffsetClamp); 473910e230b6Smaya} 474010e230b6Smaya 474196c5ddc4Srjs#define GFX75_3DSTATE_SO_BUFFER_length 4 474296c5ddc4Srjs#define GFX75_3DSTATE_SO_BUFFER_length_bias 2 474396c5ddc4Srjs#define GFX75_3DSTATE_SO_BUFFER_header \ 474410e230b6Smaya .DWordLength = 2, \ 474510e230b6Smaya ._3DCommandSubOpcode = 24, \ 474610e230b6Smaya ._3DCommandOpcode = 1, \ 474710e230b6Smaya .CommandSubType = 3, \ 474810e230b6Smaya .CommandType = 3 474910e230b6Smaya 475096c5ddc4Srjsstruct GFX75_3DSTATE_SO_BUFFER { 475110e230b6Smaya uint32_t DWordLength; 475210e230b6Smaya uint32_t _3DCommandSubOpcode; 475310e230b6Smaya uint32_t _3DCommandOpcode; 475410e230b6Smaya uint32_t CommandSubType; 475510e230b6Smaya uint32_t CommandType; 475610e230b6Smaya uint32_t SurfacePitch; 475710e230b6Smaya uint32_t MOCS; 475810e230b6Smaya uint32_t SOBufferIndex; 475910e230b6Smaya __gen_address_type SurfaceBaseAddress; 476010e230b6Smaya __gen_address_type SurfaceEndAddress; 476110e230b6Smaya}; 476210e230b6Smaya 476396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 476496c5ddc4SrjsGFX75_3DSTATE_SO_BUFFER_pack(__attribute__((unused)) __gen_user_data *data, 476510e230b6Smaya __attribute__((unused)) void * restrict dst, 476696c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SO_BUFFER * restrict values) 476710e230b6Smaya{ 476810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 476910e230b6Smaya 477010e230b6Smaya dw[0] = 477110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 477210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 477310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 477410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 477510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 477610e230b6Smaya 477710e230b6Smaya dw[1] = 477810e230b6Smaya __gen_uint(values->SurfacePitch, 0, 11) | 477910e230b6Smaya __gen_uint(values->MOCS, 25, 28) | 478010e230b6Smaya __gen_uint(values->SOBufferIndex, 29, 30); 478110e230b6Smaya 478296c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->SurfaceBaseAddress, 0, 2, 31); 478310e230b6Smaya 478496c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->SurfaceEndAddress, 0, 2, 31); 478510e230b6Smaya} 478610e230b6Smaya 478796c5ddc4Srjs#define GFX75_3DSTATE_SO_DECL_LIST_length_bias 2 478896c5ddc4Srjs#define GFX75_3DSTATE_SO_DECL_LIST_header \ 478910e230b6Smaya ._3DCommandSubOpcode = 23, \ 479010e230b6Smaya ._3DCommandOpcode = 1, \ 479110e230b6Smaya .CommandSubType = 3, \ 479210e230b6Smaya .CommandType = 3 479310e230b6Smaya 479496c5ddc4Srjsstruct GFX75_3DSTATE_SO_DECL_LIST { 479510e230b6Smaya uint32_t DWordLength; 479610e230b6Smaya uint32_t _3DCommandSubOpcode; 479710e230b6Smaya uint32_t _3DCommandOpcode; 479810e230b6Smaya uint32_t CommandSubType; 479910e230b6Smaya uint32_t CommandType; 480010e230b6Smaya uint32_t StreamtoBufferSelects0; 480110e230b6Smaya uint32_t StreamtoBufferSelects1; 480210e230b6Smaya uint32_t StreamtoBufferSelects2; 480310e230b6Smaya uint32_t StreamtoBufferSelects3; 480410e230b6Smaya uint32_t NumEntries0; 480510e230b6Smaya uint32_t NumEntries1; 480610e230b6Smaya uint32_t NumEntries2; 480710e230b6Smaya uint32_t NumEntries3; 480810e230b6Smaya /* variable length fields follow */ 480910e230b6Smaya}; 481010e230b6Smaya 481196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 481296c5ddc4SrjsGFX75_3DSTATE_SO_DECL_LIST_pack(__attribute__((unused)) __gen_user_data *data, 481310e230b6Smaya __attribute__((unused)) void * restrict dst, 481496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_SO_DECL_LIST * restrict values) 481510e230b6Smaya{ 481610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 481710e230b6Smaya 481810e230b6Smaya dw[0] = 481910e230b6Smaya __gen_uint(values->DWordLength, 0, 8) | 482010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 482110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 482210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 482310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 482410e230b6Smaya 482510e230b6Smaya dw[1] = 482610e230b6Smaya __gen_uint(values->StreamtoBufferSelects0, 0, 3) | 482710e230b6Smaya __gen_uint(values->StreamtoBufferSelects1, 4, 7) | 482810e230b6Smaya __gen_uint(values->StreamtoBufferSelects2, 8, 11) | 482910e230b6Smaya __gen_uint(values->StreamtoBufferSelects3, 12, 15); 483010e230b6Smaya 483110e230b6Smaya dw[2] = 483210e230b6Smaya __gen_uint(values->NumEntries0, 0, 7) | 483310e230b6Smaya __gen_uint(values->NumEntries1, 8, 15) | 483410e230b6Smaya __gen_uint(values->NumEntries2, 16, 23) | 483510e230b6Smaya __gen_uint(values->NumEntries3, 24, 31); 483610e230b6Smaya} 483710e230b6Smaya 483896c5ddc4Srjs#define GFX75_3DSTATE_STENCIL_BUFFER_length 3 483996c5ddc4Srjs#define GFX75_3DSTATE_STENCIL_BUFFER_length_bias 2 484096c5ddc4Srjs#define GFX75_3DSTATE_STENCIL_BUFFER_header \ 484110e230b6Smaya .DWordLength = 1, \ 484210e230b6Smaya ._3DCommandSubOpcode = 6, \ 484310e230b6Smaya ._3DCommandOpcode = 0, \ 484410e230b6Smaya .CommandSubType = 3, \ 484510e230b6Smaya .CommandType = 3 484610e230b6Smaya 484796c5ddc4Srjsstruct GFX75_3DSTATE_STENCIL_BUFFER { 484810e230b6Smaya uint32_t DWordLength; 484910e230b6Smaya uint32_t _3DCommandSubOpcode; 485010e230b6Smaya uint32_t _3DCommandOpcode; 485110e230b6Smaya uint32_t CommandSubType; 485210e230b6Smaya uint32_t CommandType; 485310e230b6Smaya uint32_t SurfacePitch; 485410e230b6Smaya uint32_t MOCS; 485510e230b6Smaya bool StencilBufferEnable; 485610e230b6Smaya __gen_address_type SurfaceBaseAddress; 485710e230b6Smaya}; 485810e230b6Smaya 485996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 486096c5ddc4SrjsGFX75_3DSTATE_STENCIL_BUFFER_pack(__attribute__((unused)) __gen_user_data *data, 486110e230b6Smaya __attribute__((unused)) void * restrict dst, 486296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_STENCIL_BUFFER * restrict values) 486310e230b6Smaya{ 486410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 486510e230b6Smaya 486610e230b6Smaya dw[0] = 486710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 486810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 486910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 487010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 487110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 487210e230b6Smaya 487310e230b6Smaya dw[1] = 487410e230b6Smaya __gen_uint(values->SurfacePitch, 0, 16) | 487510e230b6Smaya __gen_uint(values->MOCS, 25, 28) | 487610e230b6Smaya __gen_uint(values->StencilBufferEnable, 31, 31); 487710e230b6Smaya 487896c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->SurfaceBaseAddress, 0, 0, 31); 487910e230b6Smaya} 488010e230b6Smaya 488196c5ddc4Srjs#define GFX75_3DSTATE_STREAMOUT_length 3 488296c5ddc4Srjs#define GFX75_3DSTATE_STREAMOUT_length_bias 2 488396c5ddc4Srjs#define GFX75_3DSTATE_STREAMOUT_header \ 488410e230b6Smaya .DWordLength = 1, \ 488510e230b6Smaya ._3DCommandSubOpcode = 30, \ 488610e230b6Smaya ._3DCommandOpcode = 0, \ 488710e230b6Smaya .CommandSubType = 3, \ 488810e230b6Smaya .CommandType = 3 488910e230b6Smaya 489096c5ddc4Srjsstruct GFX75_3DSTATE_STREAMOUT { 489110e230b6Smaya uint32_t DWordLength; 489210e230b6Smaya uint32_t _3DCommandSubOpcode; 489310e230b6Smaya uint32_t _3DCommandOpcode; 489410e230b6Smaya uint32_t CommandSubType; 489510e230b6Smaya uint32_t CommandType; 489610e230b6Smaya bool SOBufferEnable0; 489710e230b6Smaya bool SOBufferEnable1; 489810e230b6Smaya bool SOBufferEnable2; 489910e230b6Smaya bool SOBufferEnable3; 490010e230b6Smaya bool SOStatisticsEnable; 490110e230b6Smaya uint32_t ReorderMode; 490210e230b6Smaya#define LEADING 0 490310e230b6Smaya#define TRAILING 1 490410e230b6Smaya uint32_t RenderStreamSelect; 490510e230b6Smaya bool RenderingDisable; 490610e230b6Smaya bool SOFunctionEnable; 490710e230b6Smaya uint32_t Stream0VertexReadLength; 490810e230b6Smaya uint32_t Stream0VertexReadOffset; 490910e230b6Smaya uint32_t Stream1VertexReadLength; 491010e230b6Smaya uint32_t Stream1VertexReadOffset; 491110e230b6Smaya uint32_t Stream2VertexReadLength; 491210e230b6Smaya uint32_t Stream2VertexReadOffset; 491310e230b6Smaya uint32_t Stream3VertexReadLength; 491410e230b6Smaya uint32_t Stream3VertexReadOffset; 491510e230b6Smaya}; 491610e230b6Smaya 491796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 491896c5ddc4SrjsGFX75_3DSTATE_STREAMOUT_pack(__attribute__((unused)) __gen_user_data *data, 491910e230b6Smaya __attribute__((unused)) void * restrict dst, 492096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_STREAMOUT * restrict values) 492110e230b6Smaya{ 492210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 492310e230b6Smaya 492410e230b6Smaya dw[0] = 492510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 492610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 492710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 492810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 492910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 493010e230b6Smaya 493110e230b6Smaya dw[1] = 493210e230b6Smaya __gen_uint(values->SOBufferEnable0, 8, 8) | 493310e230b6Smaya __gen_uint(values->SOBufferEnable1, 9, 9) | 493410e230b6Smaya __gen_uint(values->SOBufferEnable2, 10, 10) | 493510e230b6Smaya __gen_uint(values->SOBufferEnable3, 11, 11) | 493610e230b6Smaya __gen_uint(values->SOStatisticsEnable, 25, 25) | 493710e230b6Smaya __gen_uint(values->ReorderMode, 26, 26) | 493810e230b6Smaya __gen_uint(values->RenderStreamSelect, 27, 28) | 493910e230b6Smaya __gen_uint(values->RenderingDisable, 30, 30) | 494010e230b6Smaya __gen_uint(values->SOFunctionEnable, 31, 31); 494110e230b6Smaya 494210e230b6Smaya dw[2] = 494310e230b6Smaya __gen_uint(values->Stream0VertexReadLength, 0, 4) | 494410e230b6Smaya __gen_uint(values->Stream0VertexReadOffset, 5, 5) | 494510e230b6Smaya __gen_uint(values->Stream1VertexReadLength, 8, 12) | 494610e230b6Smaya __gen_uint(values->Stream1VertexReadOffset, 13, 13) | 494710e230b6Smaya __gen_uint(values->Stream2VertexReadLength, 16, 20) | 494810e230b6Smaya __gen_uint(values->Stream2VertexReadOffset, 21, 21) | 494910e230b6Smaya __gen_uint(values->Stream3VertexReadLength, 24, 28) | 495010e230b6Smaya __gen_uint(values->Stream3VertexReadOffset, 29, 29); 495110e230b6Smaya} 495210e230b6Smaya 495396c5ddc4Srjs#define GFX75_3DSTATE_TE_length 4 495496c5ddc4Srjs#define GFX75_3DSTATE_TE_length_bias 2 495596c5ddc4Srjs#define GFX75_3DSTATE_TE_header \ 495610e230b6Smaya .DWordLength = 2, \ 495710e230b6Smaya ._3DCommandSubOpcode = 28, \ 495810e230b6Smaya ._3DCommandOpcode = 0, \ 495910e230b6Smaya .CommandSubType = 3, \ 496010e230b6Smaya .CommandType = 3 496110e230b6Smaya 496296c5ddc4Srjsstruct GFX75_3DSTATE_TE { 496310e230b6Smaya uint32_t DWordLength; 496410e230b6Smaya uint32_t _3DCommandSubOpcode; 496510e230b6Smaya uint32_t _3DCommandOpcode; 496610e230b6Smaya uint32_t CommandSubType; 496710e230b6Smaya uint32_t CommandType; 496810e230b6Smaya bool TEEnable; 496910e230b6Smaya uint32_t TEMode; 497010e230b6Smaya#define HW_TESS 0 497110e230b6Smaya#define SW_TESS 1 497210e230b6Smaya uint32_t TEDomain; 497310e230b6Smaya#define QUAD 0 497410e230b6Smaya#define TRI 1 497510e230b6Smaya#define ISOLINE 2 497610e230b6Smaya uint32_t OutputTopology; 497710e230b6Smaya#define OUTPUT_POINT 0 497810e230b6Smaya#define OUTPUT_LINE 1 497910e230b6Smaya#define OUTPUT_TRI_CW 2 498010e230b6Smaya#define OUTPUT_TRI_CCW 3 498110e230b6Smaya uint32_t Partitioning; 498210e230b6Smaya#define INTEGER 0 498310e230b6Smaya#define ODD_FRACTIONAL 1 498410e230b6Smaya#define EVEN_FRACTIONAL 2 498510e230b6Smaya float MaximumTessellationFactorOdd; 498610e230b6Smaya float MaximumTessellationFactorNotOdd; 498710e230b6Smaya}; 498810e230b6Smaya 498996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 499096c5ddc4SrjsGFX75_3DSTATE_TE_pack(__attribute__((unused)) __gen_user_data *data, 499110e230b6Smaya __attribute__((unused)) void * restrict dst, 499296c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_TE * restrict values) 499310e230b6Smaya{ 499410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 499510e230b6Smaya 499610e230b6Smaya dw[0] = 499710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 499810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 499910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 500010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 500110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 500210e230b6Smaya 500310e230b6Smaya dw[1] = 500410e230b6Smaya __gen_uint(values->TEEnable, 0, 0) | 500510e230b6Smaya __gen_uint(values->TEMode, 1, 2) | 500610e230b6Smaya __gen_uint(values->TEDomain, 4, 5) | 500710e230b6Smaya __gen_uint(values->OutputTopology, 8, 9) | 500810e230b6Smaya __gen_uint(values->Partitioning, 12, 13); 500910e230b6Smaya 501010e230b6Smaya dw[2] = 501110e230b6Smaya __gen_float(values->MaximumTessellationFactorOdd); 501210e230b6Smaya 501310e230b6Smaya dw[3] = 501410e230b6Smaya __gen_float(values->MaximumTessellationFactorNotOdd); 501510e230b6Smaya} 501610e230b6Smaya 501796c5ddc4Srjs#define GFX75_3DSTATE_URB_DS_length 2 501896c5ddc4Srjs#define GFX75_3DSTATE_URB_DS_length_bias 2 501996c5ddc4Srjs#define GFX75_3DSTATE_URB_DS_header \ 502010e230b6Smaya .DWordLength = 0, \ 502110e230b6Smaya ._3DCommandSubOpcode = 50, \ 502210e230b6Smaya ._3DCommandOpcode = 0, \ 502310e230b6Smaya .CommandSubType = 3, \ 502410e230b6Smaya .CommandType = 3 502510e230b6Smaya 502696c5ddc4Srjsstruct GFX75_3DSTATE_URB_DS { 502710e230b6Smaya uint32_t DWordLength; 502810e230b6Smaya uint32_t _3DCommandSubOpcode; 502910e230b6Smaya uint32_t _3DCommandOpcode; 503010e230b6Smaya uint32_t CommandSubType; 503110e230b6Smaya uint32_t CommandType; 503210e230b6Smaya uint32_t DSNumberofURBEntries; 503310e230b6Smaya uint32_t DSURBEntryAllocationSize; 503410e230b6Smaya uint32_t DSURBStartingAddress; 503510e230b6Smaya}; 503610e230b6Smaya 503796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 503896c5ddc4SrjsGFX75_3DSTATE_URB_DS_pack(__attribute__((unused)) __gen_user_data *data, 503910e230b6Smaya __attribute__((unused)) void * restrict dst, 504096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_URB_DS * restrict values) 504110e230b6Smaya{ 504210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 504310e230b6Smaya 504410e230b6Smaya dw[0] = 504510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 504610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 504710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 504810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 504910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 505010e230b6Smaya 505110e230b6Smaya dw[1] = 505210e230b6Smaya __gen_uint(values->DSNumberofURBEntries, 0, 15) | 505310e230b6Smaya __gen_uint(values->DSURBEntryAllocationSize, 16, 24) | 505410e230b6Smaya __gen_uint(values->DSURBStartingAddress, 25, 30); 505510e230b6Smaya} 505610e230b6Smaya 505796c5ddc4Srjs#define GFX75_3DSTATE_URB_GS_length 2 505896c5ddc4Srjs#define GFX75_3DSTATE_URB_GS_length_bias 2 505996c5ddc4Srjs#define GFX75_3DSTATE_URB_GS_header \ 506010e230b6Smaya .DWordLength = 0, \ 506110e230b6Smaya ._3DCommandSubOpcode = 51, \ 506210e230b6Smaya ._3DCommandOpcode = 0, \ 506310e230b6Smaya .CommandSubType = 3, \ 506410e230b6Smaya .CommandType = 3 506510e230b6Smaya 506696c5ddc4Srjsstruct GFX75_3DSTATE_URB_GS { 506710e230b6Smaya uint32_t DWordLength; 506810e230b6Smaya uint32_t _3DCommandSubOpcode; 506910e230b6Smaya uint32_t _3DCommandOpcode; 507010e230b6Smaya uint32_t CommandSubType; 507110e230b6Smaya uint32_t CommandType; 507210e230b6Smaya uint32_t GSNumberofURBEntries; 507310e230b6Smaya uint32_t GSURBEntryAllocationSize; 507410e230b6Smaya uint32_t GSURBStartingAddress; 507510e230b6Smaya}; 507610e230b6Smaya 507796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 507896c5ddc4SrjsGFX75_3DSTATE_URB_GS_pack(__attribute__((unused)) __gen_user_data *data, 507910e230b6Smaya __attribute__((unused)) void * restrict dst, 508096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_URB_GS * restrict values) 508110e230b6Smaya{ 508210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 508310e230b6Smaya 508410e230b6Smaya dw[0] = 508510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 508610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 508710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 508810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 508910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 509010e230b6Smaya 509110e230b6Smaya dw[1] = 509210e230b6Smaya __gen_uint(values->GSNumberofURBEntries, 0, 15) | 509310e230b6Smaya __gen_uint(values->GSURBEntryAllocationSize, 16, 24) | 509410e230b6Smaya __gen_uint(values->GSURBStartingAddress, 25, 30); 509510e230b6Smaya} 509610e230b6Smaya 509796c5ddc4Srjs#define GFX75_3DSTATE_URB_HS_length 2 509896c5ddc4Srjs#define GFX75_3DSTATE_URB_HS_length_bias 2 509996c5ddc4Srjs#define GFX75_3DSTATE_URB_HS_header \ 510010e230b6Smaya .DWordLength = 0, \ 510110e230b6Smaya ._3DCommandSubOpcode = 49, \ 510210e230b6Smaya ._3DCommandOpcode = 0, \ 510310e230b6Smaya .CommandSubType = 3, \ 510410e230b6Smaya .CommandType = 3 510510e230b6Smaya 510696c5ddc4Srjsstruct GFX75_3DSTATE_URB_HS { 510710e230b6Smaya uint32_t DWordLength; 510810e230b6Smaya uint32_t _3DCommandSubOpcode; 510910e230b6Smaya uint32_t _3DCommandOpcode; 511010e230b6Smaya uint32_t CommandSubType; 511110e230b6Smaya uint32_t CommandType; 511210e230b6Smaya uint32_t HSNumberofURBEntries; 511310e230b6Smaya uint32_t HSURBEntryAllocationSize; 511410e230b6Smaya uint32_t HSURBStartingAddress; 511510e230b6Smaya}; 511610e230b6Smaya 511796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 511896c5ddc4SrjsGFX75_3DSTATE_URB_HS_pack(__attribute__((unused)) __gen_user_data *data, 511910e230b6Smaya __attribute__((unused)) void * restrict dst, 512096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_URB_HS * restrict values) 512110e230b6Smaya{ 512210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 512310e230b6Smaya 512410e230b6Smaya dw[0] = 512510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 512610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 512710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 512810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 512910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 513010e230b6Smaya 513110e230b6Smaya dw[1] = 513210e230b6Smaya __gen_uint(values->HSNumberofURBEntries, 0, 15) | 513310e230b6Smaya __gen_uint(values->HSURBEntryAllocationSize, 16, 24) | 513410e230b6Smaya __gen_uint(values->HSURBStartingAddress, 25, 30); 513510e230b6Smaya} 513610e230b6Smaya 513796c5ddc4Srjs#define GFX75_3DSTATE_URB_VS_length 2 513896c5ddc4Srjs#define GFX75_3DSTATE_URB_VS_length_bias 2 513996c5ddc4Srjs#define GFX75_3DSTATE_URB_VS_header \ 514010e230b6Smaya .DWordLength = 0, \ 514110e230b6Smaya ._3DCommandSubOpcode = 48, \ 514210e230b6Smaya ._3DCommandOpcode = 0, \ 514310e230b6Smaya .CommandSubType = 3, \ 514410e230b6Smaya .CommandType = 3 514510e230b6Smaya 514696c5ddc4Srjsstruct GFX75_3DSTATE_URB_VS { 514710e230b6Smaya uint32_t DWordLength; 514810e230b6Smaya uint32_t _3DCommandSubOpcode; 514910e230b6Smaya uint32_t _3DCommandOpcode; 515010e230b6Smaya uint32_t CommandSubType; 515110e230b6Smaya uint32_t CommandType; 515210e230b6Smaya uint32_t VSNumberofURBEntries; 515310e230b6Smaya uint32_t VSURBEntryAllocationSize; 515410e230b6Smaya uint32_t VSURBStartingAddress; 515510e230b6Smaya}; 515610e230b6Smaya 515796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 515896c5ddc4SrjsGFX75_3DSTATE_URB_VS_pack(__attribute__((unused)) __gen_user_data *data, 515910e230b6Smaya __attribute__((unused)) void * restrict dst, 516096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_URB_VS * restrict values) 516110e230b6Smaya{ 516210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 516310e230b6Smaya 516410e230b6Smaya dw[0] = 516510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 516610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 516710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 516810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 516910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 517010e230b6Smaya 517110e230b6Smaya dw[1] = 517210e230b6Smaya __gen_uint(values->VSNumberofURBEntries, 0, 15) | 517310e230b6Smaya __gen_uint(values->VSURBEntryAllocationSize, 16, 24) | 517410e230b6Smaya __gen_uint(values->VSURBStartingAddress, 25, 30); 517510e230b6Smaya} 517610e230b6Smaya 517796c5ddc4Srjs#define GFX75_3DSTATE_VERTEX_BUFFERS_length_bias 2 517896c5ddc4Srjs#define GFX75_3DSTATE_VERTEX_BUFFERS_header \ 517910e230b6Smaya .DWordLength = 3, \ 518010e230b6Smaya ._3DCommandSubOpcode = 8, \ 518110e230b6Smaya ._3DCommandOpcode = 0, \ 518210e230b6Smaya .CommandSubType = 3, \ 518310e230b6Smaya .CommandType = 3 518410e230b6Smaya 518596c5ddc4Srjsstruct GFX75_3DSTATE_VERTEX_BUFFERS { 518610e230b6Smaya uint32_t DWordLength; 518710e230b6Smaya uint32_t _3DCommandSubOpcode; 518810e230b6Smaya uint32_t _3DCommandOpcode; 518910e230b6Smaya uint32_t CommandSubType; 519010e230b6Smaya uint32_t CommandType; 519110e230b6Smaya /* variable length fields follow */ 519210e230b6Smaya}; 519310e230b6Smaya 519496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 519596c5ddc4SrjsGFX75_3DSTATE_VERTEX_BUFFERS_pack(__attribute__((unused)) __gen_user_data *data, 519610e230b6Smaya __attribute__((unused)) void * restrict dst, 519796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VERTEX_BUFFERS * restrict values) 519810e230b6Smaya{ 519910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 520010e230b6Smaya 520110e230b6Smaya dw[0] = 520210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 520310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 520410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 520510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 520610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 520710e230b6Smaya} 520810e230b6Smaya 520996c5ddc4Srjs#define GFX75_3DSTATE_VERTEX_ELEMENTS_length_bias 2 521096c5ddc4Srjs#define GFX75_3DSTATE_VERTEX_ELEMENTS_header \ 521110e230b6Smaya .DWordLength = 1, \ 521210e230b6Smaya ._3DCommandSubOpcode = 9, \ 521310e230b6Smaya ._3DCommandOpcode = 0, \ 521410e230b6Smaya .CommandSubType = 3, \ 521510e230b6Smaya .CommandType = 3 521610e230b6Smaya 521796c5ddc4Srjsstruct GFX75_3DSTATE_VERTEX_ELEMENTS { 521810e230b6Smaya uint32_t DWordLength; 521910e230b6Smaya uint32_t _3DCommandSubOpcode; 522010e230b6Smaya uint32_t _3DCommandOpcode; 522110e230b6Smaya uint32_t CommandSubType; 522210e230b6Smaya uint32_t CommandType; 522310e230b6Smaya /* variable length fields follow */ 522410e230b6Smaya}; 522510e230b6Smaya 522696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 522796c5ddc4SrjsGFX75_3DSTATE_VERTEX_ELEMENTS_pack(__attribute__((unused)) __gen_user_data *data, 522810e230b6Smaya __attribute__((unused)) void * restrict dst, 522996c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VERTEX_ELEMENTS * restrict values) 523010e230b6Smaya{ 523110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 523210e230b6Smaya 523310e230b6Smaya dw[0] = 523410e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 523510e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 523610e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 523710e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 523810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 523910e230b6Smaya} 524010e230b6Smaya 524196c5ddc4Srjs#define GFX75_3DSTATE_VF_length 2 524296c5ddc4Srjs#define GFX75_3DSTATE_VF_length_bias 2 524396c5ddc4Srjs#define GFX75_3DSTATE_VF_header \ 524410e230b6Smaya .DWordLength = 0, \ 524510e230b6Smaya ._3DCommandSubOpcode = 12, \ 524610e230b6Smaya ._3DCommandOpcode = 0, \ 524710e230b6Smaya .CommandSubType = 3, \ 524810e230b6Smaya .CommandType = 3 524910e230b6Smaya 525096c5ddc4Srjsstruct GFX75_3DSTATE_VF { 525110e230b6Smaya uint32_t DWordLength; 525210e230b6Smaya bool IndexedDrawCutIndexEnable; 525310e230b6Smaya uint32_t _3DCommandSubOpcode; 525410e230b6Smaya uint32_t _3DCommandOpcode; 525510e230b6Smaya uint32_t CommandSubType; 525610e230b6Smaya uint32_t CommandType; 525710e230b6Smaya uint32_t CutIndex; 525810e230b6Smaya}; 525910e230b6Smaya 526096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 526196c5ddc4SrjsGFX75_3DSTATE_VF_pack(__attribute__((unused)) __gen_user_data *data, 526210e230b6Smaya __attribute__((unused)) void * restrict dst, 526396c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VF * restrict values) 526410e230b6Smaya{ 526510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 526610e230b6Smaya 526710e230b6Smaya dw[0] = 526810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 526910e230b6Smaya __gen_uint(values->IndexedDrawCutIndexEnable, 8, 8) | 527010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 527110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 527210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 527310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 527410e230b6Smaya 527510e230b6Smaya dw[1] = 527610e230b6Smaya __gen_uint(values->CutIndex, 0, 31); 527710e230b6Smaya} 527810e230b6Smaya 527996c5ddc4Srjs#define GFX75_3DSTATE_VF_STATISTICS_length 1 528096c5ddc4Srjs#define GFX75_3DSTATE_VF_STATISTICS_length_bias 1 528196c5ddc4Srjs#define GFX75_3DSTATE_VF_STATISTICS_header \ 528210e230b6Smaya ._3DCommandSubOpcode = 11, \ 528310e230b6Smaya ._3DCommandOpcode = 0, \ 528410e230b6Smaya .CommandSubType = 1, \ 528510e230b6Smaya .CommandType = 3 528610e230b6Smaya 528796c5ddc4Srjsstruct GFX75_3DSTATE_VF_STATISTICS { 528810e230b6Smaya bool StatisticsEnable; 528910e230b6Smaya uint32_t _3DCommandSubOpcode; 529010e230b6Smaya uint32_t _3DCommandOpcode; 529110e230b6Smaya uint32_t CommandSubType; 529210e230b6Smaya uint32_t CommandType; 529310e230b6Smaya}; 529410e230b6Smaya 529596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 529696c5ddc4SrjsGFX75_3DSTATE_VF_STATISTICS_pack(__attribute__((unused)) __gen_user_data *data, 529710e230b6Smaya __attribute__((unused)) void * restrict dst, 529896c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VF_STATISTICS * restrict values) 529910e230b6Smaya{ 530010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 530110e230b6Smaya 530210e230b6Smaya dw[0] = 530310e230b6Smaya __gen_uint(values->StatisticsEnable, 0, 0) | 530410e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 530510e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 530610e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 530710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 530810e230b6Smaya} 530910e230b6Smaya 531096c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 2 531196c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 2 531296c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\ 531310e230b6Smaya .DWordLength = 0, \ 531410e230b6Smaya ._3DCommandSubOpcode = 35, \ 531510e230b6Smaya ._3DCommandOpcode = 0, \ 531610e230b6Smaya .CommandSubType = 3, \ 531710e230b6Smaya .CommandType = 3 531810e230b6Smaya 531996c5ddc4Srjsstruct GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC { 532010e230b6Smaya uint32_t DWordLength; 532110e230b6Smaya uint32_t _3DCommandSubOpcode; 532210e230b6Smaya uint32_t _3DCommandOpcode; 532310e230b6Smaya uint32_t CommandSubType; 532410e230b6Smaya uint32_t CommandType; 532510e230b6Smaya uint64_t CCViewportPointer; 532610e230b6Smaya}; 532710e230b6Smaya 532896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 532996c5ddc4SrjsGFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__attribute__((unused)) __gen_user_data *data, 533010e230b6Smaya __attribute__((unused)) void * restrict dst, 533196c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values) 533210e230b6Smaya{ 533310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 533410e230b6Smaya 533510e230b6Smaya dw[0] = 533610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 533710e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 533810e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 533910e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 534010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 534110e230b6Smaya 534210e230b6Smaya dw[1] = 534310e230b6Smaya __gen_offset(values->CCViewportPointer, 5, 31); 534410e230b6Smaya} 534510e230b6Smaya 534696c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 2 534796c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 2 534896c5ddc4Srjs#define GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\ 534910e230b6Smaya .DWordLength = 0, \ 535010e230b6Smaya ._3DCommandSubOpcode = 33, \ 535110e230b6Smaya ._3DCommandOpcode = 0, \ 535210e230b6Smaya .CommandSubType = 3, \ 535310e230b6Smaya .CommandType = 3 535410e230b6Smaya 535596c5ddc4Srjsstruct GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP { 535610e230b6Smaya uint32_t DWordLength; 535710e230b6Smaya uint32_t _3DCommandSubOpcode; 535810e230b6Smaya uint32_t _3DCommandOpcode; 535910e230b6Smaya uint32_t CommandSubType; 536010e230b6Smaya uint32_t CommandType; 536110e230b6Smaya uint64_t SFClipViewportPointer; 536210e230b6Smaya}; 536310e230b6Smaya 536496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 536596c5ddc4SrjsGFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__attribute__((unused)) __gen_user_data *data, 536610e230b6Smaya __attribute__((unused)) void * restrict dst, 536796c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values) 536810e230b6Smaya{ 536910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 537010e230b6Smaya 537110e230b6Smaya dw[0] = 537210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 537310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 537410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 537510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 537610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 537710e230b6Smaya 537810e230b6Smaya dw[1] = 537910e230b6Smaya __gen_offset(values->SFClipViewportPointer, 6, 31); 538010e230b6Smaya} 538110e230b6Smaya 538296c5ddc4Srjs#define GFX75_3DSTATE_VS_length 6 538396c5ddc4Srjs#define GFX75_3DSTATE_VS_length_bias 2 538496c5ddc4Srjs#define GFX75_3DSTATE_VS_header \ 538510e230b6Smaya .DWordLength = 4, \ 538610e230b6Smaya ._3DCommandSubOpcode = 16, \ 538710e230b6Smaya ._3DCommandOpcode = 0, \ 538810e230b6Smaya .CommandSubType = 3, \ 538910e230b6Smaya .CommandType = 3 539010e230b6Smaya 539196c5ddc4Srjsstruct GFX75_3DSTATE_VS { 539210e230b6Smaya uint32_t DWordLength; 539310e230b6Smaya uint32_t _3DCommandSubOpcode; 539410e230b6Smaya uint32_t _3DCommandOpcode; 539510e230b6Smaya uint32_t CommandSubType; 539610e230b6Smaya uint32_t CommandType; 539710e230b6Smaya uint64_t KernelStartPointer; 539810e230b6Smaya bool SoftwareExceptionEnable; 539910e230b6Smaya bool VSaccessesUAV; 540010e230b6Smaya bool IllegalOpcodeExceptionEnable; 540110e230b6Smaya uint32_t FloatingPointMode; 540210e230b6Smaya#define IEEE754 0 540310e230b6Smaya#define Alternate 1 540410e230b6Smaya uint32_t ThreadPriority; 540510e230b6Smaya#define NormalPriority 0 540610e230b6Smaya#define HighPriority 1 540710e230b6Smaya uint32_t BindingTableEntryCount; 540810e230b6Smaya uint32_t SamplerCount; 540910e230b6Smaya#define NoSamplers 0 541010e230b6Smaya#define _14Samplers 1 541110e230b6Smaya#define _58Samplers 2 541210e230b6Smaya#define _912Samplers 3 541310e230b6Smaya#define _1316Samplers 4 541410e230b6Smaya bool VectorMaskEnable; 541510e230b6Smaya bool SingleVertexDispatch; 541610e230b6Smaya uint32_t PerThreadScratchSpace; 541710e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 541810e230b6Smaya uint32_t VertexURBEntryReadOffset; 541910e230b6Smaya uint32_t VertexURBEntryReadLength; 542010e230b6Smaya uint32_t DispatchGRFStartRegisterForURBData; 542110e230b6Smaya bool Enable; 542210e230b6Smaya bool VertexCacheDisable; 542310e230b6Smaya bool StatisticsEnable; 542410e230b6Smaya uint32_t MaximumNumberofThreads; 542510e230b6Smaya}; 542610e230b6Smaya 542796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 542896c5ddc4SrjsGFX75_3DSTATE_VS_pack(__attribute__((unused)) __gen_user_data *data, 542910e230b6Smaya __attribute__((unused)) void * restrict dst, 543096c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_VS * restrict values) 543110e230b6Smaya{ 543210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 543310e230b6Smaya 543410e230b6Smaya dw[0] = 543510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 543610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 543710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 543810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 543910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 544010e230b6Smaya 544110e230b6Smaya dw[1] = 544210e230b6Smaya __gen_offset(values->KernelStartPointer, 6, 31); 544310e230b6Smaya 544410e230b6Smaya dw[2] = 544510e230b6Smaya __gen_uint(values->SoftwareExceptionEnable, 7, 7) | 544610e230b6Smaya __gen_uint(values->VSaccessesUAV, 12, 12) | 544710e230b6Smaya __gen_uint(values->IllegalOpcodeExceptionEnable, 13, 13) | 544810e230b6Smaya __gen_uint(values->FloatingPointMode, 16, 16) | 544910e230b6Smaya __gen_uint(values->ThreadPriority, 17, 17) | 545010e230b6Smaya __gen_uint(values->BindingTableEntryCount, 18, 25) | 545110e230b6Smaya __gen_uint(values->SamplerCount, 27, 29) | 545210e230b6Smaya __gen_uint(values->VectorMaskEnable, 30, 30) | 545310e230b6Smaya __gen_uint(values->SingleVertexDispatch, 31, 31); 545410e230b6Smaya 545510e230b6Smaya const uint32_t v3 = 545610e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3); 545796c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->ScratchSpaceBasePointer, v3, 10, 31); 545810e230b6Smaya 545910e230b6Smaya dw[4] = 546010e230b6Smaya __gen_uint(values->VertexURBEntryReadOffset, 4, 9) | 546110e230b6Smaya __gen_uint(values->VertexURBEntryReadLength, 11, 16) | 546210e230b6Smaya __gen_uint(values->DispatchGRFStartRegisterForURBData, 20, 24); 546310e230b6Smaya 546410e230b6Smaya dw[5] = 546510e230b6Smaya __gen_uint(values->Enable, 0, 0) | 546610e230b6Smaya __gen_uint(values->VertexCacheDisable, 1, 1) | 546710e230b6Smaya __gen_uint(values->StatisticsEnable, 10, 10) | 546810e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 23, 31); 546910e230b6Smaya} 547010e230b6Smaya 547196c5ddc4Srjs#define GFX75_3DSTATE_WM_length 3 547296c5ddc4Srjs#define GFX75_3DSTATE_WM_length_bias 2 547396c5ddc4Srjs#define GFX75_3DSTATE_WM_header \ 547410e230b6Smaya .DWordLength = 1, \ 547510e230b6Smaya ._3DCommandSubOpcode = 20, \ 547610e230b6Smaya ._3DCommandOpcode = 0, \ 547710e230b6Smaya .CommandSubType = 3, \ 547810e230b6Smaya .CommandType = 3 547910e230b6Smaya 548096c5ddc4Srjsstruct GFX75_3DSTATE_WM { 548110e230b6Smaya uint32_t DWordLength; 548210e230b6Smaya uint32_t _3DCommandSubOpcode; 548310e230b6Smaya uint32_t _3DCommandOpcode; 548410e230b6Smaya uint32_t CommandSubType; 548510e230b6Smaya uint32_t CommandType; 548610e230b6Smaya uint32_t MultisampleRasterizationMode; 548710e230b6Smaya#define MSRASTMODE_OFF_PIXEL 0 548810e230b6Smaya#define MSRASTMODE_OFF_PATTERN 1 548910e230b6Smaya#define MSRASTMODE_ON_PIXEL 2 549010e230b6Smaya#define MSRASTMODE_ON_PATTERN 3 549110e230b6Smaya uint32_t PointRasterizationRule; 549210e230b6Smaya#define RASTRULE_UPPER_LEFT 0 549310e230b6Smaya#define RASTRULE_UPPER_RIGHT 1 549410e230b6Smaya bool LineStippleEnable; 549510e230b6Smaya bool PolygonStippleEnable; 549610e230b6Smaya bool RTIndependentRasterizationEnable; 549710e230b6Smaya uint32_t LineAntialiasingRegionWidth; 549810e230b6Smaya#define _05pixels 0 549910e230b6Smaya#define _10pixels 1 550010e230b6Smaya#define _20pixels 2 550110e230b6Smaya#define _40pixels 3 550210e230b6Smaya uint32_t LineEndCapAntialiasingRegionWidth; 550310e230b6Smaya bool PixelShaderUsesInputCoverageMask; 550410e230b6Smaya uint32_t BarycentricInterpolationMode; 550510e230b6Smaya#define BIM_PERSPECTIVE_PIXEL 1 550610e230b6Smaya#define BIM_PERSPECTIVE_CENTROID 2 550710e230b6Smaya#define BIM_PERSPECTIVE_SAMPLE 4 550810e230b6Smaya#define BIM_LINEAR_PIXEL 8 550910e230b6Smaya#define BIM_LINEAR_CENTROID 16 551010e230b6Smaya#define BIM_LINEAR_SAMPLE 32 551110e230b6Smaya uint32_t PositionZWInterpolationMode; 551210e230b6Smaya#define INTERP_PIXEL 0 551310e230b6Smaya#define INTERP_CENTROID 2 551410e230b6Smaya#define INTERP_SAMPLE 3 551510e230b6Smaya bool PixelShaderUsesSourceW; 551610e230b6Smaya bool PixelShaderUsesSourceDepth; 551710e230b6Smaya uint32_t EarlyDepthStencilControl; 551810e230b6Smaya#define EDSC_NORMAL 0 551910e230b6Smaya#define EDSC_PSEXEC 1 552010e230b6Smaya#define EDSC_PREPS 2 552110e230b6Smaya uint32_t PixelShaderComputedDepthMode; 552210e230b6Smaya#define PSCDEPTH_OFF 0 552310e230b6Smaya#define PSCDEPTH_ON 1 552410e230b6Smaya#define PSCDEPTH_ON_GE 2 552510e230b6Smaya#define PSCDEPTH_ON_LE 3 552610e230b6Smaya bool PixelShaderKillsPixel; 552710e230b6Smaya bool LegacyDiamondLineRasterization; 552810e230b6Smaya bool HierarchicalDepthBufferResolveEnable; 552910e230b6Smaya bool DepthBufferResolveEnable; 553010e230b6Smaya bool ThreadDispatchEnable; 553110e230b6Smaya bool DepthBufferClear; 553210e230b6Smaya bool StatisticsEnable; 553310e230b6Smaya uint32_t PSUAVonly; 553410e230b6Smaya#define OFF 0 553510e230b6Smaya#define ON 1 553610e230b6Smaya uint32_t MultisampleDispatchMode; 553710e230b6Smaya#define MSDISPMODE_PERSAMPLE 0 553810e230b6Smaya#define MSDISPMODE_PERPIXEL 1 553910e230b6Smaya}; 554010e230b6Smaya 554196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 554296c5ddc4SrjsGFX75_3DSTATE_WM_pack(__attribute__((unused)) __gen_user_data *data, 554310e230b6Smaya __attribute__((unused)) void * restrict dst, 554496c5ddc4Srjs __attribute__((unused)) const struct GFX75_3DSTATE_WM * restrict values) 554510e230b6Smaya{ 554610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 554710e230b6Smaya 554810e230b6Smaya dw[0] = 554910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 555010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 555110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 555210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 555310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 555410e230b6Smaya 555510e230b6Smaya dw[1] = 555610e230b6Smaya __gen_uint(values->MultisampleRasterizationMode, 0, 1) | 555710e230b6Smaya __gen_uint(values->PointRasterizationRule, 2, 2) | 555810e230b6Smaya __gen_uint(values->LineStippleEnable, 3, 3) | 555910e230b6Smaya __gen_uint(values->PolygonStippleEnable, 4, 4) | 556010e230b6Smaya __gen_uint(values->RTIndependentRasterizationEnable, 5, 5) | 556110e230b6Smaya __gen_uint(values->LineAntialiasingRegionWidth, 6, 7) | 556210e230b6Smaya __gen_uint(values->LineEndCapAntialiasingRegionWidth, 8, 9) | 556310e230b6Smaya __gen_uint(values->PixelShaderUsesInputCoverageMask, 10, 10) | 556410e230b6Smaya __gen_uint(values->BarycentricInterpolationMode, 11, 16) | 556510e230b6Smaya __gen_uint(values->PositionZWInterpolationMode, 17, 18) | 556610e230b6Smaya __gen_uint(values->PixelShaderUsesSourceW, 19, 19) | 556710e230b6Smaya __gen_uint(values->PixelShaderUsesSourceDepth, 20, 20) | 556810e230b6Smaya __gen_uint(values->EarlyDepthStencilControl, 21, 22) | 556910e230b6Smaya __gen_uint(values->PixelShaderComputedDepthMode, 23, 24) | 557010e230b6Smaya __gen_uint(values->PixelShaderKillsPixel, 25, 25) | 557110e230b6Smaya __gen_uint(values->LegacyDiamondLineRasterization, 26, 26) | 557210e230b6Smaya __gen_uint(values->HierarchicalDepthBufferResolveEnable, 27, 27) | 557310e230b6Smaya __gen_uint(values->DepthBufferResolveEnable, 28, 28) | 557410e230b6Smaya __gen_uint(values->ThreadDispatchEnable, 29, 29) | 557510e230b6Smaya __gen_uint(values->DepthBufferClear, 30, 30) | 557610e230b6Smaya __gen_uint(values->StatisticsEnable, 31, 31); 557710e230b6Smaya 557810e230b6Smaya dw[2] = 557910e230b6Smaya __gen_uint(values->PSUAVonly, 30, 30) | 558010e230b6Smaya __gen_uint(values->MultisampleDispatchMode, 31, 31); 558110e230b6Smaya} 558210e230b6Smaya 558396c5ddc4Srjs#define GFX75_GPGPU_CSR_BASE_ADDRESS_length 2 558496c5ddc4Srjs#define GFX75_GPGPU_CSR_BASE_ADDRESS_length_bias 2 558596c5ddc4Srjs#define GFX75_GPGPU_CSR_BASE_ADDRESS_header \ 558610e230b6Smaya .DWordLength = 0, \ 558710e230b6Smaya ._3DCommandSubOpcode = 4, \ 558810e230b6Smaya ._3DCommandOpcode = 1, \ 558910e230b6Smaya .CommandSubType = 0, \ 559010e230b6Smaya .CommandType = 3 559110e230b6Smaya 559296c5ddc4Srjsstruct GFX75_GPGPU_CSR_BASE_ADDRESS { 559310e230b6Smaya uint32_t DWordLength; 559410e230b6Smaya uint32_t _3DCommandSubOpcode; 559510e230b6Smaya uint32_t _3DCommandOpcode; 559610e230b6Smaya uint32_t CommandSubType; 559710e230b6Smaya uint32_t CommandType; 559810e230b6Smaya __gen_address_type GPGPUCSRBaseAddress; 559910e230b6Smaya}; 560010e230b6Smaya 560196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 560296c5ddc4SrjsGFX75_GPGPU_CSR_BASE_ADDRESS_pack(__attribute__((unused)) __gen_user_data *data, 560310e230b6Smaya __attribute__((unused)) void * restrict dst, 560496c5ddc4Srjs __attribute__((unused)) const struct GFX75_GPGPU_CSR_BASE_ADDRESS * restrict values) 560510e230b6Smaya{ 560610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 560710e230b6Smaya 560810e230b6Smaya dw[0] = 560910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 561010e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 561110e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 561210e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 561310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 561410e230b6Smaya 561596c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->GPGPUCSRBaseAddress, 0, 12, 31); 561610e230b6Smaya} 561710e230b6Smaya 561896c5ddc4Srjs#define GFX75_GPGPU_OBJECT_length 8 561996c5ddc4Srjs#define GFX75_GPGPU_OBJECT_length_bias 2 562096c5ddc4Srjs#define GFX75_GPGPU_OBJECT_header \ 562110e230b6Smaya .DWordLength = 6, \ 562210e230b6Smaya .SubOpcode = 4, \ 562310e230b6Smaya .MediaCommandOpcode = 1, \ 562410e230b6Smaya .Pipeline = 2, \ 562510e230b6Smaya .CommandType = 3 562610e230b6Smaya 562796c5ddc4Srjsstruct GFX75_GPGPU_OBJECT { 562810e230b6Smaya uint32_t DWordLength; 562910e230b6Smaya bool PredicateEnable; 563010e230b6Smaya uint32_t SubOpcode; 563110e230b6Smaya uint32_t MediaCommandOpcode; 563210e230b6Smaya uint32_t Pipeline; 563310e230b6Smaya uint32_t CommandType; 563410e230b6Smaya uint32_t InterfaceDescriptorOffset; 563510e230b6Smaya uint32_t SharedLocalMemoryFixedOffset; 563610e230b6Smaya uint32_t IndirectDataLength; 563710e230b6Smaya uint32_t HalfSliceDestinationSelect; 563810e230b6Smaya#define HalfSlice1 2 563910e230b6Smaya#define HalfSlice0 1 564010e230b6Smaya#define EitherHalfSlice 0 564110e230b6Smaya uint32_t SliceDestinationSelect; 564210e230b6Smaya#define Slice0 0 564310e230b6Smaya#define Slice1 1 564410e230b6Smaya uint32_t EndofThreadGroup; 564510e230b6Smaya uint32_t SharedLocalMemoryOffset; 564610e230b6Smaya uint64_t IndirectDataStartAddress; 564710e230b6Smaya uint32_t ThreadGroupIDX; 564810e230b6Smaya uint32_t ThreadGroupIDY; 564910e230b6Smaya uint32_t ThreadGroupIDZ; 565010e230b6Smaya uint32_t ExecutionMask; 565110e230b6Smaya}; 565210e230b6Smaya 565396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 565496c5ddc4SrjsGFX75_GPGPU_OBJECT_pack(__attribute__((unused)) __gen_user_data *data, 565510e230b6Smaya __attribute__((unused)) void * restrict dst, 565696c5ddc4Srjs __attribute__((unused)) const struct GFX75_GPGPU_OBJECT * restrict values) 565710e230b6Smaya{ 565810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 565910e230b6Smaya 566010e230b6Smaya dw[0] = 566110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 566210e230b6Smaya __gen_uint(values->PredicateEnable, 8, 8) | 566310e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 566410e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 566510e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 566610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 566710e230b6Smaya 566810e230b6Smaya dw[1] = 566910e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5) | 567010e230b6Smaya __gen_uint(values->SharedLocalMemoryFixedOffset, 7, 7); 567110e230b6Smaya 567210e230b6Smaya dw[2] = 567310e230b6Smaya __gen_uint(values->IndirectDataLength, 0, 16) | 567410e230b6Smaya __gen_uint(values->HalfSliceDestinationSelect, 17, 18) | 567510e230b6Smaya __gen_uint(values->SliceDestinationSelect, 19, 19) | 567610e230b6Smaya __gen_uint(values->EndofThreadGroup, 24, 24) | 567710e230b6Smaya __gen_uint(values->SharedLocalMemoryOffset, 28, 31); 567810e230b6Smaya 567910e230b6Smaya dw[3] = 568010e230b6Smaya __gen_offset(values->IndirectDataStartAddress, 0, 31); 568110e230b6Smaya 568210e230b6Smaya dw[4] = 568310e230b6Smaya __gen_uint(values->ThreadGroupIDX, 0, 31); 568410e230b6Smaya 568510e230b6Smaya dw[5] = 568610e230b6Smaya __gen_uint(values->ThreadGroupIDY, 0, 31); 568710e230b6Smaya 568810e230b6Smaya dw[6] = 568910e230b6Smaya __gen_uint(values->ThreadGroupIDZ, 0, 31); 569010e230b6Smaya 569110e230b6Smaya dw[7] = 569210e230b6Smaya __gen_uint(values->ExecutionMask, 0, 31); 569310e230b6Smaya} 569410e230b6Smaya 569596c5ddc4Srjs#define GFX75_GPGPU_WALKER_length 11 569696c5ddc4Srjs#define GFX75_GPGPU_WALKER_length_bias 2 569796c5ddc4Srjs#define GFX75_GPGPU_WALKER_header \ 569810e230b6Smaya .DWordLength = 9, \ 569910e230b6Smaya .SubOpcodeA = 5, \ 570010e230b6Smaya .MediaCommandOpcode = 1, \ 570110e230b6Smaya .Pipeline = 2, \ 570210e230b6Smaya .CommandType = 3 570310e230b6Smaya 570496c5ddc4Srjsstruct GFX75_GPGPU_WALKER { 570510e230b6Smaya uint32_t DWordLength; 570610e230b6Smaya bool PredicateEnable; 570710e230b6Smaya bool IndirectParameterEnable; 570810e230b6Smaya uint32_t SubOpcodeA; 570910e230b6Smaya uint32_t MediaCommandOpcode; 571010e230b6Smaya uint32_t Pipeline; 571110e230b6Smaya uint32_t CommandType; 571210e230b6Smaya uint32_t InterfaceDescriptorOffset; 571310e230b6Smaya uint32_t ThreadWidthCounterMaximum; 571410e230b6Smaya uint32_t ThreadHeightCounterMaximum; 571510e230b6Smaya uint32_t ThreadDepthCounterMaximum; 571610e230b6Smaya uint32_t SIMDSize; 571710e230b6Smaya#define SIMD8 0 571810e230b6Smaya#define SIMD16 1 571910e230b6Smaya#define SIMD32 2 572010e230b6Smaya uint32_t ThreadGroupIDStartingX; 572110e230b6Smaya uint32_t ThreadGroupIDXDimension; 572210e230b6Smaya uint32_t ThreadGroupIDStartingY; 572310e230b6Smaya uint32_t ThreadGroupIDYDimension; 572410e230b6Smaya uint32_t ThreadGroupIDStartingZ; 572510e230b6Smaya uint32_t ThreadGroupIDZDimension; 572610e230b6Smaya uint32_t RightExecutionMask; 572710e230b6Smaya uint32_t BottomExecutionMask; 572810e230b6Smaya}; 572910e230b6Smaya 573096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 573196c5ddc4SrjsGFX75_GPGPU_WALKER_pack(__attribute__((unused)) __gen_user_data *data, 573210e230b6Smaya __attribute__((unused)) void * restrict dst, 573396c5ddc4Srjs __attribute__((unused)) const struct GFX75_GPGPU_WALKER * restrict values) 573410e230b6Smaya{ 573510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 573610e230b6Smaya 573710e230b6Smaya dw[0] = 573810e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 573910e230b6Smaya __gen_uint(values->PredicateEnable, 8, 8) | 574010e230b6Smaya __gen_uint(values->IndirectParameterEnable, 10, 10) | 574110e230b6Smaya __gen_uint(values->SubOpcodeA, 16, 23) | 574210e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 574310e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 574410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 574510e230b6Smaya 574610e230b6Smaya dw[1] = 574710e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5); 574810e230b6Smaya 574910e230b6Smaya dw[2] = 575010e230b6Smaya __gen_uint(values->ThreadWidthCounterMaximum, 0, 5) | 575110e230b6Smaya __gen_uint(values->ThreadHeightCounterMaximum, 8, 13) | 575210e230b6Smaya __gen_uint(values->ThreadDepthCounterMaximum, 16, 21) | 575310e230b6Smaya __gen_uint(values->SIMDSize, 30, 31); 575410e230b6Smaya 575510e230b6Smaya dw[3] = 575610e230b6Smaya __gen_uint(values->ThreadGroupIDStartingX, 0, 31); 575710e230b6Smaya 575810e230b6Smaya dw[4] = 575910e230b6Smaya __gen_uint(values->ThreadGroupIDXDimension, 0, 31); 576010e230b6Smaya 576110e230b6Smaya dw[5] = 576210e230b6Smaya __gen_uint(values->ThreadGroupIDStartingY, 0, 31); 576310e230b6Smaya 576410e230b6Smaya dw[6] = 576510e230b6Smaya __gen_uint(values->ThreadGroupIDYDimension, 0, 31); 576610e230b6Smaya 576710e230b6Smaya dw[7] = 576810e230b6Smaya __gen_uint(values->ThreadGroupIDStartingZ, 0, 31); 576910e230b6Smaya 577010e230b6Smaya dw[8] = 577110e230b6Smaya __gen_uint(values->ThreadGroupIDZDimension, 0, 31); 577210e230b6Smaya 577310e230b6Smaya dw[9] = 577410e230b6Smaya __gen_uint(values->RightExecutionMask, 0, 31); 577510e230b6Smaya 577610e230b6Smaya dw[10] = 577710e230b6Smaya __gen_uint(values->BottomExecutionMask, 0, 31); 577810e230b6Smaya} 577910e230b6Smaya 578096c5ddc4Srjs#define GFX75_MEDIA_CURBE_LOAD_length 4 578196c5ddc4Srjs#define GFX75_MEDIA_CURBE_LOAD_length_bias 2 578296c5ddc4Srjs#define GFX75_MEDIA_CURBE_LOAD_header \ 578310e230b6Smaya .DWordLength = 2, \ 578410e230b6Smaya .SubOpcode = 1, \ 578510e230b6Smaya .MediaCommandOpcode = 0, \ 578610e230b6Smaya .Pipeline = 2, \ 578710e230b6Smaya .CommandType = 3 578810e230b6Smaya 578996c5ddc4Srjsstruct GFX75_MEDIA_CURBE_LOAD { 579010e230b6Smaya uint32_t DWordLength; 579110e230b6Smaya uint32_t SubOpcode; 579210e230b6Smaya uint32_t MediaCommandOpcode; 579310e230b6Smaya uint32_t Pipeline; 579410e230b6Smaya uint32_t CommandType; 579510e230b6Smaya uint32_t CURBETotalDataLength; 579610e230b6Smaya uint32_t CURBEDataStartAddress; 579710e230b6Smaya}; 579810e230b6Smaya 579996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 580096c5ddc4SrjsGFX75_MEDIA_CURBE_LOAD_pack(__attribute__((unused)) __gen_user_data *data, 580110e230b6Smaya __attribute__((unused)) void * restrict dst, 580296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_CURBE_LOAD * restrict values) 580310e230b6Smaya{ 580410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 580510e230b6Smaya 580610e230b6Smaya dw[0] = 580710e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 580810e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 580910e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 581010e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 581110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 581210e230b6Smaya 581310e230b6Smaya dw[1] = 0; 581410e230b6Smaya 581510e230b6Smaya dw[2] = 581610e230b6Smaya __gen_uint(values->CURBETotalDataLength, 0, 16); 581710e230b6Smaya 581810e230b6Smaya dw[3] = 581910e230b6Smaya __gen_uint(values->CURBEDataStartAddress, 0, 31); 582010e230b6Smaya} 582110e230b6Smaya 582296c5ddc4Srjs#define GFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 4 582396c5ddc4Srjs#define GFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 2 582496c5ddc4Srjs#define GFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\ 582510e230b6Smaya .DWordLength = 2, \ 582610e230b6Smaya .SubOpcode = 2, \ 582710e230b6Smaya .MediaCommandOpcode = 0, \ 582810e230b6Smaya .Pipeline = 2, \ 582910e230b6Smaya .CommandType = 3 583010e230b6Smaya 583196c5ddc4Srjsstruct GFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD { 583210e230b6Smaya uint32_t DWordLength; 583310e230b6Smaya uint32_t SubOpcode; 583410e230b6Smaya uint32_t MediaCommandOpcode; 583510e230b6Smaya uint32_t Pipeline; 583610e230b6Smaya uint32_t CommandType; 583710e230b6Smaya uint32_t InterfaceDescriptorTotalLength; 583810e230b6Smaya uint64_t InterfaceDescriptorDataStartAddress; 583910e230b6Smaya}; 584010e230b6Smaya 584196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 584296c5ddc4SrjsGFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__attribute__((unused)) __gen_user_data *data, 584310e230b6Smaya __attribute__((unused)) void * restrict dst, 584496c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values) 584510e230b6Smaya{ 584610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 584710e230b6Smaya 584810e230b6Smaya dw[0] = 584910e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 585010e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 585110e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 585210e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 585310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 585410e230b6Smaya 585510e230b6Smaya dw[1] = 0; 585610e230b6Smaya 585710e230b6Smaya dw[2] = 585810e230b6Smaya __gen_uint(values->InterfaceDescriptorTotalLength, 0, 16); 585910e230b6Smaya 586010e230b6Smaya dw[3] = 586110e230b6Smaya __gen_offset(values->InterfaceDescriptorDataStartAddress, 0, 31); 586210e230b6Smaya} 586310e230b6Smaya 586496c5ddc4Srjs#define GFX75_MEDIA_OBJECT_length_bias 2 586596c5ddc4Srjs#define GFX75_MEDIA_OBJECT_header \ 586610e230b6Smaya .DWordLength = 4, \ 586710e230b6Smaya .MediaCommandSubOpcode = 0, \ 586810e230b6Smaya .MediaCommandOpcode = 1, \ 586910e230b6Smaya .MediaCommandPipeline = 2, \ 587010e230b6Smaya .CommandType = 3 587110e230b6Smaya 587296c5ddc4Srjsstruct GFX75_MEDIA_OBJECT { 587310e230b6Smaya uint32_t DWordLength; 587410e230b6Smaya uint32_t MediaCommandSubOpcode; 587510e230b6Smaya uint32_t MediaCommandOpcode; 587610e230b6Smaya uint32_t MediaCommandPipeline; 587710e230b6Smaya uint32_t CommandType; 587810e230b6Smaya uint32_t InterfaceDescriptorOffset; 587910e230b6Smaya uint32_t IndirectDataLength; 588010e230b6Smaya uint32_t HalfSliceDestinationSelect; 588110e230b6Smaya#define HalfSlice1 2 588210e230b6Smaya#define HalfSlice0 1 588310e230b6Smaya#define Eitherhalfslice 0 588410e230b6Smaya uint32_t SliceDestinationSelect; 588510e230b6Smaya#define Slice0 0 588610e230b6Smaya#define Slice1 1 588710e230b6Smaya#define EitherSlice 0 588810e230b6Smaya uint32_t UseScoreboard; 588910e230b6Smaya#define Notusingscoreboard 0 589010e230b6Smaya#define Usingscoreboard 1 589110e230b6Smaya uint32_t ThreadSynchronization; 589210e230b6Smaya#define Nothreadsynchronization 0 589310e230b6Smaya#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 589410e230b6Smaya bool ChildrenPresent; 589510e230b6Smaya __gen_address_type IndirectDataStartAddress; 589610e230b6Smaya uint32_t ScoreboardX; 589710e230b6Smaya uint32_t ScoredboardY; 589810e230b6Smaya uint32_t ScoreboardMask; 589910e230b6Smaya uint32_t ScoreboardColor; 590010e230b6Smaya /* variable length fields follow */ 590110e230b6Smaya}; 590210e230b6Smaya 590396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 590496c5ddc4SrjsGFX75_MEDIA_OBJECT_pack(__attribute__((unused)) __gen_user_data *data, 590510e230b6Smaya __attribute__((unused)) void * restrict dst, 590696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_OBJECT * restrict values) 590710e230b6Smaya{ 590810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 590910e230b6Smaya 591010e230b6Smaya dw[0] = 591110e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 591210e230b6Smaya __gen_uint(values->MediaCommandSubOpcode, 16, 23) | 591310e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 591410e230b6Smaya __gen_uint(values->MediaCommandPipeline, 27, 28) | 591510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 591610e230b6Smaya 591710e230b6Smaya dw[1] = 591810e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5); 591910e230b6Smaya 592010e230b6Smaya dw[2] = 592110e230b6Smaya __gen_uint(values->IndirectDataLength, 0, 16) | 592210e230b6Smaya __gen_uint(values->HalfSliceDestinationSelect, 17, 18) | 592310e230b6Smaya __gen_uint(values->SliceDestinationSelect, 19, 19) | 592410e230b6Smaya __gen_uint(values->UseScoreboard, 21, 21) | 592510e230b6Smaya __gen_uint(values->ThreadSynchronization, 24, 24) | 592610e230b6Smaya __gen_uint(values->ChildrenPresent, 31, 31); 592710e230b6Smaya 592896c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->IndirectDataStartAddress, 0, 0, 31); 592910e230b6Smaya 593010e230b6Smaya dw[4] = 593110e230b6Smaya __gen_uint(values->ScoreboardX, 0, 8) | 593210e230b6Smaya __gen_uint(values->ScoredboardY, 16, 24); 593310e230b6Smaya 593410e230b6Smaya dw[5] = 593510e230b6Smaya __gen_uint(values->ScoreboardMask, 0, 7) | 593610e230b6Smaya __gen_uint(values->ScoreboardColor, 16, 19); 593710e230b6Smaya} 593810e230b6Smaya 593996c5ddc4Srjs#define GFX75_MEDIA_OBJECT_PRT_length 16 594096c5ddc4Srjs#define GFX75_MEDIA_OBJECT_PRT_length_bias 2 594196c5ddc4Srjs#define GFX75_MEDIA_OBJECT_PRT_header \ 594210e230b6Smaya .DWordLength = 14, \ 594310e230b6Smaya .SubOpcode = 2, \ 594410e230b6Smaya .MediaCommandOpcode = 1, \ 594510e230b6Smaya .Pipeline = 2, \ 594610e230b6Smaya .CommandType = 3 594710e230b6Smaya 594896c5ddc4Srjsstruct GFX75_MEDIA_OBJECT_PRT { 594910e230b6Smaya uint32_t DWordLength; 595010e230b6Smaya uint32_t SubOpcode; 595110e230b6Smaya uint32_t MediaCommandOpcode; 595210e230b6Smaya uint32_t Pipeline; 595310e230b6Smaya uint32_t CommandType; 595410e230b6Smaya uint32_t InterfaceDescriptorOffset; 595510e230b6Smaya uint32_t PRT_FenceType; 595610e230b6Smaya#define Rootthreadqueue 0 595710e230b6Smaya#define VFEstateflush 1 595810e230b6Smaya bool PRT_FenceNeeded; 595910e230b6Smaya bool ChildrenPresent; 596010e230b6Smaya uint32_t InlineData[12]; 596110e230b6Smaya}; 596210e230b6Smaya 596396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 596496c5ddc4SrjsGFX75_MEDIA_OBJECT_PRT_pack(__attribute__((unused)) __gen_user_data *data, 596510e230b6Smaya __attribute__((unused)) void * restrict dst, 596696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_OBJECT_PRT * restrict values) 596710e230b6Smaya{ 596810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 596910e230b6Smaya 597010e230b6Smaya dw[0] = 597110e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 597210e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 597310e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 597410e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 597510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 597610e230b6Smaya 597710e230b6Smaya dw[1] = 597810e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5); 597910e230b6Smaya 598010e230b6Smaya dw[2] = 598110e230b6Smaya __gen_uint(values->PRT_FenceType, 22, 22) | 598210e230b6Smaya __gen_uint(values->PRT_FenceNeeded, 23, 23) | 598310e230b6Smaya __gen_uint(values->ChildrenPresent, 31, 31); 598410e230b6Smaya 598510e230b6Smaya dw[3] = 0; 598610e230b6Smaya 598710e230b6Smaya dw[4] = 598810e230b6Smaya __gen_uint(values->InlineData[0], 0, 31); 598910e230b6Smaya 599010e230b6Smaya dw[5] = 599110e230b6Smaya __gen_uint(values->InlineData[1], 0, 31); 599210e230b6Smaya 599310e230b6Smaya dw[6] = 599410e230b6Smaya __gen_uint(values->InlineData[2], 0, 31); 599510e230b6Smaya 599610e230b6Smaya dw[7] = 599710e230b6Smaya __gen_uint(values->InlineData[3], 0, 31); 599810e230b6Smaya 599910e230b6Smaya dw[8] = 600010e230b6Smaya __gen_uint(values->InlineData[4], 0, 31); 600110e230b6Smaya 600210e230b6Smaya dw[9] = 600310e230b6Smaya __gen_uint(values->InlineData[5], 0, 31); 600410e230b6Smaya 600510e230b6Smaya dw[10] = 600610e230b6Smaya __gen_uint(values->InlineData[6], 0, 31); 600710e230b6Smaya 600810e230b6Smaya dw[11] = 600910e230b6Smaya __gen_uint(values->InlineData[7], 0, 31); 601010e230b6Smaya 601110e230b6Smaya dw[12] = 601210e230b6Smaya __gen_uint(values->InlineData[8], 0, 31); 601310e230b6Smaya 601410e230b6Smaya dw[13] = 601510e230b6Smaya __gen_uint(values->InlineData[9], 0, 31); 601610e230b6Smaya 601710e230b6Smaya dw[14] = 601810e230b6Smaya __gen_uint(values->InlineData[10], 0, 31); 601910e230b6Smaya 602010e230b6Smaya dw[15] = 602110e230b6Smaya __gen_uint(values->InlineData[11], 0, 31); 602210e230b6Smaya} 602310e230b6Smaya 602496c5ddc4Srjs#define GFX75_MEDIA_OBJECT_WALKER_length_bias 2 602596c5ddc4Srjs#define GFX75_MEDIA_OBJECT_WALKER_header \ 602610e230b6Smaya .DWordLength = 15, \ 602710e230b6Smaya .SubOpcode = 3, \ 602810e230b6Smaya .MediaCommandOpcode = 1, \ 602910e230b6Smaya .Pipeline = 2, \ 603010e230b6Smaya .CommandType = 3 603110e230b6Smaya 603296c5ddc4Srjsstruct GFX75_MEDIA_OBJECT_WALKER { 603310e230b6Smaya uint32_t DWordLength; 603410e230b6Smaya uint32_t SubOpcode; 603510e230b6Smaya uint32_t MediaCommandOpcode; 603610e230b6Smaya uint32_t Pipeline; 603710e230b6Smaya uint32_t CommandType; 603810e230b6Smaya uint32_t InterfaceDescriptorOffset; 603910e230b6Smaya uint32_t IndirectDataLength; 604010e230b6Smaya uint32_t UseScoreboard; 604110e230b6Smaya#define Notusingscoreboard 0 604210e230b6Smaya#define Usingscoreboard 1 604310e230b6Smaya uint32_t ThreadSynchronization; 604410e230b6Smaya#define Nothreadsynchronization 0 604510e230b6Smaya#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 604610e230b6Smaya uint32_t ChildrenPresent; 604710e230b6Smaya uint64_t IndirectDataStartAddress; 604810e230b6Smaya uint32_t ScoreboardMask; 604910e230b6Smaya int32_t MidLoopUnitX; 605010e230b6Smaya int32_t LocalMidLoopUnitY; 605110e230b6Smaya uint32_t MiddleLoopExtraSteps; 605210e230b6Smaya uint32_t ColorCountMinusOne; 605310e230b6Smaya uint32_t QuadMode; 605410e230b6Smaya uint32_t Repel; 605510e230b6Smaya uint32_t DualMode; 605610e230b6Smaya uint32_t LocalLoopExecCount; 605710e230b6Smaya uint32_t GlobalLoopExecCount; 605810e230b6Smaya uint32_t BlockResolutionX; 605910e230b6Smaya uint32_t BlockResolutionY; 606010e230b6Smaya uint32_t LocalStartX; 606110e230b6Smaya uint32_t LocalStartY; 606210e230b6Smaya int32_t LocalOuterLoopStrideX; 606310e230b6Smaya int32_t LocalOuterLoopStrideY; 606410e230b6Smaya int32_t LocalInnerLoopUnitX; 606510e230b6Smaya int32_t LocalInnerLoopUnitY; 606610e230b6Smaya uint32_t GlobalResolutionX; 606710e230b6Smaya uint32_t GlobalResolutionY; 606810e230b6Smaya int32_t GlobalStartX; 606910e230b6Smaya int32_t GlobalStartY; 607010e230b6Smaya int32_t GlobalOuterLoopStrideX; 607110e230b6Smaya int32_t GlobalOuterLoopStrideY; 607210e230b6Smaya int32_t GlobalInnerLoopUnitX; 607310e230b6Smaya int32_t GlobalInnerLoopUnitY; 607410e230b6Smaya /* variable length fields follow */ 607510e230b6Smaya}; 607610e230b6Smaya 607796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 607896c5ddc4SrjsGFX75_MEDIA_OBJECT_WALKER_pack(__attribute__((unused)) __gen_user_data *data, 607910e230b6Smaya __attribute__((unused)) void * restrict dst, 608096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_OBJECT_WALKER * restrict values) 608110e230b6Smaya{ 608210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 608310e230b6Smaya 608410e230b6Smaya dw[0] = 608510e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 608610e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 608710e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 608810e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 608910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 609010e230b6Smaya 609110e230b6Smaya dw[1] = 609210e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5); 609310e230b6Smaya 609410e230b6Smaya dw[2] = 609510e230b6Smaya __gen_uint(values->IndirectDataLength, 0, 16) | 609610e230b6Smaya __gen_uint(values->UseScoreboard, 21, 21) | 609710e230b6Smaya __gen_uint(values->ThreadSynchronization, 24, 24) | 609810e230b6Smaya __gen_uint(values->ChildrenPresent, 31, 31); 609910e230b6Smaya 610010e230b6Smaya dw[3] = 610110e230b6Smaya __gen_offset(values->IndirectDataStartAddress, 0, 31); 610210e230b6Smaya 610310e230b6Smaya dw[4] = 0; 610410e230b6Smaya 610510e230b6Smaya dw[5] = 610610e230b6Smaya __gen_uint(values->ScoreboardMask, 0, 7); 610710e230b6Smaya 610810e230b6Smaya dw[6] = 610910e230b6Smaya __gen_sint(values->MidLoopUnitX, 8, 9) | 611010e230b6Smaya __gen_sint(values->LocalMidLoopUnitY, 12, 13) | 611110e230b6Smaya __gen_uint(values->MiddleLoopExtraSteps, 16, 20) | 611210e230b6Smaya __gen_uint(values->ColorCountMinusOne, 24, 27) | 611310e230b6Smaya __gen_uint(values->QuadMode, 29, 29) | 611410e230b6Smaya __gen_uint(values->Repel, 30, 30) | 611510e230b6Smaya __gen_uint(values->DualMode, 31, 31); 611610e230b6Smaya 611710e230b6Smaya dw[7] = 611810e230b6Smaya __gen_uint(values->LocalLoopExecCount, 0, 9) | 611910e230b6Smaya __gen_uint(values->GlobalLoopExecCount, 16, 25); 612010e230b6Smaya 612110e230b6Smaya dw[8] = 612210e230b6Smaya __gen_uint(values->BlockResolutionX, 0, 8) | 612310e230b6Smaya __gen_uint(values->BlockResolutionY, 16, 24); 612410e230b6Smaya 612510e230b6Smaya dw[9] = 612610e230b6Smaya __gen_uint(values->LocalStartX, 0, 8) | 612710e230b6Smaya __gen_uint(values->LocalStartY, 16, 24); 612810e230b6Smaya 612910e230b6Smaya dw[10] = 0; 613010e230b6Smaya 613110e230b6Smaya dw[11] = 613210e230b6Smaya __gen_sint(values->LocalOuterLoopStrideX, 0, 9) | 613310e230b6Smaya __gen_sint(values->LocalOuterLoopStrideY, 16, 25); 613410e230b6Smaya 613510e230b6Smaya dw[12] = 613610e230b6Smaya __gen_sint(values->LocalInnerLoopUnitX, 0, 9) | 613710e230b6Smaya __gen_sint(values->LocalInnerLoopUnitY, 16, 25); 613810e230b6Smaya 613910e230b6Smaya dw[13] = 614010e230b6Smaya __gen_uint(values->GlobalResolutionX, 0, 8) | 614110e230b6Smaya __gen_uint(values->GlobalResolutionY, 16, 24); 614210e230b6Smaya 614310e230b6Smaya dw[14] = 614410e230b6Smaya __gen_sint(values->GlobalStartX, 0, 9) | 614510e230b6Smaya __gen_sint(values->GlobalStartY, 16, 25); 614610e230b6Smaya 614710e230b6Smaya dw[15] = 614810e230b6Smaya __gen_sint(values->GlobalOuterLoopStrideX, 0, 9) | 614910e230b6Smaya __gen_sint(values->GlobalOuterLoopStrideY, 16, 25); 615010e230b6Smaya 615110e230b6Smaya dw[16] = 615210e230b6Smaya __gen_sint(values->GlobalInnerLoopUnitX, 0, 9) | 615310e230b6Smaya __gen_sint(values->GlobalInnerLoopUnitY, 16, 25); 615410e230b6Smaya} 615510e230b6Smaya 615696c5ddc4Srjs#define GFX75_MEDIA_STATE_FLUSH_length 2 615796c5ddc4Srjs#define GFX75_MEDIA_STATE_FLUSH_length_bias 2 615896c5ddc4Srjs#define GFX75_MEDIA_STATE_FLUSH_header \ 615910e230b6Smaya .DWordLength = 0, \ 616010e230b6Smaya .SubOpcode = 4, \ 616110e230b6Smaya .MediaCommandOpcode = 0, \ 616210e230b6Smaya .Pipeline = 2, \ 616310e230b6Smaya .CommandType = 3 616410e230b6Smaya 616596c5ddc4Srjsstruct GFX75_MEDIA_STATE_FLUSH { 616610e230b6Smaya uint32_t DWordLength; 616710e230b6Smaya uint32_t SubOpcode; 616810e230b6Smaya uint32_t MediaCommandOpcode; 616910e230b6Smaya uint32_t Pipeline; 617010e230b6Smaya uint32_t CommandType; 617110e230b6Smaya uint32_t InterfaceDescriptorOffset; 617210e230b6Smaya uint32_t WatermarkRequired; 617310e230b6Smaya bool FlushtoGO; 617410e230b6Smaya bool DisablePreemption; 617510e230b6Smaya}; 617610e230b6Smaya 617796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 617896c5ddc4SrjsGFX75_MEDIA_STATE_FLUSH_pack(__attribute__((unused)) __gen_user_data *data, 617910e230b6Smaya __attribute__((unused)) void * restrict dst, 618096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_STATE_FLUSH * restrict values) 618110e230b6Smaya{ 618210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 618310e230b6Smaya 618410e230b6Smaya dw[0] = 618510e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 618610e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 618710e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 618810e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 618910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 619010e230b6Smaya 619110e230b6Smaya dw[1] = 619210e230b6Smaya __gen_uint(values->InterfaceDescriptorOffset, 0, 5) | 619310e230b6Smaya __gen_uint(values->WatermarkRequired, 6, 6) | 619410e230b6Smaya __gen_uint(values->FlushtoGO, 7, 7) | 619510e230b6Smaya __gen_uint(values->DisablePreemption, 8, 8); 619610e230b6Smaya} 619710e230b6Smaya 619896c5ddc4Srjs#define GFX75_MEDIA_VFE_STATE_length 8 619996c5ddc4Srjs#define GFX75_MEDIA_VFE_STATE_length_bias 2 620096c5ddc4Srjs#define GFX75_MEDIA_VFE_STATE_header \ 620110e230b6Smaya .DWordLength = 6, \ 620210e230b6Smaya .SubOpcode = 0, \ 620310e230b6Smaya .MediaCommandOpcode = 0, \ 620410e230b6Smaya .Pipeline = 2, \ 620510e230b6Smaya .CommandType = 3 620610e230b6Smaya 620796c5ddc4Srjsstruct GFX75_MEDIA_VFE_STATE { 620810e230b6Smaya uint32_t DWordLength; 620910e230b6Smaya uint32_t SubOpcode; 621010e230b6Smaya uint32_t MediaCommandOpcode; 621110e230b6Smaya uint32_t Pipeline; 621210e230b6Smaya uint32_t CommandType; 621310e230b6Smaya uint32_t PerThreadScratchSpace; 621410e230b6Smaya uint32_t StackSize; 621510e230b6Smaya __gen_address_type ScratchSpaceBasePointer; 621696c5ddc4Srjs bool GPGPUMode; 621710e230b6Smaya uint32_t BypassGatewayControl; 621810e230b6Smaya#define MaintainingOpenGatewayForwardMsgCloseGatewayprotocollegacymode 0 621910e230b6Smaya#define BypassingOpenGatewayCloseGatewayprotocol 1 622010e230b6Smaya uint32_t ResetGatewayTimer; 622110e230b6Smaya#define Maintainingtheexistingtimestampstate 0 622210e230b6Smaya#define Resettingrelativetimerandlatchingtheglobaltimestamp 1 622310e230b6Smaya uint32_t NumberofURBEntries; 622410e230b6Smaya uint32_t MaximumNumberofThreads; 622510e230b6Smaya uint32_t HalfSliceDisable; 622610e230b6Smaya uint32_t CURBEAllocationSize; 622710e230b6Smaya uint32_t URBEntryAllocationSize; 622810e230b6Smaya uint32_t ScoreboardMask; 622910e230b6Smaya uint32_t ScoreboardType; 623010e230b6Smaya#define StallingScoreboard 0 623110e230b6Smaya#define NonStallingScoreboard 1 623210e230b6Smaya uint32_t ScoreboardEnable; 623310e230b6Smaya#define Scoreboarddisabled 0 623410e230b6Smaya#define Scoreboardenabled 1 623510e230b6Smaya int32_t Scoreboard0DeltaX; 623610e230b6Smaya int32_t Scoreboard0DeltaY; 623710e230b6Smaya int32_t Scoreboard1DeltaX; 623810e230b6Smaya int32_t Scoreboard1DeltaY; 623910e230b6Smaya int32_t Scoreboard2DeltaX; 624010e230b6Smaya int32_t Scoreboard2DeltaY; 624110e230b6Smaya int32_t Scoreboard3DeltaX; 624210e230b6Smaya int32_t Scoreboard3DeltaY; 624310e230b6Smaya int32_t Scoreboard4DeltaX; 624410e230b6Smaya int32_t Scoreboard4DeltaY; 624510e230b6Smaya int32_t Scoreboard5DeltaX; 624610e230b6Smaya int32_t Scoreboard5DeltaY; 624710e230b6Smaya int32_t Scoreboard6DeltaX; 624810e230b6Smaya int32_t Scoreboard6DeltaY; 624910e230b6Smaya int32_t Scoreboard7DeltaX; 625010e230b6Smaya int32_t Scoreboard7DeltaY; 625110e230b6Smaya}; 625210e230b6Smaya 625396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 625496c5ddc4SrjsGFX75_MEDIA_VFE_STATE_pack(__attribute__((unused)) __gen_user_data *data, 625510e230b6Smaya __attribute__((unused)) void * restrict dst, 625696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MEDIA_VFE_STATE * restrict values) 625710e230b6Smaya{ 625810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 625910e230b6Smaya 626010e230b6Smaya dw[0] = 626110e230b6Smaya __gen_uint(values->DWordLength, 0, 15) | 626210e230b6Smaya __gen_uint(values->SubOpcode, 16, 23) | 626310e230b6Smaya __gen_uint(values->MediaCommandOpcode, 24, 26) | 626410e230b6Smaya __gen_uint(values->Pipeline, 27, 28) | 626510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 626610e230b6Smaya 626710e230b6Smaya const uint32_t v1 = 626810e230b6Smaya __gen_uint(values->PerThreadScratchSpace, 0, 3) | 626910e230b6Smaya __gen_uint(values->StackSize, 4, 7); 627096c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->ScratchSpaceBasePointer, v1, 10, 31); 627110e230b6Smaya 627210e230b6Smaya dw[2] = 627310e230b6Smaya __gen_uint(values->GPGPUMode, 2, 2) | 627410e230b6Smaya __gen_uint(values->BypassGatewayControl, 6, 6) | 627510e230b6Smaya __gen_uint(values->ResetGatewayTimer, 7, 7) | 627610e230b6Smaya __gen_uint(values->NumberofURBEntries, 8, 15) | 627710e230b6Smaya __gen_uint(values->MaximumNumberofThreads, 16, 31); 627810e230b6Smaya 627910e230b6Smaya dw[3] = 628010e230b6Smaya __gen_uint(values->HalfSliceDisable, 0, 1); 628110e230b6Smaya 628210e230b6Smaya dw[4] = 628310e230b6Smaya __gen_uint(values->CURBEAllocationSize, 0, 15) | 628410e230b6Smaya __gen_uint(values->URBEntryAllocationSize, 16, 31); 628510e230b6Smaya 628610e230b6Smaya dw[5] = 628710e230b6Smaya __gen_uint(values->ScoreboardMask, 0, 7) | 628810e230b6Smaya __gen_uint(values->ScoreboardType, 30, 30) | 628910e230b6Smaya __gen_uint(values->ScoreboardEnable, 31, 31); 629010e230b6Smaya 629110e230b6Smaya dw[6] = 629210e230b6Smaya __gen_sint(values->Scoreboard0DeltaX, 0, 3) | 629310e230b6Smaya __gen_sint(values->Scoreboard0DeltaY, 4, 7) | 629410e230b6Smaya __gen_sint(values->Scoreboard1DeltaX, 8, 11) | 629510e230b6Smaya __gen_sint(values->Scoreboard1DeltaY, 12, 15) | 629610e230b6Smaya __gen_sint(values->Scoreboard2DeltaX, 16, 19) | 629710e230b6Smaya __gen_sint(values->Scoreboard2DeltaY, 20, 23) | 629810e230b6Smaya __gen_sint(values->Scoreboard3DeltaX, 24, 27) | 629910e230b6Smaya __gen_sint(values->Scoreboard3DeltaY, 28, 31); 630010e230b6Smaya 630110e230b6Smaya dw[7] = 630210e230b6Smaya __gen_sint(values->Scoreboard4DeltaX, 0, 3) | 630310e230b6Smaya __gen_sint(values->Scoreboard4DeltaY, 4, 7) | 630410e230b6Smaya __gen_sint(values->Scoreboard5DeltaX, 8, 11) | 630510e230b6Smaya __gen_sint(values->Scoreboard5DeltaY, 12, 15) | 630610e230b6Smaya __gen_sint(values->Scoreboard6DeltaX, 16, 19) | 630710e230b6Smaya __gen_sint(values->Scoreboard6DeltaY, 20, 23) | 630810e230b6Smaya __gen_sint(values->Scoreboard7DeltaX, 24, 27) | 630910e230b6Smaya __gen_sint(values->Scoreboard7DeltaY, 28, 31); 631010e230b6Smaya} 631110e230b6Smaya 631296c5ddc4Srjs#define GFX75_MI_ARB_CHECK_length 1 631396c5ddc4Srjs#define GFX75_MI_ARB_CHECK_length_bias 1 631496c5ddc4Srjs#define GFX75_MI_ARB_CHECK_header \ 631510e230b6Smaya .MICommandOpcode = 5, \ 631610e230b6Smaya .CommandType = 0 631710e230b6Smaya 631896c5ddc4Srjsstruct GFX75_MI_ARB_CHECK { 631910e230b6Smaya uint32_t MICommandOpcode; 632010e230b6Smaya uint32_t CommandType; 632110e230b6Smaya}; 632210e230b6Smaya 632396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 632496c5ddc4SrjsGFX75_MI_ARB_CHECK_pack(__attribute__((unused)) __gen_user_data *data, 632510e230b6Smaya __attribute__((unused)) void * restrict dst, 632696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_ARB_CHECK * restrict values) 632710e230b6Smaya{ 632810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 632910e230b6Smaya 633010e230b6Smaya dw[0] = 633110e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 633210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 633310e230b6Smaya} 633410e230b6Smaya 633596c5ddc4Srjs#define GFX75_MI_ARB_ON_OFF_length 1 633696c5ddc4Srjs#define GFX75_MI_ARB_ON_OFF_length_bias 1 633796c5ddc4Srjs#define GFX75_MI_ARB_ON_OFF_header \ 633810e230b6Smaya .MICommandOpcode = 8, \ 633910e230b6Smaya .CommandType = 0 634010e230b6Smaya 634196c5ddc4Srjsstruct GFX75_MI_ARB_ON_OFF { 634210e230b6Smaya bool ArbitrationEnable; 634310e230b6Smaya uint32_t MICommandOpcode; 634410e230b6Smaya uint32_t CommandType; 634510e230b6Smaya}; 634610e230b6Smaya 634796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 634896c5ddc4SrjsGFX75_MI_ARB_ON_OFF_pack(__attribute__((unused)) __gen_user_data *data, 634910e230b6Smaya __attribute__((unused)) void * restrict dst, 635096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_ARB_ON_OFF * restrict values) 635110e230b6Smaya{ 635210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 635310e230b6Smaya 635410e230b6Smaya dw[0] = 635510e230b6Smaya __gen_uint(values->ArbitrationEnable, 0, 0) | 635610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 635710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 635810e230b6Smaya} 635910e230b6Smaya 636096c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_END_length 1 636196c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_END_length_bias 1 636296c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_END_header \ 636310e230b6Smaya .MICommandOpcode = 10, \ 636410e230b6Smaya .CommandType = 0 636510e230b6Smaya 636696c5ddc4Srjsstruct GFX75_MI_BATCH_BUFFER_END { 636710e230b6Smaya uint32_t MICommandOpcode; 636810e230b6Smaya uint32_t CommandType; 636910e230b6Smaya}; 637010e230b6Smaya 637196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 637296c5ddc4SrjsGFX75_MI_BATCH_BUFFER_END_pack(__attribute__((unused)) __gen_user_data *data, 637310e230b6Smaya __attribute__((unused)) void * restrict dst, 637496c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_BATCH_BUFFER_END * restrict values) 637510e230b6Smaya{ 637610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 637710e230b6Smaya 637810e230b6Smaya dw[0] = 637910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 638010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 638110e230b6Smaya} 638210e230b6Smaya 638396c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_START_length 2 638496c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_START_length_bias 2 638596c5ddc4Srjs#define GFX75_MI_BATCH_BUFFER_START_header \ 638610e230b6Smaya .DWordLength = 0, \ 638710e230b6Smaya .MICommandOpcode = 49, \ 638810e230b6Smaya .CommandType = 0 638910e230b6Smaya 639096c5ddc4Srjsstruct GFX75_MI_BATCH_BUFFER_START { 639110e230b6Smaya uint32_t DWordLength; 639210e230b6Smaya uint32_t AddressSpaceIndicator; 639310e230b6Smaya#define ASI_GGTT 0 639410e230b6Smaya#define ASI_PPGTT 1 639510e230b6Smaya bool ResourceStreamerEnable; 639610e230b6Smaya bool ClearCommandBufferEnable; 639710e230b6Smaya bool NonPrivileged; 639810e230b6Smaya bool PredicationEnable; 639910e230b6Smaya bool AddOffsetEnable; 640010e230b6Smaya uint32_t SecondLevelBatchBuffer; 640110e230b6Smaya#define Firstlevelbatch 0 640210e230b6Smaya#define Secondlevelbatch 1 640310e230b6Smaya uint32_t MICommandOpcode; 640410e230b6Smaya uint32_t CommandType; 640510e230b6Smaya __gen_address_type BatchBufferStartAddress; 640610e230b6Smaya}; 640710e230b6Smaya 640896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 640996c5ddc4SrjsGFX75_MI_BATCH_BUFFER_START_pack(__attribute__((unused)) __gen_user_data *data, 641010e230b6Smaya __attribute__((unused)) void * restrict dst, 641196c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_BATCH_BUFFER_START * restrict values) 641210e230b6Smaya{ 641310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 641410e230b6Smaya 641510e230b6Smaya dw[0] = 641610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 641710e230b6Smaya __gen_uint(values->AddressSpaceIndicator, 8, 8) | 641810e230b6Smaya __gen_uint(values->ResourceStreamerEnable, 10, 10) | 641910e230b6Smaya __gen_uint(values->ClearCommandBufferEnable, 11, 11) | 642010e230b6Smaya __gen_uint(values->NonPrivileged, 13, 13) | 642110e230b6Smaya __gen_uint(values->PredicationEnable, 15, 15) | 642210e230b6Smaya __gen_uint(values->AddOffsetEnable, 16, 16) | 642310e230b6Smaya __gen_uint(values->SecondLevelBatchBuffer, 22, 22) | 642410e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 642510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 642610e230b6Smaya 642796c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->BatchBufferStartAddress, 0, 2, 31); 642810e230b6Smaya} 642910e230b6Smaya 643096c5ddc4Srjs#define GFX75_MI_CLFLUSH_length_bias 2 643196c5ddc4Srjs#define GFX75_MI_CLFLUSH_header \ 643210e230b6Smaya .DWordLength = 1, \ 643310e230b6Smaya .MICommandOpcode = 39, \ 643410e230b6Smaya .CommandType = 0 643510e230b6Smaya 643696c5ddc4Srjsstruct GFX75_MI_CLFLUSH { 643710e230b6Smaya uint32_t DWordLength; 643810e230b6Smaya bool UseGlobalGTT; 643910e230b6Smaya uint32_t MICommandOpcode; 644010e230b6Smaya uint32_t CommandType; 644110e230b6Smaya uint32_t StartingCachelineOffset; 644210e230b6Smaya __gen_address_type PageBaseAddress; 644310e230b6Smaya __gen_address_type PageBaseAddressHigh; 644410e230b6Smaya /* variable length fields follow */ 644510e230b6Smaya}; 644610e230b6Smaya 644796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 644896c5ddc4SrjsGFX75_MI_CLFLUSH_pack(__attribute__((unused)) __gen_user_data *data, 644910e230b6Smaya __attribute__((unused)) void * restrict dst, 645096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_CLFLUSH * restrict values) 645110e230b6Smaya{ 645210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 645310e230b6Smaya 645410e230b6Smaya dw[0] = 645510e230b6Smaya __gen_uint(values->DWordLength, 0, 9) | 645610e230b6Smaya __gen_uint(values->UseGlobalGTT, 22, 22) | 645710e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 645810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 645910e230b6Smaya 646010e230b6Smaya const uint32_t v1 = 646110e230b6Smaya __gen_uint(values->StartingCachelineOffset, 6, 11); 646296c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->PageBaseAddress, v1, 12, 31); 646310e230b6Smaya 646496c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->PageBaseAddressHigh, 0, 0, 15); 646510e230b6Smaya} 646610e230b6Smaya 646796c5ddc4Srjs#define GFX75_MI_CONDITIONAL_BATCH_BUFFER_END_length 2 646896c5ddc4Srjs#define GFX75_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 2 646996c5ddc4Srjs#define GFX75_MI_CONDITIONAL_BATCH_BUFFER_END_header\ 647010e230b6Smaya .DWordLength = 0, \ 647110e230b6Smaya .CompareSemaphore = 0, \ 647210e230b6Smaya .MICommandOpcode = 54, \ 647310e230b6Smaya .CommandType = 0 647410e230b6Smaya 647596c5ddc4Srjsstruct GFX75_MI_CONDITIONAL_BATCH_BUFFER_END { 647610e230b6Smaya uint32_t DWordLength; 647710e230b6Smaya uint32_t CompareSemaphore; 647810e230b6Smaya bool UseGlobalGTT; 647910e230b6Smaya uint32_t MICommandOpcode; 648010e230b6Smaya uint32_t CommandType; 648110e230b6Smaya uint32_t CompareDataDword; 648210e230b6Smaya __gen_address_type CompareAddress; 648310e230b6Smaya}; 648410e230b6Smaya 648596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 648696c5ddc4SrjsGFX75_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__attribute__((unused)) __gen_user_data *data, 648710e230b6Smaya __attribute__((unused)) void * restrict dst, 648896c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values) 648910e230b6Smaya{ 649010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 649110e230b6Smaya 649210e230b6Smaya dw[0] = 649310e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 649410e230b6Smaya __gen_uint(values->CompareSemaphore, 21, 21) | 649510e230b6Smaya __gen_uint(values->UseGlobalGTT, 22, 22) | 649610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 649710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 649810e230b6Smaya 649910e230b6Smaya dw[1] = 650010e230b6Smaya __gen_uint(values->CompareDataDword, 0, 31); 650110e230b6Smaya} 650210e230b6Smaya 650396c5ddc4Srjs#define GFX75_MI_FLUSH_length 1 650496c5ddc4Srjs#define GFX75_MI_FLUSH_length_bias 1 650596c5ddc4Srjs#define GFX75_MI_FLUSH_header \ 650610e230b6Smaya .MICommandOpcode = 4, \ 650710e230b6Smaya .CommandType = 0 650810e230b6Smaya 650996c5ddc4Srjsstruct GFX75_MI_FLUSH { 651010e230b6Smaya uint32_t StateInstructionCacheInvalidate; 651110e230b6Smaya#define DontInvalidate 0 651210e230b6Smaya#define Invalidate 1 651310e230b6Smaya uint32_t RenderCacheFlushInhibit; 651410e230b6Smaya#define Flush 0 651510e230b6Smaya#define DontFlush 1 651610e230b6Smaya uint32_t GlobalSnapshotCountReset; 651710e230b6Smaya#define DontReset 0 651810e230b6Smaya#define Reset 1 651910e230b6Smaya bool GenericMediaStateClear; 652010e230b6Smaya bool IndirectStatePointersDisable; 652110e230b6Smaya uint32_t MICommandOpcode; 652210e230b6Smaya uint32_t CommandType; 652310e230b6Smaya}; 652410e230b6Smaya 652596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 652696c5ddc4SrjsGFX75_MI_FLUSH_pack(__attribute__((unused)) __gen_user_data *data, 652710e230b6Smaya __attribute__((unused)) void * restrict dst, 652896c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_FLUSH * restrict values) 652910e230b6Smaya{ 653010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 653110e230b6Smaya 653210e230b6Smaya dw[0] = 653310e230b6Smaya __gen_uint(values->StateInstructionCacheInvalidate, 1, 1) | 653410e230b6Smaya __gen_uint(values->RenderCacheFlushInhibit, 2, 2) | 653510e230b6Smaya __gen_uint(values->GlobalSnapshotCountReset, 3, 3) | 653610e230b6Smaya __gen_uint(values->GenericMediaStateClear, 4, 4) | 653710e230b6Smaya __gen_uint(values->IndirectStatePointersDisable, 5, 5) | 653810e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 653910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 654010e230b6Smaya} 654110e230b6Smaya 654296c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_IMM_length 3 654396c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_IMM_length_bias 2 654496c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_IMM_header \ 654510e230b6Smaya .DWordLength = 1, \ 654610e230b6Smaya .MICommandOpcode = 34, \ 654710e230b6Smaya .CommandType = 0 654810e230b6Smaya 654996c5ddc4Srjsstruct GFX75_MI_LOAD_REGISTER_IMM { 655010e230b6Smaya uint32_t DWordLength; 655110e230b6Smaya uint32_t ByteWriteDisables; 655210e230b6Smaya uint32_t MICommandOpcode; 655310e230b6Smaya uint32_t CommandType; 655410e230b6Smaya uint64_t RegisterOffset; 655510e230b6Smaya uint32_t DataDWord; 655610e230b6Smaya /* variable length fields follow */ 655710e230b6Smaya}; 655810e230b6Smaya 655996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 656096c5ddc4SrjsGFX75_MI_LOAD_REGISTER_IMM_pack(__attribute__((unused)) __gen_user_data *data, 656110e230b6Smaya __attribute__((unused)) void * restrict dst, 656296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_REGISTER_IMM * restrict values) 656310e230b6Smaya{ 656410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 656510e230b6Smaya 656610e230b6Smaya dw[0] = 656710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 656810e230b6Smaya __gen_uint(values->ByteWriteDisables, 8, 11) | 656910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 657010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 657110e230b6Smaya 657210e230b6Smaya dw[1] = 657310e230b6Smaya __gen_offset(values->RegisterOffset, 2, 22); 657410e230b6Smaya 657510e230b6Smaya dw[2] = 657610e230b6Smaya __gen_uint(values->DataDWord, 0, 31); 657710e230b6Smaya} 657810e230b6Smaya 657996c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_MEM_length 3 658096c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_MEM_length_bias 2 658196c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_MEM_header \ 658210e230b6Smaya .DWordLength = 1, \ 658310e230b6Smaya .MICommandOpcode = 41, \ 658410e230b6Smaya .CommandType = 0 658510e230b6Smaya 658696c5ddc4Srjsstruct GFX75_MI_LOAD_REGISTER_MEM { 658710e230b6Smaya uint32_t DWordLength; 658810e230b6Smaya bool AsyncModeEnable; 658910e230b6Smaya bool UseGlobalGTT; 659010e230b6Smaya uint32_t MICommandOpcode; 659110e230b6Smaya uint32_t CommandType; 659210e230b6Smaya uint64_t RegisterAddress; 659310e230b6Smaya __gen_address_type MemoryAddress; 659410e230b6Smaya}; 659510e230b6Smaya 659696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 659796c5ddc4SrjsGFX75_MI_LOAD_REGISTER_MEM_pack(__attribute__((unused)) __gen_user_data *data, 659810e230b6Smaya __attribute__((unused)) void * restrict dst, 659996c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_REGISTER_MEM * restrict values) 660010e230b6Smaya{ 660110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 660210e230b6Smaya 660310e230b6Smaya dw[0] = 660410e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 660510e230b6Smaya __gen_uint(values->AsyncModeEnable, 21, 21) | 660610e230b6Smaya __gen_uint(values->UseGlobalGTT, 22, 22) | 660710e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 660810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 660910e230b6Smaya 661010e230b6Smaya dw[1] = 661110e230b6Smaya __gen_offset(values->RegisterAddress, 2, 22); 661210e230b6Smaya 661396c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->MemoryAddress, 0, 2, 31); 661410e230b6Smaya} 661510e230b6Smaya 661696c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_REG_length 3 661796c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_REG_length_bias 2 661896c5ddc4Srjs#define GFX75_MI_LOAD_REGISTER_REG_header \ 661910e230b6Smaya .DWordLength = 1, \ 662010e230b6Smaya .MICommandOpcode = 42, \ 662110e230b6Smaya .CommandType = 0 662210e230b6Smaya 662396c5ddc4Srjsstruct GFX75_MI_LOAD_REGISTER_REG { 662410e230b6Smaya uint32_t DWordLength; 662510e230b6Smaya uint32_t MICommandOpcode; 662610e230b6Smaya uint32_t CommandType; 662710e230b6Smaya uint64_t SourceRegisterAddress; 662810e230b6Smaya uint64_t DestinationRegisterAddress; 662910e230b6Smaya}; 663010e230b6Smaya 663196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 663296c5ddc4SrjsGFX75_MI_LOAD_REGISTER_REG_pack(__attribute__((unused)) __gen_user_data *data, 663310e230b6Smaya __attribute__((unused)) void * restrict dst, 663496c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_REGISTER_REG * restrict values) 663510e230b6Smaya{ 663610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 663710e230b6Smaya 663810e230b6Smaya dw[0] = 663910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 664010e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 664110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 664210e230b6Smaya 664310e230b6Smaya dw[1] = 664410e230b6Smaya __gen_offset(values->SourceRegisterAddress, 2, 22); 664510e230b6Smaya 664610e230b6Smaya dw[2] = 664710e230b6Smaya __gen_offset(values->DestinationRegisterAddress, 2, 22); 664810e230b6Smaya} 664910e230b6Smaya 665096c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_EXCL_length 2 665196c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_EXCL_length_bias 2 665296c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_EXCL_header \ 665310e230b6Smaya .DWordLength = 0, \ 665410e230b6Smaya .MICommandOpcode = 19, \ 665510e230b6Smaya .CommandType = 0 665610e230b6Smaya 665796c5ddc4Srjsstruct GFX75_MI_LOAD_SCAN_LINES_EXCL { 665810e230b6Smaya uint32_t DWordLength; 665910e230b6Smaya uint32_t DisplayPlaneSelect; 666010e230b6Smaya#define DisplayPlaneA 0 666110e230b6Smaya#define DisplayPlaneB 1 666210e230b6Smaya#define DisplayPlaneC 4 666310e230b6Smaya uint32_t MICommandOpcode; 666410e230b6Smaya uint32_t CommandType; 666510e230b6Smaya uint32_t EndScanLineNumber; 666610e230b6Smaya uint32_t StartScanLineNumber; 666710e230b6Smaya}; 666810e230b6Smaya 666996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 667096c5ddc4SrjsGFX75_MI_LOAD_SCAN_LINES_EXCL_pack(__attribute__((unused)) __gen_user_data *data, 667110e230b6Smaya __attribute__((unused)) void * restrict dst, 667296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_SCAN_LINES_EXCL * restrict values) 667310e230b6Smaya{ 667410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 667510e230b6Smaya 667610e230b6Smaya dw[0] = 667710e230b6Smaya __gen_uint(values->DWordLength, 0, 5) | 667810e230b6Smaya __gen_uint(values->DisplayPlaneSelect, 19, 21) | 667910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 668010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 668110e230b6Smaya 668210e230b6Smaya dw[1] = 668310e230b6Smaya __gen_uint(values->EndScanLineNumber, 0, 12) | 668410e230b6Smaya __gen_uint(values->StartScanLineNumber, 16, 28); 668510e230b6Smaya} 668610e230b6Smaya 668796c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_INCL_length 2 668896c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_INCL_length_bias 2 668996c5ddc4Srjs#define GFX75_MI_LOAD_SCAN_LINES_INCL_header \ 669010e230b6Smaya .DWordLength = 0, \ 669110e230b6Smaya .MICommandOpcode = 18, \ 669210e230b6Smaya .CommandType = 0 669310e230b6Smaya 669496c5ddc4Srjsstruct GFX75_MI_LOAD_SCAN_LINES_INCL { 669510e230b6Smaya uint32_t DWordLength; 669610e230b6Smaya uint32_t DisplayPlaneSelect; 669710e230b6Smaya#define DisplayPlaneA 0 669810e230b6Smaya#define DisplayPlaneB 1 669910e230b6Smaya#define DisplayPlaneC 4 670010e230b6Smaya uint32_t MICommandOpcode; 670110e230b6Smaya uint32_t CommandType; 670210e230b6Smaya uint32_t EndScanLineNumber; 670310e230b6Smaya uint32_t StartScanLineNumber; 670410e230b6Smaya}; 670510e230b6Smaya 670696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 670796c5ddc4SrjsGFX75_MI_LOAD_SCAN_LINES_INCL_pack(__attribute__((unused)) __gen_user_data *data, 670810e230b6Smaya __attribute__((unused)) void * restrict dst, 670996c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_SCAN_LINES_INCL * restrict values) 671010e230b6Smaya{ 671110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 671210e230b6Smaya 671310e230b6Smaya dw[0] = 671410e230b6Smaya __gen_uint(values->DWordLength, 0, 5) | 671510e230b6Smaya __gen_uint(values->DisplayPlaneSelect, 19, 21) | 671610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 671710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 671810e230b6Smaya 671910e230b6Smaya dw[1] = 672010e230b6Smaya __gen_uint(values->EndScanLineNumber, 0, 12) | 672110e230b6Smaya __gen_uint(values->StartScanLineNumber, 16, 28); 672210e230b6Smaya} 672310e230b6Smaya 672496c5ddc4Srjs#define GFX75_MI_LOAD_URB_MEM_length 3 672596c5ddc4Srjs#define GFX75_MI_LOAD_URB_MEM_length_bias 2 672696c5ddc4Srjs#define GFX75_MI_LOAD_URB_MEM_header \ 672710e230b6Smaya .DWordLength = 1, \ 672810e230b6Smaya .MICommandOpcode = 44, \ 672910e230b6Smaya .CommandType = 0 673010e230b6Smaya 673196c5ddc4Srjsstruct GFX75_MI_LOAD_URB_MEM { 673210e230b6Smaya uint32_t DWordLength; 673310e230b6Smaya uint32_t MICommandOpcode; 673410e230b6Smaya uint32_t CommandType; 673510e230b6Smaya uint32_t URBAddress; 673610e230b6Smaya __gen_address_type MemoryAddress; 673710e230b6Smaya}; 673810e230b6Smaya 673996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 674096c5ddc4SrjsGFX75_MI_LOAD_URB_MEM_pack(__attribute__((unused)) __gen_user_data *data, 674110e230b6Smaya __attribute__((unused)) void * restrict dst, 674296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_LOAD_URB_MEM * restrict values) 674310e230b6Smaya{ 674410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 674510e230b6Smaya 674610e230b6Smaya dw[0] = 674710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 674810e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 674910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 675010e230b6Smaya 675110e230b6Smaya dw[1] = 675210e230b6Smaya __gen_uint(values->URBAddress, 2, 14); 675310e230b6Smaya 675496c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->MemoryAddress, 0, 6, 31); 675510e230b6Smaya} 675610e230b6Smaya 675796c5ddc4Srjs#define GFX75_MI_MATH_length_bias 2 675896c5ddc4Srjs#define GFX75_MI_MATH_header \ 675910e230b6Smaya .DWordLength = 0, \ 676010e230b6Smaya .MICommandOpcode = 26, \ 676110e230b6Smaya .CommandType = 0 676210e230b6Smaya 676396c5ddc4Srjsstruct GFX75_MI_MATH { 676410e230b6Smaya uint32_t DWordLength; 676510e230b6Smaya uint32_t MICommandOpcode; 676610e230b6Smaya uint32_t CommandType; 676710e230b6Smaya /* variable length fields follow */ 676810e230b6Smaya}; 676910e230b6Smaya 677096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 677196c5ddc4SrjsGFX75_MI_MATH_pack(__attribute__((unused)) __gen_user_data *data, 677210e230b6Smaya __attribute__((unused)) void * restrict dst, 677396c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_MATH * restrict values) 677410e230b6Smaya{ 677510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 677610e230b6Smaya 677710e230b6Smaya dw[0] = 677810e230b6Smaya __gen_uint(values->DWordLength, 0, 5) | 677910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 678010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 678110e230b6Smaya} 678210e230b6Smaya 678396c5ddc4Srjs#define GFX75_MI_NOOP_length 1 678496c5ddc4Srjs#define GFX75_MI_NOOP_length_bias 1 678596c5ddc4Srjs#define GFX75_MI_NOOP_header \ 678610e230b6Smaya .MICommandOpcode = 0, \ 678710e230b6Smaya .CommandType = 0 678810e230b6Smaya 678996c5ddc4Srjsstruct GFX75_MI_NOOP { 679010e230b6Smaya uint32_t IdentificationNumber; 679110e230b6Smaya bool IdentificationNumberRegisterWriteEnable; 679210e230b6Smaya uint32_t MICommandOpcode; 679310e230b6Smaya uint32_t CommandType; 679410e230b6Smaya}; 679510e230b6Smaya 679696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 679796c5ddc4SrjsGFX75_MI_NOOP_pack(__attribute__((unused)) __gen_user_data *data, 679810e230b6Smaya __attribute__((unused)) void * restrict dst, 679996c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_NOOP * restrict values) 680010e230b6Smaya{ 680110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 680210e230b6Smaya 680310e230b6Smaya dw[0] = 680410e230b6Smaya __gen_uint(values->IdentificationNumber, 0, 21) | 680510e230b6Smaya __gen_uint(values->IdentificationNumberRegisterWriteEnable, 22, 22) | 680610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 680710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 680810e230b6Smaya} 680910e230b6Smaya 681096c5ddc4Srjs#define GFX75_MI_PREDICATE_length 1 681196c5ddc4Srjs#define GFX75_MI_PREDICATE_length_bias 1 681296c5ddc4Srjs#define GFX75_MI_PREDICATE_header \ 681310e230b6Smaya .MICommandOpcode = 12, \ 681410e230b6Smaya .CommandType = 0 681510e230b6Smaya 681696c5ddc4Srjsstruct GFX75_MI_PREDICATE { 681710e230b6Smaya uint32_t CompareOperation; 681810e230b6Smaya#define COMPARE_TRUE 0 681910e230b6Smaya#define COMPARE_FALSE 1 682010e230b6Smaya#define COMPARE_SRCS_EQUAL 2 682110e230b6Smaya#define COMPARE_DELTAS_EQUAL 3 682210e230b6Smaya uint32_t CombineOperation; 682310e230b6Smaya#define COMBINE_SET 0 682410e230b6Smaya#define COMBINE_AND 1 682510e230b6Smaya#define COMBINE_OR 2 682610e230b6Smaya#define COMBINE_XOR 3 682710e230b6Smaya uint32_t LoadOperation; 682810e230b6Smaya#define LOAD_KEEP 0 682910e230b6Smaya#define LOAD_LOAD 2 683010e230b6Smaya#define LOAD_LOADINV 3 683110e230b6Smaya uint32_t MICommandOpcode; 683210e230b6Smaya uint32_t CommandType; 683310e230b6Smaya}; 683410e230b6Smaya 683596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 683696c5ddc4SrjsGFX75_MI_PREDICATE_pack(__attribute__((unused)) __gen_user_data *data, 683710e230b6Smaya __attribute__((unused)) void * restrict dst, 683896c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_PREDICATE * restrict values) 683910e230b6Smaya{ 684010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 684110e230b6Smaya 684210e230b6Smaya dw[0] = 684310e230b6Smaya __gen_uint(values->CompareOperation, 0, 1) | 684410e230b6Smaya __gen_uint(values->CombineOperation, 3, 4) | 684510e230b6Smaya __gen_uint(values->LoadOperation, 6, 7) | 684610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 684710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 684810e230b6Smaya} 684910e230b6Smaya 685096c5ddc4Srjs#define GFX75_MI_REPORT_HEAD_length 1 685196c5ddc4Srjs#define GFX75_MI_REPORT_HEAD_length_bias 1 685296c5ddc4Srjs#define GFX75_MI_REPORT_HEAD_header \ 685310e230b6Smaya .MICommandOpcode = 7, \ 685410e230b6Smaya .CommandType = 0 685510e230b6Smaya 685696c5ddc4Srjsstruct GFX75_MI_REPORT_HEAD { 685710e230b6Smaya uint32_t MICommandOpcode; 685810e230b6Smaya uint32_t CommandType; 685910e230b6Smaya}; 686010e230b6Smaya 686196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 686296c5ddc4SrjsGFX75_MI_REPORT_HEAD_pack(__attribute__((unused)) __gen_user_data *data, 686310e230b6Smaya __attribute__((unused)) void * restrict dst, 686496c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_REPORT_HEAD * restrict values) 686510e230b6Smaya{ 686610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 686710e230b6Smaya 686810e230b6Smaya dw[0] = 686910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 687010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 687110e230b6Smaya} 687210e230b6Smaya 687396c5ddc4Srjs#define GFX75_MI_REPORT_PERF_COUNT_length 3 687496c5ddc4Srjs#define GFX75_MI_REPORT_PERF_COUNT_length_bias 2 687596c5ddc4Srjs#define GFX75_MI_REPORT_PERF_COUNT_header \ 687610e230b6Smaya .DWordLength = 1, \ 687710e230b6Smaya .MICommandOpcode = 40, \ 687810e230b6Smaya .CommandType = 0 687910e230b6Smaya 688096c5ddc4Srjsstruct GFX75_MI_REPORT_PERF_COUNT { 688110e230b6Smaya uint32_t DWordLength; 688210e230b6Smaya uint32_t MICommandOpcode; 688310e230b6Smaya uint32_t CommandType; 688410e230b6Smaya bool UseGlobalGTT; 688510e230b6Smaya uint32_t CoreModeEnable; 688610e230b6Smaya __gen_address_type MemoryAddress; 688710e230b6Smaya uint32_t ReportID; 688810e230b6Smaya}; 688910e230b6Smaya 689096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 689196c5ddc4SrjsGFX75_MI_REPORT_PERF_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 689210e230b6Smaya __attribute__((unused)) void * restrict dst, 689396c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_REPORT_PERF_COUNT * restrict values) 689410e230b6Smaya{ 689510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 689610e230b6Smaya 689710e230b6Smaya dw[0] = 689810e230b6Smaya __gen_uint(values->DWordLength, 0, 5) | 689910e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 690010e230b6Smaya __gen_uint(values->CommandType, 29, 31); 690110e230b6Smaya 690210e230b6Smaya const uint32_t v1 = 690310e230b6Smaya __gen_uint(values->UseGlobalGTT, 0, 0) | 690410e230b6Smaya __gen_uint(values->CoreModeEnable, 4, 4); 690596c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->MemoryAddress, v1, 6, 31); 690610e230b6Smaya 690710e230b6Smaya dw[2] = 690810e230b6Smaya __gen_uint(values->ReportID, 0, 31); 690910e230b6Smaya} 691010e230b6Smaya 691196c5ddc4Srjs#define GFX75_MI_RS_CONTEXT_length 1 691296c5ddc4Srjs#define GFX75_MI_RS_CONTEXT_length_bias 1 691396c5ddc4Srjs#define GFX75_MI_RS_CONTEXT_header \ 691410e230b6Smaya .MICommandOpcode = 15, \ 691510e230b6Smaya .CommandType = 0 691610e230b6Smaya 691796c5ddc4Srjsstruct GFX75_MI_RS_CONTEXT { 691810e230b6Smaya uint32_t ResourceStreamerSave; 691910e230b6Smaya#define RS_Restore 0 692010e230b6Smaya#define RS_Save 1 692110e230b6Smaya uint32_t MICommandOpcode; 692210e230b6Smaya uint32_t CommandType; 692310e230b6Smaya}; 692410e230b6Smaya 692596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 692696c5ddc4SrjsGFX75_MI_RS_CONTEXT_pack(__attribute__((unused)) __gen_user_data *data, 692710e230b6Smaya __attribute__((unused)) void * restrict dst, 692896c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_RS_CONTEXT * restrict values) 692910e230b6Smaya{ 693010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 693110e230b6Smaya 693210e230b6Smaya dw[0] = 693310e230b6Smaya __gen_uint(values->ResourceStreamerSave, 0, 0) | 693410e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 693510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 693610e230b6Smaya} 693710e230b6Smaya 693896c5ddc4Srjs#define GFX75_MI_RS_CONTROL_length 1 693996c5ddc4Srjs#define GFX75_MI_RS_CONTROL_length_bias 1 694096c5ddc4Srjs#define GFX75_MI_RS_CONTROL_header \ 694110e230b6Smaya .MICommandOpcode = 6, \ 694210e230b6Smaya .CommandType = 0 694310e230b6Smaya 694496c5ddc4Srjsstruct GFX75_MI_RS_CONTROL { 694510e230b6Smaya uint32_t ResourceStreamerControl; 694610e230b6Smaya#define RS_Stop 0 694710e230b6Smaya#define RS_Start 1 694810e230b6Smaya uint32_t MICommandOpcode; 694910e230b6Smaya uint32_t CommandType; 695010e230b6Smaya}; 695110e230b6Smaya 695296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 695396c5ddc4SrjsGFX75_MI_RS_CONTROL_pack(__attribute__((unused)) __gen_user_data *data, 695410e230b6Smaya __attribute__((unused)) void * restrict dst, 695596c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_RS_CONTROL * restrict values) 695610e230b6Smaya{ 695710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 695810e230b6Smaya 695910e230b6Smaya dw[0] = 696010e230b6Smaya __gen_uint(values->ResourceStreamerControl, 0, 0) | 696110e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 696210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 696310e230b6Smaya} 696410e230b6Smaya 696596c5ddc4Srjs#define GFX75_MI_RS_STORE_DATA_IMM_length 4 696696c5ddc4Srjs#define GFX75_MI_RS_STORE_DATA_IMM_length_bias 2 696796c5ddc4Srjs#define GFX75_MI_RS_STORE_DATA_IMM_header \ 696810e230b6Smaya .DWordLength = 2, \ 696910e230b6Smaya .MICommandOpcode = 43, \ 697010e230b6Smaya .CommandType = 0 697110e230b6Smaya 697296c5ddc4Srjsstruct GFX75_MI_RS_STORE_DATA_IMM { 697310e230b6Smaya uint32_t DWordLength; 697410e230b6Smaya uint32_t MICommandOpcode; 697510e230b6Smaya uint32_t CommandType; 697610e230b6Smaya uint32_t CoreModeEnable; 697710e230b6Smaya __gen_address_type DestinationAddress; 697810e230b6Smaya uint32_t DataDWord0; 697910e230b6Smaya}; 698010e230b6Smaya 698196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 698296c5ddc4SrjsGFX75_MI_RS_STORE_DATA_IMM_pack(__attribute__((unused)) __gen_user_data *data, 698310e230b6Smaya __attribute__((unused)) void * restrict dst, 698496c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_RS_STORE_DATA_IMM * restrict values) 698510e230b6Smaya{ 698610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 698710e230b6Smaya 698810e230b6Smaya dw[0] = 698910e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 699010e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 699110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 699210e230b6Smaya 699310e230b6Smaya dw[1] = 0; 699410e230b6Smaya 699510e230b6Smaya const uint32_t v2 = 699610e230b6Smaya __gen_uint(values->CoreModeEnable, 0, 0); 699796c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->DestinationAddress, v2, 2, 31); 699810e230b6Smaya 699910e230b6Smaya dw[3] = 700010e230b6Smaya __gen_uint(values->DataDWord0, 0, 31); 700110e230b6Smaya} 700210e230b6Smaya 700396c5ddc4Srjs#define GFX75_MI_SEMAPHORE_MBOX_length 3 700496c5ddc4Srjs#define GFX75_MI_SEMAPHORE_MBOX_length_bias 2 700596c5ddc4Srjs#define GFX75_MI_SEMAPHORE_MBOX_header \ 700610e230b6Smaya .DWordLength = 1, \ 700710e230b6Smaya .MICommandOpcode = 22, \ 700810e230b6Smaya .CommandType = 0 700910e230b6Smaya 701096c5ddc4Srjsstruct GFX75_MI_SEMAPHORE_MBOX { 701110e230b6Smaya uint32_t DWordLength; 701210e230b6Smaya uint32_t GeneralRegisterSelect; 701310e230b6Smaya uint32_t RegisterSelect; 701410e230b6Smaya#define RVSYNC 0 701510e230b6Smaya#define RVESYNC 1 701610e230b6Smaya#define RBSYNC 2 701710e230b6Smaya#define UseGeneralRegisterSelect 3 701810e230b6Smaya uint32_t MICommandOpcode; 701910e230b6Smaya uint32_t CommandType; 702010e230b6Smaya uint32_t SemaphoreDataDword; 702110e230b6Smaya}; 702210e230b6Smaya 702396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 702496c5ddc4SrjsGFX75_MI_SEMAPHORE_MBOX_pack(__attribute__((unused)) __gen_user_data *data, 702510e230b6Smaya __attribute__((unused)) void * restrict dst, 702696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_SEMAPHORE_MBOX * restrict values) 702710e230b6Smaya{ 702810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 702910e230b6Smaya 703010e230b6Smaya dw[0] = 703110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 703210e230b6Smaya __gen_uint(values->GeneralRegisterSelect, 8, 13) | 703310e230b6Smaya __gen_uint(values->RegisterSelect, 16, 17) | 703410e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 703510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 703610e230b6Smaya 703710e230b6Smaya dw[1] = 703810e230b6Smaya __gen_uint(values->SemaphoreDataDword, 0, 31); 703910e230b6Smaya 704010e230b6Smaya dw[2] = 0; 704110e230b6Smaya} 704210e230b6Smaya 704396c5ddc4Srjs#define GFX75_MI_SET_CONTEXT_length 2 704496c5ddc4Srjs#define GFX75_MI_SET_CONTEXT_length_bias 2 704596c5ddc4Srjs#define GFX75_MI_SET_CONTEXT_header \ 704610e230b6Smaya .DWordLength = 0, \ 704710e230b6Smaya .MICommandOpcode = 24, \ 704810e230b6Smaya .CommandType = 0 704910e230b6Smaya 705096c5ddc4Srjsstruct GFX75_MI_SET_CONTEXT { 705110e230b6Smaya uint32_t DWordLength; 705210e230b6Smaya uint32_t MICommandOpcode; 705310e230b6Smaya uint32_t CommandType; 705410e230b6Smaya uint32_t RestoreInhibit; 705510e230b6Smaya uint32_t ForceRestore; 705610e230b6Smaya bool ResourceStreamerStateRestoreEnable; 705710e230b6Smaya bool ResourceStreamerStateSaveEnable; 705810e230b6Smaya bool CoreModeEnable; 705910e230b6Smaya uint32_t ReservedMustbe1; 706010e230b6Smaya __gen_address_type LogicalContextAddress; 706110e230b6Smaya}; 706210e230b6Smaya 706396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 706496c5ddc4SrjsGFX75_MI_SET_CONTEXT_pack(__attribute__((unused)) __gen_user_data *data, 706510e230b6Smaya __attribute__((unused)) void * restrict dst, 706696c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_SET_CONTEXT * restrict values) 706710e230b6Smaya{ 706810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 706910e230b6Smaya 707010e230b6Smaya dw[0] = 707110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 707210e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 707310e230b6Smaya __gen_uint(values->CommandType, 29, 31); 707410e230b6Smaya 707510e230b6Smaya const uint32_t v1 = 707610e230b6Smaya __gen_uint(values->RestoreInhibit, 0, 0) | 707710e230b6Smaya __gen_uint(values->ForceRestore, 1, 1) | 707810e230b6Smaya __gen_uint(values->ResourceStreamerStateRestoreEnable, 2, 2) | 707910e230b6Smaya __gen_uint(values->ResourceStreamerStateSaveEnable, 3, 3) | 708010e230b6Smaya __gen_uint(values->CoreModeEnable, 4, 4) | 708110e230b6Smaya __gen_uint(values->ReservedMustbe1, 8, 8); 708296c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->LogicalContextAddress, v1, 12, 31); 708310e230b6Smaya} 708410e230b6Smaya 708596c5ddc4Srjs#define GFX75_MI_SET_PREDICATE_length 1 708696c5ddc4Srjs#define GFX75_MI_SET_PREDICATE_length_bias 1 708796c5ddc4Srjs#define GFX75_MI_SET_PREDICATE_header \ 708810e230b6Smaya .MICommandOpcode = 1, \ 708910e230b6Smaya .CommandType = 0 709010e230b6Smaya 709196c5ddc4Srjsstruct GFX75_MI_SET_PREDICATE { 709210e230b6Smaya uint32_t PREDICATEENABLE; 709310e230b6Smaya uint32_t MICommandOpcode; 709410e230b6Smaya uint32_t CommandType; 709510e230b6Smaya}; 709610e230b6Smaya 709796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 709896c5ddc4SrjsGFX75_MI_SET_PREDICATE_pack(__attribute__((unused)) __gen_user_data *data, 709910e230b6Smaya __attribute__((unused)) void * restrict dst, 710096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_SET_PREDICATE * restrict values) 710110e230b6Smaya{ 710210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 710310e230b6Smaya 710410e230b6Smaya dw[0] = 710510e230b6Smaya __gen_uint(values->PREDICATEENABLE, 0, 1) | 710610e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 710710e230b6Smaya __gen_uint(values->CommandType, 29, 31); 710810e230b6Smaya} 710910e230b6Smaya 711096c5ddc4Srjs#define GFX75_MI_STORE_DATA_IMM_length 4 711196c5ddc4Srjs#define GFX75_MI_STORE_DATA_IMM_length_bias 2 711296c5ddc4Srjs#define GFX75_MI_STORE_DATA_IMM_header \ 711310e230b6Smaya .DWordLength = 2, \ 711410e230b6Smaya .MICommandOpcode = 32, \ 711510e230b6Smaya .CommandType = 0 711610e230b6Smaya 711796c5ddc4Srjsstruct GFX75_MI_STORE_DATA_IMM { 711810e230b6Smaya uint32_t DWordLength; 711910e230b6Smaya bool UseGlobalGTT; 712010e230b6Smaya uint32_t MICommandOpcode; 712110e230b6Smaya uint32_t CommandType; 712210e230b6Smaya uint32_t CoreModeEnable; 712310e230b6Smaya __gen_address_type Address; 712410e230b6Smaya uint64_t ImmediateData; 712510e230b6Smaya}; 712610e230b6Smaya 712796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 712896c5ddc4SrjsGFX75_MI_STORE_DATA_IMM_pack(__attribute__((unused)) __gen_user_data *data, 712910e230b6Smaya __attribute__((unused)) void * restrict dst, 713096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_STORE_DATA_IMM * restrict values) 713110e230b6Smaya{ 713210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 713310e230b6Smaya 713410e230b6Smaya dw[0] = 713510e230b6Smaya __gen_uint(values->DWordLength, 0, 5) | 713610e230b6Smaya __gen_uint(values->UseGlobalGTT, 22, 22) | 713710e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 713810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 713910e230b6Smaya 714010e230b6Smaya dw[1] = 0; 714110e230b6Smaya 714210e230b6Smaya const uint32_t v2 = 714310e230b6Smaya __gen_uint(values->CoreModeEnable, 0, 0); 714496c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->Address, v2, 2, 31); 714510e230b6Smaya 714610e230b6Smaya const uint64_t v3 = 714710e230b6Smaya __gen_uint(values->ImmediateData, 0, 63); 714810e230b6Smaya dw[3] = v3; 714910e230b6Smaya dw[4] = v3 >> 32; 715010e230b6Smaya} 715110e230b6Smaya 715296c5ddc4Srjs#define GFX75_MI_STORE_DATA_INDEX_length 3 715396c5ddc4Srjs#define GFX75_MI_STORE_DATA_INDEX_length_bias 2 715496c5ddc4Srjs#define GFX75_MI_STORE_DATA_INDEX_header \ 715510e230b6Smaya .DWordLength = 1, \ 715610e230b6Smaya .MICommandOpcode = 33, \ 715710e230b6Smaya .CommandType = 0 715810e230b6Smaya 715996c5ddc4Srjsstruct GFX75_MI_STORE_DATA_INDEX { 716010e230b6Smaya uint32_t DWordLength; 716110e230b6Smaya uint32_t MICommandOpcode; 716210e230b6Smaya uint32_t CommandType; 716310e230b6Smaya uint32_t Offset; 716410e230b6Smaya uint32_t DataDWord0; 716510e230b6Smaya uint32_t DataDWord1; 716610e230b6Smaya}; 716710e230b6Smaya 716896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 716996c5ddc4SrjsGFX75_MI_STORE_DATA_INDEX_pack(__attribute__((unused)) __gen_user_data *data, 717010e230b6Smaya __attribute__((unused)) void * restrict dst, 717196c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_STORE_DATA_INDEX * restrict values) 717210e230b6Smaya{ 717310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 717410e230b6Smaya 717510e230b6Smaya dw[0] = 717610e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 717710e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 717810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 717910e230b6Smaya 718010e230b6Smaya dw[1] = 718110e230b6Smaya __gen_uint(values->Offset, 2, 11); 718210e230b6Smaya 718310e230b6Smaya dw[2] = 718410e230b6Smaya __gen_uint(values->DataDWord0, 0, 31); 718510e230b6Smaya} 718610e230b6Smaya 718796c5ddc4Srjs#define GFX75_MI_STORE_REGISTER_MEM_length 3 718896c5ddc4Srjs#define GFX75_MI_STORE_REGISTER_MEM_length_bias 2 718996c5ddc4Srjs#define GFX75_MI_STORE_REGISTER_MEM_header \ 719010e230b6Smaya .DWordLength = 1, \ 719110e230b6Smaya .MICommandOpcode = 36, \ 719210e230b6Smaya .CommandType = 0 719310e230b6Smaya 719496c5ddc4Srjsstruct GFX75_MI_STORE_REGISTER_MEM { 719510e230b6Smaya uint32_t DWordLength; 719610e230b6Smaya bool PredicateEnable; 719710e230b6Smaya bool UseGlobalGTT; 719810e230b6Smaya uint32_t MICommandOpcode; 719910e230b6Smaya uint32_t CommandType; 720010e230b6Smaya uint64_t RegisterAddress; 720110e230b6Smaya __gen_address_type MemoryAddress; 720210e230b6Smaya}; 720310e230b6Smaya 720496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 720596c5ddc4SrjsGFX75_MI_STORE_REGISTER_MEM_pack(__attribute__((unused)) __gen_user_data *data, 720610e230b6Smaya __attribute__((unused)) void * restrict dst, 720796c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_STORE_REGISTER_MEM * restrict values) 720810e230b6Smaya{ 720910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 721010e230b6Smaya 721110e230b6Smaya dw[0] = 721210e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 721310e230b6Smaya __gen_uint(values->PredicateEnable, 21, 21) | 721410e230b6Smaya __gen_uint(values->UseGlobalGTT, 22, 22) | 721510e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 721610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 721710e230b6Smaya 721810e230b6Smaya dw[1] = 721910e230b6Smaya __gen_offset(values->RegisterAddress, 2, 22); 722010e230b6Smaya 722196c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->MemoryAddress, 0, 2, 31); 722210e230b6Smaya} 722310e230b6Smaya 722496c5ddc4Srjs#define GFX75_MI_STORE_URB_MEM_length 3 722596c5ddc4Srjs#define GFX75_MI_STORE_URB_MEM_length_bias 2 722696c5ddc4Srjs#define GFX75_MI_STORE_URB_MEM_header \ 722710e230b6Smaya .DWordLength = 1, \ 722810e230b6Smaya .MICommandOpcode = 45, \ 722910e230b6Smaya .CommandType = 0 723010e230b6Smaya 723196c5ddc4Srjsstruct GFX75_MI_STORE_URB_MEM { 723210e230b6Smaya uint32_t DWordLength; 723310e230b6Smaya uint32_t MICommandOpcode; 723410e230b6Smaya uint32_t CommandType; 723510e230b6Smaya uint32_t URBAddress; 723610e230b6Smaya __gen_address_type MemoryAddress; 723710e230b6Smaya}; 723810e230b6Smaya 723996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 724096c5ddc4SrjsGFX75_MI_STORE_URB_MEM_pack(__attribute__((unused)) __gen_user_data *data, 724110e230b6Smaya __attribute__((unused)) void * restrict dst, 724296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_STORE_URB_MEM * restrict values) 724310e230b6Smaya{ 724410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 724510e230b6Smaya 724610e230b6Smaya dw[0] = 724710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 724810e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 724910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 725010e230b6Smaya 725110e230b6Smaya dw[1] = 725210e230b6Smaya __gen_uint(values->URBAddress, 2, 14); 725310e230b6Smaya 725496c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->MemoryAddress, 0, 6, 31); 725510e230b6Smaya} 725610e230b6Smaya 725796c5ddc4Srjs#define GFX75_MI_SUSPEND_FLUSH_length 1 725896c5ddc4Srjs#define GFX75_MI_SUSPEND_FLUSH_length_bias 1 725996c5ddc4Srjs#define GFX75_MI_SUSPEND_FLUSH_header \ 726010e230b6Smaya .MICommandOpcode = 11, \ 726110e230b6Smaya .CommandType = 0 726210e230b6Smaya 726396c5ddc4Srjsstruct GFX75_MI_SUSPEND_FLUSH { 726410e230b6Smaya bool SuspendFlush; 726510e230b6Smaya uint32_t MICommandOpcode; 726610e230b6Smaya uint32_t CommandType; 726710e230b6Smaya}; 726810e230b6Smaya 726996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 727096c5ddc4SrjsGFX75_MI_SUSPEND_FLUSH_pack(__attribute__((unused)) __gen_user_data *data, 727110e230b6Smaya __attribute__((unused)) void * restrict dst, 727296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_SUSPEND_FLUSH * restrict values) 727310e230b6Smaya{ 727410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 727510e230b6Smaya 727610e230b6Smaya dw[0] = 727710e230b6Smaya __gen_uint(values->SuspendFlush, 0, 0) | 727810e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 727910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 728010e230b6Smaya} 728110e230b6Smaya 728296c5ddc4Srjs#define GFX75_MI_TOPOLOGY_FILTER_length 1 728396c5ddc4Srjs#define GFX75_MI_TOPOLOGY_FILTER_length_bias 1 728496c5ddc4Srjs#define GFX75_MI_TOPOLOGY_FILTER_header \ 728510e230b6Smaya .MICommandOpcode = 13, \ 728610e230b6Smaya .CommandType = 0 728710e230b6Smaya 728896c5ddc4Srjsstruct GFX75_MI_TOPOLOGY_FILTER { 728996c5ddc4Srjs enum GFX75_3D_Prim_Topo_Type TopologyFilterValue; 729010e230b6Smaya uint32_t MICommandOpcode; 729110e230b6Smaya uint32_t CommandType; 729210e230b6Smaya}; 729310e230b6Smaya 729496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 729596c5ddc4SrjsGFX75_MI_TOPOLOGY_FILTER_pack(__attribute__((unused)) __gen_user_data *data, 729610e230b6Smaya __attribute__((unused)) void * restrict dst, 729796c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_TOPOLOGY_FILTER * restrict values) 729810e230b6Smaya{ 729910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 730010e230b6Smaya 730110e230b6Smaya dw[0] = 730210e230b6Smaya __gen_uint(values->TopologyFilterValue, 0, 5) | 730310e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 730410e230b6Smaya __gen_uint(values->CommandType, 29, 31); 730510e230b6Smaya} 730610e230b6Smaya 730796c5ddc4Srjs#define GFX75_MI_URB_ATOMIC_ALLOC_length 1 730896c5ddc4Srjs#define GFX75_MI_URB_ATOMIC_ALLOC_length_bias 1 730996c5ddc4Srjs#define GFX75_MI_URB_ATOMIC_ALLOC_header \ 731010e230b6Smaya .MICommandOpcode = 9, \ 731110e230b6Smaya .CommandType = 0 731210e230b6Smaya 731396c5ddc4Srjsstruct GFX75_MI_URB_ATOMIC_ALLOC { 731410e230b6Smaya uint32_t URBAtomicStorageSize; 731510e230b6Smaya uint32_t URBAtomicStorageOffset; 731610e230b6Smaya uint32_t MICommandOpcode; 731710e230b6Smaya uint32_t CommandType; 731810e230b6Smaya}; 731910e230b6Smaya 732096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 732196c5ddc4SrjsGFX75_MI_URB_ATOMIC_ALLOC_pack(__attribute__((unused)) __gen_user_data *data, 732210e230b6Smaya __attribute__((unused)) void * restrict dst, 732396c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_URB_ATOMIC_ALLOC * restrict values) 732410e230b6Smaya{ 732510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 732610e230b6Smaya 732710e230b6Smaya dw[0] = 732810e230b6Smaya __gen_uint(values->URBAtomicStorageSize, 0, 8) | 732910e230b6Smaya __gen_uint(values->URBAtomicStorageOffset, 12, 19) | 733010e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 733110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 733210e230b6Smaya} 733310e230b6Smaya 733496c5ddc4Srjs#define GFX75_MI_URB_CLEAR_length 2 733596c5ddc4Srjs#define GFX75_MI_URB_CLEAR_length_bias 2 733696c5ddc4Srjs#define GFX75_MI_URB_CLEAR_header \ 733710e230b6Smaya .DWordLength = 0, \ 733810e230b6Smaya .MICommandOpcode = 25, \ 733910e230b6Smaya .CommandType = 0 734010e230b6Smaya 734196c5ddc4Srjsstruct GFX75_MI_URB_CLEAR { 734210e230b6Smaya uint32_t DWordLength; 734310e230b6Smaya uint32_t MICommandOpcode; 734410e230b6Smaya uint32_t CommandType; 734510e230b6Smaya uint64_t URBAddress; 734610e230b6Smaya uint32_t URBClearLength; 734710e230b6Smaya}; 734810e230b6Smaya 734996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 735096c5ddc4SrjsGFX75_MI_URB_CLEAR_pack(__attribute__((unused)) __gen_user_data *data, 735110e230b6Smaya __attribute__((unused)) void * restrict dst, 735296c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_URB_CLEAR * restrict values) 735310e230b6Smaya{ 735410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 735510e230b6Smaya 735610e230b6Smaya dw[0] = 735710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 735810e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 735910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 736010e230b6Smaya 736110e230b6Smaya dw[1] = 736210e230b6Smaya __gen_offset(values->URBAddress, 0, 14) | 736310e230b6Smaya __gen_uint(values->URBClearLength, 16, 29); 736410e230b6Smaya} 736510e230b6Smaya 736696c5ddc4Srjs#define GFX75_MI_USER_INTERRUPT_length 1 736796c5ddc4Srjs#define GFX75_MI_USER_INTERRUPT_length_bias 1 736896c5ddc4Srjs#define GFX75_MI_USER_INTERRUPT_header \ 736910e230b6Smaya .MICommandOpcode = 2, \ 737010e230b6Smaya .CommandType = 0 737110e230b6Smaya 737296c5ddc4Srjsstruct GFX75_MI_USER_INTERRUPT { 737310e230b6Smaya uint32_t MICommandOpcode; 737410e230b6Smaya uint32_t CommandType; 737510e230b6Smaya}; 737610e230b6Smaya 737796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 737896c5ddc4SrjsGFX75_MI_USER_INTERRUPT_pack(__attribute__((unused)) __gen_user_data *data, 737910e230b6Smaya __attribute__((unused)) void * restrict dst, 738096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_USER_INTERRUPT * restrict values) 738110e230b6Smaya{ 738210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 738310e230b6Smaya 738410e230b6Smaya dw[0] = 738510e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 738610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 738710e230b6Smaya} 738810e230b6Smaya 738996c5ddc4Srjs#define GFX75_MI_WAIT_FOR_EVENT_length 1 739096c5ddc4Srjs#define GFX75_MI_WAIT_FOR_EVENT_length_bias 1 739196c5ddc4Srjs#define GFX75_MI_WAIT_FOR_EVENT_header \ 739210e230b6Smaya .MICommandOpcode = 3, \ 739310e230b6Smaya .CommandType = 0 739410e230b6Smaya 739596c5ddc4Srjsstruct GFX75_MI_WAIT_FOR_EVENT { 739610e230b6Smaya bool DisplayPipeAScanLineWaitEnable; 739710e230b6Smaya bool DisplayPlaneAFlipPendingWaitEnable; 739810e230b6Smaya bool DisplaySpriteAFlipPendingWaitEnable; 739910e230b6Smaya bool DisplayPipeAVerticalBlankWaitEnable; 740010e230b6Smaya bool DisplayPipeAHorizontalBlankWaitEnable; 740110e230b6Smaya bool DisplayPipeBScanLineWaitEnable; 740210e230b6Smaya bool DisplayPlaneBFlipPendingWaitEnable; 740310e230b6Smaya bool DisplaySpriteBFlipPendingWaitEnable; 740410e230b6Smaya bool DisplayPipeBVerticalBlankWaitEnable; 740510e230b6Smaya bool DisplayPipeBHorizontalBlankWaitEnable; 740610e230b6Smaya bool DisplayPipeCScanLineWaitEnable; 740710e230b6Smaya bool DisplayPlaneCFlipPendingWaitEnable; 740810e230b6Smaya uint32_t ConditionCodeWaitSelect; 740910e230b6Smaya#define Notenabled 0 741010e230b6Smaya bool DisplaySpriteCFlipPendingWaitEnable; 741110e230b6Smaya bool DisplayPipeCVerticalBlankWaitEnable; 741210e230b6Smaya bool DisplayPipeCHorizontalBlankWaitEnable; 741310e230b6Smaya uint32_t MICommandOpcode; 741410e230b6Smaya uint32_t CommandType; 741510e230b6Smaya}; 741610e230b6Smaya 741796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 741896c5ddc4SrjsGFX75_MI_WAIT_FOR_EVENT_pack(__attribute__((unused)) __gen_user_data *data, 741910e230b6Smaya __attribute__((unused)) void * restrict dst, 742096c5ddc4Srjs __attribute__((unused)) const struct GFX75_MI_WAIT_FOR_EVENT * restrict values) 742110e230b6Smaya{ 742210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 742310e230b6Smaya 742410e230b6Smaya dw[0] = 742510e230b6Smaya __gen_uint(values->DisplayPipeAScanLineWaitEnable, 0, 0) | 742610e230b6Smaya __gen_uint(values->DisplayPlaneAFlipPendingWaitEnable, 1, 1) | 742710e230b6Smaya __gen_uint(values->DisplaySpriteAFlipPendingWaitEnable, 2, 2) | 742810e230b6Smaya __gen_uint(values->DisplayPipeAVerticalBlankWaitEnable, 3, 3) | 742910e230b6Smaya __gen_uint(values->DisplayPipeAHorizontalBlankWaitEnable, 5, 5) | 743010e230b6Smaya __gen_uint(values->DisplayPipeBScanLineWaitEnable, 8, 8) | 743110e230b6Smaya __gen_uint(values->DisplayPlaneBFlipPendingWaitEnable, 9, 9) | 743210e230b6Smaya __gen_uint(values->DisplaySpriteBFlipPendingWaitEnable, 10, 10) | 743310e230b6Smaya __gen_uint(values->DisplayPipeBVerticalBlankWaitEnable, 11, 11) | 743410e230b6Smaya __gen_uint(values->DisplayPipeBHorizontalBlankWaitEnable, 13, 13) | 743510e230b6Smaya __gen_uint(values->DisplayPipeCScanLineWaitEnable, 14, 14) | 743610e230b6Smaya __gen_uint(values->DisplayPlaneCFlipPendingWaitEnable, 15, 15) | 743710e230b6Smaya __gen_uint(values->ConditionCodeWaitSelect, 16, 19) | 743810e230b6Smaya __gen_uint(values->DisplaySpriteCFlipPendingWaitEnable, 20, 20) | 743910e230b6Smaya __gen_uint(values->DisplayPipeCVerticalBlankWaitEnable, 21, 21) | 744010e230b6Smaya __gen_uint(values->DisplayPipeCHorizontalBlankWaitEnable, 22, 22) | 744110e230b6Smaya __gen_uint(values->MICommandOpcode, 23, 28) | 744210e230b6Smaya __gen_uint(values->CommandType, 29, 31); 744310e230b6Smaya} 744410e230b6Smaya 744596c5ddc4Srjs#define GFX75_PIPELINE_SELECT_length 1 744696c5ddc4Srjs#define GFX75_PIPELINE_SELECT_length_bias 1 744796c5ddc4Srjs#define GFX75_PIPELINE_SELECT_header \ 744810e230b6Smaya ._3DCommandSubOpcode = 4, \ 744910e230b6Smaya ._3DCommandOpcode = 1, \ 745010e230b6Smaya .CommandSubType = 1, \ 745110e230b6Smaya .CommandType = 3 745210e230b6Smaya 745396c5ddc4Srjsstruct GFX75_PIPELINE_SELECT { 745410e230b6Smaya uint32_t PipelineSelection; 745510e230b6Smaya#define _3D 0 745610e230b6Smaya#define Media 1 745710e230b6Smaya#define GPGPU 2 745810e230b6Smaya uint32_t _3DCommandSubOpcode; 745910e230b6Smaya uint32_t _3DCommandOpcode; 746010e230b6Smaya uint32_t CommandSubType; 746110e230b6Smaya uint32_t CommandType; 746210e230b6Smaya}; 746310e230b6Smaya 746496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 746596c5ddc4SrjsGFX75_PIPELINE_SELECT_pack(__attribute__((unused)) __gen_user_data *data, 746610e230b6Smaya __attribute__((unused)) void * restrict dst, 746796c5ddc4Srjs __attribute__((unused)) const struct GFX75_PIPELINE_SELECT * restrict values) 746810e230b6Smaya{ 746910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 747010e230b6Smaya 747110e230b6Smaya dw[0] = 747210e230b6Smaya __gen_uint(values->PipelineSelection, 0, 1) | 747310e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 747410e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 747510e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 747610e230b6Smaya __gen_uint(values->CommandType, 29, 31); 747710e230b6Smaya} 747810e230b6Smaya 747996c5ddc4Srjs#define GFX75_PIPE_CONTROL_length 5 748096c5ddc4Srjs#define GFX75_PIPE_CONTROL_length_bias 2 748196c5ddc4Srjs#define GFX75_PIPE_CONTROL_header \ 748210e230b6Smaya .DWordLength = 3, \ 748310e230b6Smaya ._3DCommandSubOpcode = 0, \ 748410e230b6Smaya ._3DCommandOpcode = 2, \ 748510e230b6Smaya .CommandSubType = 3, \ 748610e230b6Smaya .CommandType = 3 748710e230b6Smaya 748896c5ddc4Srjsstruct GFX75_PIPE_CONTROL { 748910e230b6Smaya uint32_t DWordLength; 749010e230b6Smaya uint32_t _3DCommandSubOpcode; 749110e230b6Smaya uint32_t _3DCommandOpcode; 749210e230b6Smaya uint32_t CommandSubType; 749310e230b6Smaya uint32_t CommandType; 749410e230b6Smaya bool DepthCacheFlushEnable; 749510e230b6Smaya bool StallAtPixelScoreboard; 749610e230b6Smaya bool StateCacheInvalidationEnable; 749710e230b6Smaya bool ConstantCacheInvalidationEnable; 749810e230b6Smaya bool VFCacheInvalidationEnable; 749910e230b6Smaya bool DCFlushEnable; 750010e230b6Smaya bool PipeControlFlushEnable; 750110e230b6Smaya bool NotifyEnable; 750210e230b6Smaya bool IndirectStatePointersDisable; 750310e230b6Smaya bool TextureCacheInvalidationEnable; 750410e230b6Smaya bool InstructionCacheInvalidateEnable; 750510e230b6Smaya bool RenderTargetCacheFlushEnable; 750610e230b6Smaya bool DepthStallEnable; 750710e230b6Smaya uint32_t PostSyncOperation; 750810e230b6Smaya#define NoWrite 0 750910e230b6Smaya#define WriteImmediateData 1 751010e230b6Smaya#define WritePSDepthCount 2 751110e230b6Smaya#define WriteTimestamp 3 751210e230b6Smaya bool GenericMediaStateClear; 751310e230b6Smaya bool TLBInvalidate; 751410e230b6Smaya bool GlobalSnapshotCountReset; 751510e230b6Smaya bool CommandStreamerStallEnable; 751610e230b6Smaya uint32_t StoreDataIndex; 751710e230b6Smaya uint32_t LRIPostSyncOperation; 751810e230b6Smaya#define NoLRIOperation 0 751910e230b6Smaya#define MMIOWriteImmediateData 1 752010e230b6Smaya uint32_t DestinationAddressType; 752110e230b6Smaya#define DAT_PPGTT 0 752210e230b6Smaya#define DAT_GGTT 1 752310e230b6Smaya __gen_address_type Address; 752410e230b6Smaya uint64_t ImmediateData; 752510e230b6Smaya}; 752610e230b6Smaya 752796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 752896c5ddc4SrjsGFX75_PIPE_CONTROL_pack(__attribute__((unused)) __gen_user_data *data, 752910e230b6Smaya __attribute__((unused)) void * restrict dst, 753096c5ddc4Srjs __attribute__((unused)) const struct GFX75_PIPE_CONTROL * restrict values) 753110e230b6Smaya{ 753210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 753310e230b6Smaya 753410e230b6Smaya dw[0] = 753510e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 753610e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 753710e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 753810e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 753910e230b6Smaya __gen_uint(values->CommandType, 29, 31); 754010e230b6Smaya 754110e230b6Smaya dw[1] = 754210e230b6Smaya __gen_uint(values->DepthCacheFlushEnable, 0, 0) | 754310e230b6Smaya __gen_uint(values->StallAtPixelScoreboard, 1, 1) | 754410e230b6Smaya __gen_uint(values->StateCacheInvalidationEnable, 2, 2) | 754510e230b6Smaya __gen_uint(values->ConstantCacheInvalidationEnable, 3, 3) | 754610e230b6Smaya __gen_uint(values->VFCacheInvalidationEnable, 4, 4) | 754710e230b6Smaya __gen_uint(values->DCFlushEnable, 5, 5) | 754810e230b6Smaya __gen_uint(values->PipeControlFlushEnable, 7, 7) | 754910e230b6Smaya __gen_uint(values->NotifyEnable, 8, 8) | 755010e230b6Smaya __gen_uint(values->IndirectStatePointersDisable, 9, 9) | 755110e230b6Smaya __gen_uint(values->TextureCacheInvalidationEnable, 10, 10) | 755210e230b6Smaya __gen_uint(values->InstructionCacheInvalidateEnable, 11, 11) | 755310e230b6Smaya __gen_uint(values->RenderTargetCacheFlushEnable, 12, 12) | 755410e230b6Smaya __gen_uint(values->DepthStallEnable, 13, 13) | 755510e230b6Smaya __gen_uint(values->PostSyncOperation, 14, 15) | 755610e230b6Smaya __gen_uint(values->GenericMediaStateClear, 16, 16) | 755710e230b6Smaya __gen_uint(values->TLBInvalidate, 18, 18) | 755810e230b6Smaya __gen_uint(values->GlobalSnapshotCountReset, 19, 19) | 755910e230b6Smaya __gen_uint(values->CommandStreamerStallEnable, 20, 20) | 756010e230b6Smaya __gen_uint(values->StoreDataIndex, 21, 21) | 756110e230b6Smaya __gen_uint(values->LRIPostSyncOperation, 23, 23) | 756210e230b6Smaya __gen_uint(values->DestinationAddressType, 24, 24); 756310e230b6Smaya 756496c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->Address, 0, 2, 31); 756510e230b6Smaya 756610e230b6Smaya const uint64_t v3 = 756710e230b6Smaya __gen_uint(values->ImmediateData, 0, 63); 756810e230b6Smaya dw[3] = v3; 756910e230b6Smaya dw[4] = v3 >> 32; 757010e230b6Smaya} 757110e230b6Smaya 757296c5ddc4Srjs#define GFX75_STATE_BASE_ADDRESS_length 10 757396c5ddc4Srjs#define GFX75_STATE_BASE_ADDRESS_length_bias 2 757496c5ddc4Srjs#define GFX75_STATE_BASE_ADDRESS_header \ 757510e230b6Smaya .DWordLength = 8, \ 757610e230b6Smaya ._3DCommandSubOpcode = 1, \ 757710e230b6Smaya ._3DCommandOpcode = 1, \ 757810e230b6Smaya .CommandSubType = 0, \ 757910e230b6Smaya .CommandType = 3 758010e230b6Smaya 758196c5ddc4Srjsstruct GFX75_STATE_BASE_ADDRESS { 758210e230b6Smaya uint32_t DWordLength; 758310e230b6Smaya uint32_t _3DCommandSubOpcode; 758410e230b6Smaya uint32_t _3DCommandOpcode; 758510e230b6Smaya uint32_t CommandSubType; 758610e230b6Smaya uint32_t CommandType; 758710e230b6Smaya bool GeneralStateBaseAddressModifyEnable; 758810e230b6Smaya uint32_t StatelessDataPortAccessMOCS; 758910e230b6Smaya uint32_t GeneralStateMOCS; 759010e230b6Smaya __gen_address_type GeneralStateBaseAddress; 759110e230b6Smaya bool SurfaceStateBaseAddressModifyEnable; 759210e230b6Smaya uint32_t SurfaceStateMOCS; 759310e230b6Smaya __gen_address_type SurfaceStateBaseAddress; 759410e230b6Smaya bool DynamicStateBaseAddressModifyEnable; 759510e230b6Smaya uint32_t DynamicStateMOCS; 759610e230b6Smaya __gen_address_type DynamicStateBaseAddress; 759710e230b6Smaya bool IndirectObjectBaseAddressModifyEnable; 759810e230b6Smaya uint32_t IndirectObjectMOCS; 759910e230b6Smaya __gen_address_type IndirectObjectBaseAddress; 760010e230b6Smaya bool InstructionBaseAddressModifyEnable; 760110e230b6Smaya uint32_t InstructionMOCS; 760210e230b6Smaya __gen_address_type InstructionBaseAddress; 760310e230b6Smaya bool GeneralStateAccessUpperBoundModifyEnable; 760410e230b6Smaya __gen_address_type GeneralStateAccessUpperBound; 760510e230b6Smaya bool DynamicStateAccessUpperBoundModifyEnable; 760610e230b6Smaya __gen_address_type DynamicStateAccessUpperBound; 760710e230b6Smaya bool IndirectObjectAccessUpperBoundModifyEnable; 760810e230b6Smaya __gen_address_type IndirectObjectAccessUpperBound; 760910e230b6Smaya bool InstructionAccessUpperBoundModifyEnable; 761010e230b6Smaya __gen_address_type InstructionAccessUpperBound; 761110e230b6Smaya}; 761210e230b6Smaya 761396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 761496c5ddc4SrjsGFX75_STATE_BASE_ADDRESS_pack(__attribute__((unused)) __gen_user_data *data, 761510e230b6Smaya __attribute__((unused)) void * restrict dst, 761696c5ddc4Srjs __attribute__((unused)) const struct GFX75_STATE_BASE_ADDRESS * restrict values) 761710e230b6Smaya{ 761810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 761910e230b6Smaya 762010e230b6Smaya dw[0] = 762110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 762210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 762310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 762410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 762510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 762610e230b6Smaya 762710e230b6Smaya const uint32_t v1 = 762810e230b6Smaya __gen_uint(values->GeneralStateBaseAddressModifyEnable, 0, 0) | 762910e230b6Smaya __gen_uint(values->StatelessDataPortAccessMOCS, 4, 7) | 763010e230b6Smaya __gen_uint(values->GeneralStateMOCS, 8, 11); 763196c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->GeneralStateBaseAddress, v1, 12, 31); 763210e230b6Smaya 763310e230b6Smaya const uint32_t v2 = 763410e230b6Smaya __gen_uint(values->SurfaceStateBaseAddressModifyEnable, 0, 0) | 763510e230b6Smaya __gen_uint(values->SurfaceStateMOCS, 8, 11); 763696c5ddc4Srjs dw[2] = __gen_address(data, &dw[2], values->SurfaceStateBaseAddress, v2, 12, 31); 763710e230b6Smaya 763810e230b6Smaya const uint32_t v3 = 763910e230b6Smaya __gen_uint(values->DynamicStateBaseAddressModifyEnable, 0, 0) | 764010e230b6Smaya __gen_uint(values->DynamicStateMOCS, 8, 11); 764196c5ddc4Srjs dw[3] = __gen_address(data, &dw[3], values->DynamicStateBaseAddress, v3, 12, 31); 764210e230b6Smaya 764310e230b6Smaya const uint32_t v4 = 764410e230b6Smaya __gen_uint(values->IndirectObjectBaseAddressModifyEnable, 0, 0) | 764510e230b6Smaya __gen_uint(values->IndirectObjectMOCS, 8, 11); 764696c5ddc4Srjs dw[4] = __gen_address(data, &dw[4], values->IndirectObjectBaseAddress, v4, 12, 31); 764710e230b6Smaya 764810e230b6Smaya const uint32_t v5 = 764910e230b6Smaya __gen_uint(values->InstructionBaseAddressModifyEnable, 0, 0) | 765010e230b6Smaya __gen_uint(values->InstructionMOCS, 8, 11); 765196c5ddc4Srjs dw[5] = __gen_address(data, &dw[5], values->InstructionBaseAddress, v5, 12, 31); 765210e230b6Smaya 765310e230b6Smaya const uint32_t v6 = 765410e230b6Smaya __gen_uint(values->GeneralStateAccessUpperBoundModifyEnable, 0, 0); 765596c5ddc4Srjs dw[6] = __gen_address(data, &dw[6], values->GeneralStateAccessUpperBound, v6, 12, 31); 765610e230b6Smaya 765710e230b6Smaya const uint32_t v7 = 765810e230b6Smaya __gen_uint(values->DynamicStateAccessUpperBoundModifyEnable, 0, 0); 765996c5ddc4Srjs dw[7] = __gen_address(data, &dw[7], values->DynamicStateAccessUpperBound, v7, 12, 31); 766010e230b6Smaya 766110e230b6Smaya const uint32_t v8 = 766210e230b6Smaya __gen_uint(values->IndirectObjectAccessUpperBoundModifyEnable, 0, 0); 766396c5ddc4Srjs dw[8] = __gen_address(data, &dw[8], values->IndirectObjectAccessUpperBound, v8, 12, 31); 766410e230b6Smaya 766510e230b6Smaya const uint32_t v9 = 766610e230b6Smaya __gen_uint(values->InstructionAccessUpperBoundModifyEnable, 0, 0); 766796c5ddc4Srjs dw[9] = __gen_address(data, &dw[9], values->InstructionAccessUpperBound, v9, 12, 31); 766810e230b6Smaya} 766910e230b6Smaya 767096c5ddc4Srjs#define GFX75_STATE_PREFETCH_length 2 767196c5ddc4Srjs#define GFX75_STATE_PREFETCH_length_bias 2 767296c5ddc4Srjs#define GFX75_STATE_PREFETCH_header \ 767310e230b6Smaya .DWordLength = 0, \ 767410e230b6Smaya ._3DCommandSubOpcode = 3, \ 767510e230b6Smaya ._3DCommandOpcode = 0, \ 767610e230b6Smaya .CommandSubType = 0, \ 767710e230b6Smaya .CommandType = 3 767810e230b6Smaya 767996c5ddc4Srjsstruct GFX75_STATE_PREFETCH { 768010e230b6Smaya uint32_t DWordLength; 768110e230b6Smaya uint32_t _3DCommandSubOpcode; 768210e230b6Smaya uint32_t _3DCommandOpcode; 768310e230b6Smaya uint32_t CommandSubType; 768410e230b6Smaya uint32_t CommandType; 768510e230b6Smaya uint32_t PrefetchCount; 768610e230b6Smaya __gen_address_type PrefetchPointer; 768710e230b6Smaya}; 768810e230b6Smaya 768996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 769096c5ddc4SrjsGFX75_STATE_PREFETCH_pack(__attribute__((unused)) __gen_user_data *data, 769110e230b6Smaya __attribute__((unused)) void * restrict dst, 769296c5ddc4Srjs __attribute__((unused)) const struct GFX75_STATE_PREFETCH * restrict values) 769310e230b6Smaya{ 769410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 769510e230b6Smaya 769610e230b6Smaya dw[0] = 769710e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 769810e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 769910e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 770010e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 770110e230b6Smaya __gen_uint(values->CommandType, 29, 31); 770210e230b6Smaya 770310e230b6Smaya const uint32_t v1 = 770410e230b6Smaya __gen_uint(values->PrefetchCount, 0, 2); 770596c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->PrefetchPointer, v1, 6, 31); 770610e230b6Smaya} 770710e230b6Smaya 770896c5ddc4Srjs#define GFX75_STATE_SIP_length 2 770996c5ddc4Srjs#define GFX75_STATE_SIP_length_bias 2 771096c5ddc4Srjs#define GFX75_STATE_SIP_header \ 771110e230b6Smaya .DWordLength = 0, \ 771210e230b6Smaya ._3DCommandSubOpcode = 2, \ 771310e230b6Smaya ._3DCommandOpcode = 1, \ 771410e230b6Smaya .CommandSubType = 0, \ 771510e230b6Smaya .CommandType = 3 771610e230b6Smaya 771796c5ddc4Srjsstruct GFX75_STATE_SIP { 771810e230b6Smaya uint32_t DWordLength; 771910e230b6Smaya uint32_t _3DCommandSubOpcode; 772010e230b6Smaya uint32_t _3DCommandOpcode; 772110e230b6Smaya uint32_t CommandSubType; 772210e230b6Smaya uint32_t CommandType; 772310e230b6Smaya uint64_t SystemInstructionPointer; 772410e230b6Smaya}; 772510e230b6Smaya 772696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 772796c5ddc4SrjsGFX75_STATE_SIP_pack(__attribute__((unused)) __gen_user_data *data, 772810e230b6Smaya __attribute__((unused)) void * restrict dst, 772996c5ddc4Srjs __attribute__((unused)) const struct GFX75_STATE_SIP * restrict values) 773010e230b6Smaya{ 773110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 773210e230b6Smaya 773310e230b6Smaya dw[0] = 773410e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 773510e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 773610e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 773710e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 773810e230b6Smaya __gen_uint(values->CommandType, 29, 31); 773910e230b6Smaya 774010e230b6Smaya dw[1] = 774110e230b6Smaya __gen_offset(values->SystemInstructionPointer, 4, 31); 774210e230b6Smaya} 774310e230b6Smaya 774496c5ddc4Srjs#define GFX75_SWTESS_BASE_ADDRESS_length 2 774596c5ddc4Srjs#define GFX75_SWTESS_BASE_ADDRESS_length_bias 2 774696c5ddc4Srjs#define GFX75_SWTESS_BASE_ADDRESS_header \ 774710e230b6Smaya .DWordLength = 0, \ 774810e230b6Smaya ._3DCommandSubOpcode = 3, \ 774910e230b6Smaya ._3DCommandOpcode = 1, \ 775010e230b6Smaya .CommandSubType = 0, \ 775110e230b6Smaya .CommandType = 3 775210e230b6Smaya 775396c5ddc4Srjsstruct GFX75_SWTESS_BASE_ADDRESS { 775410e230b6Smaya uint32_t DWordLength; 775510e230b6Smaya uint32_t _3DCommandSubOpcode; 775610e230b6Smaya uint32_t _3DCommandOpcode; 775710e230b6Smaya uint32_t CommandSubType; 775810e230b6Smaya uint32_t CommandType; 775910e230b6Smaya uint32_t SWTessellationMOCS; 776010e230b6Smaya __gen_address_type SWTessellationBaseAddress; 776110e230b6Smaya}; 776210e230b6Smaya 776396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 776496c5ddc4SrjsGFX75_SWTESS_BASE_ADDRESS_pack(__attribute__((unused)) __gen_user_data *data, 776510e230b6Smaya __attribute__((unused)) void * restrict dst, 776696c5ddc4Srjs __attribute__((unused)) const struct GFX75_SWTESS_BASE_ADDRESS * restrict values) 776710e230b6Smaya{ 776810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 776910e230b6Smaya 777010e230b6Smaya dw[0] = 777110e230b6Smaya __gen_uint(values->DWordLength, 0, 7) | 777210e230b6Smaya __gen_uint(values->_3DCommandSubOpcode, 16, 23) | 777310e230b6Smaya __gen_uint(values->_3DCommandOpcode, 24, 26) | 777410e230b6Smaya __gen_uint(values->CommandSubType, 27, 28) | 777510e230b6Smaya __gen_uint(values->CommandType, 29, 31); 777610e230b6Smaya 777710e230b6Smaya const uint32_t v1 = 777810e230b6Smaya __gen_uint(values->SWTessellationMOCS, 8, 11); 777996c5ddc4Srjs dw[1] = __gen_address(data, &dw[1], values->SWTessellationBaseAddress, v1, 12, 31); 778010e230b6Smaya} 778110e230b6Smaya 778296c5ddc4Srjs#define GFX75_BCS_FAULT_REG_num 0x4294 778396c5ddc4Srjs#define GFX75_BCS_FAULT_REG_length 1 778496c5ddc4Srjsstruct GFX75_BCS_FAULT_REG { 778510e230b6Smaya bool ValidBit; 778610e230b6Smaya uint32_t FaultType; 778710e230b6Smaya#define PageFault 0 778810e230b6Smaya#define InvalidPDFault 1 778910e230b6Smaya#define UnloadedPDFault 2 779010e230b6Smaya#define InvalidandUnloadedPDfault 3 779110e230b6Smaya uint32_t SRCIDofFault; 779210e230b6Smaya uint32_t GTTSEL; 779310e230b6Smaya#define PPGTT 0 779410e230b6Smaya#define GGTT 1 779510e230b6Smaya __gen_address_type VirtualAddressofFault; 779610e230b6Smaya}; 779710e230b6Smaya 779896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 779996c5ddc4SrjsGFX75_BCS_FAULT_REG_pack(__attribute__((unused)) __gen_user_data *data, 780010e230b6Smaya __attribute__((unused)) void * restrict dst, 780196c5ddc4Srjs __attribute__((unused)) const struct GFX75_BCS_FAULT_REG * restrict values) 780210e230b6Smaya{ 780310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 780410e230b6Smaya 780510e230b6Smaya const uint32_t v0 = 780610e230b6Smaya __gen_uint(values->ValidBit, 0, 0) | 780710e230b6Smaya __gen_uint(values->FaultType, 1, 2) | 780810e230b6Smaya __gen_uint(values->SRCIDofFault, 3, 10) | 780910e230b6Smaya __gen_uint(values->GTTSEL, 11, 11); 781096c5ddc4Srjs dw[0] = __gen_address(data, &dw[0], values->VirtualAddressofFault, v0, 12, 31); 781110e230b6Smaya} 781210e230b6Smaya 781396c5ddc4Srjs#define GFX75_BCS_INSTDONE_num 0x2206c 781496c5ddc4Srjs#define GFX75_BCS_INSTDONE_length 1 781596c5ddc4Srjsstruct GFX75_BCS_INSTDONE { 781610e230b6Smaya bool RingEnable; 781710e230b6Smaya bool BlitterIDLE; 781810e230b6Smaya bool GABIDLE; 781910e230b6Smaya bool BCSDone; 782010e230b6Smaya}; 782110e230b6Smaya 782296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 782396c5ddc4SrjsGFX75_BCS_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 782410e230b6Smaya __attribute__((unused)) void * restrict dst, 782596c5ddc4Srjs __attribute__((unused)) const struct GFX75_BCS_INSTDONE * restrict values) 782610e230b6Smaya{ 782710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 782810e230b6Smaya 782910e230b6Smaya dw[0] = 783010e230b6Smaya __gen_uint(values->RingEnable, 0, 0) | 783110e230b6Smaya __gen_uint(values->BlitterIDLE, 1, 1) | 783210e230b6Smaya __gen_uint(values->GABIDLE, 2, 2) | 783310e230b6Smaya __gen_uint(values->BCSDone, 3, 3); 783410e230b6Smaya} 783510e230b6Smaya 783696c5ddc4Srjs#define GFX75_BCS_RING_BUFFER_CTL_num 0x2203c 783796c5ddc4Srjs#define GFX75_BCS_RING_BUFFER_CTL_length 1 783896c5ddc4Srjsstruct GFX75_BCS_RING_BUFFER_CTL { 783910e230b6Smaya bool RingBufferEnable; 784010e230b6Smaya uint32_t AutomaticReportHeadPointer; 784110e230b6Smaya#define MI_AUTOREPORT_OFF 0 784210e230b6Smaya#define MI_AUTOREPORT_64KB 1 784310e230b6Smaya#define MI_AUTOREPORT_4KB 2 784410e230b6Smaya#define MI_AUTOREPORT_128KB 3 784510e230b6Smaya bool DisableRegisterAccesses; 784610e230b6Smaya bool SemaphoreWait; 784710e230b6Smaya bool RBWait; 784810e230b6Smaya uint32_t BufferLengthinpages1; 784910e230b6Smaya}; 785010e230b6Smaya 785196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 785296c5ddc4SrjsGFX75_BCS_RING_BUFFER_CTL_pack(__attribute__((unused)) __gen_user_data *data, 785310e230b6Smaya __attribute__((unused)) void * restrict dst, 785496c5ddc4Srjs __attribute__((unused)) const struct GFX75_BCS_RING_BUFFER_CTL * restrict values) 785510e230b6Smaya{ 785610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 785710e230b6Smaya 785810e230b6Smaya dw[0] = 785910e230b6Smaya __gen_uint(values->RingBufferEnable, 0, 0) | 786010e230b6Smaya __gen_uint(values->AutomaticReportHeadPointer, 1, 2) | 786110e230b6Smaya __gen_uint(values->DisableRegisterAccesses, 8, 8) | 786210e230b6Smaya __gen_uint(values->SemaphoreWait, 10, 10) | 786310e230b6Smaya __gen_uint(values->RBWait, 11, 11) | 786410e230b6Smaya __gen_uint(values->BufferLengthinpages1, 12, 20); 786510e230b6Smaya} 786610e230b6Smaya 786796c5ddc4Srjs#define GFX75_CHICKEN3_num 0xe49c 786896c5ddc4Srjs#define GFX75_CHICKEN3_length 1 786996c5ddc4Srjsstruct GFX75_CHICKEN3 { 787010e230b6Smaya uint32_t L3AtomicDisable; 787110e230b6Smaya uint32_t L3AtomicDisableMask; 787210e230b6Smaya}; 787310e230b6Smaya 787496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 787596c5ddc4SrjsGFX75_CHICKEN3_pack(__attribute__((unused)) __gen_user_data *data, 787610e230b6Smaya __attribute__((unused)) void * restrict dst, 787796c5ddc4Srjs __attribute__((unused)) const struct GFX75_CHICKEN3 * restrict values) 787810e230b6Smaya{ 787910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 788010e230b6Smaya 788110e230b6Smaya dw[0] = 788210e230b6Smaya __gen_uint(values->L3AtomicDisable, 6, 6) | 788310e230b6Smaya __gen_uint(values->L3AtomicDisableMask, 22, 22); 788410e230b6Smaya} 788510e230b6Smaya 788696c5ddc4Srjs#define GFX75_CL_INVOCATION_COUNT_num 0x2338 788796c5ddc4Srjs#define GFX75_CL_INVOCATION_COUNT_length 2 788896c5ddc4Srjsstruct GFX75_CL_INVOCATION_COUNT { 788910e230b6Smaya uint64_t CLInvocationCountReport; 789010e230b6Smaya}; 789110e230b6Smaya 789296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 789396c5ddc4SrjsGFX75_CL_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 789410e230b6Smaya __attribute__((unused)) void * restrict dst, 789596c5ddc4Srjs __attribute__((unused)) const struct GFX75_CL_INVOCATION_COUNT * restrict values) 789610e230b6Smaya{ 789710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 789810e230b6Smaya 789910e230b6Smaya const uint64_t v0 = 790010e230b6Smaya __gen_uint(values->CLInvocationCountReport, 0, 63); 790110e230b6Smaya dw[0] = v0; 790210e230b6Smaya dw[1] = v0 >> 32; 790310e230b6Smaya} 790410e230b6Smaya 790596c5ddc4Srjs#define GFX75_CL_PRIMITIVES_COUNT_num 0x2340 790696c5ddc4Srjs#define GFX75_CL_PRIMITIVES_COUNT_length 2 790796c5ddc4Srjsstruct GFX75_CL_PRIMITIVES_COUNT { 790810e230b6Smaya uint64_t CLPrimitivesCountReport; 790910e230b6Smaya}; 791010e230b6Smaya 791196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 791296c5ddc4SrjsGFX75_CL_PRIMITIVES_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 791310e230b6Smaya __attribute__((unused)) void * restrict dst, 791496c5ddc4Srjs __attribute__((unused)) const struct GFX75_CL_PRIMITIVES_COUNT * restrict values) 791510e230b6Smaya{ 791610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 791710e230b6Smaya 791810e230b6Smaya const uint64_t v0 = 791910e230b6Smaya __gen_uint(values->CLPrimitivesCountReport, 0, 63); 792010e230b6Smaya dw[0] = v0; 792110e230b6Smaya dw[1] = v0 >> 32; 792210e230b6Smaya} 792310e230b6Smaya 792496c5ddc4Srjs#define GFX75_CS_INVOCATION_COUNT_num 0x2290 792596c5ddc4Srjs#define GFX75_CS_INVOCATION_COUNT_length 2 792696c5ddc4Srjsstruct GFX75_CS_INVOCATION_COUNT { 792710e230b6Smaya uint64_t CSInvocationCountReport; 792810e230b6Smaya}; 792910e230b6Smaya 793096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 793196c5ddc4SrjsGFX75_CS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 793210e230b6Smaya __attribute__((unused)) void * restrict dst, 793396c5ddc4Srjs __attribute__((unused)) const struct GFX75_CS_INVOCATION_COUNT * restrict values) 793410e230b6Smaya{ 793510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 793610e230b6Smaya 793710e230b6Smaya const uint64_t v0 = 793810e230b6Smaya __gen_uint(values->CSInvocationCountReport, 0, 63); 793910e230b6Smaya dw[0] = v0; 794010e230b6Smaya dw[1] = v0 >> 32; 794110e230b6Smaya} 794210e230b6Smaya 794396c5ddc4Srjs#define GFX75_DS_INVOCATION_COUNT_num 0x2308 794496c5ddc4Srjs#define GFX75_DS_INVOCATION_COUNT_length 2 794596c5ddc4Srjsstruct GFX75_DS_INVOCATION_COUNT { 794610e230b6Smaya uint64_t DSInvocationCountReport; 794710e230b6Smaya}; 794810e230b6Smaya 794996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 795096c5ddc4SrjsGFX75_DS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 795110e230b6Smaya __attribute__((unused)) void * restrict dst, 795296c5ddc4Srjs __attribute__((unused)) const struct GFX75_DS_INVOCATION_COUNT * restrict values) 795310e230b6Smaya{ 795410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 795510e230b6Smaya 795610e230b6Smaya const uint64_t v0 = 795710e230b6Smaya __gen_uint(values->DSInvocationCountReport, 0, 63); 795810e230b6Smaya dw[0] = v0; 795910e230b6Smaya dw[1] = v0 >> 32; 796010e230b6Smaya} 796110e230b6Smaya 796296c5ddc4Srjs#define GFX75_ERR_INT_num 0x44040 796396c5ddc4Srjs#define GFX75_ERR_INT_length 1 796496c5ddc4Srjsstruct GFX75_ERR_INT { 796510e230b6Smaya bool PrimaryAGTTFaultStatus; 796610e230b6Smaya bool PrimaryBGTTFaultStatus; 796710e230b6Smaya bool SpriteAGTTFaultStatus; 796810e230b6Smaya bool SpriteBGTTFaultStatus; 796910e230b6Smaya bool CursorAGTTFaultStatus; 797010e230b6Smaya bool CursorBGTTFaultStatus; 797110e230b6Smaya bool Invalidpagetableentrydata; 797210e230b6Smaya bool InvalidGTTpagetableentry; 797310e230b6Smaya}; 797410e230b6Smaya 797596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 797696c5ddc4SrjsGFX75_ERR_INT_pack(__attribute__((unused)) __gen_user_data *data, 797710e230b6Smaya __attribute__((unused)) void * restrict dst, 797896c5ddc4Srjs __attribute__((unused)) const struct GFX75_ERR_INT * restrict values) 797910e230b6Smaya{ 798010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 798110e230b6Smaya 798210e230b6Smaya dw[0] = 798310e230b6Smaya __gen_uint(values->PrimaryAGTTFaultStatus, 0, 0) | 798410e230b6Smaya __gen_uint(values->PrimaryBGTTFaultStatus, 1, 1) | 798510e230b6Smaya __gen_uint(values->SpriteAGTTFaultStatus, 2, 2) | 798610e230b6Smaya __gen_uint(values->SpriteBGTTFaultStatus, 3, 3) | 798710e230b6Smaya __gen_uint(values->CursorAGTTFaultStatus, 4, 4) | 798810e230b6Smaya __gen_uint(values->CursorBGTTFaultStatus, 5, 5) | 798910e230b6Smaya __gen_uint(values->Invalidpagetableentrydata, 6, 6) | 799010e230b6Smaya __gen_uint(values->InvalidGTTpagetableentry, 7, 7); 799110e230b6Smaya} 799210e230b6Smaya 799396c5ddc4Srjs#define GFX75_GFX_ARB_ERROR_RPT_num 0x40a0 799496c5ddc4Srjs#define GFX75_GFX_ARB_ERROR_RPT_length 1 799596c5ddc4Srjsstruct GFX75_GFX_ARB_ERROR_RPT { 799610e230b6Smaya bool TLBPageFaultError; 799710e230b6Smaya bool ContextPageFaultError; 799810e230b6Smaya bool InvalidPageDirectoryentryerror; 799910e230b6Smaya bool HardwareStatusPageFaultError; 800010e230b6Smaya bool TLBPageVTDTranslationError; 800110e230b6Smaya bool ContextPageVTDTranslationError; 800210e230b6Smaya bool PageDirectoryEntryVTDTranslationError; 800310e230b6Smaya bool HardwareStatusPageVTDTranslationError; 800410e230b6Smaya bool UnloadedPDError; 800510e230b6Smaya uint32_t PendingPageFaults; 800610e230b6Smaya}; 800710e230b6Smaya 800896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 800996c5ddc4SrjsGFX75_GFX_ARB_ERROR_RPT_pack(__attribute__((unused)) __gen_user_data *data, 801010e230b6Smaya __attribute__((unused)) void * restrict dst, 801196c5ddc4Srjs __attribute__((unused)) const struct GFX75_GFX_ARB_ERROR_RPT * restrict values) 801210e230b6Smaya{ 801310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 801410e230b6Smaya 801510e230b6Smaya dw[0] = 801610e230b6Smaya __gen_uint(values->TLBPageFaultError, 0, 0) | 801710e230b6Smaya __gen_uint(values->ContextPageFaultError, 1, 1) | 801810e230b6Smaya __gen_uint(values->InvalidPageDirectoryentryerror, 2, 2) | 801910e230b6Smaya __gen_uint(values->HardwareStatusPageFaultError, 3, 3) | 802010e230b6Smaya __gen_uint(values->TLBPageVTDTranslationError, 4, 4) | 802110e230b6Smaya __gen_uint(values->ContextPageVTDTranslationError, 5, 5) | 802210e230b6Smaya __gen_uint(values->PageDirectoryEntryVTDTranslationError, 6, 6) | 802310e230b6Smaya __gen_uint(values->HardwareStatusPageVTDTranslationError, 7, 7) | 802410e230b6Smaya __gen_uint(values->UnloadedPDError, 8, 8) | 802510e230b6Smaya __gen_uint(values->PendingPageFaults, 9, 15); 802610e230b6Smaya} 802710e230b6Smaya 802896c5ddc4Srjs#define GFX75_GS_INVOCATION_COUNT_num 0x2328 802996c5ddc4Srjs#define GFX75_GS_INVOCATION_COUNT_length 2 803096c5ddc4Srjsstruct GFX75_GS_INVOCATION_COUNT { 803110e230b6Smaya uint64_t GSInvocationCountReport; 803210e230b6Smaya}; 803310e230b6Smaya 803496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 803596c5ddc4SrjsGFX75_GS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 803610e230b6Smaya __attribute__((unused)) void * restrict dst, 803796c5ddc4Srjs __attribute__((unused)) const struct GFX75_GS_INVOCATION_COUNT * restrict values) 803810e230b6Smaya{ 803910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 804010e230b6Smaya 804110e230b6Smaya const uint64_t v0 = 804210e230b6Smaya __gen_uint(values->GSInvocationCountReport, 0, 63); 804310e230b6Smaya dw[0] = v0; 804410e230b6Smaya dw[1] = v0 >> 32; 804510e230b6Smaya} 804610e230b6Smaya 804796c5ddc4Srjs#define GFX75_GS_PRIMITIVES_COUNT_num 0x2330 804896c5ddc4Srjs#define GFX75_GS_PRIMITIVES_COUNT_length 2 804996c5ddc4Srjsstruct GFX75_GS_PRIMITIVES_COUNT { 805010e230b6Smaya uint64_t GSPrimitivesCountReport; 805110e230b6Smaya}; 805210e230b6Smaya 805396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 805496c5ddc4SrjsGFX75_GS_PRIMITIVES_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 805510e230b6Smaya __attribute__((unused)) void * restrict dst, 805696c5ddc4Srjs __attribute__((unused)) const struct GFX75_GS_PRIMITIVES_COUNT * restrict values) 805710e230b6Smaya{ 805810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 805910e230b6Smaya 806010e230b6Smaya const uint64_t v0 = 806110e230b6Smaya __gen_uint(values->GSPrimitivesCountReport, 0, 63); 806210e230b6Smaya dw[0] = v0; 806310e230b6Smaya dw[1] = v0 >> 32; 806410e230b6Smaya} 806510e230b6Smaya 806696c5ddc4Srjs#define GFX75_HS_INVOCATION_COUNT_num 0x2300 806796c5ddc4Srjs#define GFX75_HS_INVOCATION_COUNT_length 2 806896c5ddc4Srjsstruct GFX75_HS_INVOCATION_COUNT { 806910e230b6Smaya uint64_t HSInvocationCountReport; 807010e230b6Smaya}; 807110e230b6Smaya 807296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 807396c5ddc4SrjsGFX75_HS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 807410e230b6Smaya __attribute__((unused)) void * restrict dst, 807596c5ddc4Srjs __attribute__((unused)) const struct GFX75_HS_INVOCATION_COUNT * restrict values) 807610e230b6Smaya{ 807710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 807810e230b6Smaya 807910e230b6Smaya const uint64_t v0 = 808010e230b6Smaya __gen_uint(values->HSInvocationCountReport, 0, 63); 808110e230b6Smaya dw[0] = v0; 808210e230b6Smaya dw[1] = v0 >> 32; 808310e230b6Smaya} 808410e230b6Smaya 808596c5ddc4Srjs#define GFX75_IA_PRIMITIVES_COUNT_num 0x2318 808696c5ddc4Srjs#define GFX75_IA_PRIMITIVES_COUNT_length 2 808796c5ddc4Srjsstruct GFX75_IA_PRIMITIVES_COUNT { 808810e230b6Smaya uint64_t IAPrimitivesCountReport; 808910e230b6Smaya}; 809010e230b6Smaya 809196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 809296c5ddc4SrjsGFX75_IA_PRIMITIVES_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 809310e230b6Smaya __attribute__((unused)) void * restrict dst, 809496c5ddc4Srjs __attribute__((unused)) const struct GFX75_IA_PRIMITIVES_COUNT * restrict values) 809510e230b6Smaya{ 809610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 809710e230b6Smaya 809810e230b6Smaya const uint64_t v0 = 809910e230b6Smaya __gen_uint(values->IAPrimitivesCountReport, 0, 63); 810010e230b6Smaya dw[0] = v0; 810110e230b6Smaya dw[1] = v0 >> 32; 810210e230b6Smaya} 810310e230b6Smaya 810496c5ddc4Srjs#define GFX75_IA_VERTICES_COUNT_num 0x2310 810596c5ddc4Srjs#define GFX75_IA_VERTICES_COUNT_length 2 810696c5ddc4Srjsstruct GFX75_IA_VERTICES_COUNT { 810710e230b6Smaya uint64_t IAVerticesCountReport; 810810e230b6Smaya}; 810910e230b6Smaya 811096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 811196c5ddc4SrjsGFX75_IA_VERTICES_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 811210e230b6Smaya __attribute__((unused)) void * restrict dst, 811396c5ddc4Srjs __attribute__((unused)) const struct GFX75_IA_VERTICES_COUNT * restrict values) 811410e230b6Smaya{ 811510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 811610e230b6Smaya 811710e230b6Smaya const uint64_t v0 = 811810e230b6Smaya __gen_uint(values->IAVerticesCountReport, 0, 63); 811910e230b6Smaya dw[0] = v0; 812010e230b6Smaya dw[1] = v0 >> 32; 812110e230b6Smaya} 812210e230b6Smaya 812396c5ddc4Srjs#define GFX75_INSTDONE_1_num 0x206c 812496c5ddc4Srjs#define GFX75_INSTDONE_1_length 1 812596c5ddc4Srjsstruct GFX75_INSTDONE_1 { 812610e230b6Smaya bool PRB0RingEnable; 812710e230b6Smaya bool VFGDone; 812810e230b6Smaya bool VSDone; 812910e230b6Smaya bool HSDone; 813010e230b6Smaya bool TEDone; 813110e230b6Smaya bool DSDone; 813210e230b6Smaya bool GSDone; 813310e230b6Smaya bool SOLDone; 813410e230b6Smaya bool CLDone; 813510e230b6Smaya bool SFDone; 813610e230b6Smaya bool TDGDone; 813710e230b6Smaya bool URBMDone; 813810e230b6Smaya bool SVGDone; 813910e230b6Smaya bool GAFSDone; 814010e230b6Smaya bool VFEDone; 814110e230b6Smaya bool TSGDone; 814210e230b6Smaya bool GAFMDone; 814310e230b6Smaya bool GAMDone; 814410e230b6Smaya bool RSDone; 814510e230b6Smaya bool CSDone; 814610e230b6Smaya bool SDEDone; 814710e230b6Smaya bool RCCFBCCSDone; 814810e230b6Smaya}; 814910e230b6Smaya 815096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 815196c5ddc4SrjsGFX75_INSTDONE_1_pack(__attribute__((unused)) __gen_user_data *data, 815210e230b6Smaya __attribute__((unused)) void * restrict dst, 815396c5ddc4Srjs __attribute__((unused)) const struct GFX75_INSTDONE_1 * restrict values) 815410e230b6Smaya{ 815510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 815610e230b6Smaya 815710e230b6Smaya dw[0] = 815810e230b6Smaya __gen_uint(values->PRB0RingEnable, 0, 0) | 815910e230b6Smaya __gen_uint(values->VFGDone, 1, 1) | 816010e230b6Smaya __gen_uint(values->VSDone, 2, 2) | 816110e230b6Smaya __gen_uint(values->HSDone, 3, 3) | 816210e230b6Smaya __gen_uint(values->TEDone, 4, 4) | 816310e230b6Smaya __gen_uint(values->DSDone, 5, 5) | 816410e230b6Smaya __gen_uint(values->GSDone, 6, 6) | 816510e230b6Smaya __gen_uint(values->SOLDone, 7, 7) | 816610e230b6Smaya __gen_uint(values->CLDone, 8, 8) | 816710e230b6Smaya __gen_uint(values->SFDone, 9, 9) | 816810e230b6Smaya __gen_uint(values->TDGDone, 12, 12) | 816910e230b6Smaya __gen_uint(values->URBMDone, 13, 13) | 817010e230b6Smaya __gen_uint(values->SVGDone, 14, 14) | 817110e230b6Smaya __gen_uint(values->GAFSDone, 15, 15) | 817210e230b6Smaya __gen_uint(values->VFEDone, 16, 16) | 817310e230b6Smaya __gen_uint(values->TSGDone, 17, 17) | 817410e230b6Smaya __gen_uint(values->GAFMDone, 18, 18) | 817510e230b6Smaya __gen_uint(values->GAMDone, 19, 19) | 817610e230b6Smaya __gen_uint(values->RSDone, 20, 20) | 817710e230b6Smaya __gen_uint(values->CSDone, 21, 21) | 817810e230b6Smaya __gen_uint(values->SDEDone, 22, 22) | 817910e230b6Smaya __gen_uint(values->RCCFBCCSDone, 23, 23); 818010e230b6Smaya} 818110e230b6Smaya 818296c5ddc4Srjs#define GFX75_INSTPM_num 0x20c0 818396c5ddc4Srjs#define GFX75_INSTPM_length 1 818496c5ddc4Srjsstruct GFX75_INSTPM { 818510e230b6Smaya bool _3DStateInstructionDisable; 818610e230b6Smaya bool _3DRenderingInstructionDisable; 818710e230b6Smaya bool MediaInstructionDisable; 818810e230b6Smaya bool CONSTANT_BUFFERAddressOffsetDisable; 818910e230b6Smaya bool _3DStateInstructionDisableMask; 819010e230b6Smaya bool _3DRenderingInstructionDisableMask; 819110e230b6Smaya bool MediaInstructionDisableMask; 819210e230b6Smaya bool CONSTANT_BUFFERAddressOffsetDisableMask; 819310e230b6Smaya}; 819410e230b6Smaya 819596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 819696c5ddc4SrjsGFX75_INSTPM_pack(__attribute__((unused)) __gen_user_data *data, 819710e230b6Smaya __attribute__((unused)) void * restrict dst, 819896c5ddc4Srjs __attribute__((unused)) const struct GFX75_INSTPM * restrict values) 819910e230b6Smaya{ 820010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 820110e230b6Smaya 820210e230b6Smaya dw[0] = 820310e230b6Smaya __gen_uint(values->_3DStateInstructionDisable, 1, 1) | 820410e230b6Smaya __gen_uint(values->_3DRenderingInstructionDisable, 2, 2) | 820510e230b6Smaya __gen_uint(values->MediaInstructionDisable, 3, 3) | 820610e230b6Smaya __gen_uint(values->CONSTANT_BUFFERAddressOffsetDisable, 6, 6) | 820710e230b6Smaya __gen_uint(values->_3DStateInstructionDisableMask, 17, 17) | 820810e230b6Smaya __gen_uint(values->_3DRenderingInstructionDisableMask, 18, 18) | 820910e230b6Smaya __gen_uint(values->MediaInstructionDisableMask, 19, 19) | 821010e230b6Smaya __gen_uint(values->CONSTANT_BUFFERAddressOffsetDisableMask, 22, 22); 821110e230b6Smaya} 821210e230b6Smaya 821396c5ddc4Srjs#define GFX75_L3CNTLREG2_num 0xb020 821496c5ddc4Srjs#define GFX75_L3CNTLREG2_length 1 821596c5ddc4Srjsstruct GFX75_L3CNTLREG2 { 821696c5ddc4Srjs bool SLMEnable; 821710e230b6Smaya uint32_t URBAllocation; 821896c5ddc4Srjs bool URBLowBandwidth; 821910e230b6Smaya uint32_t ROAllocation; 822096c5ddc4Srjs bool ROLowBandwidth; 822110e230b6Smaya uint32_t DCAllocation; 822296c5ddc4Srjs bool DCLowBandwidth; 822310e230b6Smaya}; 822410e230b6Smaya 822596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 822696c5ddc4SrjsGFX75_L3CNTLREG2_pack(__attribute__((unused)) __gen_user_data *data, 822710e230b6Smaya __attribute__((unused)) void * restrict dst, 822896c5ddc4Srjs __attribute__((unused)) const struct GFX75_L3CNTLREG2 * restrict values) 822910e230b6Smaya{ 823010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 823110e230b6Smaya 823210e230b6Smaya dw[0] = 823310e230b6Smaya __gen_uint(values->SLMEnable, 0, 0) | 823410e230b6Smaya __gen_uint(values->URBAllocation, 1, 6) | 823510e230b6Smaya __gen_uint(values->URBLowBandwidth, 7, 7) | 823610e230b6Smaya __gen_uint(values->ROAllocation, 14, 19) | 823710e230b6Smaya __gen_uint(values->ROLowBandwidth, 20, 20) | 823810e230b6Smaya __gen_uint(values->DCAllocation, 21, 26) | 823910e230b6Smaya __gen_uint(values->DCLowBandwidth, 27, 27); 824010e230b6Smaya} 824110e230b6Smaya 824296c5ddc4Srjs#define GFX75_L3CNTLREG3_num 0xb024 824396c5ddc4Srjs#define GFX75_L3CNTLREG3_length 1 824496c5ddc4Srjsstruct GFX75_L3CNTLREG3 { 824510e230b6Smaya uint32_t ISAllocation; 824696c5ddc4Srjs bool ISLowBandwidth; 824710e230b6Smaya uint32_t CAllocation; 824896c5ddc4Srjs bool CLowBandwidth; 824910e230b6Smaya uint32_t TAllocation; 825096c5ddc4Srjs bool TLowBandwidth; 825110e230b6Smaya}; 825210e230b6Smaya 825396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 825496c5ddc4SrjsGFX75_L3CNTLREG3_pack(__attribute__((unused)) __gen_user_data *data, 825510e230b6Smaya __attribute__((unused)) void * restrict dst, 825696c5ddc4Srjs __attribute__((unused)) const struct GFX75_L3CNTLREG3 * restrict values) 825710e230b6Smaya{ 825810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 825910e230b6Smaya 826010e230b6Smaya dw[0] = 826110e230b6Smaya __gen_uint(values->ISAllocation, 1, 6) | 826210e230b6Smaya __gen_uint(values->ISLowBandwidth, 7, 7) | 826310e230b6Smaya __gen_uint(values->CAllocation, 8, 13) | 826410e230b6Smaya __gen_uint(values->CLowBandwidth, 14, 14) | 826510e230b6Smaya __gen_uint(values->TAllocation, 15, 20) | 826610e230b6Smaya __gen_uint(values->TLowBandwidth, 21, 21); 826710e230b6Smaya} 826810e230b6Smaya 826996c5ddc4Srjs#define GFX75_L3SQCREG1_num 0xb010 827096c5ddc4Srjs#define GFX75_L3SQCREG1_length 1 827196c5ddc4Srjsstruct GFX75_L3SQCREG1 { 827296c5ddc4Srjs uint32_t L3SQGeneralPriorityCreditInitialization; 827396c5ddc4Srjs#define SQGPCI_DEFAULT 12 827496c5ddc4Srjs uint32_t L3SQHighPriorityCreditInitialization; 827596c5ddc4Srjs#define SQHPCI_DEFAULT 4 827696c5ddc4Srjs bool ConvertDC_UC; 827796c5ddc4Srjs bool ConvertIS_UC; 827896c5ddc4Srjs bool ConvertC_UC; 827996c5ddc4Srjs bool ConvertT_UC; 828010e230b6Smaya}; 828110e230b6Smaya 828296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 828396c5ddc4SrjsGFX75_L3SQCREG1_pack(__attribute__((unused)) __gen_user_data *data, 828410e230b6Smaya __attribute__((unused)) void * restrict dst, 828596c5ddc4Srjs __attribute__((unused)) const struct GFX75_L3SQCREG1 * restrict values) 828610e230b6Smaya{ 828710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 828810e230b6Smaya 828910e230b6Smaya dw[0] = 829096c5ddc4Srjs __gen_uint(values->L3SQGeneralPriorityCreditInitialization, 19, 23) | 829196c5ddc4Srjs __gen_uint(values->L3SQHighPriorityCreditInitialization, 14, 18) | 829210e230b6Smaya __gen_uint(values->ConvertDC_UC, 24, 24) | 829310e230b6Smaya __gen_uint(values->ConvertIS_UC, 25, 25) | 829410e230b6Smaya __gen_uint(values->ConvertC_UC, 26, 26) | 829510e230b6Smaya __gen_uint(values->ConvertT_UC, 27, 27); 829610e230b6Smaya} 829710e230b6Smaya 829896c5ddc4Srjs#define GFX75_PERFCNT1_num 0x91b8 829996c5ddc4Srjs#define GFX75_PERFCNT1_length 2 830096c5ddc4Srjsstruct GFX75_PERFCNT1 { 830196c5ddc4Srjs uint64_t Value; 830296c5ddc4Srjs uint32_t EventSelection; 830396c5ddc4Srjs bool CounterClear; 830496c5ddc4Srjs bool EdgeDetect; 830596c5ddc4Srjs bool OverflowEnable; 830696c5ddc4Srjs bool CounterEnable; 830796c5ddc4Srjs}; 830896c5ddc4Srjs 830996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 831096c5ddc4SrjsGFX75_PERFCNT1_pack(__attribute__((unused)) __gen_user_data *data, 831196c5ddc4Srjs __attribute__((unused)) void * restrict dst, 831296c5ddc4Srjs __attribute__((unused)) const struct GFX75_PERFCNT1 * restrict values) 831396c5ddc4Srjs{ 831496c5ddc4Srjs uint32_t * restrict dw = (uint32_t * restrict) dst; 831596c5ddc4Srjs 831696c5ddc4Srjs const uint64_t v0 = 831796c5ddc4Srjs __gen_uint(values->Value, 0, 43) | 831896c5ddc4Srjs __gen_uint(values->EventSelection, 52, 59) | 831996c5ddc4Srjs __gen_uint(values->CounterClear, 60, 60) | 832096c5ddc4Srjs __gen_uint(values->EdgeDetect, 61, 61) | 832196c5ddc4Srjs __gen_uint(values->OverflowEnable, 62, 62) | 832296c5ddc4Srjs __gen_uint(values->CounterEnable, 63, 63); 832396c5ddc4Srjs dw[0] = v0; 832496c5ddc4Srjs dw[1] = v0 >> 32; 832596c5ddc4Srjs} 832696c5ddc4Srjs 832796c5ddc4Srjs#define GFX75_PERFCNT2_num 0x91c0 832896c5ddc4Srjs#define GFX75_PERFCNT2_length 2 832996c5ddc4Srjsstruct GFX75_PERFCNT2 { 833096c5ddc4Srjs uint64_t Value; 833196c5ddc4Srjs uint32_t EventSelection; 833296c5ddc4Srjs bool CounterClear; 833396c5ddc4Srjs bool EdgeDetect; 833496c5ddc4Srjs bool OverflowEnable; 833596c5ddc4Srjs bool CounterEnable; 833696c5ddc4Srjs}; 833796c5ddc4Srjs 833896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 833996c5ddc4SrjsGFX75_PERFCNT2_pack(__attribute__((unused)) __gen_user_data *data, 834096c5ddc4Srjs __attribute__((unused)) void * restrict dst, 834196c5ddc4Srjs __attribute__((unused)) const struct GFX75_PERFCNT2 * restrict values) 834296c5ddc4Srjs{ 834396c5ddc4Srjs uint32_t * restrict dw = (uint32_t * restrict) dst; 834496c5ddc4Srjs 834596c5ddc4Srjs const uint64_t v0 = 834696c5ddc4Srjs __gen_uint(values->Value, 0, 43) | 834796c5ddc4Srjs __gen_uint(values->EventSelection, 52, 59) | 834896c5ddc4Srjs __gen_uint(values->CounterClear, 60, 60) | 834996c5ddc4Srjs __gen_uint(values->EdgeDetect, 61, 61) | 835096c5ddc4Srjs __gen_uint(values->OverflowEnable, 62, 62) | 835196c5ddc4Srjs __gen_uint(values->CounterEnable, 63, 63); 835296c5ddc4Srjs dw[0] = v0; 835396c5ddc4Srjs dw[1] = v0 >> 32; 835496c5ddc4Srjs} 835596c5ddc4Srjs 835696c5ddc4Srjs#define GFX75_PS_INVOCATION_COUNT_num 0x2348 835796c5ddc4Srjs#define GFX75_PS_INVOCATION_COUNT_length 2 835896c5ddc4Srjsstruct GFX75_PS_INVOCATION_COUNT { 835910e230b6Smaya uint64_t PSInvocationCountReport; 836010e230b6Smaya}; 836110e230b6Smaya 836296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 836396c5ddc4SrjsGFX75_PS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 836410e230b6Smaya __attribute__((unused)) void * restrict dst, 836596c5ddc4Srjs __attribute__((unused)) const struct GFX75_PS_INVOCATION_COUNT * restrict values) 836610e230b6Smaya{ 836710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 836810e230b6Smaya 836910e230b6Smaya const uint64_t v0 = 837010e230b6Smaya __gen_uint(values->PSInvocationCountReport, 0, 63); 837110e230b6Smaya dw[0] = v0; 837210e230b6Smaya dw[1] = v0 >> 32; 837310e230b6Smaya} 837410e230b6Smaya 837596c5ddc4Srjs#define GFX75_RCS_FAULT_REG_num 0x4094 837696c5ddc4Srjs#define GFX75_RCS_FAULT_REG_length 1 837796c5ddc4Srjsstruct GFX75_RCS_FAULT_REG { 837810e230b6Smaya bool ValidBit; 837910e230b6Smaya uint32_t FaultType; 838010e230b6Smaya#define PageFault 0 838110e230b6Smaya#define InvalidPDFault 1 838210e230b6Smaya#define UnloadedPDFault 2 838310e230b6Smaya#define InvalidandUnloadedPDfault 3 838410e230b6Smaya uint32_t SRCIDofFault; 838510e230b6Smaya uint32_t GTTSEL; 838610e230b6Smaya#define PPGTT 0 838710e230b6Smaya#define GGTT 1 838810e230b6Smaya __gen_address_type VirtualAddressofFault; 838910e230b6Smaya}; 839010e230b6Smaya 839196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 839296c5ddc4SrjsGFX75_RCS_FAULT_REG_pack(__attribute__((unused)) __gen_user_data *data, 839310e230b6Smaya __attribute__((unused)) void * restrict dst, 839496c5ddc4Srjs __attribute__((unused)) const struct GFX75_RCS_FAULT_REG * restrict values) 839510e230b6Smaya{ 839610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 839710e230b6Smaya 839810e230b6Smaya const uint32_t v0 = 839910e230b6Smaya __gen_uint(values->ValidBit, 0, 0) | 840010e230b6Smaya __gen_uint(values->FaultType, 1, 2) | 840110e230b6Smaya __gen_uint(values->SRCIDofFault, 3, 10) | 840210e230b6Smaya __gen_uint(values->GTTSEL, 11, 11); 840396c5ddc4Srjs dw[0] = __gen_address(data, &dw[0], values->VirtualAddressofFault, v0, 12, 31); 840410e230b6Smaya} 840510e230b6Smaya 840696c5ddc4Srjs#define GFX75_RCS_RING_BUFFER_CTL_num 0x203c 840796c5ddc4Srjs#define GFX75_RCS_RING_BUFFER_CTL_length 1 840896c5ddc4Srjsstruct GFX75_RCS_RING_BUFFER_CTL { 840910e230b6Smaya bool RingBufferEnable; 841010e230b6Smaya uint32_t AutomaticReportHeadPointer; 841110e230b6Smaya#define MI_AUTOREPORT_OFF 0 841210e230b6Smaya#define MI_AUTOREPORT_64KBMI_AUTOREPORT_4KB 1 841310e230b6Smaya#define MI_AUTOREPORT_128KB 3 841410e230b6Smaya bool SemaphoreWait; 841510e230b6Smaya bool RBWait; 841610e230b6Smaya uint32_t BufferLengthinpages1; 841710e230b6Smaya}; 841810e230b6Smaya 841996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 842096c5ddc4SrjsGFX75_RCS_RING_BUFFER_CTL_pack(__attribute__((unused)) __gen_user_data *data, 842110e230b6Smaya __attribute__((unused)) void * restrict dst, 842296c5ddc4Srjs __attribute__((unused)) const struct GFX75_RCS_RING_BUFFER_CTL * restrict values) 842310e230b6Smaya{ 842410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 842510e230b6Smaya 842610e230b6Smaya dw[0] = 842710e230b6Smaya __gen_uint(values->RingBufferEnable, 0, 0) | 842810e230b6Smaya __gen_uint(values->AutomaticReportHeadPointer, 1, 2) | 842910e230b6Smaya __gen_uint(values->SemaphoreWait, 10, 10) | 843010e230b6Smaya __gen_uint(values->RBWait, 11, 11) | 843110e230b6Smaya __gen_uint(values->BufferLengthinpages1, 12, 20); 843210e230b6Smaya} 843310e230b6Smaya 843496c5ddc4Srjs#define GFX75_ROW_INSTDONE_num 0xe164 843596c5ddc4Srjs#define GFX75_ROW_INSTDONE_length 1 843696c5ddc4Srjsstruct GFX75_ROW_INSTDONE { 843710e230b6Smaya bool BCDone; 843810e230b6Smaya bool PSDDone; 843910e230b6Smaya bool DCDone; 844010e230b6Smaya bool DAPRDone; 844110e230b6Smaya bool TDLDone; 844210e230b6Smaya bool GWDone; 844310e230b6Smaya bool ICDone; 844410e230b6Smaya bool MA0Done; 844510e230b6Smaya bool EU00DoneSS0; 844610e230b6Smaya bool EU01DoneSS0; 844710e230b6Smaya bool EU02DoneSS0; 844810e230b6Smaya bool EU03DoneSS0; 844910e230b6Smaya bool EU04DoneSS0; 845010e230b6Smaya bool EU10DoneSS0; 845110e230b6Smaya bool EU11DoneSS0; 845210e230b6Smaya bool EU12DoneSS0; 845310e230b6Smaya bool EU13DoneSS0; 845410e230b6Smaya bool EU14DoneSS0; 845510e230b6Smaya bool MA1DoneSS0; 845610e230b6Smaya}; 845710e230b6Smaya 845896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 845996c5ddc4SrjsGFX75_ROW_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 846010e230b6Smaya __attribute__((unused)) void * restrict dst, 846196c5ddc4Srjs __attribute__((unused)) const struct GFX75_ROW_INSTDONE * restrict values) 846210e230b6Smaya{ 846310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 846410e230b6Smaya 846510e230b6Smaya dw[0] = 846610e230b6Smaya __gen_uint(values->BCDone, 0, 0) | 846710e230b6Smaya __gen_uint(values->PSDDone, 1, 1) | 846810e230b6Smaya __gen_uint(values->DCDone, 2, 2) | 846910e230b6Smaya __gen_uint(values->DAPRDone, 3, 3) | 847010e230b6Smaya __gen_uint(values->TDLDone, 6, 6) | 847110e230b6Smaya __gen_uint(values->GWDone, 8, 8) | 847210e230b6Smaya __gen_uint(values->ICDone, 12, 12) | 847310e230b6Smaya __gen_uint(values->MA0Done, 15, 15) | 847410e230b6Smaya __gen_uint(values->EU00DoneSS0, 16, 16) | 847510e230b6Smaya __gen_uint(values->EU01DoneSS0, 17, 17) | 847610e230b6Smaya __gen_uint(values->EU02DoneSS0, 18, 18) | 847710e230b6Smaya __gen_uint(values->EU03DoneSS0, 19, 19) | 847810e230b6Smaya __gen_uint(values->EU04DoneSS0, 20, 20) | 847910e230b6Smaya __gen_uint(values->EU10DoneSS0, 21, 21) | 848010e230b6Smaya __gen_uint(values->EU11DoneSS0, 22, 22) | 848110e230b6Smaya __gen_uint(values->EU12DoneSS0, 23, 23) | 848210e230b6Smaya __gen_uint(values->EU13DoneSS0, 24, 24) | 848310e230b6Smaya __gen_uint(values->EU14DoneSS0, 25, 25) | 848410e230b6Smaya __gen_uint(values->MA1DoneSS0, 26, 26); 848510e230b6Smaya} 848610e230b6Smaya 848796c5ddc4Srjs#define GFX75_RPSTAT1_num 0xa01c 848896c5ddc4Srjs#define GFX75_RPSTAT1_length 1 848996c5ddc4Srjsstruct GFX75_RPSTAT1 { 849096c5ddc4Srjs uint32_t PreviousGTFrequency; 849196c5ddc4Srjs uint32_t CurrentGTFrequency; 849296c5ddc4Srjs}; 849396c5ddc4Srjs 849496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 849596c5ddc4SrjsGFX75_RPSTAT1_pack(__attribute__((unused)) __gen_user_data *data, 849696c5ddc4Srjs __attribute__((unused)) void * restrict dst, 849796c5ddc4Srjs __attribute__((unused)) const struct GFX75_RPSTAT1 * restrict values) 849896c5ddc4Srjs{ 849996c5ddc4Srjs uint32_t * restrict dw = (uint32_t * restrict) dst; 850096c5ddc4Srjs 850196c5ddc4Srjs dw[0] = 850296c5ddc4Srjs __gen_uint(values->PreviousGTFrequency, 0, 6) | 850396c5ddc4Srjs __gen_uint(values->CurrentGTFrequency, 7, 14); 850496c5ddc4Srjs} 850596c5ddc4Srjs 850696c5ddc4Srjs#define GFX75_SAMPLER_INSTDONE_num 0xe160 850796c5ddc4Srjs#define GFX75_SAMPLER_INSTDONE_length 1 850896c5ddc4Srjsstruct GFX75_SAMPLER_INSTDONE { 850910e230b6Smaya bool IMEDone; 851010e230b6Smaya bool PL0Done; 851110e230b6Smaya bool SO0Done; 851210e230b6Smaya bool DG0Done; 851310e230b6Smaya bool FT0Done; 851410e230b6Smaya bool DM0Done; 851510e230b6Smaya bool SCDone; 851610e230b6Smaya bool FL0Done; 851710e230b6Smaya bool QCDone; 851810e230b6Smaya bool SVSMDone; 851910e230b6Smaya bool SI0Done; 852010e230b6Smaya bool MT0Done; 852110e230b6Smaya bool AVSDone; 852210e230b6Smaya bool IEFDone; 852310e230b6Smaya bool CREDone; 852410e230b6Smaya bool SVSMARB3; 852510e230b6Smaya bool SVSMARB2; 852610e230b6Smaya bool SVSMARB1; 852710e230b6Smaya bool SVSMAdapter; 852810e230b6Smaya bool FT1Done; 852910e230b6Smaya bool DM1Done; 853010e230b6Smaya bool MT1Done; 853110e230b6Smaya}; 853210e230b6Smaya 853396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 853496c5ddc4SrjsGFX75_SAMPLER_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 853510e230b6Smaya __attribute__((unused)) void * restrict dst, 853696c5ddc4Srjs __attribute__((unused)) const struct GFX75_SAMPLER_INSTDONE * restrict values) 853710e230b6Smaya{ 853810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 853910e230b6Smaya 854010e230b6Smaya dw[0] = 854110e230b6Smaya __gen_uint(values->IMEDone, 0, 0) | 854210e230b6Smaya __gen_uint(values->PL0Done, 1, 1) | 854310e230b6Smaya __gen_uint(values->SO0Done, 2, 2) | 854410e230b6Smaya __gen_uint(values->DG0Done, 3, 3) | 854510e230b6Smaya __gen_uint(values->FT0Done, 4, 4) | 854610e230b6Smaya __gen_uint(values->DM0Done, 5, 5) | 854710e230b6Smaya __gen_uint(values->SCDone, 6, 6) | 854810e230b6Smaya __gen_uint(values->FL0Done, 7, 7) | 854910e230b6Smaya __gen_uint(values->QCDone, 8, 8) | 855010e230b6Smaya __gen_uint(values->SVSMDone, 9, 9) | 855110e230b6Smaya __gen_uint(values->SI0Done, 10, 10) | 855210e230b6Smaya __gen_uint(values->MT0Done, 11, 11) | 855310e230b6Smaya __gen_uint(values->AVSDone, 12, 12) | 855410e230b6Smaya __gen_uint(values->IEFDone, 13, 13) | 855510e230b6Smaya __gen_uint(values->CREDone, 14, 14) | 855610e230b6Smaya __gen_uint(values->SVSMARB3, 15, 15) | 855710e230b6Smaya __gen_uint(values->SVSMARB2, 16, 16) | 855810e230b6Smaya __gen_uint(values->SVSMARB1, 17, 17) | 855910e230b6Smaya __gen_uint(values->SVSMAdapter, 18, 18) | 856010e230b6Smaya __gen_uint(values->FT1Done, 19, 19) | 856110e230b6Smaya __gen_uint(values->DM1Done, 20, 20) | 856210e230b6Smaya __gen_uint(values->MT1Done, 21, 21); 856310e230b6Smaya} 856410e230b6Smaya 856596c5ddc4Srjs#define GFX75_SCRATCH1_num 0xb038 856696c5ddc4Srjs#define GFX75_SCRATCH1_length 1 856796c5ddc4Srjsstruct GFX75_SCRATCH1 { 856810e230b6Smaya uint32_t L3AtomicDisable; 856910e230b6Smaya}; 857010e230b6Smaya 857196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 857296c5ddc4SrjsGFX75_SCRATCH1_pack(__attribute__((unused)) __gen_user_data *data, 857310e230b6Smaya __attribute__((unused)) void * restrict dst, 857496c5ddc4Srjs __attribute__((unused)) const struct GFX75_SCRATCH1 * restrict values) 857510e230b6Smaya{ 857610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 857710e230b6Smaya 857810e230b6Smaya dw[0] = 857910e230b6Smaya __gen_uint(values->L3AtomicDisable, 27, 27); 858010e230b6Smaya} 858110e230b6Smaya 858296c5ddc4Srjs#define GFX75_SC_INSTDONE_num 0x7100 858396c5ddc4Srjs#define GFX75_SC_INSTDONE_length 1 858496c5ddc4Srjsstruct GFX75_SC_INSTDONE { 858510e230b6Smaya bool SVLDone; 858610e230b6Smaya bool WMFEDone; 858710e230b6Smaya bool WMBEDone; 858810e230b6Smaya bool HIZDone; 858910e230b6Smaya bool STCDone; 859010e230b6Smaya bool IZDone; 859110e230b6Smaya bool SBEDone; 859210e230b6Smaya bool RCZDone; 859310e230b6Smaya bool RCCDone; 859410e230b6Smaya bool RCPBEDone; 859510e230b6Smaya bool RCPFEDone; 859610e230b6Smaya bool DAPBDone; 859710e230b6Smaya bool DAPRBEDone; 859810e230b6Smaya bool SARBDone; 859910e230b6Smaya}; 860010e230b6Smaya 860196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 860296c5ddc4SrjsGFX75_SC_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 860310e230b6Smaya __attribute__((unused)) void * restrict dst, 860496c5ddc4Srjs __attribute__((unused)) const struct GFX75_SC_INSTDONE * restrict values) 860510e230b6Smaya{ 860610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 860710e230b6Smaya 860810e230b6Smaya dw[0] = 860910e230b6Smaya __gen_uint(values->SVLDone, 0, 0) | 861010e230b6Smaya __gen_uint(values->WMFEDone, 1, 1) | 861110e230b6Smaya __gen_uint(values->WMBEDone, 2, 2) | 861210e230b6Smaya __gen_uint(values->HIZDone, 3, 3) | 861310e230b6Smaya __gen_uint(values->STCDone, 4, 4) | 861410e230b6Smaya __gen_uint(values->IZDone, 5, 5) | 861510e230b6Smaya __gen_uint(values->SBEDone, 6, 6) | 861610e230b6Smaya __gen_uint(values->RCZDone, 8, 8) | 861710e230b6Smaya __gen_uint(values->RCCDone, 9, 9) | 861810e230b6Smaya __gen_uint(values->RCPBEDone, 10, 10) | 861910e230b6Smaya __gen_uint(values->RCPFEDone, 11, 11) | 862010e230b6Smaya __gen_uint(values->DAPBDone, 12, 12) | 862110e230b6Smaya __gen_uint(values->DAPRBEDone, 13, 13) | 862210e230b6Smaya __gen_uint(values->SARBDone, 15, 15); 862310e230b6Smaya} 862410e230b6Smaya 862596c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN0_num 0x5200 862696c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN0_length 2 862796c5ddc4Srjsstruct GFX75_SO_NUM_PRIMS_WRITTEN0 { 862810e230b6Smaya uint64_t NumPrimsWrittenCount; 862910e230b6Smaya}; 863010e230b6Smaya 863196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 863296c5ddc4SrjsGFX75_SO_NUM_PRIMS_WRITTEN0_pack(__attribute__((unused)) __gen_user_data *data, 863310e230b6Smaya __attribute__((unused)) void * restrict dst, 863496c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_NUM_PRIMS_WRITTEN0 * restrict values) 863510e230b6Smaya{ 863610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 863710e230b6Smaya 863810e230b6Smaya const uint64_t v0 = 863910e230b6Smaya __gen_uint(values->NumPrimsWrittenCount, 0, 63); 864010e230b6Smaya dw[0] = v0; 864110e230b6Smaya dw[1] = v0 >> 32; 864210e230b6Smaya} 864310e230b6Smaya 864496c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN1_num 0x5208 864596c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN1_length 2 864696c5ddc4Srjsstruct GFX75_SO_NUM_PRIMS_WRITTEN1 { 864710e230b6Smaya uint64_t NumPrimsWrittenCount; 864810e230b6Smaya}; 864910e230b6Smaya 865096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 865196c5ddc4SrjsGFX75_SO_NUM_PRIMS_WRITTEN1_pack(__attribute__((unused)) __gen_user_data *data, 865210e230b6Smaya __attribute__((unused)) void * restrict dst, 865396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_NUM_PRIMS_WRITTEN1 * restrict values) 865410e230b6Smaya{ 865510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 865610e230b6Smaya 865710e230b6Smaya const uint64_t v0 = 865810e230b6Smaya __gen_uint(values->NumPrimsWrittenCount, 0, 63); 865910e230b6Smaya dw[0] = v0; 866010e230b6Smaya dw[1] = v0 >> 32; 866110e230b6Smaya} 866210e230b6Smaya 866396c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN2_num 0x5210 866496c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN2_length 2 866596c5ddc4Srjsstruct GFX75_SO_NUM_PRIMS_WRITTEN2 { 866610e230b6Smaya uint64_t NumPrimsWrittenCount; 866710e230b6Smaya}; 866810e230b6Smaya 866996c5ddc4Srjsstatic inline __attribute__((always_inline)) void 867096c5ddc4SrjsGFX75_SO_NUM_PRIMS_WRITTEN2_pack(__attribute__((unused)) __gen_user_data *data, 867110e230b6Smaya __attribute__((unused)) void * restrict dst, 867296c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_NUM_PRIMS_WRITTEN2 * restrict values) 867310e230b6Smaya{ 867410e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 867510e230b6Smaya 867610e230b6Smaya const uint64_t v0 = 867710e230b6Smaya __gen_uint(values->NumPrimsWrittenCount, 0, 63); 867810e230b6Smaya dw[0] = v0; 867910e230b6Smaya dw[1] = v0 >> 32; 868010e230b6Smaya} 868110e230b6Smaya 868296c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN3_num 0x5218 868396c5ddc4Srjs#define GFX75_SO_NUM_PRIMS_WRITTEN3_length 2 868496c5ddc4Srjsstruct GFX75_SO_NUM_PRIMS_WRITTEN3 { 868510e230b6Smaya uint64_t NumPrimsWrittenCount; 868610e230b6Smaya}; 868710e230b6Smaya 868896c5ddc4Srjsstatic inline __attribute__((always_inline)) void 868996c5ddc4SrjsGFX75_SO_NUM_PRIMS_WRITTEN3_pack(__attribute__((unused)) __gen_user_data *data, 869010e230b6Smaya __attribute__((unused)) void * restrict dst, 869196c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_NUM_PRIMS_WRITTEN3 * restrict values) 869210e230b6Smaya{ 869310e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 869410e230b6Smaya 869510e230b6Smaya const uint64_t v0 = 869610e230b6Smaya __gen_uint(values->NumPrimsWrittenCount, 0, 63); 869710e230b6Smaya dw[0] = v0; 869810e230b6Smaya dw[1] = v0 >> 32; 869910e230b6Smaya} 870010e230b6Smaya 870196c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED0_num 0x5240 870296c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED0_length 2 870396c5ddc4Srjsstruct GFX75_SO_PRIM_STORAGE_NEEDED0 { 870410e230b6Smaya uint64_t PrimStorageNeededCount; 870510e230b6Smaya}; 870610e230b6Smaya 870796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 870896c5ddc4SrjsGFX75_SO_PRIM_STORAGE_NEEDED0_pack(__attribute__((unused)) __gen_user_data *data, 870910e230b6Smaya __attribute__((unused)) void * restrict dst, 871096c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_PRIM_STORAGE_NEEDED0 * restrict values) 871110e230b6Smaya{ 871210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 871310e230b6Smaya 871410e230b6Smaya const uint64_t v0 = 871510e230b6Smaya __gen_uint(values->PrimStorageNeededCount, 0, 63); 871610e230b6Smaya dw[0] = v0; 871710e230b6Smaya dw[1] = v0 >> 32; 871810e230b6Smaya} 871910e230b6Smaya 872096c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED1_num 0x5248 872196c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED1_length 2 872296c5ddc4Srjsstruct GFX75_SO_PRIM_STORAGE_NEEDED1 { 872310e230b6Smaya uint64_t PrimStorageNeededCount; 872410e230b6Smaya}; 872510e230b6Smaya 872696c5ddc4Srjsstatic inline __attribute__((always_inline)) void 872796c5ddc4SrjsGFX75_SO_PRIM_STORAGE_NEEDED1_pack(__attribute__((unused)) __gen_user_data *data, 872810e230b6Smaya __attribute__((unused)) void * restrict dst, 872996c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_PRIM_STORAGE_NEEDED1 * restrict values) 873010e230b6Smaya{ 873110e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 873210e230b6Smaya 873310e230b6Smaya const uint64_t v0 = 873410e230b6Smaya __gen_uint(values->PrimStorageNeededCount, 0, 63); 873510e230b6Smaya dw[0] = v0; 873610e230b6Smaya dw[1] = v0 >> 32; 873710e230b6Smaya} 873810e230b6Smaya 873996c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED2_num 0x5250 874096c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED2_length 2 874196c5ddc4Srjsstruct GFX75_SO_PRIM_STORAGE_NEEDED2 { 874210e230b6Smaya uint64_t PrimStorageNeededCount; 874310e230b6Smaya}; 874410e230b6Smaya 874596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 874696c5ddc4SrjsGFX75_SO_PRIM_STORAGE_NEEDED2_pack(__attribute__((unused)) __gen_user_data *data, 874710e230b6Smaya __attribute__((unused)) void * restrict dst, 874896c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_PRIM_STORAGE_NEEDED2 * restrict values) 874910e230b6Smaya{ 875010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 875110e230b6Smaya 875210e230b6Smaya const uint64_t v0 = 875310e230b6Smaya __gen_uint(values->PrimStorageNeededCount, 0, 63); 875410e230b6Smaya dw[0] = v0; 875510e230b6Smaya dw[1] = v0 >> 32; 875610e230b6Smaya} 875710e230b6Smaya 875896c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED3_num 0x5258 875996c5ddc4Srjs#define GFX75_SO_PRIM_STORAGE_NEEDED3_length 2 876096c5ddc4Srjsstruct GFX75_SO_PRIM_STORAGE_NEEDED3 { 876110e230b6Smaya uint64_t PrimStorageNeededCount; 876210e230b6Smaya}; 876310e230b6Smaya 876496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 876596c5ddc4SrjsGFX75_SO_PRIM_STORAGE_NEEDED3_pack(__attribute__((unused)) __gen_user_data *data, 876610e230b6Smaya __attribute__((unused)) void * restrict dst, 876796c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_PRIM_STORAGE_NEEDED3 * restrict values) 876810e230b6Smaya{ 876910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 877010e230b6Smaya 877110e230b6Smaya const uint64_t v0 = 877210e230b6Smaya __gen_uint(values->PrimStorageNeededCount, 0, 63); 877310e230b6Smaya dw[0] = v0; 877410e230b6Smaya dw[1] = v0 >> 32; 877510e230b6Smaya} 877610e230b6Smaya 877796c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET0_num 0x5280 877896c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET0_length 1 877996c5ddc4Srjsstruct GFX75_SO_WRITE_OFFSET0 { 878010e230b6Smaya uint64_t WriteOffset; 878110e230b6Smaya}; 878210e230b6Smaya 878396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 878496c5ddc4SrjsGFX75_SO_WRITE_OFFSET0_pack(__attribute__((unused)) __gen_user_data *data, 878510e230b6Smaya __attribute__((unused)) void * restrict dst, 878696c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_WRITE_OFFSET0 * restrict values) 878710e230b6Smaya{ 878810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 878910e230b6Smaya 879010e230b6Smaya dw[0] = 879110e230b6Smaya __gen_offset(values->WriteOffset, 2, 31); 879210e230b6Smaya} 879310e230b6Smaya 879496c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET1_num 0x5284 879596c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET1_length 1 879696c5ddc4Srjsstruct GFX75_SO_WRITE_OFFSET1 { 879710e230b6Smaya uint64_t WriteOffset; 879810e230b6Smaya}; 879910e230b6Smaya 880096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 880196c5ddc4SrjsGFX75_SO_WRITE_OFFSET1_pack(__attribute__((unused)) __gen_user_data *data, 880210e230b6Smaya __attribute__((unused)) void * restrict dst, 880396c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_WRITE_OFFSET1 * restrict values) 880410e230b6Smaya{ 880510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 880610e230b6Smaya 880710e230b6Smaya dw[0] = 880810e230b6Smaya __gen_offset(values->WriteOffset, 2, 31); 880910e230b6Smaya} 881010e230b6Smaya 881196c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET2_num 0x5288 881296c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET2_length 1 881396c5ddc4Srjsstruct GFX75_SO_WRITE_OFFSET2 { 881410e230b6Smaya uint64_t WriteOffset; 881510e230b6Smaya}; 881610e230b6Smaya 881796c5ddc4Srjsstatic inline __attribute__((always_inline)) void 881896c5ddc4SrjsGFX75_SO_WRITE_OFFSET2_pack(__attribute__((unused)) __gen_user_data *data, 881910e230b6Smaya __attribute__((unused)) void * restrict dst, 882096c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_WRITE_OFFSET2 * restrict values) 882110e230b6Smaya{ 882210e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 882310e230b6Smaya 882410e230b6Smaya dw[0] = 882510e230b6Smaya __gen_offset(values->WriteOffset, 2, 31); 882610e230b6Smaya} 882710e230b6Smaya 882896c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET3_num 0x528c 882996c5ddc4Srjs#define GFX75_SO_WRITE_OFFSET3_length 1 883096c5ddc4Srjsstruct GFX75_SO_WRITE_OFFSET3 { 883110e230b6Smaya uint64_t WriteOffset; 883210e230b6Smaya}; 883310e230b6Smaya 883496c5ddc4Srjsstatic inline __attribute__((always_inline)) void 883596c5ddc4SrjsGFX75_SO_WRITE_OFFSET3_pack(__attribute__((unused)) __gen_user_data *data, 883610e230b6Smaya __attribute__((unused)) void * restrict dst, 883796c5ddc4Srjs __attribute__((unused)) const struct GFX75_SO_WRITE_OFFSET3 * restrict values) 883810e230b6Smaya{ 883910e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 884010e230b6Smaya 884110e230b6Smaya dw[0] = 884210e230b6Smaya __gen_offset(values->WriteOffset, 2, 31); 884310e230b6Smaya} 884410e230b6Smaya 884596c5ddc4Srjs#define GFX75_VCS_FAULT_REG_num 0x4194 884696c5ddc4Srjs#define GFX75_VCS_FAULT_REG_length 1 884796c5ddc4Srjsstruct GFX75_VCS_FAULT_REG { 884810e230b6Smaya bool ValidBit; 884910e230b6Smaya uint32_t FaultType; 885010e230b6Smaya#define PageFault 0 885110e230b6Smaya#define InvalidPDFault 1 885210e230b6Smaya#define UnloadedPDFault 2 885310e230b6Smaya#define InvalidandUnloadedPDfault 3 885410e230b6Smaya uint32_t SRCIDofFault; 885510e230b6Smaya uint32_t GTTSEL; 885610e230b6Smaya#define PPGTT 0 885710e230b6Smaya#define GGTT 1 885810e230b6Smaya __gen_address_type VirtualAddressofFault; 885910e230b6Smaya}; 886010e230b6Smaya 886196c5ddc4Srjsstatic inline __attribute__((always_inline)) void 886296c5ddc4SrjsGFX75_VCS_FAULT_REG_pack(__attribute__((unused)) __gen_user_data *data, 886310e230b6Smaya __attribute__((unused)) void * restrict dst, 886496c5ddc4Srjs __attribute__((unused)) const struct GFX75_VCS_FAULT_REG * restrict values) 886510e230b6Smaya{ 886610e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 886710e230b6Smaya 886810e230b6Smaya const uint32_t v0 = 886910e230b6Smaya __gen_uint(values->ValidBit, 0, 0) | 887010e230b6Smaya __gen_uint(values->FaultType, 1, 2) | 887110e230b6Smaya __gen_uint(values->SRCIDofFault, 3, 10) | 887210e230b6Smaya __gen_uint(values->GTTSEL, 11, 11); 887396c5ddc4Srjs dw[0] = __gen_address(data, &dw[0], values->VirtualAddressofFault, v0, 12, 31); 887410e230b6Smaya} 887510e230b6Smaya 887696c5ddc4Srjs#define GFX75_VCS_INSTDONE_num 0x1206c 887796c5ddc4Srjs#define GFX75_VCS_INSTDONE_length 1 887896c5ddc4Srjsstruct GFX75_VCS_INSTDONE { 887910e230b6Smaya bool RingEnable; 888010e230b6Smaya uint32_t USBDone; 888110e230b6Smaya uint32_t QRCDone; 888210e230b6Smaya uint32_t SECDone; 888310e230b6Smaya uint32_t MPCDone; 888410e230b6Smaya uint32_t VFTDone; 888510e230b6Smaya uint32_t BSPDone; 888610e230b6Smaya uint32_t VLFDone; 888710e230b6Smaya uint32_t VOPDone; 888810e230b6Smaya uint32_t VMCDone; 888910e230b6Smaya uint32_t VIPDone; 889010e230b6Smaya uint32_t VITDone; 889110e230b6Smaya uint32_t VDSDone; 889210e230b6Smaya uint32_t VMXDone; 889310e230b6Smaya uint32_t VCPDone; 889410e230b6Smaya uint32_t VCDDone; 889510e230b6Smaya uint32_t VADDone; 889610e230b6Smaya uint32_t VMDDone; 889710e230b6Smaya uint32_t VISDone; 889810e230b6Smaya uint32_t VACDone; 889910e230b6Smaya uint32_t VAMDone; 890010e230b6Smaya uint32_t JPGDone; 890110e230b6Smaya uint32_t VBPDone; 890210e230b6Smaya uint32_t VHRDone; 890310e230b6Smaya uint32_t VCIDone; 890410e230b6Smaya uint32_t VCRDone; 890510e230b6Smaya uint32_t VINDone; 890610e230b6Smaya uint32_t VPRDone; 890710e230b6Smaya uint32_t VTQDone; 890810e230b6Smaya uint32_t Reserved; 890910e230b6Smaya uint32_t VCSDone; 891010e230b6Smaya uint32_t GACDone; 891110e230b6Smaya}; 891210e230b6Smaya 891396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 891496c5ddc4SrjsGFX75_VCS_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 891510e230b6Smaya __attribute__((unused)) void * restrict dst, 891696c5ddc4Srjs __attribute__((unused)) const struct GFX75_VCS_INSTDONE * restrict values) 891710e230b6Smaya{ 891810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 891910e230b6Smaya 892010e230b6Smaya dw[0] = 892110e230b6Smaya __gen_uint(values->RingEnable, 0, 0) | 892210e230b6Smaya __gen_uint(values->USBDone, 1, 1) | 892310e230b6Smaya __gen_uint(values->QRCDone, 2, 2) | 892410e230b6Smaya __gen_uint(values->SECDone, 3, 3) | 892510e230b6Smaya __gen_uint(values->MPCDone, 4, 4) | 892610e230b6Smaya __gen_uint(values->VFTDone, 5, 5) | 892710e230b6Smaya __gen_uint(values->BSPDone, 6, 6) | 892810e230b6Smaya __gen_uint(values->VLFDone, 7, 7) | 892910e230b6Smaya __gen_uint(values->VOPDone, 8, 8) | 893010e230b6Smaya __gen_uint(values->VMCDone, 9, 9) | 893110e230b6Smaya __gen_uint(values->VIPDone, 10, 10) | 893210e230b6Smaya __gen_uint(values->VITDone, 11, 11) | 893310e230b6Smaya __gen_uint(values->VDSDone, 12, 12) | 893410e230b6Smaya __gen_uint(values->VMXDone, 13, 13) | 893510e230b6Smaya __gen_uint(values->VCPDone, 14, 14) | 893610e230b6Smaya __gen_uint(values->VCDDone, 15, 15) | 893710e230b6Smaya __gen_uint(values->VADDone, 16, 16) | 893810e230b6Smaya __gen_uint(values->VMDDone, 17, 17) | 893910e230b6Smaya __gen_uint(values->VISDone, 18, 18) | 894010e230b6Smaya __gen_uint(values->VACDone, 19, 19) | 894110e230b6Smaya __gen_uint(values->VAMDone, 20, 20) | 894210e230b6Smaya __gen_uint(values->JPGDone, 21, 21) | 894310e230b6Smaya __gen_uint(values->VBPDone, 22, 22) | 894410e230b6Smaya __gen_uint(values->VHRDone, 23, 23) | 894510e230b6Smaya __gen_uint(values->VCIDone, 24, 24) | 894610e230b6Smaya __gen_uint(values->VCRDone, 25, 25) | 894710e230b6Smaya __gen_uint(values->VINDone, 26, 26) | 894810e230b6Smaya __gen_uint(values->VPRDone, 27, 27) | 894910e230b6Smaya __gen_uint(values->VTQDone, 28, 28) | 895010e230b6Smaya __gen_uint(values->Reserved, 29, 29) | 895110e230b6Smaya __gen_uint(values->VCSDone, 30, 30) | 895210e230b6Smaya __gen_uint(values->GACDone, 31, 31); 895310e230b6Smaya} 895410e230b6Smaya 895596c5ddc4Srjs#define GFX75_VCS_RING_BUFFER_CTL_num 0x1203c 895696c5ddc4Srjs#define GFX75_VCS_RING_BUFFER_CTL_length 1 895796c5ddc4Srjsstruct GFX75_VCS_RING_BUFFER_CTL { 895810e230b6Smaya bool RingBufferEnable; 895910e230b6Smaya uint32_t AutomaticReportHeadPointer; 896010e230b6Smaya#define MI_AUTOREPORT_OFF 0 896110e230b6Smaya#define MI_AUTOREPORT_64KB 1 896210e230b6Smaya#define MI_AUTOREPORT_4KB 2 896310e230b6Smaya#define MI_AUTOREPORT_128KB 3 896410e230b6Smaya bool DisableRegisterAccesses; 896510e230b6Smaya bool SemaphoreWait; 896610e230b6Smaya bool RBWait; 896710e230b6Smaya uint32_t BufferLengthinpages1; 896810e230b6Smaya}; 896910e230b6Smaya 897096c5ddc4Srjsstatic inline __attribute__((always_inline)) void 897196c5ddc4SrjsGFX75_VCS_RING_BUFFER_CTL_pack(__attribute__((unused)) __gen_user_data *data, 897210e230b6Smaya __attribute__((unused)) void * restrict dst, 897396c5ddc4Srjs __attribute__((unused)) const struct GFX75_VCS_RING_BUFFER_CTL * restrict values) 897410e230b6Smaya{ 897510e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 897610e230b6Smaya 897710e230b6Smaya dw[0] = 897810e230b6Smaya __gen_uint(values->RingBufferEnable, 0, 0) | 897910e230b6Smaya __gen_uint(values->AutomaticReportHeadPointer, 1, 2) | 898010e230b6Smaya __gen_uint(values->DisableRegisterAccesses, 8, 8) | 898110e230b6Smaya __gen_uint(values->SemaphoreWait, 10, 10) | 898210e230b6Smaya __gen_uint(values->RBWait, 11, 11) | 898310e230b6Smaya __gen_uint(values->BufferLengthinpages1, 12, 20); 898410e230b6Smaya} 898510e230b6Smaya 898696c5ddc4Srjs#define GFX75_VECS_FAULT_REG_num 0x4394 898796c5ddc4Srjs#define GFX75_VECS_FAULT_REG_length 1 898896c5ddc4Srjsstruct GFX75_VECS_FAULT_REG { 898910e230b6Smaya bool ValidBit; 899010e230b6Smaya uint32_t FaultType; 899110e230b6Smaya#define PageFault 0 899210e230b6Smaya#define InvalidPDFault 1 899310e230b6Smaya#define UnloadedPDFault 2 899410e230b6Smaya#define InvalidandUnloadedPDfault 3 899510e230b6Smaya uint32_t SRCIDofFault; 899610e230b6Smaya uint32_t GTTSEL; 899710e230b6Smaya#define PPGTT 0 899810e230b6Smaya#define GGTT 1 899910e230b6Smaya __gen_address_type VirtualAddressofFault; 900010e230b6Smaya}; 900110e230b6Smaya 900296c5ddc4Srjsstatic inline __attribute__((always_inline)) void 900396c5ddc4SrjsGFX75_VECS_FAULT_REG_pack(__attribute__((unused)) __gen_user_data *data, 900410e230b6Smaya __attribute__((unused)) void * restrict dst, 900596c5ddc4Srjs __attribute__((unused)) const struct GFX75_VECS_FAULT_REG * restrict values) 900610e230b6Smaya{ 900710e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 900810e230b6Smaya 900910e230b6Smaya const uint32_t v0 = 901010e230b6Smaya __gen_uint(values->ValidBit, 0, 0) | 901110e230b6Smaya __gen_uint(values->FaultType, 1, 2) | 901210e230b6Smaya __gen_uint(values->SRCIDofFault, 3, 10) | 901310e230b6Smaya __gen_uint(values->GTTSEL, 11, 11); 901496c5ddc4Srjs dw[0] = __gen_address(data, &dw[0], values->VirtualAddressofFault, v0, 12, 31); 901510e230b6Smaya} 901610e230b6Smaya 901796c5ddc4Srjs#define GFX75_VECS_INSTDONE_num 0x1a06c 901896c5ddc4Srjs#define GFX75_VECS_INSTDONE_length 1 901996c5ddc4Srjsstruct GFX75_VECS_INSTDONE { 902010e230b6Smaya bool RingEnable; 902110e230b6Smaya uint32_t VECSDone; 902210e230b6Smaya uint32_t GAMDone; 902310e230b6Smaya}; 902410e230b6Smaya 902596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 902696c5ddc4SrjsGFX75_VECS_INSTDONE_pack(__attribute__((unused)) __gen_user_data *data, 902710e230b6Smaya __attribute__((unused)) void * restrict dst, 902896c5ddc4Srjs __attribute__((unused)) const struct GFX75_VECS_INSTDONE * restrict values) 902910e230b6Smaya{ 903010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 903110e230b6Smaya 903210e230b6Smaya dw[0] = 903310e230b6Smaya __gen_uint(values->RingEnable, 0, 0) | 903410e230b6Smaya __gen_uint(values->VECSDone, 30, 30) | 903510e230b6Smaya __gen_uint(values->GAMDone, 31, 31); 903610e230b6Smaya} 903710e230b6Smaya 903896c5ddc4Srjs#define GFX75_VECS_RING_BUFFER_CTL_num 0x1a03c 903996c5ddc4Srjs#define GFX75_VECS_RING_BUFFER_CTL_length 1 904096c5ddc4Srjsstruct GFX75_VECS_RING_BUFFER_CTL { 904110e230b6Smaya bool RingBufferEnable; 904210e230b6Smaya uint32_t AutomaticReportHeadPointer; 904310e230b6Smaya#define MI_AUTOREPORT_OFF 0 904410e230b6Smaya#define MI_AUTOREPORT_64KB 1 904510e230b6Smaya#define MI_AUTOREPORT_4KB 2 904610e230b6Smaya#define MI_AUTOREPORT_128KB 3 904710e230b6Smaya bool DisableRegisterAccesses; 904810e230b6Smaya bool SemaphoreWait; 904910e230b6Smaya bool RBWait; 905010e230b6Smaya uint32_t BufferLengthinpages1; 905110e230b6Smaya}; 905210e230b6Smaya 905396c5ddc4Srjsstatic inline __attribute__((always_inline)) void 905496c5ddc4SrjsGFX75_VECS_RING_BUFFER_CTL_pack(__attribute__((unused)) __gen_user_data *data, 905510e230b6Smaya __attribute__((unused)) void * restrict dst, 905696c5ddc4Srjs __attribute__((unused)) const struct GFX75_VECS_RING_BUFFER_CTL * restrict values) 905710e230b6Smaya{ 905810e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 905910e230b6Smaya 906010e230b6Smaya dw[0] = 906110e230b6Smaya __gen_uint(values->RingBufferEnable, 0, 0) | 906210e230b6Smaya __gen_uint(values->AutomaticReportHeadPointer, 1, 2) | 906310e230b6Smaya __gen_uint(values->DisableRegisterAccesses, 8, 8) | 906410e230b6Smaya __gen_uint(values->SemaphoreWait, 10, 10) | 906510e230b6Smaya __gen_uint(values->RBWait, 11, 11) | 906610e230b6Smaya __gen_uint(values->BufferLengthinpages1, 12, 20); 906710e230b6Smaya} 906810e230b6Smaya 906996c5ddc4Srjs#define GFX75_VS_INVOCATION_COUNT_num 0x2320 907096c5ddc4Srjs#define GFX75_VS_INVOCATION_COUNT_length 2 907196c5ddc4Srjsstruct GFX75_VS_INVOCATION_COUNT { 907210e230b6Smaya uint64_t VSInvocationCountReport; 907310e230b6Smaya}; 907410e230b6Smaya 907596c5ddc4Srjsstatic inline __attribute__((always_inline)) void 907696c5ddc4SrjsGFX75_VS_INVOCATION_COUNT_pack(__attribute__((unused)) __gen_user_data *data, 907710e230b6Smaya __attribute__((unused)) void * restrict dst, 907896c5ddc4Srjs __attribute__((unused)) const struct GFX75_VS_INVOCATION_COUNT * restrict values) 907910e230b6Smaya{ 908010e230b6Smaya uint32_t * restrict dw = (uint32_t * restrict) dst; 908110e230b6Smaya 908210e230b6Smaya const uint64_t v0 = 908310e230b6Smaya __gen_uint(values->VSInvocationCountReport, 0, 63); 908410e230b6Smaya dw[0] = v0; 908510e230b6Smaya dw[1] = v0 >> 32; 908610e230b6Smaya} 908710e230b6Smaya 908896c5ddc4Srjs#endif /* GFX75_PACK_H */ 9089