Path: blob/21.2-virgl/src/gallium/drivers/iris/iris_defines.h
4565 views
/*1* Copyright © 2018 Intel Corporation2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE.21*/22#ifndef IRIS_DEFINES_H23#define IRIS_DEFINES_H2425/**26* @file iris_defines.h27*28* Random hardware #defines that we're not using GENXML for.29*/3031#define MI_PREDICATE (0xC << 23)32# define MI_PREDICATE_LOADOP_KEEP (0 << 6)33# define MI_PREDICATE_LOADOP_LOAD (2 << 6)34# define MI_PREDICATE_LOADOP_LOADINV (3 << 6)35# define MI_PREDICATE_COMBINEOP_SET (0 << 3)36# define MI_PREDICATE_COMBINEOP_AND (1 << 3)37# define MI_PREDICATE_COMBINEOP_OR (2 << 3)38# define MI_PREDICATE_COMBINEOP_XOR (3 << 3)39# define MI_PREDICATE_COMPAREOP_TRUE (0 << 0)40# define MI_PREDICATE_COMPAREOP_FALSE (1 << 0)41# define MI_PREDICATE_COMPAREOP_SRCS_EQUAL (2 << 0)42# define MI_PREDICATE_COMPAREOP_DELTAS_EQUAL (3 << 0)4344/* Predicate registers */45#define MI_PREDICATE_SRC0 0x240046#define MI_PREDICATE_SRC1 0x240847#define MI_PREDICATE_DATA 0x241048#define MI_PREDICATE_RESULT 0x241849#define MI_PREDICATE_RESULT_1 0x241C50#define MI_PREDICATE_RESULT_2 0x22145152#define CS_GPR(n) (0x2600 + (n) * 8)5354/* The number of bits in our TIMESTAMP queries. */55#define TIMESTAMP_BITS 365657/* For gfx12 we set the streamout buffers using 4 separate commands58* (3DSTATE_SO_BUFFER_INDEX_*) instead of 3DSTATE_SO_BUFFER. However the layout59* of the 3DSTATE_SO_BUFFER_INDEX_* commands is identical to that of60* 3DSTATE_SO_BUFFER apart from the SOBufferIndex field, so for now we use the61* 3DSTATE_SO_BUFFER command, but change the 3DCommandSubOpcode.62* SO_BUFFER_INDEX_0_CMD is actually the 3DCommandSubOpcode for63* 3DSTATE_SO_BUFFER_INDEX_0.64*/65#define SO_BUFFER_INDEX_0_CMD 0x606667#endif686970