intel/compiler: Split 3DPRIM_* defines out to a separate header.

These clash with genxml and will become a problem shortly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309>
This commit is contained in:
Kenneth Graunke 2022-06-29 15:19:57 -07:00 committed by Marge Bot
parent 9f8784232a
commit fdae90aa85
13 changed files with 61 additions and 23 deletions

View File

@ -44,6 +44,7 @@
#include "compiler/nir/nir_serialize.h"
#include "intel/compiler/brw_compiler.h"
#include "intel/compiler/brw_nir.h"
#include "intel/compiler/brw_prim.h"
#include "crocus_context.h"
#include "nir/tgsi_to_nir.h"

View File

@ -44,6 +44,7 @@
#include "compiler/nir/nir_serialize.h"
#include "intel/compiler/brw_compiler.h"
#include "intel/compiler/brw_nir.h"
#include "intel/compiler/brw_prim.h"
#include "iris_context.h"
#include "nir/tgsi_to_nir.h"

View File

@ -34,6 +34,7 @@
#include "program/program.h"
#include "brw_clip.h"
#include "brw_prim.h"
static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
{

View File

@ -34,6 +34,7 @@
#include "program/program.h"
#include "brw_clip.h"
#include "brw_prim.h"
static void release_tmps( struct brw_clip_compile *c )
{

View File

@ -34,6 +34,7 @@
#include "program/program.h"
#include "brw_clip.h"
#include "brw_prim.h"
/* This is performed against the original triangles, so no indirection

View File

@ -31,6 +31,7 @@
#include "brw_compiler.h"
#include "brw_eu.h"
#include "brw_prim.h"
#include "dev/intel_debug.h"

View File

@ -23,6 +23,7 @@
#include "brw_compiler.h"
#include "brw_eu.h"
#include "brw_prim.h"
#include "dev/intel_debug.h"

View File

@ -59,29 +59,6 @@
#define GET_BITS(data, high, low) ((data & INTEL_MASK((high), (low))) >> (low))
#define GET_FIELD(word, field) (((word) & field ## _MASK) >> field ## _SHIFT)
#define _3DPRIM_POINTLIST 0x01
#define _3DPRIM_LINELIST 0x02
#define _3DPRIM_LINESTRIP 0x03
#define _3DPRIM_TRILIST 0x04
#define _3DPRIM_TRISTRIP 0x05
#define _3DPRIM_TRIFAN 0x06
#define _3DPRIM_QUADLIST 0x07
#define _3DPRIM_QUADSTRIP 0x08
#define _3DPRIM_LINELIST_ADJ 0x09 /* G45+ */
#define _3DPRIM_LINESTRIP_ADJ 0x0A /* G45+ */
#define _3DPRIM_TRILIST_ADJ 0x0B /* G45+ */
#define _3DPRIM_TRISTRIP_ADJ 0x0C /* G45+ */
#define _3DPRIM_TRISTRIP_REVERSE 0x0D
#define _3DPRIM_POLYGON 0x0E
#define _3DPRIM_RECTLIST 0x0F
#define _3DPRIM_LINELOOP 0x10
#define _3DPRIM_POINTLIST_BF 0x11
#define _3DPRIM_LINESTRIP_CONT 0x12
#define _3DPRIM_LINESTRIP_BF 0x13
#define _3DPRIM_LINESTRIP_CONT_BF 0x14
#define _3DPRIM_TRIFAN_NOSTIPPLE 0x16
#define _3DPRIM_PATCHLIST(n) ({ assert(n > 0 && n <= 32); 0x20 + (n - 1); })
/* Bitfields for the URB_WRITE message, DW2 of message header: */
#define URB_WRITE_PRIM_END 0x1
#define URB_WRITE_PRIM_START 0x2

View File

@ -0,0 +1,50 @@
/*
* Copyright © 2022 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
#ifndef BRW_PRIM_H
#define BRW_PRIM_H
#define _3DPRIM_POINTLIST 0x01
#define _3DPRIM_LINELIST 0x02
#define _3DPRIM_LINESTRIP 0x03
#define _3DPRIM_TRILIST 0x04
#define _3DPRIM_TRISTRIP 0x05
#define _3DPRIM_TRIFAN 0x06
#define _3DPRIM_QUADLIST 0x07
#define _3DPRIM_QUADSTRIP 0x08
#define _3DPRIM_LINELIST_ADJ 0x09 /* G45+ */
#define _3DPRIM_LINESTRIP_ADJ 0x0A /* G45+ */
#define _3DPRIM_TRILIST_ADJ 0x0B /* G45+ */
#define _3DPRIM_TRISTRIP_ADJ 0x0C /* G45+ */
#define _3DPRIM_TRISTRIP_REVERSE 0x0D
#define _3DPRIM_POLYGON 0x0E
#define _3DPRIM_RECTLIST 0x0F
#define _3DPRIM_LINELOOP 0x10
#define _3DPRIM_POINTLIST_BF 0x11
#define _3DPRIM_LINESTRIP_CONT 0x12
#define _3DPRIM_LINESTRIP_BF 0x13
#define _3DPRIM_LINESTRIP_CONT_BF 0x14
#define _3DPRIM_TRIFAN_NOSTIPPLE 0x16
#define _3DPRIM_PATCHLIST(n) ({ assert(n > 0 && n <= 32); 0x20 + (n - 1); })
#endif /* BRW_PRIM_H */

View File

@ -32,6 +32,7 @@
#include "brw_cfg.h"
#include "brw_fs.h"
#include "brw_nir.h"
#include "brw_prim.h"
#include "dev/intel_debug.h"
namespace brw {

View File

@ -31,6 +31,7 @@
#include "gfx6_gs_visitor.h"
#include "brw_eu.h"
#include "brw_prim.h"
namespace brw {

View File

@ -102,6 +102,7 @@ libintel_compiler_files = files(
'brw_nir_clamp_image_1d_2d_array_sizes.c',
'brw_packed_float.c',
'brw_predicated_break.cpp',
'brw_prim.h',
'brw_private.h',
'brw_reg.h',
'brw_reg_type.c',

View File

@ -35,6 +35,7 @@
#include "anv_private.h"
#include "compiler/brw_nir.h"
#include "compiler/brw_nir_rt.h"
#include "compiler/brw_prim.h"
#include "anv_nir.h"
#include "nir/nir_xfb_info.h"
#include "spirv/nir_spirv.h"