intel: s/brw_device_info/gen_device_info/
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 22 Aug 2016 22:01:08 +0000 (15:01 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 3 Sep 2016 15:23:06 +0000 (08:23 -0700)
Generated by:

sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.c
sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.h
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.c
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.cpp
sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.h

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
77 files changed:
src/intel/Makefile.sources
src/intel/blorp/blorp_blit.c
src/intel/blorp/blorp_genX_exec.h
src/intel/common/brw_device_info.c [deleted file]
src/intel/common/brw_device_info.h [deleted file]
src/intel/common/gen_device_info.c [new file with mode: 0644]
src/intel/common/gen_device_info.h [new file with mode: 0644]
src/intel/isl/isl.c
src/intel/isl/isl.h
src/intel/isl/isl_format.c
src/intel/isl/isl_priv.h
src/intel/isl/isl_storage_image.c
src/intel/isl/tests/isl_surf_get_image_offset_test.c
src/intel/tools/disasm.c
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py
src/intel/vulkan/anv_formats.c
src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_l3.c
src/mesa/drivers/dri/i965/brw_clip_line.c
src/mesa/drivers/dri/i965/brw_clip_tri.c
src/mesa/drivers/dri/i965/brw_compiler.c
src/mesa/drivers/dri/i965/brw_compiler.h
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_cs.c
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_eu.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_compact.c
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_eu_validate.c
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
src/mesa/drivers/dri/i965/brw_gs.c
src/mesa/drivers/dri/i965/brw_inst.h
src/mesa/drivers/dri/i965/brw_ir_fs.h
src/mesa/drivers/dri/i965/brw_ir_vec4.h
src/mesa/drivers/dri/i965/brw_nir.c
src/mesa/drivers/dri/i965/brw_nir.h
src/mesa/drivers/dri/i965/brw_pipe_control.c
src/mesa/drivers/dri/i965/brw_reg.h
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_shader.h
src/mesa/drivers/dri/i965/brw_surface_formats.c
src/mesa/drivers/dri/i965/brw_tcs.c
src/mesa/drivers/dri/i965/brw_tes.c
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
src/mesa/drivers/dri/i965/brw_vue_map.c
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen7_cs_state.c
src/mesa/drivers/dri/i965/gen7_l3_state.c
src/mesa/drivers/dri/i965/gen7_urb.c
src/mesa/drivers/dri/i965/intel_asm_annotation.c
src/mesa/drivers/dri/i965/intel_asm_annotation.h
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.h
src/mesa/drivers/dri/i965/test_eu_compact.c
src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp

index 97f2328fefe4e34110256113301a6bfc9cbd80f8..af4174fc5c0f064888684e90ed265cfa02ac3026 100644 (file)
@@ -7,8 +7,8 @@ BLORP_FILES = \
        blorp/blorp_priv.h
 
 COMMON_FILES = \
-       common/brw_device_info.c \
-       common/brw_device_info.h
+       common/gen_device_info.c \
+       common/gen_device_info.h
 
 GENXML_GENERATED_FILES = \
        genxml/gen4_pack.h \
index 170c3816e38008e39d622f934daab1bc8e0a7b8a..f5cb16a2c2a45820ef215744e59bb5d5f7b13e5a 100644 (file)
@@ -984,7 +984,7 @@ static nir_shader *
 brw_blorp_build_nir_shader(struct blorp_context *blorp,
                            const struct brw_blorp_blit_prog_key *key)
 {
-   const struct brw_device_info *devinfo = blorp->isl_dev->info;
+   const struct gen_device_info *devinfo = blorp->isl_dev->info;
    nir_ssa_def *src_pos, *dst_pos, *color;
 
    /* Sanity checks */
@@ -1393,7 +1393,7 @@ blorp_blit(struct blorp_batch *batch,
            float dst_x1, float dst_y1,
            GLenum filter, bool mirror_x, bool mirror_y)
 {
-   const struct brw_device_info *devinfo = batch->blorp->isl_dev->info;
+   const struct gen_device_info *devinfo = batch->blorp->isl_dev->info;
 
    struct blorp_params params;
    blorp_params_init(&params);
index 461cfe0abc8338278351a34802520997f2a5a0ba..d049eb0912e70f3d5c6444249f7a86e736a6791f 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include "blorp_priv.h"
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "intel_aub.h"
 
 /**
diff --git a/src/intel/common/brw_device_info.c b/src/intel/common/brw_device_info.c
deleted file mode 100644 (file)
index fb224fa..0000000
+++ /dev/null
@@ -1,517 +0,0 @@
-/*
- * Copyright Â© 2013 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "brw_device_info.h"
-
-static const struct brw_device_info brw_device_info_i965 = {
-   .gen = 4,
-   .has_negative_rhw_bug = true,
-   .num_slices = 1,
-   .max_vs_threads = 16,
-   .max_gs_threads = 2,
-   .max_wm_threads = 8 * 4,
-   .urb = {
-      .size = 256,
-   },
-};
-
-static const struct brw_device_info brw_device_info_g4x = {
-   .gen = 4,
-   .has_pln = true,
-   .has_compr4 = true,
-   .has_surface_tile_offset = true,
-   .is_g4x = true,
-   .num_slices = 1,
-   .max_vs_threads = 32,
-   .max_gs_threads = 2,
-   .max_wm_threads = 10 * 5,
-   .urb = {
-      .size = 384,
-   },
-};
-
-static const struct brw_device_info brw_device_info_ilk = {
-   .gen = 5,
-   .has_pln = true,
-   .has_compr4 = true,
-   .has_surface_tile_offset = true,
-   .num_slices = 1,
-   .max_vs_threads = 72,
-   .max_gs_threads = 32,
-   .max_wm_threads = 12 * 6,
-   .urb = {
-      .size = 1024,
-   },
-};
-
-static const struct brw_device_info brw_device_info_snb_gt1 = {
-   .gen = 6,
-   .gt = 1,
-   .has_hiz_and_separate_stencil = true,
-   .has_llc = true,
-   .has_pln = true,
-   .has_surface_tile_offset = true,
-   .needs_unlit_centroid_workaround = true,
-   .num_slices = 1,
-   .max_vs_threads = 24,
-   .max_gs_threads = 21, /* conservative; 24 if rendering disabled. */
-   .max_wm_threads = 40,
-   .urb = {
-      .size = 32,
-      .min_vs_entries = 24,
-      .max_vs_entries = 256,
-      .max_gs_entries = 256,
-   },
-};
-
-static const struct brw_device_info brw_device_info_snb_gt2 = {
-   .gen = 6,
-   .gt = 2,
-   .has_hiz_and_separate_stencil = true,
-   .has_llc = true,
-   .has_pln = true,
-   .has_surface_tile_offset = true,
-   .needs_unlit_centroid_workaround = true,
-   .num_slices = 1,
-   .max_vs_threads = 60,
-   .max_gs_threads = 60,
-   .max_wm_threads = 80,
-   .urb = {
-      .size = 64,
-      .min_vs_entries = 24,
-      .max_vs_entries = 256,
-      .max_gs_entries = 256,
-   },
-};
-
-#define GEN7_FEATURES                               \
-   .gen = 7,                                        \
-   .has_hiz_and_separate_stencil = true,            \
-   .must_use_separate_stencil = true,               \
-   .has_llc = true,                                 \
-   .has_pln = true,                                 \
-   .has_surface_tile_offset = true
-
-static const struct brw_device_info brw_device_info_ivb_gt1 = {
-   GEN7_FEATURES, .is_ivybridge = true, .gt = 1,
-   .num_slices = 1,
-   .max_vs_threads = 36,
-   .max_hs_threads = 36,
-   .max_ds_threads = 36,
-   .max_gs_threads = 36,
-   .max_wm_threads = 48,
-   .max_cs_threads = 36,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 32,
-      .max_vs_entries = 512,
-      .max_hs_entries = 32,
-      .min_ds_entries = 10,
-      .max_ds_entries = 288,
-      .max_gs_entries = 192,
-   },
-};
-
-static const struct brw_device_info brw_device_info_ivb_gt2 = {
-   GEN7_FEATURES, .is_ivybridge = true, .gt = 2,
-   .num_slices = 1,
-   .max_vs_threads = 128,
-   .max_hs_threads = 128,
-   .max_ds_threads = 128,
-   .max_gs_threads = 128,
-   .max_wm_threads = 172,
-   .max_cs_threads = 64,
-   .urb = {
-      .size = 256,
-      .min_vs_entries = 32,
-      .max_vs_entries = 704,
-      .max_hs_entries = 64,
-      .min_ds_entries = 10,
-      .max_ds_entries = 448,
-      .max_gs_entries = 320,
-   },
-};
-
-static const struct brw_device_info brw_device_info_byt = {
-   GEN7_FEATURES, .is_baytrail = true, .gt = 1,
-   .num_slices = 1,
-   .has_llc = false,
-   .max_vs_threads = 36,
-   .max_hs_threads = 36,
-   .max_ds_threads = 36,
-   .max_gs_threads = 36,
-   .max_wm_threads = 48,
-   .max_cs_threads = 32,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 32,
-      .max_vs_entries = 512,
-      .max_hs_entries = 32,
-      .min_ds_entries = 10,
-      .max_ds_entries = 288,
-      .max_gs_entries = 192,
-   },
-};
-
-#define HSW_FEATURES             \
-   GEN7_FEATURES,                \
-   .is_haswell = true,           \
-   .supports_simd16_3src = true, \
-   .has_resource_streamer = true
-
-static const struct brw_device_info brw_device_info_hsw_gt1 = {
-   HSW_FEATURES, .gt = 1,
-   .num_slices = 1,
-   .max_vs_threads = 70,
-   .max_hs_threads = 70,
-   .max_ds_threads = 70,
-   .max_gs_threads = 70,
-   .max_wm_threads = 102,
-   .max_cs_threads = 70,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 32,
-      .max_vs_entries = 640,
-      .max_hs_entries = 64,
-      .min_ds_entries = 10,
-      .max_ds_entries = 384,
-      .max_gs_entries = 256,
-   },
-};
-
-static const struct brw_device_info brw_device_info_hsw_gt2 = {
-   HSW_FEATURES, .gt = 2,
-   .num_slices = 1,
-   .max_vs_threads = 280,
-   .max_hs_threads = 256,
-   .max_ds_threads = 280,
-   .max_gs_threads = 256,
-   .max_wm_threads = 204,
-   .max_cs_threads = 70,
-   .urb = {
-      .size = 256,
-      .min_vs_entries = 64,
-      .max_vs_entries = 1664,
-      .max_hs_entries = 128,
-      .min_ds_entries = 10,
-      .max_ds_entries = 960,
-      .max_gs_entries = 640,
-   },
-};
-
-static const struct brw_device_info brw_device_info_hsw_gt3 = {
-   HSW_FEATURES, .gt = 3,
-   .num_slices = 2,
-   .max_vs_threads = 280,
-   .max_hs_threads = 256,
-   .max_ds_threads = 280,
-   .max_gs_threads = 256,
-   .max_wm_threads = 408,
-   .max_cs_threads = 70,
-   .urb = {
-      .size = 512,
-      .min_vs_entries = 64,
-      .max_vs_entries = 1664,
-      .max_hs_entries = 128,
-      .min_ds_entries = 10,
-      .max_ds_entries = 960,
-      .max_gs_entries = 640,
-   },
-};
-
-#define GEN8_FEATURES                               \
-   .gen = 8,                                        \
-   .has_hiz_and_separate_stencil = true,            \
-   .has_resource_streamer = true,                   \
-   .must_use_separate_stencil = true,               \
-   .has_llc = true,                                 \
-   .has_pln = true,                                 \
-   .supports_simd16_3src = true,                    \
-   .has_surface_tile_offset = true,                 \
-   .max_vs_threads = 504,                           \
-   .max_hs_threads = 504,                           \
-   .max_ds_threads = 504,                           \
-   .max_gs_threads = 504,                           \
-   .max_wm_threads = 384
-
-static const struct brw_device_info brw_device_info_bdw_gt1 = {
-   GEN8_FEATURES, .gt = 1,
-   .num_slices = 1,
-   .max_cs_threads = 42,
-   .urb = {
-      .size = 192,
-      .min_vs_entries = 64,
-      .max_vs_entries = 2560,
-      .max_hs_entries = 504,
-      .min_ds_entries = 34,
-      .max_ds_entries = 1536,
-      .max_gs_entries = 960,
-   }
-};
-
-static const struct brw_device_info brw_device_info_bdw_gt2 = {
-   GEN8_FEATURES, .gt = 2,
-   .num_slices = 1,
-   .max_cs_threads = 56,
-   .urb = {
-      .size = 384,
-      .min_vs_entries = 64,
-      .max_vs_entries = 2560,
-      .max_hs_entries = 504,
-      .min_ds_entries = 34,
-      .max_ds_entries = 1536,
-      .max_gs_entries = 960,
-   }
-};
-
-static const struct brw_device_info brw_device_info_bdw_gt3 = {
-   GEN8_FEATURES, .gt = 3,
-   .num_slices = 2,
-   .max_cs_threads = 56,
-   .urb = {
-      .size = 384,
-      .min_vs_entries = 64,
-      .max_vs_entries = 2560,
-      .max_hs_entries = 504,
-      .min_ds_entries = 34,
-      .max_ds_entries = 1536,
-      .max_gs_entries = 960,
-   }
-};
-
-static const struct brw_device_info brw_device_info_chv = {
-   GEN8_FEATURES, .is_cherryview = 1, .gt = 1,
-   .has_llc = false,
-   .num_slices = 1,
-   .max_vs_threads = 80,
-   .max_hs_threads = 80,
-   .max_ds_threads = 80,
-   .max_gs_threads = 80,
-   .max_wm_threads = 128,
-   .max_cs_threads = 6 * 7,
-   .urb = {
-      .size = 192,
-      .min_vs_entries = 34,
-      .max_vs_entries = 640,
-      .max_hs_entries = 80,
-      .min_ds_entries = 34,
-      .max_ds_entries = 384,
-      .max_gs_entries = 256,
-   }
-};
-
-#define GEN9_FEATURES                               \
-   .gen = 9,                                        \
-   .has_hiz_and_separate_stencil = true,            \
-   .has_resource_streamer = true,                   \
-   .must_use_separate_stencil = true,               \
-   .has_llc = true,                                 \
-   .has_pln = true,                                 \
-   .supports_simd16_3src = true,                    \
-   .has_surface_tile_offset = true,                 \
-   .max_vs_threads = 336,                           \
-   .max_gs_threads = 336,                           \
-   .max_hs_threads = 336,                           \
-   .max_ds_threads = 336,                           \
-   .max_wm_threads = 64 * 9,                        \
-   .max_cs_threads = 56,                            \
-   .urb = {                                         \
-      .size = 384,                                  \
-      .min_vs_entries = 64,                         \
-      .max_vs_entries = 1856,                       \
-      .max_hs_entries = 672,                        \
-      .min_ds_entries = 34,                         \
-      .max_ds_entries = 1120,                       \
-      .max_gs_entries = 640,                        \
-   }
-
-static const struct brw_device_info brw_device_info_skl_gt1 = {
-   GEN9_FEATURES, .gt = 1,
-   .num_slices = 1,
-   .urb.size = 192,
-};
-
-static const struct brw_device_info brw_device_info_skl_gt2 = {
-   GEN9_FEATURES, .gt = 2,
-   .num_slices = 1,
-};
-
-static const struct brw_device_info brw_device_info_skl_gt3 = {
-   GEN9_FEATURES, .gt = 3,
-   .num_slices = 2,
-};
-
-static const struct brw_device_info brw_device_info_skl_gt4 = {
-   GEN9_FEATURES, .gt = 4,
-   .num_slices = 3,
-   /* From the "L3 Allocation and Programming" documentation:
-    *
-    * "URB is limited to 1008KB due to programming restrictions.  This is not a
-    * restriction of the L3 implementation, but of the FF and other clients.
-    * Therefore, in a GT4 implementation it is possible for the programmed
-    * allocation of the L3 data array to provide 3*384KB=1152KB for URB, but
-    * only 1008KB of this will be used."
-    */
-   .urb.size = 1008 / 3,
-};
-
-static const struct brw_device_info brw_device_info_bxt = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 112,
-   .max_hs_threads = 112,
-   .max_ds_threads = 112,
-   .max_gs_threads = 112,
-   .max_wm_threads = 64 * 3,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 192,
-      .min_vs_entries = 34,
-      .max_vs_entries = 704,
-      .max_hs_entries = 256,
-      .max_ds_entries = 416,
-      .max_gs_entries = 256,
-   }
-};
-
-static const struct brw_device_info brw_device_info_bxt_2x6 = {
-   GEN9_FEATURES,
-   .is_broxton = 1,
-   .gt = 1,
-   .has_llc = false,
-
-   .num_slices = 1,
-   .max_vs_threads = 56, /* XXX: guess */
-   .max_hs_threads = 56, /* XXX: guess */
-   .max_ds_threads = 56,
-   .max_gs_threads = 56,
-   .max_wm_threads = 64 * 2,
-   .max_cs_threads = 6 * 6,
-   .urb = {
-      .size = 128,
-      .min_vs_entries = 34,
-      .max_vs_entries = 352,
-      .max_hs_entries = 128,
-      .max_ds_entries = 208,
-      .max_gs_entries = 128,
-   }
-};
-/*
- * Note: for all KBL SKUs, the PRM says SKL for GS entries, not SKL+.
- * There's no KBL entry. Using the default SKL (GEN9) GS entries value.
- */
-
-/*
- * Both SKL and KBL support a maximum of 64 threads per
- * Pixel Shader Dispatch (PSD) unit.
- */
-#define  KBL_MAX_THREADS_PER_PSD 64
-
-static const struct brw_device_info brw_device_info_kbl_gt1 = {
-   GEN9_FEATURES,
-   .gt = 1,
-
-   .max_cs_threads = 7 * 6,
-   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 2,
-   .urb.size = 192,
-   .num_slices = 1,
-};
-
-static const struct brw_device_info brw_device_info_kbl_gt1_5 = {
-   GEN9_FEATURES,
-   .gt = 1,
-
-   .max_cs_threads = 7 * 6,
-   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 3,
-   .num_slices = 1,
-};
-
-static const struct brw_device_info brw_device_info_kbl_gt2 = {
-   GEN9_FEATURES,
-   .gt = 2,
-
-   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 3,
-   .num_slices = 1,
-};
-
-static const struct brw_device_info brw_device_info_kbl_gt3 = {
-   GEN9_FEATURES,
-   .gt = 3,
-
-   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 6,
-   .num_slices = 2,
-};
-
-static const struct brw_device_info brw_device_info_kbl_gt4 = {
-   GEN9_FEATURES,
-   .gt = 4,
-
-   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 9,
-   /*
-    * From the "L3 Allocation and Programming" documentation:
-    *
-    * "URB is limited to 1008KB due to programming restrictions.  This
-    *  is not a restriction of the L3 implementation, but of the FF and
-    *  other clients.  Therefore, in a GT4 implementation it is
-    *  possible for the programmed allocation of the L3 data array to
-    *  provide 3*384KB=1152KB for URB, but only 1008KB of this
-    *  will be used."
-    */
-   .urb.size = 1008 / 3,
-   .num_slices = 3,
-};
-
-const struct brw_device_info *
-brw_get_device_info(int devid)
-{
-   const struct brw_device_info *devinfo;
-   switch (devid) {
-#undef CHIPSET
-#define CHIPSET(id, family, name) \
-   case id: devinfo = &brw_device_info_##family; break;
-#include "pci_ids/i965_pci_ids.h"
-   default:
-      fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid);
-      return NULL;
-   }
-
-   return devinfo;
-}
-
-const char *
-brw_get_device_name(int devid)
-{
-   switch (devid) {
-#undef CHIPSET
-#define CHIPSET(id, family, name) case id: return name;
-#include "pci_ids/i965_pci_ids.h"
-   default:
-      return NULL;
-   }
-}
diff --git a/src/intel/common/brw_device_info.h b/src/intel/common/brw_device_info.h
deleted file mode 100644 (file)
index 0869063..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
- /*
-  * Copyright Â© 2013 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.
-  *
-  */
-
-#pragma once
-#include <stdbool.h>
-
-/**
- * Intel hardware information and quirks
- */
-struct brw_device_info
-{
-   int gen; /**< Generation number: 4, 5, 6, 7, ... */
-   int gt;
-
-   bool is_g4x;
-   bool is_ivybridge;
-   bool is_baytrail;
-   bool is_haswell;
-   bool is_cherryview;
-   bool is_broxton;
-
-   bool has_hiz_and_separate_stencil;
-   bool must_use_separate_stencil;
-
-   bool has_llc;
-
-   bool has_pln;
-   bool has_compr4;
-   bool has_surface_tile_offset;
-   bool supports_simd16_3src;
-   bool has_resource_streamer;
-
-   /**
-    * \name Intel hardware quirks
-    *  @{
-    */
-   bool has_negative_rhw_bug;
-
-   /**
-    * Some versions of Gen hardware don't do centroid interpolation correctly
-    * on unlit pixels, causing incorrect values for derivatives near triangle
-    * edges.  Enabling this flag causes the fragment shader to use
-    * non-centroid interpolation for unlit pixels, at the expense of two extra
-    * fragment shader instructions.
-    */
-   bool needs_unlit_centroid_workaround;
-   /** @} */
-
-   /**
-    * \name GPU hardware limits
-    *
-    * In general, you can find shader thread maximums by looking at the "Maximum
-    * Number of Threads" field in the Intel PRM description of the 3DSTATE_VS,
-    * 3DSTATE_GS, 3DSTATE_HS, 3DSTATE_DS, and 3DSTATE_PS commands. URB entry
-    * limits come from the "Number of URB Entries" field in the
-    * 3DSTATE_URB_VS command and friends.
-    *
-    * These fields are used to calculate the scratch space to allocate.  The
-    * amount of scratch space can be larger without being harmful on modern
-    * GPUs, however, prior to Haswell, programming the maximum number of threads
-    * to greater than the hardware maximum would cause GPU performance to tank.
-    *
-    *  @{
-    */
-   /**
-    * Total number of slices present on the device whether or not they've been
-    * fused off.
-    *
-    * XXX: CS thread counts are limited by the inability to do cross subslice
-    * communication. It is the effectively the number of logical threads which
-    * can be executed in a subslice. Fuse configurations may cause this number
-    * to change, so we program @max_cs_threads as the lower maximum.
-    */
-   unsigned num_slices;
-   unsigned max_vs_threads;   /**< Maximum Vertex Shader threads */
-   unsigned max_hs_threads;   /**< Maximum Hull Shader threads */
-   unsigned max_ds_threads;   /**< Maximum Domain Shader threads */
-   unsigned max_gs_threads;   /**< Maximum Geometry Shader threads. */
-   /**
-    * Theoretical maximum number of Pixel Shader threads.
-    *
-    * PSD means Pixel Shader Dispatcher. On modern Intel GPUs, hardware will
-    * automatically scale pixel shader thread count, based on a single value
-    * programmed into 3DSTATE_PS.
-    *
-    * To calculate the maximum number of threads for Gen8 beyond (which have
-    * multiple Pixel Shader Dispatchers):
-    *
-    * - Look up 3DSTATE_PS and find "Maximum Number of Threads Per PSD"
-    * - Usually there's only one PSD per subslice, so use the number of
-    *   subslices for number of PSDs.
-    * - For max_wm_threads, the total should be PSD threads * #PSDs.
-    */
-   unsigned max_wm_threads;
-
-   /**
-    * Maximum Compute Shader threads.
-    *
-    * Thread count * number of EUs per subslice
-    */
-   unsigned max_cs_threads;
-
-   struct {
-      /**
-       * Hardware default URB size.
-       *
-       * The units this is expressed in are somewhat inconsistent: 512b units
-       * on Gen4-5, KB on Gen6-7, and KB times the slice count on Gen8+.
-       *
-       * Look up "URB Size" in the "Device Attributes" page, and take the
-       * maximum.  Look up the slice count for each GT SKU on the same page.
-       * urb.size = URB Size (kbytes) / slice count
-       */
-      unsigned size;
-      unsigned min_vs_entries;
-      unsigned max_vs_entries;
-      unsigned max_hs_entries;
-      unsigned min_ds_entries;
-      unsigned max_ds_entries;
-      unsigned max_gs_entries;
-   } urb;
-   /** @} */
-};
-
-const struct brw_device_info *brw_get_device_info(int devid);
-const char *brw_get_device_name(int devid);
diff --git a/src/intel/common/gen_device_info.c b/src/intel/common/gen_device_info.c
new file mode 100644 (file)
index 0000000..6ee55e1
--- /dev/null
@@ -0,0 +1,517 @@
+/*
+ * Copyright Â© 2013 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.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "gen_device_info.h"
+
+static const struct gen_device_info gen_device_info_i965 = {
+   .gen = 4,
+   .has_negative_rhw_bug = true,
+   .num_slices = 1,
+   .max_vs_threads = 16,
+   .max_gs_threads = 2,
+   .max_wm_threads = 8 * 4,
+   .urb = {
+      .size = 256,
+   },
+};
+
+static const struct gen_device_info gen_device_info_g4x = {
+   .gen = 4,
+   .has_pln = true,
+   .has_compr4 = true,
+   .has_surface_tile_offset = true,
+   .is_g4x = true,
+   .num_slices = 1,
+   .max_vs_threads = 32,
+   .max_gs_threads = 2,
+   .max_wm_threads = 10 * 5,
+   .urb = {
+      .size = 384,
+   },
+};
+
+static const struct gen_device_info gen_device_info_ilk = {
+   .gen = 5,
+   .has_pln = true,
+   .has_compr4 = true,
+   .has_surface_tile_offset = true,
+   .num_slices = 1,
+   .max_vs_threads = 72,
+   .max_gs_threads = 32,
+   .max_wm_threads = 12 * 6,
+   .urb = {
+      .size = 1024,
+   },
+};
+
+static const struct gen_device_info gen_device_info_snb_gt1 = {
+   .gen = 6,
+   .gt = 1,
+   .has_hiz_and_separate_stencil = true,
+   .has_llc = true,
+   .has_pln = true,
+   .has_surface_tile_offset = true,
+   .needs_unlit_centroid_workaround = true,
+   .num_slices = 1,
+   .max_vs_threads = 24,
+   .max_gs_threads = 21, /* conservative; 24 if rendering disabled. */
+   .max_wm_threads = 40,
+   .urb = {
+      .size = 32,
+      .min_vs_entries = 24,
+      .max_vs_entries = 256,
+      .max_gs_entries = 256,
+   },
+};
+
+static const struct gen_device_info gen_device_info_snb_gt2 = {
+   .gen = 6,
+   .gt = 2,
+   .has_hiz_and_separate_stencil = true,
+   .has_llc = true,
+   .has_pln = true,
+   .has_surface_tile_offset = true,
+   .needs_unlit_centroid_workaround = true,
+   .num_slices = 1,
+   .max_vs_threads = 60,
+   .max_gs_threads = 60,
+   .max_wm_threads = 80,
+   .urb = {
+      .size = 64,
+      .min_vs_entries = 24,
+      .max_vs_entries = 256,
+      .max_gs_entries = 256,
+   },
+};
+
+#define GEN7_FEATURES                               \
+   .gen = 7,                                        \
+   .has_hiz_and_separate_stencil = true,            \
+   .must_use_separate_stencil = true,               \
+   .has_llc = true,                                 \
+   .has_pln = true,                                 \
+   .has_surface_tile_offset = true
+
+static const struct gen_device_info gen_device_info_ivb_gt1 = {
+   GEN7_FEATURES, .is_ivybridge = true, .gt = 1,
+   .num_slices = 1,
+   .max_vs_threads = 36,
+   .max_hs_threads = 36,
+   .max_ds_threads = 36,
+   .max_gs_threads = 36,
+   .max_wm_threads = 48,
+   .max_cs_threads = 36,
+   .urb = {
+      .size = 128,
+      .min_vs_entries = 32,
+      .max_vs_entries = 512,
+      .max_hs_entries = 32,
+      .min_ds_entries = 10,
+      .max_ds_entries = 288,
+      .max_gs_entries = 192,
+   },
+};
+
+static const struct gen_device_info gen_device_info_ivb_gt2 = {
+   GEN7_FEATURES, .is_ivybridge = true, .gt = 2,
+   .num_slices = 1,
+   .max_vs_threads = 128,
+   .max_hs_threads = 128,
+   .max_ds_threads = 128,
+   .max_gs_threads = 128,
+   .max_wm_threads = 172,
+   .max_cs_threads = 64,
+   .urb = {
+      .size = 256,
+      .min_vs_entries = 32,
+      .max_vs_entries = 704,
+      .max_hs_entries = 64,
+      .min_ds_entries = 10,
+      .max_ds_entries = 448,
+      .max_gs_entries = 320,
+   },
+};
+
+static const struct gen_device_info gen_device_info_byt = {
+   GEN7_FEATURES, .is_baytrail = true, .gt = 1,
+   .num_slices = 1,
+   .has_llc = false,
+   .max_vs_threads = 36,
+   .max_hs_threads = 36,
+   .max_ds_threads = 36,
+   .max_gs_threads = 36,
+   .max_wm_threads = 48,
+   .max_cs_threads = 32,
+   .urb = {
+      .size = 128,
+      .min_vs_entries = 32,
+      .max_vs_entries = 512,
+      .max_hs_entries = 32,
+      .min_ds_entries = 10,
+      .max_ds_entries = 288,
+      .max_gs_entries = 192,
+   },
+};
+
+#define HSW_FEATURES             \
+   GEN7_FEATURES,                \
+   .is_haswell = true,           \
+   .supports_simd16_3src = true, \
+   .has_resource_streamer = true
+
+static const struct gen_device_info gen_device_info_hsw_gt1 = {
+   HSW_FEATURES, .gt = 1,
+   .num_slices = 1,
+   .max_vs_threads = 70,
+   .max_hs_threads = 70,
+   .max_ds_threads = 70,
+   .max_gs_threads = 70,
+   .max_wm_threads = 102,
+   .max_cs_threads = 70,
+   .urb = {
+      .size = 128,
+      .min_vs_entries = 32,
+      .max_vs_entries = 640,
+      .max_hs_entries = 64,
+      .min_ds_entries = 10,
+      .max_ds_entries = 384,
+      .max_gs_entries = 256,
+   },
+};
+
+static const struct gen_device_info gen_device_info_hsw_gt2 = {
+   HSW_FEATURES, .gt = 2,
+   .num_slices = 1,
+   .max_vs_threads = 280,
+   .max_hs_threads = 256,
+   .max_ds_threads = 280,
+   .max_gs_threads = 256,
+   .max_wm_threads = 204,
+   .max_cs_threads = 70,
+   .urb = {
+      .size = 256,
+      .min_vs_entries = 64,
+      .max_vs_entries = 1664,
+      .max_hs_entries = 128,
+      .min_ds_entries = 10,
+      .max_ds_entries = 960,
+      .max_gs_entries = 640,
+   },
+};
+
+static const struct gen_device_info gen_device_info_hsw_gt3 = {
+   HSW_FEATURES, .gt = 3,
+   .num_slices = 2,
+   .max_vs_threads = 280,
+   .max_hs_threads = 256,
+   .max_ds_threads = 280,
+   .max_gs_threads = 256,
+   .max_wm_threads = 408,
+   .max_cs_threads = 70,
+   .urb = {
+      .size = 512,
+      .min_vs_entries = 64,
+      .max_vs_entries = 1664,
+      .max_hs_entries = 128,
+      .min_ds_entries = 10,
+      .max_ds_entries = 960,
+      .max_gs_entries = 640,
+   },
+};
+
+#define GEN8_FEATURES                               \
+   .gen = 8,                                        \
+   .has_hiz_and_separate_stencil = true,            \
+   .has_resource_streamer = true,                   \
+   .must_use_separate_stencil = true,               \
+   .has_llc = true,                                 \
+   .has_pln = true,                                 \
+   .supports_simd16_3src = true,                    \
+   .has_surface_tile_offset = true,                 \
+   .max_vs_threads = 504,                           \
+   .max_hs_threads = 504,                           \
+   .max_ds_threads = 504,                           \
+   .max_gs_threads = 504,                           \
+   .max_wm_threads = 384
+
+static const struct gen_device_info gen_device_info_bdw_gt1 = {
+   GEN8_FEATURES, .gt = 1,
+   .num_slices = 1,
+   .max_cs_threads = 42,
+   .urb = {
+      .size = 192,
+      .min_vs_entries = 64,
+      .max_vs_entries = 2560,
+      .max_hs_entries = 504,
+      .min_ds_entries = 34,
+      .max_ds_entries = 1536,
+      .max_gs_entries = 960,
+   }
+};
+
+static const struct gen_device_info gen_device_info_bdw_gt2 = {
+   GEN8_FEATURES, .gt = 2,
+   .num_slices = 1,
+   .max_cs_threads = 56,
+   .urb = {
+      .size = 384,
+      .min_vs_entries = 64,
+      .max_vs_entries = 2560,
+      .max_hs_entries = 504,
+      .min_ds_entries = 34,
+      .max_ds_entries = 1536,
+      .max_gs_entries = 960,
+   }
+};
+
+static const struct gen_device_info gen_device_info_bdw_gt3 = {
+   GEN8_FEATURES, .gt = 3,
+   .num_slices = 2,
+   .max_cs_threads = 56,
+   .urb = {
+      .size = 384,
+      .min_vs_entries = 64,
+      .max_vs_entries = 2560,
+      .max_hs_entries = 504,
+      .min_ds_entries = 34,
+      .max_ds_entries = 1536,
+      .max_gs_entries = 960,
+   }
+};
+
+static const struct gen_device_info gen_device_info_chv = {
+   GEN8_FEATURES, .is_cherryview = 1, .gt = 1,
+   .has_llc = false,
+   .num_slices = 1,
+   .max_vs_threads = 80,
+   .max_hs_threads = 80,
+   .max_ds_threads = 80,
+   .max_gs_threads = 80,
+   .max_wm_threads = 128,
+   .max_cs_threads = 6 * 7,
+   .urb = {
+      .size = 192,
+      .min_vs_entries = 34,
+      .max_vs_entries = 640,
+      .max_hs_entries = 80,
+      .min_ds_entries = 34,
+      .max_ds_entries = 384,
+      .max_gs_entries = 256,
+   }
+};
+
+#define GEN9_FEATURES                               \
+   .gen = 9,                                        \
+   .has_hiz_and_separate_stencil = true,            \
+   .has_resource_streamer = true,                   \
+   .must_use_separate_stencil = true,               \
+   .has_llc = true,                                 \
+   .has_pln = true,                                 \
+   .supports_simd16_3src = true,                    \
+   .has_surface_tile_offset = true,                 \
+   .max_vs_threads = 336,                           \
+   .max_gs_threads = 336,                           \
+   .max_hs_threads = 336,                           \
+   .max_ds_threads = 336,                           \
+   .max_wm_threads = 64 * 9,                        \
+   .max_cs_threads = 56,                            \
+   .urb = {                                         \
+      .size = 384,                                  \
+      .min_vs_entries = 64,                         \
+      .max_vs_entries = 1856,                       \
+      .max_hs_entries = 672,                        \
+      .min_ds_entries = 34,                         \
+      .max_ds_entries = 1120,                       \
+      .max_gs_entries = 640,                        \
+   }
+
+static const struct gen_device_info gen_device_info_skl_gt1 = {
+   GEN9_FEATURES, .gt = 1,
+   .num_slices = 1,
+   .urb.size = 192,
+};
+
+static const struct gen_device_info gen_device_info_skl_gt2 = {
+   GEN9_FEATURES, .gt = 2,
+   .num_slices = 1,
+};
+
+static const struct gen_device_info gen_device_info_skl_gt3 = {
+   GEN9_FEATURES, .gt = 3,
+   .num_slices = 2,
+};
+
+static const struct gen_device_info gen_device_info_skl_gt4 = {
+   GEN9_FEATURES, .gt = 4,
+   .num_slices = 3,
+   /* From the "L3 Allocation and Programming" documentation:
+    *
+    * "URB is limited to 1008KB due to programming restrictions.  This is not a
+    * restriction of the L3 implementation, but of the FF and other clients.
+    * Therefore, in a GT4 implementation it is possible for the programmed
+    * allocation of the L3 data array to provide 3*384KB=1152KB for URB, but
+    * only 1008KB of this will be used."
+    */
+   .urb.size = 1008 / 3,
+};
+
+static const struct gen_device_info gen_device_info_bxt = {
+   GEN9_FEATURES,
+   .is_broxton = 1,
+   .gt = 1,
+   .has_llc = false,
+
+   .num_slices = 1,
+   .max_vs_threads = 112,
+   .max_hs_threads = 112,
+   .max_ds_threads = 112,
+   .max_gs_threads = 112,
+   .max_wm_threads = 64 * 3,
+   .max_cs_threads = 6 * 6,
+   .urb = {
+      .size = 192,
+      .min_vs_entries = 34,
+      .max_vs_entries = 704,
+      .max_hs_entries = 256,
+      .max_ds_entries = 416,
+      .max_gs_entries = 256,
+   }
+};
+
+static const struct gen_device_info gen_device_info_bxt_2x6 = {
+   GEN9_FEATURES,
+   .is_broxton = 1,
+   .gt = 1,
+   .has_llc = false,
+
+   .num_slices = 1,
+   .max_vs_threads = 56, /* XXX: guess */
+   .max_hs_threads = 56, /* XXX: guess */
+   .max_ds_threads = 56,
+   .max_gs_threads = 56,
+   .max_wm_threads = 64 * 2,
+   .max_cs_threads = 6 * 6,
+   .urb = {
+      .size = 128,
+      .min_vs_entries = 34,
+      .max_vs_entries = 352,
+      .max_hs_entries = 128,
+      .max_ds_entries = 208,
+      .max_gs_entries = 128,
+   }
+};
+/*
+ * Note: for all KBL SKUs, the PRM says SKL for GS entries, not SKL+.
+ * There's no KBL entry. Using the default SKL (GEN9) GS entries value.
+ */
+
+/*
+ * Both SKL and KBL support a maximum of 64 threads per
+ * Pixel Shader Dispatch (PSD) unit.
+ */
+#define  KBL_MAX_THREADS_PER_PSD 64
+
+static const struct gen_device_info gen_device_info_kbl_gt1 = {
+   GEN9_FEATURES,
+   .gt = 1,
+
+   .max_cs_threads = 7 * 6,
+   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 2,
+   .urb.size = 192,
+   .num_slices = 1,
+};
+
+static const struct gen_device_info gen_device_info_kbl_gt1_5 = {
+   GEN9_FEATURES,
+   .gt = 1,
+
+   .max_cs_threads = 7 * 6,
+   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 3,
+   .num_slices = 1,
+};
+
+static const struct gen_device_info gen_device_info_kbl_gt2 = {
+   GEN9_FEATURES,
+   .gt = 2,
+
+   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 3,
+   .num_slices = 1,
+};
+
+static const struct gen_device_info gen_device_info_kbl_gt3 = {
+   GEN9_FEATURES,
+   .gt = 3,
+
+   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 6,
+   .num_slices = 2,
+};
+
+static const struct gen_device_info gen_device_info_kbl_gt4 = {
+   GEN9_FEATURES,
+   .gt = 4,
+
+   .max_wm_threads = KBL_MAX_THREADS_PER_PSD * 9,
+   /*
+    * From the "L3 Allocation and Programming" documentation:
+    *
+    * "URB is limited to 1008KB due to programming restrictions.  This
+    *  is not a restriction of the L3 implementation, but of the FF and
+    *  other clients.  Therefore, in a GT4 implementation it is
+    *  possible for the programmed allocation of the L3 data array to
+    *  provide 3*384KB=1152KB for URB, but only 1008KB of this
+    *  will be used."
+    */
+   .urb.size = 1008 / 3,
+   .num_slices = 3,
+};
+
+const struct gen_device_info *
+brw_get_device_info(int devid)
+{
+   const struct gen_device_info *devinfo;
+   switch (devid) {
+#undef CHIPSET
+#define CHIPSET(id, family, name) \
+   case id: devinfo = &gen_device_info_##family; break;
+#include "pci_ids/i965_pci_ids.h"
+   default:
+      fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid);
+      return NULL;
+   }
+
+   return devinfo;
+}
+
+const char *
+brw_get_device_name(int devid)
+{
+   switch (devid) {
+#undef CHIPSET
+#define CHIPSET(id, family, name) case id: return name;
+#include "pci_ids/i965_pci_ids.h"
+   default:
+      return NULL;
+   }
+}
diff --git a/src/intel/common/gen_device_info.h b/src/intel/common/gen_device_info.h
new file mode 100644 (file)
index 0000000..ea1b750
--- /dev/null
@@ -0,0 +1,147 @@
+ /*
+  * Copyright Â© 2013 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.
+  *
+  */
+
+#pragma once
+#include <stdbool.h>
+
+/**
+ * Intel hardware information and quirks
+ */
+struct gen_device_info
+{
+   int gen; /**< Generation number: 4, 5, 6, 7, ... */
+   int gt;
+
+   bool is_g4x;
+   bool is_ivybridge;
+   bool is_baytrail;
+   bool is_haswell;
+   bool is_cherryview;
+   bool is_broxton;
+
+   bool has_hiz_and_separate_stencil;
+   bool must_use_separate_stencil;
+
+   bool has_llc;
+
+   bool has_pln;
+   bool has_compr4;
+   bool has_surface_tile_offset;
+   bool supports_simd16_3src;
+   bool has_resource_streamer;
+
+   /**
+    * \name Intel hardware quirks
+    *  @{
+    */
+   bool has_negative_rhw_bug;
+
+   /**
+    * Some versions of Gen hardware don't do centroid interpolation correctly
+    * on unlit pixels, causing incorrect values for derivatives near triangle
+    * edges.  Enabling this flag causes the fragment shader to use
+    * non-centroid interpolation for unlit pixels, at the expense of two extra
+    * fragment shader instructions.
+    */
+   bool needs_unlit_centroid_workaround;
+   /** @} */
+
+   /**
+    * \name GPU hardware limits
+    *
+    * In general, you can find shader thread maximums by looking at the "Maximum
+    * Number of Threads" field in the Intel PRM description of the 3DSTATE_VS,
+    * 3DSTATE_GS, 3DSTATE_HS, 3DSTATE_DS, and 3DSTATE_PS commands. URB entry
+    * limits come from the "Number of URB Entries" field in the
+    * 3DSTATE_URB_VS command and friends.
+    *
+    * These fields are used to calculate the scratch space to allocate.  The
+    * amount of scratch space can be larger without being harmful on modern
+    * GPUs, however, prior to Haswell, programming the maximum number of threads
+    * to greater than the hardware maximum would cause GPU performance to tank.
+    *
+    *  @{
+    */
+   /**
+    * Total number of slices present on the device whether or not they've been
+    * fused off.
+    *
+    * XXX: CS thread counts are limited by the inability to do cross subslice
+    * communication. It is the effectively the number of logical threads which
+    * can be executed in a subslice. Fuse configurations may cause this number
+    * to change, so we program @max_cs_threads as the lower maximum.
+    */
+   unsigned num_slices;
+   unsigned max_vs_threads;   /**< Maximum Vertex Shader threads */
+   unsigned max_hs_threads;   /**< Maximum Hull Shader threads */
+   unsigned max_ds_threads;   /**< Maximum Domain Shader threads */
+   unsigned max_gs_threads;   /**< Maximum Geometry Shader threads. */
+   /**
+    * Theoretical maximum number of Pixel Shader threads.
+    *
+    * PSD means Pixel Shader Dispatcher. On modern Intel GPUs, hardware will
+    * automatically scale pixel shader thread count, based on a single value
+    * programmed into 3DSTATE_PS.
+    *
+    * To calculate the maximum number of threads for Gen8 beyond (which have
+    * multiple Pixel Shader Dispatchers):
+    *
+    * - Look up 3DSTATE_PS and find "Maximum Number of Threads Per PSD"
+    * - Usually there's only one PSD per subslice, so use the number of
+    *   subslices for number of PSDs.
+    * - For max_wm_threads, the total should be PSD threads * #PSDs.
+    */
+   unsigned max_wm_threads;
+
+   /**
+    * Maximum Compute Shader threads.
+    *
+    * Thread count * number of EUs per subslice
+    */
+   unsigned max_cs_threads;
+
+   struct {
+      /**
+       * Hardware default URB size.
+       *
+       * The units this is expressed in are somewhat inconsistent: 512b units
+       * on Gen4-5, KB on Gen6-7, and KB times the slice count on Gen8+.
+       *
+       * Look up "URB Size" in the "Device Attributes" page, and take the
+       * maximum.  Look up the slice count for each GT SKU on the same page.
+       * urb.size = URB Size (kbytes) / slice count
+       */
+      unsigned size;
+      unsigned min_vs_entries;
+      unsigned max_vs_entries;
+      unsigned max_hs_entries;
+      unsigned min_ds_entries;
+      unsigned max_ds_entries;
+      unsigned max_gs_entries;
+   } urb;
+   /** @} */
+};
+
+const struct gen_device_info *brw_get_device_info(int devid);
+const char *brw_get_device_name(int devid);
index 0487515d1d6a964d13ae0570c8790ec008f0b700..c7639d0164e14acc2b274c8395d48bd9cf7aad66 100644 (file)
@@ -48,7 +48,7 @@ __isl_finishme(const char *file, int line, const char *fmt, ...)
 
 void
 isl_device_init(struct isl_device *dev,
-                const struct brw_device_info *info,
+                const struct gen_device_info *info,
                 bool has_bit6_swizzling)
 {
    dev->info = info;
index 5e56f28545e09d2ee2797e4f1ac26f41ee31b5f1..bb20d1772d1c690dd1a790c1152fa2aa6d526f2a 100644 (file)
@@ -48,7 +48,7 @@
 extern "C" {
 #endif
 
-struct brw_device_info;
+struct gen_device_info;
 struct brw_image_param;
 
 #ifndef ISL_DEV_GEN
@@ -667,7 +667,7 @@ enum isl_msaa_layout {
 
 
 struct isl_device {
-   const struct brw_device_info *info;
+   const struct gen_device_info *info;
    bool use_separate_stencil;
    bool has_bit6_swizzling;
 };
@@ -959,7 +959,7 @@ extern const struct isl_format_layout isl_format_layouts[];
 
 void
 isl_device_init(struct isl_device *dev,
-                const struct brw_device_info *info,
+                const struct gen_device_info *info,
                 bool has_bit6_swizzling);
 
 isl_sample_count_mask_t ATTRIBUTE_CONST
@@ -977,17 +977,17 @@ isl_format_get_name(enum isl_format fmt)
    return isl_format_layouts[fmt].name;
 }
 
-bool isl_format_supports_rendering(const struct brw_device_info *devinfo,
+bool isl_format_supports_rendering(const struct gen_device_info *devinfo,
                                    enum isl_format format);
-bool isl_format_supports_alpha_blending(const struct brw_device_info *devinfo,
+bool isl_format_supports_alpha_blending(const struct gen_device_info *devinfo,
                                         enum isl_format format);
-bool isl_format_supports_sampling(const struct brw_device_info *devinfo,
+bool isl_format_supports_sampling(const struct gen_device_info *devinfo,
                                   enum isl_format format);
-bool isl_format_supports_filtering(const struct brw_device_info *devinfo,
+bool isl_format_supports_filtering(const struct gen_device_info *devinfo,
                                    enum isl_format format);
-bool isl_format_supports_vertex_fetch(const struct brw_device_info *devinfo,
+bool isl_format_supports_vertex_fetch(const struct gen_device_info *devinfo,
                                       enum isl_format format);
-bool isl_format_supports_lossless_compression(const struct brw_device_info *devinfo,
+bool isl_format_supports_lossless_compression(const struct gen_device_info *devinfo,
                                               enum isl_format format);
 
 bool isl_format_has_unorm_channel(enum isl_format fmt) ATTRIBUTE_CONST;
@@ -1089,14 +1089,14 @@ enum isl_format isl_format_rgb_to_rgbx(enum isl_format rgb) ATTRIBUTE_CONST;
 bool isl_is_storage_image_format(enum isl_format fmt);
 
 enum isl_format
-isl_lower_storage_image_format(const struct brw_device_info *devinfo,
+isl_lower_storage_image_format(const struct gen_device_info *devinfo,
                                enum isl_format fmt);
 
 /* Returns true if this hardware supports typed load/store on a format with
  * the same size as the given format.
  */
 bool
-isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinfo,
+isl_has_matching_typed_storage_image_format(const struct gen_device_info *devinfo,
                                             enum isl_format fmt);
 
 static inline bool
index c41a0bfcced64dca9ab3881af40d3983cc24cd44..2804463b12781fc92ee0803645d5a81997deb376 100644 (file)
@@ -24,7 +24,7 @@
 #include <assert.h>
 
 #include "isl.h"
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 
 struct surface_format_info {
    bool exists;
@@ -340,13 +340,13 @@ static const struct surface_format_info format_info[] = {
 #undef Y
 
 static unsigned
-format_gen(const struct brw_device_info *devinfo)
+format_gen(const struct gen_device_info *devinfo)
 {
    return devinfo->gen * 10 + (devinfo->is_g4x || devinfo->is_haswell) * 5;
 }
 
 bool
-isl_format_supports_rendering(const struct brw_device_info *devinfo,
+isl_format_supports_rendering(const struct gen_device_info *devinfo,
                               enum isl_format format)
 {
    if (!format_info[format].exists)
@@ -356,7 +356,7 @@ isl_format_supports_rendering(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_format_supports_alpha_blending(const struct brw_device_info *devinfo,
+isl_format_supports_alpha_blending(const struct gen_device_info *devinfo,
                                    enum isl_format format)
 {
    if (!format_info[format].exists)
@@ -366,7 +366,7 @@ isl_format_supports_alpha_blending(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_format_supports_sampling(const struct brw_device_info *devinfo,
+isl_format_supports_sampling(const struct gen_device_info *devinfo,
                              enum isl_format format)
 {
    if (!format_info[format].exists)
@@ -385,7 +385,7 @@ isl_format_supports_sampling(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_format_supports_filtering(const struct brw_device_info *devinfo,
+isl_format_supports_filtering(const struct gen_device_info *devinfo,
                               enum isl_format format)
 {
    if (!format_info[format].exists)
@@ -404,7 +404,7 @@ isl_format_supports_filtering(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_format_supports_vertex_fetch(const struct brw_device_info *devinfo,
+isl_format_supports_vertex_fetch(const struct gen_device_info *devinfo,
                                  enum isl_format format)
 {
    if (!format_info[format].exists)
@@ -420,7 +420,7 @@ isl_format_supports_vertex_fetch(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_format_supports_lossless_compression(const struct brw_device_info *devinfo,
+isl_format_supports_lossless_compression(const struct gen_device_info *devinfo,
                                          enum isl_format format)
 {
    if (!format_info[format].exists)
index 0c2ac2553fb73c7fe79ef001a1f3222199d3407e..b539f10638dd23f0956d296819952b9cc4eedf6d 100644 (file)
@@ -26,7 +26,7 @@
 #include <assert.h>
 #include <strings.h>
 
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "util/macros.h"
 
 #include "isl.h"
index 01d388180d69186186676ea9c11ab0ef9b38ef86..ffd03e4ad014e2a40a6fee0c6bbf259e6d2656a9 100644 (file)
@@ -76,7 +76,7 @@ isl_is_storage_image_format(enum isl_format format)
 }
 
 enum isl_format
-isl_lower_storage_image_format(const struct brw_device_info *devinfo,
+isl_lower_storage_image_format(const struct gen_device_info *devinfo,
                                enum isl_format format)
 {
    switch (format) {
@@ -188,7 +188,7 @@ isl_lower_storage_image_format(const struct brw_device_info *devinfo,
 }
 
 bool
-isl_has_matching_typed_storage_image_format(const struct brw_device_info *devinfo,
+isl_has_matching_typed_storage_image_format(const struct gen_device_info *devinfo,
                                             enum isl_format fmt)
 {
    if (devinfo->gen >= 9) {
index 0c9173deab42099c49d92dd832af8eeb5d347817..8c44b37dc06244aabd7466e80e91bec2691a8c5f 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "isl/isl.h"
 #include "isl/isl_priv.h"
 
index fcb61c44acb794c3e4af9578a57fd990658a2abf..29c06413ab9e8be38a41c34e16fd0e5b42e40633 100644 (file)
 uint64_t INTEL_DEBUG;
 
 struct gen_disasm {
-    struct brw_device_info devinfo;
+    struct gen_device_info devinfo;
 };
 
 void
 gen_disasm_disassemble(struct gen_disasm *disasm, void *assembly, int start,
                        int end, FILE *out)
 {
-   struct brw_device_info *devinfo = &disasm->devinfo;
+   struct gen_device_info *devinfo = &disasm->devinfo;
    bool dump_hex = false;
 
    for (int offset = start; offset < end;) {
@@ -89,7 +89,7 @@ struct gen_disasm *
 gen_disasm_create(int pciid)
 {
    struct gen_disasm *gd;
-   const struct brw_device_info *dev_info = NULL;
+   const struct gen_device_info *dev_info = NULL;
 
    gd = malloc(sizeof *gd);
    if (gd == NULL)
index f268e721fa8f62d362d198f07237bc52ebcc97ee..457a88ff0cd1ae611dd41d410557ff289ebd08fa 100644 (file)
@@ -922,7 +922,7 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
    if (size == 0) {
       /* We own the lock.  Allocate a buffer */
 
-      struct brw_device_info *devinfo = &device->info;
+      struct gen_device_info *devinfo = &device->info;
       uint32_t max_threads[] = {
          [MESA_SHADER_VERTEX]                  = devinfo->max_vs_threads,
          [MESA_SHADER_TESS_CTRL]               = devinfo->max_hs_threads,
index cf6399364c5d617a1c3a74e9949df0da765391ad..08dfa18defe0dcec4adf0075869de7f53ba8f7ab 100644 (file)
@@ -438,7 +438,7 @@ void anv_GetPhysicalDeviceProperties(
     VkPhysicalDeviceProperties*                 pProperties)
 {
    ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
-   const struct brw_device_info *devinfo = pdevice->info;
+   const struct gen_device_info *devinfo = pdevice->info;
 
    const float time_stamp_base = devinfo->gen >= 9 ? 83.333 : 80.0;
 
index dcf25ee76c6c9a7ad16fd474884ac8fd6f8f0068..b0264950d62363bdc3c614c9f27c3b17834571c7 100644 (file)
@@ -125,7 +125,7 @@ if opt_header:
     print "   };\n"
     print "};\n"
 
-    print "void anv_set_dispatch_devinfo(const struct brw_device_info *info);\n"
+    print "void anv_set_dispatch_devinfo(const struct gen_device_info *info);\n"
 
     for type, name, args, num, h in entrypoints:
         print_guard_start(name)
@@ -214,10 +214,10 @@ for layer in [ "anv", "gen7", "gen75", "gen8", "gen9" ]:
     print "};\n"
 
 print """
-static const struct brw_device_info *dispatch_devinfo;
+static const struct gen_device_info *dispatch_devinfo;
 
 void
-anv_set_dispatch_devinfo(const struct brw_device_info *devinfo)
+anv_set_dispatch_devinfo(const struct gen_device_info *devinfo)
 {
    dispatch_devinfo = devinfo;
 }
index bbfb2925d772b397921edcd45f7efafcd08ceffa..a746cd3545bc97ed34cc708485cb467f715029ac 100644 (file)
@@ -245,7 +245,7 @@ static const struct anv_format anv_formats[] = {
  * Exactly one bit must be set in \a aspect.
  */
 struct anv_format
-anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
+anv_get_format(const struct gen_device_info *devinfo, VkFormat vk_format,
                VkImageAspectFlags aspect, VkImageTiling tiling)
 {
    struct anv_format format = anv_formats[vk_format];
@@ -303,7 +303,7 @@ anv_get_format(const struct brw_device_info *devinfo, VkFormat vk_format,
 // Format capabilities
 
 static VkFormatFeatureFlags
-get_image_format_properties(const struct brw_device_info *devinfo,
+get_image_format_properties(const struct gen_device_info *devinfo,
                             enum isl_format base, struct anv_format format)
 {
    if (format.isl_format == ISL_FORMAT_UNSUPPORTED)
@@ -344,7 +344,7 @@ get_image_format_properties(const struct brw_device_info *devinfo,
 }
 
 static VkFormatFeatureFlags
-get_buffer_format_properties(const struct brw_device_info *devinfo,
+get_buffer_format_properties(const struct gen_device_info *devinfo,
                              enum isl_format format)
 {
    if (format == ISL_FORMAT_UNSUPPORTED)
index 52ab7d0bf2d13474136656c1971bd9e80e9c2a5b..151073eee5c66176342852ce59c5dd31a892f38d 100644 (file)
@@ -229,7 +229,7 @@ static const uint32_t vk_to_gen_primitive_type[] = {
 };
 
 static void
-populate_sampler_prog_key(const struct brw_device_info *devinfo,
+populate_sampler_prog_key(const struct gen_device_info *devinfo,
                           struct brw_sampler_prog_key_data *key)
 {
    /* XXX: Handle texture swizzle on HSW- */
@@ -240,7 +240,7 @@ populate_sampler_prog_key(const struct brw_device_info *devinfo,
 }
 
 static void
-populate_vs_prog_key(const struct brw_device_info *devinfo,
+populate_vs_prog_key(const struct gen_device_info *devinfo,
                      struct brw_vs_prog_key *key)
 {
    memset(key, 0, sizeof(*key));
@@ -253,7 +253,7 @@ populate_vs_prog_key(const struct brw_device_info *devinfo,
 }
 
 static void
-populate_gs_prog_key(const struct brw_device_info *devinfo,
+populate_gs_prog_key(const struct gen_device_info *devinfo,
                      struct brw_gs_prog_key *key)
 {
    memset(key, 0, sizeof(*key));
@@ -262,7 +262,7 @@ populate_gs_prog_key(const struct brw_device_info *devinfo,
 }
 
 static void
-populate_wm_prog_key(const struct brw_device_info *devinfo,
+populate_wm_prog_key(const struct gen_device_info *devinfo,
                      const VkGraphicsPipelineCreateInfo *info,
                      const struct anv_graphics_pipeline_create_info *extra,
                      struct brw_wm_prog_key *key)
@@ -304,7 +304,7 @@ populate_wm_prog_key(const struct brw_device_info *devinfo,
 }
 
 static void
-populate_cs_prog_key(const struct brw_device_info *devinfo,
+populate_cs_prog_key(const struct gen_device_info *devinfo,
                      struct brw_cs_prog_key *key)
 {
    memset(key, 0, sizeof(*key));
@@ -806,7 +806,7 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline,
 void
 anv_setup_pipeline_l3_config(struct anv_pipeline *pipeline)
 {
-   const struct brw_device_info *devinfo = &pipeline->device->info;
+   const struct gen_device_info *devinfo = &pipeline->device->info;
    switch (devinfo->gen) {
    case 7:
       if (devinfo->is_haswell)
@@ -828,7 +828,7 @@ anv_setup_pipeline_l3_config(struct anv_pipeline *pipeline)
 void
 anv_compute_urb_partition(struct anv_pipeline *pipeline)
 {
-   const struct brw_device_info *devinfo = &pipeline->device->info;
+   const struct gen_device_info *devinfo = &pipeline->device->info;
 
    bool vs_present = pipeline->active_stages & VK_SHADER_STAGE_VERTEX_BIT;
    unsigned vs_size = vs_present ?
index 74c1e5ba65f9762b275387cec4ab61c59a1f8b4d..7cab99e952b592bbd8efd4ac33829577d8016ea6 100644 (file)
@@ -40,7 +40,7 @@
 #define VG(x)
 #endif
 
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "brw_compiler.h"
 #include "util/macros.h"
 #include "util/list.h"
@@ -563,7 +563,7 @@ struct anv_physical_device {
     uint32_t                                    chipset_id;
     char                                        path[20];
     const char *                                name;
-    const struct brw_device_info *              info;
+    const struct gen_device_info *              info;
     uint64_t                                    aperture_size;
     struct brw_compiler *                       compiler;
     struct isl_device                           isl_dev;
@@ -687,7 +687,7 @@ struct anv_device {
 
     struct anv_instance *                       instance;
     uint32_t                                    chipset_id;
-    struct brw_device_info                      info;
+    struct gen_device_info                      info;
     struct isl_device                           isl_dev;
     int                                         context_id;
     int                                         fd;
@@ -1634,11 +1634,11 @@ struct anv_format {
 };
 
 struct anv_format
-anv_get_format(const struct brw_device_info *devinfo, VkFormat format,
+anv_get_format(const struct gen_device_info *devinfo, VkFormat format,
                VkImageAspectFlags aspect, VkImageTiling tiling);
 
 static inline enum isl_format
-anv_get_isl_format(const struct brw_device_info *devinfo, VkFormat vk_format,
+anv_get_isl_format(const struct gen_device_info *devinfo, VkFormat vk_format,
                    VkImageAspectFlags aspect, VkImageTiling tiling)
 {
    return anv_get_format(devinfo, vk_format, aspect, tiling).isl_format;
index a74071cf124a18eb8ea075b00d6236ee612d8f95..36bf57c35b9698c5349d2d0441d8c318da027ad6 100644 (file)
@@ -151,7 +151,7 @@ static const struct anv_l3_config chv_l3_configs[] = {
  * specified device.
  */
 static inline const struct anv_l3_config *
-get_l3_configs(const struct brw_device_info *devinfo)
+get_l3_configs(const struct gen_device_info *devinfo)
 {
    assert(devinfo->gen == GEN_GEN);
 #if GEN_IS_HASWELL
@@ -171,7 +171,7 @@ get_l3_configs(const struct brw_device_info *devinfo)
  * Return the size of an L3 way in KB.
  */
 static unsigned
-get_l3_way_size(const struct brw_device_info *devinfo)
+get_l3_way_size(const struct gen_device_info *devinfo)
 {
    if (devinfo->is_baytrail)
       return 2;
@@ -260,7 +260,7 @@ diff_l3_weights(struct anv_l3_weights w0, struct anv_l3_weights w1)
  * weight vector.
  */
 static const struct anv_l3_config *
-get_l3_config(const struct brw_device_info *devinfo, struct anv_l3_weights w0)
+get_l3_config(const struct gen_device_info *devinfo, struct anv_l3_weights w0)
 {
    const struct anv_l3_config *const cfgs = get_l3_configs(devinfo);
    const struct anv_l3_config *cfg_best = NULL;
@@ -284,7 +284,7 @@ get_l3_config(const struct brw_device_info *devinfo, struct anv_l3_weights w0)
  * is intended to approximately resemble the hardware defaults.
  */
 static struct anv_l3_weights
-get_default_l3_weights(const struct brw_device_info *devinfo,
+get_default_l3_weights(const struct gen_device_info *devinfo,
                        bool needs_dc, bool needs_slm)
 {
    struct anv_l3_weights w = {{ 0 }};
@@ -418,7 +418,7 @@ setup_l3_config(struct anv_cmd_buffer *cmd_buffer/*, struct brw_context *brw*/,
     * client (URB for all validated configurations) set to the
     * lower-bandwidth 2-bank address hashing mode.
     */
-   const struct brw_device_info *devinfo = &cmd_buffer->device->info;
+   const struct gen_device_info *devinfo = &cmd_buffer->device->info;
    const bool urb_low_bw = has_slm && !devinfo->is_baytrail;
    assert(!urb_low_bw || cfg->n[L3P_URB] == cfg->n[L3P_SLM]);
 
@@ -481,10 +481,10 @@ setup_l3_config(struct anv_cmd_buffer *cmd_buffer/*, struct brw_context *brw*/,
 
 /**
  * Return the unit brw_context::urb::size is expressed in, in KB.  \sa
- * brw_device_info::urb::size.
+ * gen_device_info::urb::size.
  */
 static unsigned
-get_urb_size_scale(const struct brw_device_info *devinfo)
+get_urb_size_scale(const struct gen_device_info *devinfo)
 {
    return (devinfo->gen >= 8 ? devinfo->num_slices : 1);
 }
@@ -493,7 +493,7 @@ void
 genX(setup_pipeline_l3_config)(struct anv_pipeline *pipeline)
 {
    const struct anv_l3_weights w = get_pipeline_state_l3_weights(pipeline);
-   const struct brw_device_info *devinfo = &pipeline->device->info;
+   const struct gen_device_info *devinfo = &pipeline->device->info;
    const struct anv_l3_config *const cfg = get_l3_config(devinfo, w);
    pipeline->urb.l3_config = cfg;
 
index d59e88493140b24d6f13885e5b239f91f387084b..2c7f85a0e60c6e72f612bc97e4c75b8af2213657 100644 (file)
@@ -44,7 +44,7 @@
 
 static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
 {
-   const struct brw_device_info *devinfo = c->func.devinfo;
+   const struct gen_device_info *devinfo = c->func.devinfo;
    GLuint i = 0,j;
 
    /* Register usage is static, precompute here:
index 0bac76096f8f0353fac2b86f238999a6bda80d32..4caa8f5aa077da40a93bdb54248ccd17a388a3ea 100644 (file)
@@ -49,7 +49,7 @@ static void release_tmps( struct brw_clip_compile *c )
 void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
                              GLuint nr_verts )
 {
-   const struct brw_device_info *devinfo = c->func.devinfo;
+   const struct gen_device_info *devinfo = c->func.devinfo;
    GLuint i = 0,j;
 
    /* Register usage is static, precompute here:
index afb70a139aecdc1a416f5c79177235620fd5d143..86b1eaa4b2e5235a03f324f16989708d20069535 100644 (file)
@@ -95,7 +95,7 @@ static const struct nir_shader_compiler_options vector_nir_options_gen6 = {
 };
 
 struct brw_compiler *
-brw_compiler_create(void *mem_ctx, const struct brw_device_info *devinfo)
+brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo)
 {
    struct brw_compiler *compiler = rzalloc(mem_ctx, struct brw_compiler);
 
index b45fba13043025b339086edafc923218b685730b..84d3dde8c995cbc1a1b1b67adbdc346718f817ff 100644 (file)
@@ -24,7 +24,7 @@
 #pragma once
 
 #include <stdio.h>
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "main/mtypes.h"
 #include "main/macros.h"
 
@@ -38,7 +38,7 @@ struct brw_geometry_program;
 union gl_constant_value;
 
 struct brw_compiler {
-   const struct brw_device_info *devinfo;
+   const struct gen_device_info *devinfo;
 
    struct {
       struct ra_regs *regs;
@@ -566,7 +566,7 @@ GLuint brw_varying_to_offset(const struct brw_vue_map *vue_map, GLuint varying)
    return brw_vue_slot_to_offset(vue_map->varying_to_slot[varying]);
 }
 
-void brw_compute_vue_map(const struct brw_device_info *devinfo,
+void brw_compute_vue_map(const struct gen_device_info *devinfo,
                          struct brw_vue_map *vue_map,
                          GLbitfield64 slots_valid,
                          bool separate_shader);
@@ -735,7 +735,7 @@ struct brw_gs_prog_data
 /** @} */
 
 struct brw_compiler *
-brw_compiler_create(void *mem_ctx, const struct brw_device_info *devinfo);
+brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo);
 
 /**
  * Compile a vertex shader.
index fec6df8ae46c748610bbea89e03f9a5a90a40da5..d3f3ae1c699919f122ed47340aebfa9eda438da2 100644 (file)
@@ -896,7 +896,7 @@ brwCreateContext(gl_api api,
    __DRIscreen *sPriv = driContextPriv->driScreenPriv;
    struct gl_context *shareCtx = (struct gl_context *) sharedContextPrivate;
    struct intel_screen *screen = sPriv->driverPrivate;
-   const struct brw_device_info *devinfo = screen->devinfo;
+   const struct gen_device_info *devinfo = screen->devinfo;
    struct dd_function_table functions;
 
    /* Only allow the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag if the kernel
index bcda0ab74c8347d52f56528ae9cc138d943dedea..829e78d6bc4698afed739192634511c41ebc82d1 100644 (file)
@@ -1063,7 +1063,7 @@ struct brw_context
       GLuint cs_start;
       /**
        * URB size in the current configuration.  The units this is expressed
-       * in are somewhat inconsistent, see brw_device_info::urb::size.
+       * in are somewhat inconsistent, see gen_device_info::urb::size.
        *
        * FINISHME: Represent the URB size consistently in KB on all platforms.
        */
@@ -1510,7 +1510,7 @@ void brw_fs_alloc_reg_sets(struct brw_compiler *compiler);
 void brw_vec4_alloc_reg_set(struct brw_compiler *compiler);
 
 /* brw_disasm.c */
-int brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
+int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
                          struct brw_inst *inst, bool is_compacted);
 
 /* brw_vs.c */
@@ -1865,7 +1865,7 @@ gen9_use_linear_1d_layout(const struct brw_context *brw,
 
 /* brw_pipe_control.c */
 int brw_init_pipe_control(struct brw_context *brw,
-                         const struct brw_device_info *info);
+                         const struct gen_device_info *info);
 void brw_fini_pipe_control(struct brw_context *brw);
 
 void brw_emit_pipe_control_flush(struct brw_context *brw, uint32_t flags);
index 6685acde9d61a01f25719f4a522a320e9aa69e48..30ff190df4ea033f927eb4d196fce23851a313f0 100644 (file)
@@ -35,7 +35,7 @@
 #include "compiler/glsl/ir_uniform.h"
 
 static void
-assign_cs_binding_table_offsets(const struct brw_device_info *devinfo,
+assign_cs_binding_table_offsets(const struct gen_device_info *devinfo,
                                 const struct gl_shader_program *shader_prog,
                                 const struct gl_program *prog,
                                 struct brw_cs_prog_data *prog_data)
index cca4c8ba8b9297de838a3af538e7d7a09e9e3e56..32cf134ea8f1c471fa766e6fe1bc443528c28f8c 100644 (file)
@@ -31,7 +31,7 @@
 #include "brw_eu.h"
 
 static bool
-has_jip(const struct brw_device_info *devinfo, enum opcode opcode)
+has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (devinfo->gen < 6)
       return false;
@@ -46,7 +46,7 @@ has_jip(const struct brw_device_info *devinfo, enum opcode opcode)
 }
 
 static bool
-has_uip(const struct brw_device_info *devinfo, enum opcode opcode)
+has_uip(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (devinfo->gen < 6)
       return false;
@@ -59,7 +59,7 @@ has_uip(const struct brw_device_info *devinfo, enum opcode opcode)
 }
 
 static bool
-has_branch_ctrl(const struct brw_device_info *devinfo, enum opcode opcode)
+has_branch_ctrl(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (devinfo->gen < 8)
       return false;
@@ -660,7 +660,7 @@ control(FILE *file, const char *name, const char *const ctrl[],
 }
 
 static int
-print_opcode(FILE *file, const struct brw_device_info *devinfo,
+print_opcode(FILE *file, const struct gen_device_info *devinfo,
              enum opcode id)
 {
    const struct opcode_desc *desc = brw_opcode_desc(devinfo, id);
@@ -732,7 +732,7 @@ reg(FILE *file, unsigned _reg_file, unsigned _reg_nr)
 }
 
 static int
-dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+dest(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int err = 0;
 
@@ -789,7 +789,7 @@ dest(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static int
-dest_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+dest_3src(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int err = 0;
    uint32_t reg_file;
@@ -831,7 +831,7 @@ src_align1_region(FILE *file,
 
 static int
 src_da1(FILE *file,
-        const struct brw_device_info *devinfo,
+        const struct gen_device_info *devinfo,
         unsigned opcode,
         unsigned type, unsigned _reg_file,
         unsigned _vert_stride, unsigned _width, unsigned _horiz_stride,
@@ -859,7 +859,7 @@ src_da1(FILE *file,
 
 static int
 src_ia1(FILE *file,
-        const struct brw_device_info *devinfo,
+        const struct gen_device_info *devinfo,
         unsigned opcode,
         unsigned type,
         unsigned _reg_file,
@@ -913,7 +913,7 @@ src_swizzle(FILE *file, unsigned swiz)
 
 static int
 src_da16(FILE *file,
-         const struct brw_device_info *devinfo,
+         const struct gen_device_info *devinfo,
          unsigned opcode,
          unsigned _reg_type,
          unsigned _reg_file,
@@ -949,7 +949,7 @@ src_da16(FILE *file,
 }
 
 static int
-src0_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+src0_3src(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int err = 0;
    unsigned src0_subreg_nr = brw_inst_3src_src0_subreg_nr(devinfo, inst);
@@ -976,7 +976,7 @@ src0_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static int
-src1_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+src1_3src(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int err = 0;
    unsigned src1_subreg_nr = brw_inst_3src_src1_subreg_nr(devinfo, inst);
@@ -1004,7 +1004,7 @@ src1_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 
 
 static int
-src2_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+src2_3src(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int err = 0;
    unsigned src2_subreg_nr = brw_inst_3src_src2_subreg_nr(devinfo, inst);
@@ -1031,7 +1031,7 @@ src2_3src(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static int
-imm(FILE *file, const struct brw_device_info *devinfo, unsigned type, brw_inst *inst)
+imm(FILE *file, const struct gen_device_info *devinfo, unsigned type, brw_inst *inst)
 {
    switch (type) {
    case BRW_HW_REG_TYPE_UD:
@@ -1073,7 +1073,7 @@ imm(FILE *file, const struct brw_device_info *devinfo, unsigned type, brw_inst *
 }
 
 static int
-src0(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+src0(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    if (brw_inst_src0_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) {
       return imm(file, devinfo, brw_inst_src0_reg_type(devinfo, inst), inst);
@@ -1129,7 +1129,7 @@ src0(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static int
-src1(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+src1(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    if (brw_inst_src1_reg_file(devinfo, inst) == BRW_IMMEDIATE_VALUE) {
       return imm(file, devinfo, brw_inst_src1_reg_type(devinfo, inst), inst);
@@ -1185,7 +1185,7 @@ src1(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static int
-qtr_ctrl(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
+qtr_ctrl(FILE *file, const struct gen_device_info *devinfo, brw_inst *inst)
 {
    int qtr_ctl = brw_inst_qtr_control(devinfo, inst);
    int exec_size = 1 << brw_inst_exec_size(devinfo, inst);
@@ -1216,7 +1216,7 @@ qtr_ctrl(FILE *file, const struct brw_device_info *devinfo, brw_inst *inst)
 
 #ifdef DEBUG
 static __attribute__((__unused__)) int
-brw_disassemble_imm(const struct brw_device_info *devinfo,
+brw_disassemble_imm(const struct gen_device_info *devinfo,
                     uint32_t dw3, uint32_t dw2, uint32_t dw1, uint32_t dw0)
 {
    brw_inst inst;
@@ -1227,7 +1227,7 @@ brw_disassemble_imm(const struct brw_device_info *devinfo,
 #endif
 
 int
-brw_disassemble_inst(FILE *file, const struct brw_device_info *devinfo,
+brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
                      brw_inst *inst, bool is_compacted)
 {
    int err = 0;
index 3a309dce8faeb2dbe7d90dac501e657422b3fe07..6a422bb798b77409a86e18ae01c523e0a82d2131 100644 (file)
@@ -221,7 +221,7 @@ brw_set_default_compression_control(struct brw_codegen *p,
  * the currently selected channel enable group untouched.
  */
 void
-brw_inst_set_compression(const struct brw_device_info *devinfo,
+brw_inst_set_compression(const struct gen_device_info *devinfo,
                          brw_inst *inst, bool on)
 {
    if (devinfo->gen >= 6) {
@@ -253,7 +253,7 @@ brw_set_default_compression(struct brw_codegen *p, bool on)
  * [group, group + exec_size) to the instruction passed as argument.
  */
 void
-brw_inst_set_group(const struct brw_device_info *devinfo,
+brw_inst_set_group(const struct gen_device_info *devinfo,
                    brw_inst *inst, unsigned group)
 {
    if (devinfo->gen >= 7) {
@@ -318,7 +318,7 @@ void brw_pop_insn_state( struct brw_codegen *p )
 /***********************************************************************
  */
 void
-brw_init_codegen(const struct brw_device_info *devinfo,
+brw_init_codegen(const struct gen_device_info *devinfo,
                  struct brw_codegen *p, void *mem_ctx)
 {
    memset(p, 0, sizeof(*p));
@@ -366,7 +366,7 @@ const unsigned *brw_get_program( struct brw_codegen *p,
 }
 
 void
-brw_disassemble(const struct brw_device_info *devinfo,
+brw_disassemble(const struct gen_device_info *devinfo,
                 void *assembly, int start, int end, FILE *out)
 {
    bool dump_hex = (INTEL_DEBUG & DEBUG_HEX) != 0;
@@ -680,7 +680,7 @@ static const struct opcode_desc opcode_descs[128] = {
 };
 
 static enum gen
-gen_from_devinfo(const struct brw_device_info *devinfo)
+gen_from_devinfo(const struct gen_device_info *devinfo)
 {
    switch (devinfo->gen) {
    case 4: return devinfo->is_g4x ? GEN45 : GEN4;
@@ -698,7 +698,7 @@ gen_from_devinfo(const struct brw_device_info *devinfo)
  * hardware generation, or NULL if the opcode is not supported by the device.
  */
 const struct opcode_desc *
-brw_opcode_desc(const struct brw_device_info *devinfo, enum opcode opcode)
+brw_opcode_desc(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    if (opcode >= ARRAY_SIZE(opcode_descs))
       return NULL;
index 2898b2ffc8b366701f01f829105eee71b397db22..3e527643704dec0f8c33ca41f129eaf6cc8902a8 100644 (file)
@@ -66,7 +66,7 @@ struct brw_codegen {
    brw_inst *current;
 
    bool single_program_flow;
-   const struct brw_device_info *devinfo;
+   const struct gen_device_info *devinfo;
 
    /* Control flow stacks:
     * - if_stack contains IF and ELSE instructions which must be patched
@@ -100,10 +100,10 @@ void brw_set_default_exec_size(struct brw_codegen *p, unsigned value);
 void brw_set_default_mask_control( struct brw_codegen *p, unsigned value );
 void brw_set_default_saturate( struct brw_codegen *p, bool enable );
 void brw_set_default_access_mode( struct brw_codegen *p, unsigned access_mode );
-void brw_inst_set_compression(const struct brw_device_info *devinfo,
+void brw_inst_set_compression(const struct gen_device_info *devinfo,
                               brw_inst *inst, bool on);
 void brw_set_default_compression(struct brw_codegen *p, bool on);
-void brw_inst_set_group(const struct brw_device_info *devinfo,
+void brw_inst_set_group(const struct gen_device_info *devinfo,
                         brw_inst *inst, unsigned group);
 void brw_set_default_group(struct brw_codegen *p, unsigned group);
 void brw_set_default_compression_control(struct brw_codegen *p, enum brw_compression c);
@@ -112,9 +112,9 @@ void brw_set_default_predicate_inverse(struct brw_codegen *p, bool predicate_inv
 void brw_set_default_flag_reg(struct brw_codegen *p, int reg, int subreg);
 void brw_set_default_acc_write_control(struct brw_codegen *p, unsigned value);
 
-void brw_init_codegen(const struct brw_device_info *, struct brw_codegen *p,
+void brw_init_codegen(const struct gen_device_info *, struct brw_codegen *p,
                      void *mem_ctx);
-void brw_disassemble(const struct brw_device_info *devinfo, void *assembly,
+void brw_disassemble(const struct gen_device_info *devinfo, void *assembly,
                      int start, int end, FILE *out);
 const unsigned *brw_get_program( struct brw_codegen *p, unsigned *sz );
 
@@ -366,7 +366,7 @@ void brw_shader_time_add(struct brw_codegen *p,
  * instruction.
  */
 static inline unsigned
-brw_jump_scale(const struct brw_device_info *devinfo)
+brw_jump_scale(const struct gen_device_info *devinfo)
 {
    /* Broadwell measures jump targets in bytes. */
    if (devinfo->gen >= 8)
@@ -532,15 +532,15 @@ enum brw_conditional_mod brw_negate_cmod(uint32_t cmod);
 enum brw_conditional_mod brw_swap_cmod(uint32_t cmod);
 
 /* brw_eu_compact.c */
-void brw_init_compaction_tables(const struct brw_device_info *devinfo);
+void brw_init_compaction_tables(const struct gen_device_info *devinfo);
 void brw_compact_instructions(struct brw_codegen *p, int start_offset,
                               int num_annotations, struct annotation *annotation);
-void brw_uncompact_instruction(const struct brw_device_info *devinfo,
+void brw_uncompact_instruction(const struct gen_device_info *devinfo,
                                brw_inst *dst, brw_compact_inst *src);
-bool brw_try_compact_instruction(const struct brw_device_info *devinfo,
+bool brw_try_compact_instruction(const struct gen_device_info *devinfo,
                                  brw_compact_inst *dst, brw_inst *src);
 
-void brw_debug_compact_uncompact(const struct brw_device_info *devinfo,
+void brw_debug_compact_uncompact(const struct gen_device_info *devinfo,
                                  brw_inst *orig, brw_inst *uncompacted);
 
 /* brw_eu_validate.c */
@@ -548,7 +548,7 @@ bool brw_validate_instructions(const struct brw_codegen *p, int start_offset,
                                struct annotation_info *annotation);
 
 static inline int
-next_offset(const struct brw_device_info *devinfo, void *store, int offset)
+next_offset(const struct gen_device_info *devinfo, void *store, int offset)
 {
    brw_inst *insn = (brw_inst *)((char *)store + offset);
 
@@ -583,10 +583,10 @@ struct opcode_desc {
 };
 
 const struct opcode_desc *
-brw_opcode_desc(const struct brw_device_info *devinfo, enum opcode opcode);
+brw_opcode_desc(const struct gen_device_info *devinfo, enum opcode opcode);
 
 static inline bool
-is_3src(const struct brw_device_info *devinfo, enum opcode opcode)
+is_3src(const struct gen_device_info *devinfo, enum opcode opcode)
 {
    const struct opcode_desc *desc = brw_opcode_desc(devinfo, opcode);
    return desc && desc->nsrc == 3;
index 5ae3fdd88cc4fa8578b54a733679a9c2c83d04c2..68321e785e837b57ee327f853c9033f6ff43c0f5 100644 (file)
@@ -670,7 +670,7 @@ static const uint16_t *subreg_table;
 static const uint16_t *src_index_table;
 
 static bool
-set_control_index(const struct brw_device_info *devinfo,
+set_control_index(const struct gen_device_info *devinfo,
                   brw_compact_inst *dst, brw_inst *src)
 {
    uint32_t uncompacted = devinfo->gen >= 8  /* 17b/G45; 19b/IVB+ */
@@ -699,7 +699,7 @@ set_control_index(const struct brw_device_info *devinfo,
 }
 
 static bool
-set_datatype_index(const struct brw_device_info *devinfo, brw_compact_inst *dst,
+set_datatype_index(const struct gen_device_info *devinfo, brw_compact_inst *dst,
                    brw_inst *src)
 {
    uint32_t uncompacted = devinfo->gen >= 8  /* 18b/G45+; 21b/BDW+ */
@@ -720,7 +720,7 @@ set_datatype_index(const struct brw_device_info *devinfo, brw_compact_inst *dst,
 }
 
 static bool
-set_subreg_index(const struct brw_device_info *devinfo, brw_compact_inst *dst,
+set_subreg_index(const struct gen_device_info *devinfo, brw_compact_inst *dst,
                  brw_inst *src, bool is_immediate)
 {
    uint16_t uncompacted =                 /* 15b */
@@ -755,7 +755,7 @@ get_src_index(uint16_t uncompacted,
 }
 
 static bool
-set_src0_index(const struct brw_device_info *devinfo,
+set_src0_index(const struct gen_device_info *devinfo,
                brw_compact_inst *dst, brw_inst *src)
 {
    uint16_t compacted;
@@ -770,7 +770,7 @@ set_src0_index(const struct brw_device_info *devinfo,
 }
 
 static bool
-set_src1_index(const struct brw_device_info *devinfo, brw_compact_inst *dst,
+set_src1_index(const struct gen_device_info *devinfo, brw_compact_inst *dst,
                brw_inst *src, bool is_immediate)
 {
    uint16_t compacted;
@@ -790,7 +790,7 @@ set_src1_index(const struct brw_device_info *devinfo, brw_compact_inst *dst,
 }
 
 static bool
-set_3src_control_index(const struct brw_device_info *devinfo,
+set_3src_control_index(const struct gen_device_info *devinfo,
                        brw_compact_inst *dst, brw_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -813,7 +813,7 @@ set_3src_control_index(const struct brw_device_info *devinfo,
 }
 
 static bool
-set_3src_source_index(const struct brw_device_info *devinfo,
+set_3src_source_index(const struct gen_device_info *devinfo,
                       brw_compact_inst *dst, brw_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -847,7 +847,7 @@ set_3src_source_index(const struct brw_device_info *devinfo,
 }
 
 static bool
-has_unmapped_bits(const struct brw_device_info *devinfo, brw_inst *src)
+has_unmapped_bits(const struct gen_device_info *devinfo, brw_inst *src)
 {
    /* EOT can only be mapped on a send if the src1 is an immediate */
    if ((brw_inst_opcode(devinfo, src) == BRW_OPCODE_SENDC ||
@@ -878,7 +878,7 @@ has_unmapped_bits(const struct brw_device_info *devinfo, brw_inst *src)
 }
 
 static bool
-has_3src_unmapped_bits(const struct brw_device_info *devinfo, brw_inst *src)
+has_3src_unmapped_bits(const struct gen_device_info *devinfo, brw_inst *src)
 {
    /* Check for three-source instruction bits that don't map to any of the
     * fields of the compacted instruction.  All of them seem to be reserved
@@ -900,7 +900,7 @@ has_3src_unmapped_bits(const struct brw_device_info *devinfo, brw_inst *src)
 }
 
 static bool
-brw_try_compact_3src_instruction(const struct brw_device_info *devinfo,
+brw_try_compact_3src_instruction(const struct gen_device_info *devinfo,
                                  brw_compact_inst *dst, brw_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -961,7 +961,7 @@ is_compactable_immediate(unsigned imm)
  * brw_compact_instructions().
  */
 bool
-brw_try_compact_instruction(const struct brw_device_info *devinfo,
+brw_try_compact_instruction(const struct gen_device_info *devinfo,
                             brw_compact_inst *dst, brw_inst *src)
 {
    brw_compact_inst temp;
@@ -1048,7 +1048,7 @@ brw_try_compact_instruction(const struct brw_device_info *devinfo,
 }
 
 static void
-set_uncompacted_control(const struct brw_device_info *devinfo, brw_inst *dst,
+set_uncompacted_control(const struct gen_device_info *devinfo, brw_inst *dst,
                         brw_compact_inst *src)
 {
    uint32_t uncompacted =
@@ -1070,7 +1070,7 @@ set_uncompacted_control(const struct brw_device_info *devinfo, brw_inst *dst,
 }
 
 static void
-set_uncompacted_datatype(const struct brw_device_info *devinfo, brw_inst *dst,
+set_uncompacted_datatype(const struct gen_device_info *devinfo, brw_inst *dst,
                          brw_compact_inst *src)
 {
    uint32_t uncompacted =
@@ -1087,7 +1087,7 @@ set_uncompacted_datatype(const struct brw_device_info *devinfo, brw_inst *dst,
 }
 
 static void
-set_uncompacted_subreg(const struct brw_device_info *devinfo, brw_inst *dst,
+set_uncompacted_subreg(const struct gen_device_info *devinfo, brw_inst *dst,
                        brw_compact_inst *src)
 {
    uint16_t uncompacted =
@@ -1099,7 +1099,7 @@ set_uncompacted_subreg(const struct brw_device_info *devinfo, brw_inst *dst,
 }
 
 static void
-set_uncompacted_src0(const struct brw_device_info *devinfo, brw_inst *dst,
+set_uncompacted_src0(const struct gen_device_info *devinfo, brw_inst *dst,
                      brw_compact_inst *src)
 {
    uint32_t compacted = brw_compact_inst_src0_index(devinfo, src);
@@ -1109,7 +1109,7 @@ set_uncompacted_src0(const struct brw_device_info *devinfo, brw_inst *dst,
 }
 
 static void
-set_uncompacted_src1(const struct brw_device_info *devinfo, brw_inst *dst,
+set_uncompacted_src1(const struct gen_device_info *devinfo, brw_inst *dst,
                      brw_compact_inst *src, bool is_immediate)
 {
    if (is_immediate) {
@@ -1125,7 +1125,7 @@ set_uncompacted_src1(const struct brw_device_info *devinfo, brw_inst *dst,
 }
 
 static void
-set_uncompacted_3src_control_index(const struct brw_device_info *devinfo,
+set_uncompacted_3src_control_index(const struct gen_device_info *devinfo,
                                    brw_inst *dst, brw_compact_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -1141,7 +1141,7 @@ set_uncompacted_3src_control_index(const struct brw_device_info *devinfo,
 }
 
 static void
-set_uncompacted_3src_source_index(const struct brw_device_info *devinfo,
+set_uncompacted_3src_source_index(const struct gen_device_info *devinfo,
                                   brw_inst *dst, brw_compact_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -1166,7 +1166,7 @@ set_uncompacted_3src_source_index(const struct brw_device_info *devinfo,
 }
 
 static void
-brw_uncompact_3src_instruction(const struct brw_device_info *devinfo,
+brw_uncompact_3src_instruction(const struct gen_device_info *devinfo,
                                brw_inst *dst, brw_compact_inst *src)
 {
    assert(devinfo->gen >= 8);
@@ -1197,7 +1197,7 @@ brw_uncompact_3src_instruction(const struct brw_device_info *devinfo,
 }
 
 void
-brw_uncompact_instruction(const struct brw_device_info *devinfo, brw_inst *dst,
+brw_uncompact_instruction(const struct gen_device_info *devinfo, brw_inst *dst,
                           brw_compact_inst *src)
 {
    memset(dst, 0, sizeof(*dst));
@@ -1254,7 +1254,7 @@ brw_uncompact_instruction(const struct brw_device_info *devinfo, brw_inst *dst,
 #undef uncompact
 }
 
-void brw_debug_compact_uncompact(const struct brw_device_info *devinfo,
+void brw_debug_compact_uncompact(const struct gen_device_info *devinfo,
                                  brw_inst *orig,
                                  brw_inst *uncompacted)
 {
@@ -1291,7 +1291,7 @@ compacted_between(int old_ip, int old_target_ip, int *compacted_counts)
 }
 
 static void
-update_uip_jip(const struct brw_device_info *devinfo, brw_inst *insn,
+update_uip_jip(const struct gen_device_info *devinfo, brw_inst *insn,
                int this_old_ip, int *compacted_counts)
 {
    /* JIP and UIP are in units of:
@@ -1319,7 +1319,7 @@ update_uip_jip(const struct brw_device_info *devinfo, brw_inst *insn,
 }
 
 static void
-update_gen4_jump_count(const struct brw_device_info *devinfo, brw_inst *insn,
+update_gen4_jump_count(const struct gen_device_info *devinfo, brw_inst *insn,
                        int this_old_ip, int *compacted_counts)
 {
    assert(devinfo->gen == 5 || devinfo->is_g4x);
@@ -1342,7 +1342,7 @@ update_gen4_jump_count(const struct brw_device_info *devinfo, brw_inst *insn,
 }
 
 void
-brw_init_compaction_tables(const struct brw_device_info *devinfo)
+brw_init_compaction_tables(const struct gen_device_info *devinfo)
 {
    static bool initialized;
    if (initialized || p_atomic_cmpxchg(&initialized, false, true) != false)
@@ -1404,7 +1404,7 @@ brw_compact_instructions(struct brw_codegen *p, int start_offset,
    if (unlikely(INTEL_DEBUG & DEBUG_NO_COMPACTION))
       return;
 
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    void *store = p->store + start_offset / 16;
    /* For an instruction at byte offset 16*i before compaction, this is the
     * number of compacted instructions minus the number of padding NOP/NENOPs
index 6da47f26f72d966534cca340f73ccd3ae3c1cb1d..da6354e587a7152eeca784826d0ca0e4413fdc33 100644 (file)
@@ -48,7 +48,7 @@ gen6_resolve_implied_move(struct brw_codegen *p,
                          struct brw_reg *src,
                          unsigned msg_reg_nr)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    if (devinfo->gen < 6)
       return;
 
@@ -78,7 +78,7 @@ gen7_convert_mrf_to_grf(struct brw_codegen *p, struct brw_reg *reg)
     * Since we're pretending to have 16 MRFs anyway, we may as well use the
     * registers required for messages with EOT.
     */
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    if (devinfo->gen >= 7 && reg->file == BRW_MESSAGE_REGISTER_FILE) {
       reg->file = BRW_GENERAL_REGISTER_FILE;
       reg->nr += GEN7_MRF_HACK_START;
@@ -91,7 +91,7 @@ gen7_convert_mrf_to_grf(struct brw_codegen *p, struct brw_reg *reg)
  * The hardware encoding may depend on whether the value is an immediate.
  */
 unsigned
-brw_reg_type_to_hw_type(const struct brw_device_info *devinfo,
+brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
                         enum brw_reg_type type, enum brw_reg_file file)
 {
    if (file == BRW_IMMEDIATE_VALUE) {
@@ -144,7 +144,7 @@ brw_reg_type_to_hw_type(const struct brw_device_info *devinfo,
 void
 brw_set_dest(struct brw_codegen *p, brw_inst *inst, struct brw_reg dest)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (dest.file == BRW_MESSAGE_REGISTER_FILE)
       assert((dest.nr & ~BRW_MRF_COMPR4) < BRW_MAX_MRF(devinfo->gen));
@@ -222,7 +222,7 @@ brw_set_dest(struct brw_codegen *p, brw_inst *inst, struct brw_reg dest)
 extern int reg_type_size[];
 
 static void
-validate_reg(const struct brw_device_info *devinfo,
+validate_reg(const struct gen_device_info *devinfo,
              brw_inst *inst, struct brw_reg reg)
 {
    const int hstride_for_reg[] = {0, 1, 2, 4};
@@ -320,7 +320,7 @@ is_compactable_immediate(unsigned imm)
 void
 brw_set_src0(struct brw_codegen *p, brw_inst *inst, struct brw_reg reg)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (reg.file == BRW_MESSAGE_REGISTER_FILE)
       assert((reg.nr & ~BRW_MRF_COMPR4) < BRW_MAX_MRF(devinfo->gen));
@@ -473,7 +473,7 @@ brw_set_src0(struct brw_codegen *p, brw_inst *inst, struct brw_reg reg)
 void
 brw_set_src1(struct brw_codegen *p, brw_inst *inst, struct brw_reg reg)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (reg.file != BRW_ARCHITECTURE_REGISTER_FILE)
       assert(reg.nr < 128);
@@ -568,7 +568,7 @@ brw_set_message_descriptor(struct brw_codegen *p,
                           bool header_present,
                           bool end_of_thread)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    brw_set_src1(p, inst, brw_imm_d(0));
 
@@ -600,7 +600,7 @@ static void brw_set_math_message( struct brw_codegen *p,
                                  bool low_precision,
                                  unsigned dataType )
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    unsigned msg_length;
    unsigned response_length;
 
@@ -646,7 +646,7 @@ static void brw_set_ff_sync_message(struct brw_codegen *p,
                                    unsigned response_length,
                                    bool end_of_thread)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    brw_set_message_descriptor(p, insn, BRW_SFID_URB,
                              1, response_length, true, end_of_thread);
@@ -667,7 +667,7 @@ static void brw_set_urb_message( struct brw_codegen *p,
                                 unsigned offset,
                                 unsigned swizzle_control )
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    assert(devinfo->gen < 7 || swizzle_control != BRW_URB_SWIZZLE_TRANSPOSE);
    assert(devinfo->gen < 7 || !(flags & BRW_URB_WRITE_ALLOCATE));
@@ -713,7 +713,7 @@ brw_set_dp_write_message(struct brw_codegen *p,
                         unsigned end_of_thread,
                         unsigned send_commit_msg)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    unsigned sfid;
 
    if (devinfo->gen >= 7) {
@@ -752,7 +752,7 @@ brw_set_dp_read_message(struct brw_codegen *p,
                         bool header_present,
                        unsigned response_length)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    unsigned sfid;
 
    if (devinfo->gen >= 7) {
@@ -796,7 +796,7 @@ brw_set_sampler_message(struct brw_codegen *p,
                         unsigned simd_mode,
                         unsigned return_format)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    brw_set_message_descriptor(p, inst, BRW_SFID_SAMPLER, msg_length,
                              response_length, header_present, false);
@@ -823,7 +823,7 @@ gen7_set_dp_scratch_message(struct brw_codegen *p,
                             unsigned rlen,
                             bool header_present)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    assert(num_regs == 1 || num_regs == 2 || num_regs == 4 ||
           (devinfo->gen >= 8 && num_regs == 8));
    const unsigned block_size = (devinfo->gen >= 8 ? _mesa_logbase2(num_regs) :
@@ -843,7 +843,7 @@ gen7_set_dp_scratch_message(struct brw_codegen *p,
 brw_inst *
 brw_next_insn(struct brw_codegen *p, unsigned opcode)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    if (p->nr_insn + 1 > p->store_size) {
@@ -898,7 +898,7 @@ static brw_inst *
 brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest,
          struct brw_reg src0, struct brw_reg src1, struct brw_reg src2)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *inst = next_insn(p, opcode);
 
    gen7_convert_mrf_to_grf(p, &dest);
@@ -1050,7 +1050,7 @@ void brw_##OP(struct brw_codegen *p,                                            \
              struct brw_reg dest,                                            \
              struct brw_reg src)                                             \
 {                                                                            \
-   const struct brw_device_info *devinfo = p->devinfo;                                       \
+   const struct gen_device_info *devinfo = p->devinfo;                                       \
    brw_inst *rnd, *add;                                                              \
    rnd = next_insn(p, BRW_OPCODE_##OP);                                              \
    brw_set_dest(p, rnd, dest);                                               \
@@ -1203,7 +1203,7 @@ brw_PLN(struct brw_codegen *p, struct brw_reg dest,
 brw_inst *
 brw_F32TO16(struct brw_codegen *p, struct brw_reg dst, struct brw_reg src)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const bool align16 = brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_16;
    /* The F32TO16 instruction doesn't support 32-bit destination types in
     * Align1 mode, and neither does the Gen8 implementation in terms of a
@@ -1250,7 +1250,7 @@ brw_F32TO16(struct brw_codegen *p, struct brw_reg dst, struct brw_reg src)
 brw_inst *
 brw_F16TO32(struct brw_codegen *p, struct brw_reg dst, struct brw_reg src)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    bool align16 = brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_16;
 
    if (align16) {
@@ -1300,7 +1300,7 @@ brw_inst *
 brw_JMPI(struct brw_codegen *p, struct brw_reg index,
          unsigned predicate_control)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_reg ip = brw_ip_reg();
    brw_inst *inst = brw_alu2(p, BRW_OPCODE_JMPI, ip, ip, index);
 
@@ -1370,7 +1370,7 @@ get_inner_do_insn(struct brw_codegen *p)
 brw_inst *
 brw_IF(struct brw_codegen *p, unsigned execute_size)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_IF);
@@ -1418,7 +1418,7 @@ brw_inst *
 gen6_IF(struct brw_codegen *p, enum brw_conditional_mod conditional,
        struct brw_reg src0, struct brw_reg src1)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_IF);
@@ -1445,7 +1445,7 @@ static void
 convert_IF_ELSE_to_ADD(struct brw_codegen *p,
                        brw_inst *if_inst, brw_inst *else_inst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    /* The next instruction (where the ENDIF would be, if it existed) */
    brw_inst *next_inst = &p->store[p->nr_insn];
@@ -1486,7 +1486,7 @@ static void
 patch_IF_ELSE(struct brw_codegen *p,
               brw_inst *if_inst, brw_inst *else_inst, brw_inst *endif_inst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    /* We shouldn't be patching IF and ELSE instructions in single program flow
     * mode when gen < 6, because in single program flow mode on those
@@ -1573,7 +1573,7 @@ patch_IF_ELSE(struct brw_codegen *p,
 void
 brw_ELSE(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_ELSE);
@@ -1611,7 +1611,7 @@ brw_ELSE(struct brw_codegen *p)
 void
 brw_ENDIF(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn = NULL;
    brw_inst *else_inst = NULL;
    brw_inst *if_inst = NULL;
@@ -1692,7 +1692,7 @@ brw_ENDIF(struct brw_codegen *p)
 brw_inst *
 brw_BREAK(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_BREAK);
@@ -1720,7 +1720,7 @@ brw_BREAK(struct brw_codegen *p)
 brw_inst *
 brw_CONT(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_CONTINUE);
@@ -1745,7 +1745,7 @@ brw_CONT(struct brw_codegen *p)
 brw_inst *
 gen6_HALT(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    insn = next_insn(p, BRW_OPCODE_HALT);
@@ -1782,7 +1782,7 @@ gen6_HALT(struct brw_codegen *p)
 brw_inst *
 brw_DO(struct brw_codegen *p, unsigned execute_size)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (devinfo->gen >= 6 || p->single_program_flow) {
       push_loop_stack(p, &p->store[p->nr_insn]);
@@ -1816,7 +1816,7 @@ brw_DO(struct brw_codegen *p, unsigned execute_size)
 static void
 brw_patch_break_cont(struct brw_codegen *p, brw_inst *while_inst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *do_inst = get_inner_do_insn(p);
    brw_inst *inst;
    unsigned br = brw_jump_scale(devinfo);
@@ -1841,7 +1841,7 @@ brw_patch_break_cont(struct brw_codegen *p, brw_inst *while_inst)
 brw_inst *
 brw_WHILE(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn, *do_insn;
    unsigned br = brw_jump_scale(devinfo);
 
@@ -1905,7 +1905,7 @@ brw_WHILE(struct brw_codegen *p)
  */
 void brw_land_fwd_jump(struct brw_codegen *p, int jmp_insn_idx)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *jmp_insn = &p->store[jmp_insn_idx];
    unsigned jmpi = 1;
 
@@ -1929,7 +1929,7 @@ void brw_CMP(struct brw_codegen *p,
             struct brw_reg src0,
             struct brw_reg src1)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn = next_insn(p, BRW_OPCODE_CMP);
 
    brw_inst_set_cond_modifier(devinfo, insn, conditional);
@@ -1965,7 +1965,7 @@ void gen4_math(struct brw_codegen *p,
               struct brw_reg src,
               unsigned precision )
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn = next_insn(p, BRW_OPCODE_SEND);
    unsigned data_type;
    if (has_scalar_region(src)) {
@@ -1998,7 +1998,7 @@ void gen6_math(struct brw_codegen *p,
               struct brw_reg src0,
               struct brw_reg src1)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn = next_insn(p, BRW_OPCODE_MATH);
 
    assert(devinfo->gen >= 6);
@@ -2074,7 +2074,7 @@ void brw_oword_block_write_scratch(struct brw_codegen *p,
                                   int num_regs,
                                   unsigned offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    uint32_t msg_type;
 
    if (devinfo->gen >= 6)
@@ -2187,7 +2187,7 @@ brw_oword_block_read_scratch(struct brw_codegen *p,
                             int num_regs,
                             unsigned offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (devinfo->gen >= 6)
       offset /= 16;
@@ -2262,7 +2262,7 @@ gen7_block_read_scratch(struct brw_codegen *p,
                         int num_regs,
                         unsigned offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn = next_insn(p, BRW_OPCODE_SEND);
    assert(brw_inst_pred_control(devinfo, insn) == BRW_PREDICATE_NONE);
 
@@ -2302,7 +2302,7 @@ void brw_oword_block_read(struct brw_codegen *p,
                          uint32_t offset,
                          uint32_t bind_table_index)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    /* On newer hardware, offset is in units of owords. */
    if (devinfo->gen >= 6)
@@ -2363,7 +2363,7 @@ void brw_fb_WRITE(struct brw_codegen *p,
                   bool last_render_target,
                   bool header_present)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
    unsigned msg_type;
    struct brw_reg dest, src0;
@@ -2455,7 +2455,7 @@ void brw_SAMPLE(struct brw_codegen *p,
                unsigned simd_mode,
                unsigned return_format)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    if (msg_reg_nr != -1)
@@ -2510,7 +2510,7 @@ void brw_adjust_sampler_state_pointer(struct brw_codegen *p,
     * exclusively use the offset - we have to use both.
     */
 
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    if (sampler_index.file == BRW_IMMEDIATE_VALUE) {
       const int sampler_state_size = 16; /* 16 bytes */
@@ -2554,7 +2554,7 @@ void brw_urb_WRITE(struct brw_codegen *p,
                   unsigned offset,
                   unsigned swizzle)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    gen6_resolve_implied_move(p, &src0, msg_reg_nr);
@@ -2598,7 +2598,7 @@ brw_send_indirect_message(struct brw_codegen *p,
                           struct brw_reg payload,
                           struct brw_reg desc)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_inst *send;
    int setup;
 
@@ -2658,7 +2658,7 @@ brw_send_indirect_surface_message(struct brw_codegen *p,
                                   unsigned response_len,
                                   bool header_present)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_inst *insn;
 
    if (surface.file != BRW_IMMEDIATE_VALUE) {
@@ -2691,7 +2691,7 @@ brw_send_indirect_surface_message(struct brw_codegen *p,
 }
 
 static bool
-while_jumps_before_offset(const struct brw_device_info *devinfo,
+while_jumps_before_offset(const struct gen_device_info *devinfo,
                           brw_inst *insn, int while_offset, int start_offset)
 {
    int scale = 16 / brw_jump_scale(devinfo);
@@ -2706,7 +2706,7 @@ brw_find_next_block_end(struct brw_codegen *p, int start_offset)
 {
    int offset;
    void *store = p->store;
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    int depth = 0;
 
@@ -2748,7 +2748,7 @@ brw_find_next_block_end(struct brw_codegen *p, int start_offset)
 static int
 brw_find_loop_end(struct brw_codegen *p, int start_offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    int offset;
    void *store = p->store;
 
@@ -2777,7 +2777,7 @@ brw_find_loop_end(struct brw_codegen *p, int start_offset)
 void
 brw_set_uip_jip(struct brw_codegen *p, int start_offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    int offset;
    int br = brw_jump_scale(devinfo);
    int scale = 16 / br;
@@ -2852,7 +2852,7 @@ void brw_ff_sync(struct brw_codegen *p,
                   unsigned response_length,
                   bool eot)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    brw_inst *insn;
 
    gen6_resolve_implied_move(p, &src0, msg_reg_nr);
@@ -2933,7 +2933,7 @@ brw_set_dp_untyped_atomic_message(struct brw_codegen *p,
                                   unsigned atomic_op,
                                   bool response_expected)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    unsigned msg_control =
       atomic_op | /* Atomic Operation Type: BRW_AOP_* */
       (response_expected ? 1 << 5 : 0); /* Return data expected */
@@ -2969,7 +2969,7 @@ brw_untyped_atomic(struct brw_codegen *p,
                    unsigned msg_length,
                    bool response_expected)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN7_SFID_DATAPORT_DATA_CACHE);
@@ -2996,7 +2996,7 @@ brw_set_dp_untyped_surface_read_message(struct brw_codegen *p,
                                         struct brw_inst *insn,
                                         unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    /* Set mask of 32-bit channels to drop. */
    unsigned msg_control = 0xf & (0xf << num_channels);
 
@@ -3022,7 +3022,7 @@ brw_untyped_surface_read(struct brw_codegen *p,
                          unsigned msg_length,
                          unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN7_SFID_DATAPORT_DATA_CACHE);
@@ -3040,7 +3040,7 @@ brw_set_dp_untyped_surface_write_message(struct brw_codegen *p,
                                          struct brw_inst *insn,
                                          unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    /* Set mask of 32-bit channels to drop. */
    unsigned msg_control = 0xf & (0xf << num_channels);
 
@@ -3070,7 +3070,7 @@ brw_untyped_surface_write(struct brw_codegen *p,
                           unsigned msg_length,
                           unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN7_SFID_DATAPORT_DATA_CACHE);
@@ -3092,7 +3092,7 @@ brw_set_dp_typed_atomic_message(struct brw_codegen *p,
                                 unsigned atomic_op,
                                 bool response_expected)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    unsigned msg_control =
       atomic_op | /* Atomic Operation Type: BRW_AOP_* */
       (response_expected ? 1 << 5 : 0); /* Return data expected */
@@ -3128,7 +3128,7 @@ brw_typed_atomic(struct brw_codegen *p,
                  unsigned atomic_op,
                  unsigned msg_length,
                  bool response_expected) {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN6_SFID_DATAPORT_RENDER_CACHE);
@@ -3150,7 +3150,7 @@ brw_set_dp_typed_surface_read_message(struct brw_codegen *p,
                                       struct brw_inst *insn,
                                       unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    /* Set mask of unused channels. */
    unsigned msg_control = 0xf & (0xf << num_channels);
 
@@ -3185,7 +3185,7 @@ brw_typed_surface_read(struct brw_codegen *p,
                        unsigned msg_length,
                        unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN6_SFID_DATAPORT_RENDER_CACHE);
@@ -3204,7 +3204,7 @@ brw_set_dp_typed_surface_write_message(struct brw_codegen *p,
                                        struct brw_inst *insn,
                                        unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    /* Set mask of unused channels. */
    unsigned msg_control = 0xf & (0xf << num_channels);
 
@@ -3239,7 +3239,7 @@ brw_typed_surface_write(struct brw_codegen *p,
                         unsigned msg_length,
                         unsigned num_channels)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned sfid = (devinfo->gen >= 8 || devinfo->is_haswell ?
                           HSW_SFID_DATAPORT_DATA_CACHE_1 :
                           GEN6_SFID_DATAPORT_RENDER_CACHE);
@@ -3261,7 +3261,7 @@ brw_set_memory_fence_message(struct brw_codegen *p,
                              enum brw_message_target sfid,
                              bool commit_enable)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    brw_set_message_descriptor(p, insn, sfid,
                               1 /* message length */,
@@ -3288,7 +3288,7 @@ void
 brw_memory_fence(struct brw_codegen *p,
                  struct brw_reg dst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const bool commit_enable = devinfo->gen == 7 && !devinfo->is_haswell;
    struct brw_inst *insn;
 
@@ -3339,7 +3339,7 @@ brw_pixel_interpolator_query(struct brw_codegen *p,
                              unsigned msg_length,
                              unsigned response_length)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_inst *insn;
    const uint16_t exec_size = brw_inst_exec_size(devinfo, p->current);
 
@@ -3363,7 +3363,7 @@ brw_pixel_interpolator_query(struct brw_codegen *p,
 void
 brw_find_live_channel(struct brw_codegen *p, struct brw_reg dst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const unsigned exec_size = 1 << brw_inst_exec_size(devinfo, p->current);
    const unsigned qtr_control = brw_inst_qtr_control(devinfo, p->current);
    brw_inst *inst;
@@ -3455,7 +3455,7 @@ brw_broadcast(struct brw_codegen *p,
               struct brw_reg src,
               struct brw_reg idx)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const bool align1 = brw_inst_access_mode(devinfo, p->current) == BRW_ALIGN_1;
    brw_inst *inst;
 
@@ -3583,7 +3583,7 @@ void brw_shader_time_add(struct brw_codegen *p,
 void
 brw_barrier(struct brw_codegen *p, struct brw_reg src)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_inst *inst;
 
    assert(devinfo->gen >= 7);
@@ -3613,7 +3613,7 @@ brw_barrier(struct brw_codegen *p, struct brw_reg src)
 void
 brw_WAIT(struct brw_codegen *p)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_inst *insn;
 
    struct brw_reg src = brw_notification_reg();
index 15fc25b126a8f64d38b6f9e5c1cc8287a41ed4bc..0e736ed01d8d10a98d16d106a426cd98f33edffc 100644 (file)
@@ -55,27 +55,27 @@ cat(struct string *dest, const struct string src)
    } while(0)
 
 static bool
-src0_is_null(const struct brw_device_info *devinfo, const brw_inst *inst)
+src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
    return brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
           brw_inst_src0_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
 }
 
 static bool
-src1_is_null(const struct brw_device_info *devinfo, const brw_inst *inst)
+src1_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
    return brw_inst_src1_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
           brw_inst_src1_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
 }
 
 static bool
-src0_is_grf(const struct brw_device_info *devinfo, const brw_inst *inst)
+src0_is_grf(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
    return brw_inst_src0_reg_file(devinfo, inst) == BRW_GENERAL_REGISTER_FILE;
 }
 
 static unsigned
-num_sources_from_inst(const struct brw_device_info *devinfo,
+num_sources_from_inst(const struct gen_device_info *devinfo,
                       const brw_inst *inst)
 {
    const struct opcode_desc *desc =
@@ -124,7 +124,7 @@ num_sources_from_inst(const struct brw_device_info *devinfo,
 }
 
 static bool
-is_unsupported_inst(const struct brw_device_info *devinfo,
+is_unsupported_inst(const struct gen_device_info *devinfo,
                     const brw_inst *inst)
 {
    return brw_opcode_desc(devinfo, brw_inst_opcode(devinfo, inst)) == NULL;
@@ -134,7 +134,7 @@ bool
 brw_validate_instructions(const struct brw_codegen *p, int start_offset,
                           struct annotation_info *annotation)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const void *store = p->store + start_offset / 16;
    bool valid = true;
 
index 80c2e5fd80ee670d29543bb5637aea103eaf1d55..d0b55aeb513d6521368d0f1676454992cae0d46d 100644 (file)
@@ -44,7 +44,7 @@
 
 using namespace brw;
 
-static unsigned get_lowered_simd_width(const struct brw_device_info *devinfo,
+static unsigned get_lowered_simd_width(const struct gen_device_info *devinfo,
                                        const fs_inst *inst);
 
 void
@@ -376,7 +376,7 @@ fs_inst::is_copy_payload(const brw::simple_allocator &grf_alloc) const
 }
 
 bool
-fs_inst::can_do_source_mods(const struct brw_device_info *devinfo)
+fs_inst::can_do_source_mods(const struct gen_device_info *devinfo)
 {
    if (devinfo->gen == 6 && is_math())
       return false;
@@ -933,7 +933,7 @@ namespace {
 }
 
 unsigned
-fs_inst::flags_read(const brw_device_info *devinfo) const
+fs_inst::flags_read(const gen_device_info *devinfo) const
 {
    /* XXX - This doesn't consider explicit uses of the flag register as source
     *       region.
@@ -3679,7 +3679,7 @@ lower_fb_write_logical_send(const fs_builder &bld, fs_inst *inst,
                             const fs_visitor::thread_payload &payload)
 {
    assert(inst->src[FB_WRITE_LOGICAL_SRC_COMPONENTS].file == IMM);
-   const brw_device_info *devinfo = bld.shader->devinfo;
+   const gen_device_info *devinfo = bld.shader->devinfo;
    const fs_reg &color0 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR0];
    const fs_reg &color1 = inst->src[FB_WRITE_LOGICAL_SRC_COLOR1];
    const fs_reg &src0_alpha = inst->src[FB_WRITE_LOGICAL_SRC_SRC0_ALPHA];
@@ -4047,7 +4047,7 @@ lower_sampler_logical_send_gen5(const fs_builder &bld, fs_inst *inst, opcode op,
 }
 
 static bool
-is_high_sampler(const struct brw_device_info *devinfo, const fs_reg &sampler)
+is_high_sampler(const struct gen_device_info *devinfo, const fs_reg &sampler)
 {
    if (devinfo->gen < 8 && !devinfo->is_haswell)
       return false;
@@ -4068,7 +4068,7 @@ lower_sampler_logical_send_gen7(const fs_builder &bld, fs_inst *inst, opcode op,
                                 unsigned coord_components,
                                 unsigned grad_components)
 {
-   const brw_device_info *devinfo = bld.shader->devinfo;
+   const gen_device_info *devinfo = bld.shader->devinfo;
    int reg_width = bld.dispatch_width() / 8;
    unsigned header_size = 0, length = 0;
    fs_reg sources[MAX_SAMPLER_MESSAGE_SIZE];
@@ -4264,7 +4264,7 @@ lower_sampler_logical_send_gen7(const fs_builder &bld, fs_inst *inst, opcode op,
 static void
 lower_sampler_logical_send(const fs_builder &bld, fs_inst *inst, opcode op)
 {
-   const brw_device_info *devinfo = bld.shader->devinfo;
+   const gen_device_info *devinfo = bld.shader->devinfo;
    const fs_reg &coordinate = inst->src[TEX_LOGICAL_SRC_COORDINATE];
    const fs_reg &shadow_c = inst->src[TEX_LOGICAL_SRC_SHADOW_C];
    const fs_reg &lod = inst->src[TEX_LOGICAL_SRC_LOD];
@@ -4361,7 +4361,7 @@ lower_surface_logical_send(const fs_builder &bld, fs_inst *inst, opcode op,
 static void
 lower_varying_pull_constant_logical_send(const fs_builder &bld, fs_inst *inst)
 {
-   const brw_device_info *devinfo = bld.shader->devinfo;
+   const gen_device_info *devinfo = bld.shader->devinfo;
 
    if (devinfo->gen >= 7) {
       /* We are switching the instruction from an ALU-like instruction to a
@@ -4588,7 +4588,7 @@ fs_visitor::lower_logical_sends()
  * excessively restrictive.
  */
 static unsigned
-get_fpu_lowered_simd_width(const struct brw_device_info *devinfo,
+get_fpu_lowered_simd_width(const struct gen_device_info *devinfo,
                            const fs_inst *inst)
 {
    /* Maximum execution size representable in the instruction controls. */
@@ -4662,7 +4662,7 @@ get_fpu_lowered_simd_width(const struct brw_device_info *devinfo,
       max_width = MIN2(max_width, 16);
 
    /* From the IVB PRMs (applies to other devices that don't have the
-    * brw_device_info::supports_simd16_3src flag set):
+    * gen_device_info::supports_simd16_3src flag set):
     *  "In Align16 access mode, SIMD16 is not allowed for DW operations and
     *   SIMD8 is not allowed for DF operations."
     */
@@ -4719,7 +4719,7 @@ get_fpu_lowered_simd_width(const struct brw_device_info *devinfo,
  * represent).
  */
 static unsigned
-get_sampler_lowered_simd_width(const struct brw_device_info *devinfo,
+get_sampler_lowered_simd_width(const struct gen_device_info *devinfo,
                                const fs_inst *inst)
 {
    /* Calculate the number of coordinate components that have to be present
@@ -4772,7 +4772,7 @@ get_sampler_lowered_simd_width(const struct brw_device_info *devinfo,
  * original execution size.
  */
 static unsigned
-get_lowered_simd_width(const struct brw_device_info *devinfo,
+get_lowered_simd_width(const struct gen_device_info *devinfo,
                        const fs_inst *inst)
 {
    switch (inst->opcode) {
@@ -6305,7 +6305,7 @@ fs_visitor::run_cs()
  * also need the BRW_BARYCENTRIC_[NON]PERSPECTIVE_CENTROID mode set up.
  */
 static unsigned
-brw_compute_barycentric_interp_modes(const struct brw_device_info *devinfo,
+brw_compute_barycentric_interp_modes(const struct gen_device_info *devinfo,
                                      const nir_shader *shader)
 {
    unsigned barycentric_interp_modes = 0;
@@ -6458,7 +6458,7 @@ move_interpolation_to_top(nir_shader *nir)
  * Apply default interpolation settings to FS inputs which don't specify any.
  */
 static void
-brw_nir_set_default_interpolation(const struct brw_device_info *devinfo,
+brw_nir_set_default_interpolation(const struct gen_device_info *devinfo,
                                   struct nir_shader *nir,
                                   bool api_flat_shade,
                                   bool per_sample_interpolation)
@@ -6719,7 +6719,7 @@ fill_push_const_block_info(struct brw_push_const_block *block, unsigned dwords)
 }
 
 static void
-cs_fill_push_const_info(const struct brw_device_info *devinfo,
+cs_fill_push_const_info(const struct gen_device_info *devinfo,
                         struct brw_cs_prog_data *cs_prog_data)
 {
    const struct brw_stage_prog_data *prog_data =
index 6ac3d27511b4cc617b8e16fea534a38a4f635940..663b3eac5deccceadfa991751597dc79556e1320 100644 (file)
@@ -474,7 +474,7 @@ private:
    const struct brw_compiler *compiler;
    void *log_data; /* Passed to compiler->*_log functions */
 
-   const struct brw_device_info *devinfo;
+   const struct gen_device_info *devinfo;
 
    struct brw_codegen *p;
    const void * const key;
index af1e3ebbaa2a698b784da790dca98acc0fd7e56e..3b123a7a18d67c62f0105fb4ab3fde6c601a3fe2 100644 (file)
@@ -49,7 +49,7 @@
  */
 
 static bool
-opt_cmod_propagation_local(const brw_device_info *devinfo, bblock_t *block)
+opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
 {
    bool progress = false;
    int ip = block->end_ip + 1;
index 5bd5343b8b4436adf8a20569d92c0466387c4d4b..5c1a00141ab2f5908522d506e16bf39adfbba374 100644 (file)
@@ -45,7 +45,7 @@ static const bool debug = false;
  * replaced with a GRF source.
  */
 static bool
-could_coissue(const struct brw_device_info *devinfo, const fs_inst *inst)
+could_coissue(const struct gen_device_info *devinfo, const fs_inst *inst)
 {
    if (devinfo->gen != 7)
       return false;
@@ -65,7 +65,7 @@ could_coissue(const struct brw_device_info *devinfo, const fs_inst *inst)
  * Returns true for instructions that don't support immediate sources.
  */
 static bool
-must_promote_imm(const struct brw_device_info *devinfo, const fs_inst *inst)
+must_promote_imm(const struct gen_device_info *devinfo, const fs_inst *inst)
 {
    switch (inst->opcode) {
    case SHADER_OPCODE_POW:
index 438f6812adb3493e933f091d67ca0f2e5c9a35b6..518827b9fab49818e20f12762989db02422941e0 100644 (file)
@@ -279,7 +279,7 @@ is_logic_op(enum opcode opcode)
 
 static bool
 can_take_stride(fs_inst *inst, unsigned arg, unsigned stride,
-                const brw_device_info *devinfo)
+                const gen_device_info *devinfo)
 {
    if (stride > 4)
       return false;
index d604a5d2cb646e1f5524d48c1ac25dc344591b7e..0ea10eee4a0799f243a67c76be39e9dfb9614381 100644 (file)
@@ -4833,7 +4833,7 @@ shuffle_64bit_data_for_32bit_write(const fs_builder &bld,
 fs_reg
 setup_imm_df(const fs_builder &bld, double v)
 {
-   const struct brw_device_info *devinfo = bld.shader->devinfo;
+   const struct gen_device_info *devinfo = bld.shader->devinfo;
    assert(devinfo->gen >= 7);
 
    if (devinfo->gen >= 8)
index 9dc3a0db2e0d98866173a554d2bf61bf3a91715e..5576163f78306648d51d55acc3db1bbcf66125fc 100644 (file)
@@ -75,7 +75,7 @@ fs_visitor::assign_regs_trivial()
 static void
 brw_alloc_reg_set(struct brw_compiler *compiler, int dispatch_width)
 {
-   const struct brw_device_info *devinfo = compiler->devinfo;
+   const struct gen_device_info *devinfo = compiler->devinfo;
    int base_reg_count = BRW_MAX_GRF;
    const int index = _mesa_logbase2(dispatch_width / 8);
 
@@ -754,7 +754,7 @@ static void
 emit_unspill(const fs_builder &bld, fs_reg dst,
              uint32_t spill_offset, unsigned count)
 {
-   const brw_device_info *devinfo = bld.shader->devinfo;
+   const gen_device_info *devinfo = bld.shader->devinfo;
    const unsigned reg_size = dst.component_size(bld.dispatch_width()) /
                              REG_SIZE;
    assert(count % reg_size == 0);
index a4774e6cac673f247f4b905a5340fdc77477d06c..5fa7c42d2ee2b0d12adec087e6608491ef1700e7 100644 (file)
@@ -284,7 +284,7 @@ namespace {
        * Return true if the format conversion boils down to a trivial copy.
        */
       inline bool
-      is_conversion_trivial(const brw_device_info *devinfo, isl_format format)
+      is_conversion_trivial(const gen_device_info *devinfo, isl_format format)
       {
          return (get_bit_widths(format).r == 32 && is_homogeneous(format)) ||
                  format == isl_lower_storage_image_format(devinfo, format);
@@ -295,7 +295,7 @@ namespace {
        * compatible bitfield layout, but possibly different data types.
        */
       inline bool
-      has_supported_bit_layout(const brw_device_info *devinfo,
+      has_supported_bit_layout(const gen_device_info *devinfo,
                                isl_format format)
       {
          const color_u widths = get_bit_widths(format);
@@ -314,7 +314,7 @@ namespace {
        * friends implemented as RGBA16UI).
        */
       inline bool
-      has_split_bit_layout(const brw_device_info *devinfo, isl_format format)
+      has_split_bit_layout(const gen_device_info *devinfo, isl_format format)
       {
          const isl_format lower_format =
             isl_lower_storage_image_format(devinfo, format);
@@ -331,7 +331,7 @@ namespace {
        * significant bits.
        */
       inline bool
-      has_undefined_high_bits(const brw_device_info *devinfo,
+      has_undefined_high_bits(const gen_device_info *devinfo,
                               isl_format format)
       {
          const isl_format lower_format =
@@ -362,7 +362,7 @@ namespace {
       emit_untyped_image_check(const fs_builder &bld, const fs_reg &image,
                                brw_predicate pred)
       {
-         const brw_device_info *devinfo = bld.shader->devinfo;
+         const gen_device_info *devinfo = bld.shader->devinfo;
          const fs_reg stride = offset(image, bld, BRW_IMAGE_PARAM_STRIDE_OFFSET);
 
          if (devinfo->gen == 7 && !devinfo->is_haswell) {
@@ -393,7 +393,7 @@ namespace {
       brw_predicate
       emit_typed_atomic_check(const fs_builder &bld, const fs_reg &image)
       {
-         const brw_device_info *devinfo = bld.shader->devinfo;
+         const gen_device_info *devinfo = bld.shader->devinfo;
          const fs_reg size = offset(image, bld, BRW_IMAGE_PARAM_SIZE_OFFSET);
 
          if (devinfo->gen == 7 && !devinfo->is_haswell) {
@@ -509,7 +509,7 @@ namespace {
       emit_address_calculation(const fs_builder &bld, const fs_reg &image,
                                const fs_reg &coord, unsigned dims)
       {
-         const brw_device_info *devinfo = bld.shader->devinfo;
+         const gen_device_info *devinfo = bld.shader->devinfo;
          const fs_reg off = offset(image, bld, BRW_IMAGE_PARAM_OFFSET_OFFSET);
          const fs_reg stride = offset(image, bld, BRW_IMAGE_PARAM_STRIDE_OFFSET);
          const fs_reg tile = offset(image, bld, BRW_IMAGE_PARAM_TILING_OFFSET);
@@ -962,7 +962,7 @@ namespace brw {
          using namespace image_validity;
          using namespace image_coordinates;
          using namespace surface_access;
-         const brw_device_info *devinfo = bld.shader->devinfo;
+         const gen_device_info *devinfo = bld.shader->devinfo;
          const isl_format format = isl_format_for_gl_format(gl_format);
          const isl_format lower_format =
             isl_lower_storage_image_format(devinfo, format);
@@ -1071,7 +1071,7 @@ namespace brw {
          using namespace image_coordinates;
          using namespace surface_access;
          const isl_format format = isl_format_for_gl_format(gl_format);
-         const brw_device_info *devinfo = bld.shader->devinfo;
+         const gen_device_info *devinfo = bld.shader->devinfo;
 
          /* Transform the image coordinates into actual surface coordinates. */
          const fs_reg saddr =
index dd1ec4b02fe8918f66555ff70d6c20ee8e017914..152013f647fe743af1a9835e4343519443731c38 100644 (file)
@@ -75,7 +75,7 @@ brw_gs_debug_recompile(struct brw_context *brw,
 }
 
 static void
-assign_gs_binding_table_offsets(const struct brw_device_info *devinfo,
+assign_gs_binding_table_offsets(const struct gen_device_info *devinfo,
                                 const struct gl_shader_program *shader_prog,
                                 const struct gl_program *prog,
                                 struct brw_gs_prog_data *prog_data)
index f45e56400c9dd9e928e879230351ce1568481385..d98bbf538a82ffd0bf2f9ecc5a19d8f32928f288 100644 (file)
@@ -52,7 +52,7 @@ static inline void brw_inst_set_bits(brw_inst *inst,
 
 #define FC(name, high, low, assertions)                       \
 static inline void                                            \
-brw_inst_set_##name(const struct brw_device_info *devinfo,    \
+brw_inst_set_##name(const struct gen_device_info *devinfo,    \
                     brw_inst *inst, uint64_t v)               \
 {                                                             \
    assert(assertions);                                        \
@@ -60,7 +60,7 @@ brw_inst_set_##name(const struct brw_device_info *devinfo,    \
    brw_inst_set_bits(inst, high, low, v);                     \
 }                                                             \
 static inline uint64_t                                        \
-brw_inst_##name(const struct brw_device_info *devinfo,        \
+brw_inst_##name(const struct gen_device_info *devinfo,        \
                 const brw_inst *inst)                         \
 {                                                             \
    assert(assertions);                                        \
@@ -94,14 +94,14 @@ brw_inst_##name(const struct brw_device_info *devinfo,        \
  */
 #define FF(name, hi4, lo4, hi45, lo45, hi5, lo5, hi6, lo6, hi7, lo7, hi8, lo8)\
 static inline void                                                            \
-brw_inst_set_##name(const struct brw_device_info *devinfo,                    \
+brw_inst_set_##name(const struct gen_device_info *devinfo,                    \
                     brw_inst *inst, uint64_t value)                           \
 {                                                                             \
    BOUNDS(hi4, lo4, hi45, lo45, hi5, lo5, hi6, lo6, hi7, lo7, hi8, lo8)       \
    brw_inst_set_bits(inst, high, low, value);                                 \
 }                                                                             \
 static inline uint64_t                                                        \
-brw_inst_##name(const struct brw_device_info *devinfo, const brw_inst *inst)  \
+brw_inst_##name(const struct gen_device_info *devinfo, const brw_inst *inst)  \
 {                                                                             \
    BOUNDS(hi4, lo4, hi45, lo45, hi5, lo5, hi6, lo6, hi7, lo7, hi8, lo8)       \
    return brw_inst_bits(inst, high, low);                                     \
@@ -248,7 +248,7 @@ F(3src_opcode,           6,  0)
  *  @{
  */
 static inline void
-brw_inst_set_uip(const struct brw_device_info *devinfo,
+brw_inst_set_uip(const struct gen_device_info *devinfo,
                  brw_inst *inst, int32_t value)
 {
    assert(devinfo->gen >= 6);
@@ -263,7 +263,7 @@ brw_inst_set_uip(const struct brw_device_info *devinfo,
 }
 
 static inline int32_t
-brw_inst_uip(const struct brw_device_info *devinfo, const brw_inst *inst)
+brw_inst_uip(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
    assert(devinfo->gen >= 6);
 
@@ -275,7 +275,7 @@ brw_inst_uip(const struct brw_device_info *devinfo, const brw_inst *inst)
 }
 
 static inline void
-brw_inst_set_jip(const struct brw_device_info *devinfo,
+brw_inst_set_jip(const struct gen_device_info *devinfo,
                  brw_inst *inst, int32_t value)
 {
    assert(devinfo->gen >= 6);
@@ -290,7 +290,7 @@ brw_inst_set_jip(const struct brw_device_info *devinfo,
 }
 
 static inline int32_t
-brw_inst_jip(const struct brw_device_info *devinfo, const brw_inst *inst)
+brw_inst_jip(const struct gen_device_info *devinfo, const brw_inst *inst)
 {
    assert(devinfo->gen >= 6);
 
@@ -304,14 +304,14 @@ brw_inst_jip(const struct brw_device_info *devinfo, const brw_inst *inst)
 /** Like FC, but using int16_t to handle negative jump targets. */
 #define FJ(name, high, low, assertions)                                       \
 static inline void                                                            \
-brw_inst_set_##name(const struct brw_device_info *devinfo, brw_inst *inst, int16_t v) \
+brw_inst_set_##name(const struct gen_device_info *devinfo, brw_inst *inst, int16_t v) \
 {                                                                             \
    assert(assertions);                                                        \
    (void) devinfo;                                                            \
    brw_inst_set_bits(inst, high, low, (uint16_t) v);                          \
 }                                                                             \
 static inline int16_t                                                         \
-brw_inst_##name(const struct brw_device_info *devinfo, const brw_inst *inst)  \
+brw_inst_##name(const struct gen_device_info *devinfo, const brw_inst *inst)  \
 {                                                                             \
    assert(assertions);                                                        \
    (void) devinfo;                                                            \
@@ -554,21 +554,21 @@ F(pi_message_data,   MD(7),   MD(0))
  *  @{
  */
 static inline int
-brw_inst_imm_d(const struct brw_device_info *devinfo, const brw_inst *insn)
+brw_inst_imm_d(const struct gen_device_info *devinfo, const brw_inst *insn)
 {
    (void) devinfo;
    return brw_inst_bits(insn, 127, 96);
 }
 
 static inline unsigned
-brw_inst_imm_ud(const struct brw_device_info *devinfo, const brw_inst *insn)
+brw_inst_imm_ud(const struct gen_device_info *devinfo, const brw_inst *insn)
 {
    (void) devinfo;
    return brw_inst_bits(insn, 127, 96);
 }
 
 static inline float
-brw_inst_imm_f(const struct brw_device_info *devinfo, const brw_inst *insn)
+brw_inst_imm_f(const struct gen_device_info *devinfo, const brw_inst *insn)
 {
    fi_type ft;
    (void) devinfo;
@@ -577,7 +577,7 @@ brw_inst_imm_f(const struct brw_device_info *devinfo, const brw_inst *insn)
 }
 
 static inline double
-brw_inst_imm_df(const struct brw_device_info *devinfo, const brw_inst *insn)
+brw_inst_imm_df(const struct gen_device_info *devinfo, const brw_inst *insn)
 {
    union {
       double d;
@@ -589,7 +589,7 @@ brw_inst_imm_df(const struct brw_device_info *devinfo, const brw_inst *insn)
 }
 
 static inline void
-brw_inst_set_imm_d(const struct brw_device_info *devinfo,
+brw_inst_set_imm_d(const struct gen_device_info *devinfo,
                    brw_inst *insn, int value)
 {
    (void) devinfo;
@@ -597,7 +597,7 @@ brw_inst_set_imm_d(const struct brw_device_info *devinfo,
 }
 
 static inline void
-brw_inst_set_imm_ud(const struct brw_device_info *devinfo,
+brw_inst_set_imm_ud(const struct gen_device_info *devinfo,
                     brw_inst *insn, unsigned value)
 {
    (void) devinfo;
@@ -605,7 +605,7 @@ brw_inst_set_imm_ud(const struct brw_device_info *devinfo,
 }
 
 static inline void
-brw_inst_set_imm_f(const struct brw_device_info *devinfo,
+brw_inst_set_imm_f(const struct gen_device_info *devinfo,
                    brw_inst *insn, float value)
 {
    fi_type ft;
@@ -615,7 +615,7 @@ brw_inst_set_imm_f(const struct brw_device_info *devinfo,
 }
 
 static inline void
-brw_inst_set_imm_df(const struct brw_device_info *devinfo,
+brw_inst_set_imm_df(const struct gen_device_info *devinfo,
                     brw_inst *insn, double value)
 {
    union {
@@ -632,7 +632,7 @@ brw_inst_set_imm_df(const struct brw_device_info *devinfo,
 /* The AddrImm fields are split into two discontiguous sections on Gen8+ */
 #define BRW_IA1_ADDR_IMM(reg, g4_high, g4_low, g8_nine, g8_high, g8_low) \
 static inline void                                                       \
-brw_inst_set_##reg##_ia1_addr_imm(const struct brw_device_info *devinfo, \
+brw_inst_set_##reg##_ia1_addr_imm(const struct gen_device_info *devinfo, \
                                   brw_inst *inst,                        \
                                   unsigned value)                        \
 {                                                                        \
@@ -645,7 +645,7 @@ brw_inst_set_##reg##_ia1_addr_imm(const struct brw_device_info *devinfo, \
    }                                                                     \
 }                                                                        \
 static inline unsigned                                                   \
-brw_inst_##reg##_ia1_addr_imm(const struct brw_device_info *devinfo,     \
+brw_inst_##reg##_ia1_addr_imm(const struct gen_device_info *devinfo,     \
                               const brw_inst *inst)                      \
 {                                                                        \
    if (devinfo->gen >= 8) {                                              \
@@ -664,7 +664,7 @@ BRW_IA1_ADDR_IMM(dst,   57, 48,  47,  56, 48)
 
 #define BRW_IA16_ADDR_IMM(reg, g4_high, g4_low, g8_nine, g8_high, g8_low) \
 static inline void                                                        \
-brw_inst_set_##reg##_ia16_addr_imm(const struct brw_device_info *devinfo, \
+brw_inst_set_##reg##_ia16_addr_imm(const struct gen_device_info *devinfo, \
                                    brw_inst *inst, unsigned value)        \
 {                                                                         \
    assert((value & ~0x3ff) == 0);                                         \
@@ -676,7 +676,7 @@ brw_inst_set_##reg##_ia16_addr_imm(const struct brw_device_info *devinfo, \
    }                                                                      \
 }                                                                         \
 static inline unsigned                                                    \
-brw_inst_##reg##_ia16_addr_imm(const struct brw_device_info *devinfo,     \
+brw_inst_##reg##_ia16_addr_imm(const struct gen_device_info *devinfo,     \
                                const brw_inst *inst)                      \
 {                                                                         \
    if (devinfo->gen >= 8) {                                               \
@@ -782,7 +782,7 @@ brw_compact_inst_set_bits(brw_compact_inst *inst, unsigned high, unsigned low,
 
 #define FC(name, high, low, assertions)                            \
 static inline void                                                 \
-brw_compact_inst_set_##name(const struct brw_device_info *devinfo, \
+brw_compact_inst_set_##name(const struct gen_device_info *devinfo, \
                             brw_compact_inst *inst, unsigned v)    \
 {                                                                  \
    assert(assertions);                                             \
@@ -790,7 +790,7 @@ brw_compact_inst_set_##name(const struct brw_device_info *devinfo, \
    brw_compact_inst_set_bits(inst, high, low, v);                  \
 }                                                                  \
 static inline unsigned                                             \
-brw_compact_inst_##name(const struct brw_device_info *devinfo,     \
+brw_compact_inst_##name(const struct gen_device_info *devinfo,     \
                         const brw_compact_inst *inst)              \
 {                                                                  \
    assert(assertions);                                             \
index f2144835584a5d2fc727ada9846e43164142e190..dd5f82aabe1bb7f141492562f67b15edc28a57d0 100644 (file)
@@ -331,7 +331,7 @@ public:
    bool is_copy_payload(const brw::simple_allocator &grf_alloc) const;
    unsigned components_read(unsigned i) const;
    int regs_read(int arg) const;
-   bool can_do_source_mods(const struct brw_device_info *devinfo);
+   bool can_do_source_mods(const struct gen_device_info *devinfo);
    bool can_change_types() const;
    bool has_side_effects() const;
    bool has_source_and_destination_hazard() const;
@@ -340,7 +340,7 @@ public:
     * Return the subset of flag registers read by the instruction as a bitset
     * with byte granularity.
     */
-   unsigned flags_read(const brw_device_info *devinfo) const;
+   unsigned flags_read(const gen_device_info *devinfo) const;
 
    /**
     * Return the subset of flag registers updated by the instruction (either
index 81b6a139f4490950633d4627a4342a8e18ba3c8f..3813bb8d0ea13c1f6eac3addc4ab11349c6659fb 100644 (file)
@@ -168,11 +168,11 @@ public:
 
    bool is_send_from_grf();
    unsigned regs_read(unsigned arg) const;
-   bool can_reswizzle(const struct brw_device_info *devinfo, int dst_writemask,
+   bool can_reswizzle(const struct gen_device_info *devinfo, int dst_writemask,
                       int swizzle, int swizzle_mask);
    void reswizzle(int dst_writemask, int swizzle);
-   bool can_do_source_mods(const struct brw_device_info *devinfo);
-   bool can_do_writemask(const struct brw_device_info *devinfo);
+   bool can_do_source_mods(const struct gen_device_info *devinfo);
+   bool can_do_writemask(const struct gen_device_info *devinfo);
    bool can_change_types() const;
    bool has_source_and_destination_hazard() const;
 
index 24a64cb09f0dfce70d09effe7013ceda8adb72da..e8dafaebc914c79ccb80087bc248a09a9297cab7 100644 (file)
@@ -191,7 +191,7 @@ remap_patch_urb_offsets(nir_block *block, nir_builder *b,
 
 void
 brw_nir_lower_vs_inputs(nir_shader *nir,
-                        const struct brw_device_info *devinfo,
+                        const struct gen_device_info *devinfo,
                         bool is_scalar,
                         bool use_legacy_snorm_formula,
                         const uint8_t *vs_attrib_wa_flags)
@@ -470,7 +470,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir)
  */
 nir_shader *
 brw_postprocess_nir(nir_shader *nir,
-                    const struct brw_device_info *devinfo,
+                    const struct gen_device_info *devinfo,
                     bool is_scalar)
 {
    bool debug_enabled =
@@ -534,7 +534,7 @@ brw_postprocess_nir(nir_shader *nir,
 
 nir_shader *
 brw_nir_apply_sampler_key(nir_shader *nir,
-                          const struct brw_device_info *devinfo,
+                          const struct gen_device_info *devinfo,
                           const struct brw_sampler_prog_key_data *key_tex,
                           bool is_scalar)
 {
index 12f31db1ac9b9054e5d285fef657f85fe0e01d18..b025d55a135399b7e85b0866ef6dd0f165276c1d 100644 (file)
@@ -99,7 +99,7 @@ nir_shader *brw_preprocess_nir(const struct brw_compiler *compiler,
 bool brw_nir_lower_intrinsics(nir_shader *nir,
                               struct brw_stage_prog_data *prog_data);
 void brw_nir_lower_vs_inputs(nir_shader *nir,
-                             const struct brw_device_info *devinfo,
+                             const struct gen_device_info *devinfo,
                              bool is_scalar,
                              bool use_legacy_snorm_formula,
                              const uint8_t *vs_attrib_wa_flags);
@@ -113,7 +113,7 @@ void brw_nir_lower_fs_outputs(nir_shader *nir);
 void brw_nir_lower_cs_shared(nir_shader *nir);
 
 nir_shader *brw_postprocess_nir(nir_shader *nir,
-                                const struct brw_device_info *devinfo,
+                                const struct gen_device_info *devinfo,
                                 bool is_scalar);
 
 bool brw_nir_apply_attribute_workarounds(nir_shader *nir,
@@ -125,7 +125,7 @@ bool brw_nir_apply_trig_workarounds(nir_shader *nir);
 void brw_nir_apply_tcs_quads_workaround(nir_shader *nir);
 
 nir_shader *brw_nir_apply_sampler_key(nir_shader *nir,
-                                      const struct brw_device_info *devinfo,
+                                      const struct gen_device_info *devinfo,
                                       const struct brw_sampler_prog_key_data *key,
                                       bool is_scalar);
 
index 3d9afc9cdde5bfb09832375f11c2b0b0cc024354..640bfdc4283e316583f75fa5d4eb8255f3983954 100644 (file)
@@ -362,7 +362,7 @@ brw_emit_mi_flush(struct brw_context *brw)
 
 int
 brw_init_pipe_control(struct brw_context *brw,
-                      const struct brw_device_info *devinfo)
+                      const struct gen_device_info *devinfo)
 {
    if (devinfo->gen < 6)
       return 0;
index 5b427b22230d30e1472d50f4b8587fd708f2b21e..d6f22ed5a120297f03df2d8b5996be5adb696af5 100644 (file)
@@ -52,7 +52,7 @@
 extern "C" {
 #endif
 
-struct brw_device_info;
+struct gen_device_info;
 
 /** Number of general purpose registers (VS, WM, etc) */
 #define BRW_MAX_GRF 128
@@ -223,7 +223,7 @@ enum PACKED brw_reg_type {
    BRW_REGISTER_TYPE_Q,
 };
 
-unsigned brw_reg_type_to_hw_type(const struct brw_device_info *devinfo,
+unsigned brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
                                  enum brw_reg_type type, enum brw_reg_file file);
 const char *brw_reg_type_letters(unsigned brw_reg_type);
 uint32_t brw_swizzle_immediate(enum brw_reg_type type, uint32_t x, unsigned swz);
index f15c0dfc55a67b77137527ac64805c540f9818c5..ff733c89d181334c1f4cd1817285a3ef6039ced8 100644 (file)
@@ -790,7 +790,7 @@ vec4_instruction_scheduler::get_register_pressure_benefit(backend_instruction *b
 schedule_node::schedule_node(backend_instruction *inst,
                              instruction_scheduler *sched)
 {
-   const struct brw_device_info *devinfo = sched->bs->devinfo;
+   const struct gen_device_info *devinfo = sched->bs->devinfo;
 
    this->inst = inst;
    this->child_array_size = 0;
@@ -1568,7 +1568,7 @@ vec4_instruction_scheduler::issue_time(backend_instruction *inst)
 void
 instruction_scheduler::schedule_instructions(bblock_t *block)
 {
-   const struct brw_device_info *devinfo = bs->devinfo;
+   const struct gen_device_info *devinfo = bs->devinfo;
    time = 0;
    if (!post_reg_alloc)
       reg_pressure = reg_pressure_in[block->num];
index b1632a66af3b0d61c66c159e7a42829857b67924..ea39252b5861a4b28e10867117da02fec14147b3 100644 (file)
@@ -147,7 +147,7 @@ brw_texture_offset(int *offsets, unsigned num_components)
 }
 
 const char *
-brw_instruction_name(const struct brw_device_info *devinfo, enum opcode op)
+brw_instruction_name(const struct gen_device_info *devinfo, enum opcode op)
 {
    switch (op) {
    case BRW_OPCODE_ILLEGAL ... BRW_OPCODE_NOP:
@@ -777,7 +777,7 @@ backend_instruction::is_commutative() const
 }
 
 bool
-backend_instruction::is_3src(const struct brw_device_info *devinfo) const
+backend_instruction::is_3src(const struct gen_device_info *devinfo) const
 {
    return ::is_3src(devinfo, opcode);
 }
@@ -959,7 +959,7 @@ backend_instruction::reads_accumulator_implicitly() const
 }
 
 bool
-backend_instruction::writes_accumulator_implicitly(const struct brw_device_info *devinfo) const
+backend_instruction::writes_accumulator_implicitly(const struct gen_device_info *devinfo) const
 {
    return writes_accumulator ||
           (devinfo->gen < 6 &&
@@ -1154,7 +1154,7 @@ backend_shader::calculate_cfg()
  */
 uint32_t
 brw_assign_common_binding_table_offsets(gl_shader_stage stage,
-                                        const struct brw_device_info *devinfo,
+                                        const struct gen_device_info *devinfo,
                                         const struct gl_shader_program *shader_prog,
                                         const struct gl_program *prog,
                                         struct brw_stage_prog_data *stage_prog_data,
@@ -1322,7 +1322,7 @@ brw_compile_tes(const struct brw_compiler *compiler,
                 unsigned *final_assembly_size,
                 char **error_str)
 {
-   const struct brw_device_info *devinfo = compiler->devinfo;
+   const struct gen_device_info *devinfo = compiler->devinfo;
    struct gl_linked_shader *shader =
       shader_prog->_LinkedShaders[MESA_SHADER_TESS_EVAL];
    const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_EVAL];
index 2ef9fb7e3b0362bbd5d8477f45b2905511091c9a..0102098e4cdfcd4e2f3bfb7c5b82a2ac8a0f2f2c 100644 (file)
@@ -102,7 +102,7 @@ struct bblock_t;
 
 #ifdef __cplusplus
 struct backend_instruction : public exec_node {
-   bool is_3src(const struct brw_device_info *devinfo) const;
+   bool is_3src(const struct gen_device_info *devinfo) const;
    bool is_tex() const;
    bool is_math() const;
    bool is_control_flow() const;
@@ -111,7 +111,7 @@ struct backend_instruction : public exec_node {
    bool can_do_saturate() const;
    bool can_do_cmod() const;
    bool reads_accumulator_implicitly() const;
-   bool writes_accumulator_implicitly(const struct brw_device_info *devinfo) const;
+   bool writes_accumulator_implicitly(const struct gen_device_info *devinfo) const;
 
    void remove(bblock_t *block);
    void insert_after(bblock_t *block, backend_instruction *inst);
@@ -190,7 +190,7 @@ public:
    const struct brw_compiler *compiler;
    void *log_data; /* Passed to compiler->*_log functions */
 
-   const struct brw_device_info * const devinfo;
+   const struct gen_device_info * const devinfo;
    const nir_shader *nir;
    struct brw_stage_prog_data * const stage_prog_data;
 
@@ -237,7 +237,7 @@ struct backend_shader;
 enum brw_reg_type brw_type_for_base_type(const struct glsl_type *type);
 enum brw_conditional_mod brw_conditional_for_comparison(unsigned int op);
 uint32_t brw_math_function(enum opcode op);
-const char *brw_instruction_name(const struct brw_device_info *devinfo,
+const char *brw_instruction_name(const struct gen_device_info *devinfo,
                                  enum opcode op);
 bool brw_saturate_immediate(enum brw_reg_type type, struct brw_reg *reg);
 bool brw_negate_immediate(enum brw_reg_type type, struct brw_reg *reg);
@@ -263,7 +263,7 @@ struct brw_gs_compile
 
 uint32_t
 brw_assign_common_binding_table_offsets(gl_shader_stage stage,
-                                        const struct brw_device_info *devinfo,
+                                        const struct gen_device_info *devinfo,
                                         const struct gl_shader_program *shader_prog,
                                         const struct gl_program *prog,
                                         struct brw_stage_prog_data *stage_prog_data,
index a9d8544f340d04b6c9ffbb7c275448c41a8c7006..40b2689e4e0b8f3a6897ab550cd3b761ddba1bb5 100644 (file)
@@ -288,7 +288,7 @@ brw_format_for_mesa_format(mesa_format mesa_format)
 void
 brw_init_surface_formats(struct brw_context *brw)
 {
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    struct gl_context *ctx = &brw->ctx;
    int gen;
    mesa_format format;
index 2a4c775418202dbcdcefb5712c62feb2c8b14a04..44629ad34655313dccba41b75d073670715e7298 100644 (file)
@@ -170,7 +170,7 @@ brw_codegen_tcs_prog(struct brw_context *brw,
 {
    struct gl_context *ctx = &brw->ctx;
    const struct brw_compiler *compiler = brw->intelScreen->compiler;
-   const struct brw_device_info *devinfo = compiler->devinfo;
+   const struct gen_device_info *devinfo = compiler->devinfo;
    struct brw_stage_state *stage_state = &brw->tcs.base;
    nir_shader *nir;
    struct brw_tcs_prog_data prog_data;
index e14ae865a39ebc2e92bfdbfe116e83148b656579..c2f78226086f6a7abba57c731bd7aed47ebbc0f2 100644 (file)
@@ -83,7 +83,7 @@ brw_codegen_tes_prog(struct brw_context *brw,
                      struct brw_tes_prog_key *key)
 {
    const struct brw_compiler *compiler = brw->intelScreen->compiler;
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    struct brw_stage_state *stage_state = &brw->tes.base;
    nir_shader *nir = tep->program.Base.nir;
    struct brw_tes_prog_data prog_data;
index a7398a797bb58aa5f829deebfaa08e6976542aca..d52fdc06eddc7290ec843a78d2eadf955b8bfdcb 100644 (file)
@@ -224,7 +224,7 @@ vec4_instruction::regs_read(unsigned arg) const
 }
 
 bool
-vec4_instruction::can_do_source_mods(const struct brw_device_info *devinfo)
+vec4_instruction::can_do_source_mods(const struct gen_device_info *devinfo)
 {
    if (devinfo->gen == 6 && is_math())
       return false;
@@ -239,7 +239,7 @@ vec4_instruction::can_do_source_mods(const struct brw_device_info *devinfo)
 }
 
 bool
-vec4_instruction::can_do_writemask(const struct brw_device_info *devinfo)
+vec4_instruction::can_do_writemask(const struct gen_device_info *devinfo)
 {
    switch (opcode) {
    case SHADER_OPCODE_GEN4_SCRATCH_READ:
@@ -996,7 +996,7 @@ vec4_visitor::opt_set_dependency_control()
 }
 
 bool
-vec4_instruction::can_reswizzle(const struct brw_device_info *devinfo,
+vec4_instruction::can_reswizzle(const struct gen_device_info *devinfo,
                                 int dst_writemask,
                                 int swizzle,
                                 int swizzle_mask)
index 8faa241bd550005e0a30bf87fa98907c82106240..cc0e44cc8e13cbc6cef301b608c139acce14d1fc 100644 (file)
@@ -130,7 +130,7 @@ get_copy_value(const copy_entry &entry, unsigned readmask)
 }
 
 static bool
-try_constant_propagate(const struct brw_device_info *devinfo,
+try_constant_propagate(const struct gen_device_info *devinfo,
                        vec4_instruction *inst,
                        int arg, const copy_entry *entry)
 {
@@ -281,7 +281,7 @@ try_constant_propagate(const struct brw_device_info *devinfo,
 }
 
 static bool
-try_copy_propagate(const struct brw_device_info *devinfo,
+try_copy_propagate(const struct gen_device_info *devinfo,
                    vec4_instruction *inst, int arg,
                    const copy_entry *entry, int attributes_per_reg)
 {
index 9f943839f80d99aedcb62c48a2acdebb8c470865..256abae55e585be2c971f1ad638f60151709efe7 100644 (file)
@@ -112,7 +112,7 @@ generate_tex(struct brw_codegen *p,
              struct brw_reg surface_index,
              struct brw_reg sampler_index)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    int msg_type = -1;
 
    if (devinfo->gen >= 5) {
@@ -728,7 +728,7 @@ generate_gs_set_primitive_id(struct brw_codegen *p, struct brw_reg dst)
 static void
 generate_tcs_get_instance_id(struct brw_codegen *p, struct brw_reg dst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const bool ivb = devinfo->is_ivybridge || devinfo->is_baytrail;
 
    /* "Instance Count" comes as part of the payload in r0.2 bits 23:17.
@@ -759,7 +759,7 @@ generate_tcs_urb_write(struct brw_codegen *p,
                        vec4_instruction *inst,
                        struct brw_reg urb_header)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    brw_inst *send = brw_next_insn(p, BRW_OPCODE_SEND);
    brw_set_dest(p, send, brw_null_reg());
@@ -929,7 +929,7 @@ generate_vec4_urb_read(struct brw_codegen *p,
                        struct brw_reg dst,
                        struct brw_reg header)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    assert(header.file == BRW_GENERAL_REGISTER_FILE);
    assert(header.type == BRW_REGISTER_TYPE_UD);
@@ -954,7 +954,7 @@ generate_tcs_release_input(struct brw_codegen *p,
                            struct brw_reg vertex,
                            struct brw_reg is_unpaired)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
 
    assert(vertex.file == BRW_IMMEDIATE_VALUE);
    assert(vertex.type == BRW_REGISTER_TYPE_UD);
@@ -1034,7 +1034,7 @@ generate_tcs_create_barrier_header(struct brw_codegen *p,
                                    struct brw_vue_prog_data *prog_data,
                                    struct brw_reg dst)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const bool ivb = devinfo->is_ivybridge || devinfo->is_baytrail;
    struct brw_reg m0_2 = get_element_ud(dst, 2);
    unsigned instances = ((struct brw_tcs_prog_data *) prog_data)->instances;
@@ -1123,7 +1123,7 @@ generate_scratch_read(struct brw_codegen *p,
                       struct brw_reg dst,
                       struct brw_reg index)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_reg header = brw_vec8_grf(0, 0);
 
    gen6_resolve_implied_move(p, &header, inst->base_mrf);
@@ -1168,7 +1168,7 @@ generate_scratch_write(struct brw_codegen *p,
                        struct brw_reg src,
                        struct brw_reg index)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    struct brw_reg header = brw_vec8_grf(0, 0);
    bool write_commit;
 
@@ -1244,7 +1244,7 @@ generate_pull_constant_load(struct brw_codegen *p,
                             struct brw_reg index,
                             struct brw_reg offset)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    assert(index.file == BRW_IMMEDIATE_VALUE &&
          index.type == BRW_REGISTER_TYPE_UD);
    uint32_t surf_index = index.ud;
@@ -1472,7 +1472,7 @@ generate_code(struct brw_codegen *p,
               struct brw_vue_prog_data *prog_data,
               const struct cfg_t *cfg)
 {
-   const struct brw_device_info *devinfo = p->devinfo;
+   const struct gen_device_info *devinfo = p->devinfo;
    const char *stage_abbrev = _mesa_shader_stage_to_abbrev(nir->stage);
    bool debug_flag = INTEL_DEBUG &
       intel_debug_flag_for_shader_stage(nir->stage);
index 9944803f31b9deef809b10eb3f5e54e0408da417..498fb7cfbcf18e86234420c77c42bc9ccc3e5cb8 100644 (file)
@@ -451,7 +451,7 @@ brw_compile_tcs(const struct brw_compiler *compiler,
                 unsigned *final_assembly_size,
                 char **error_str)
 {
-   const struct brw_device_info *devinfo = compiler->devinfo;
+   const struct gen_device_info *devinfo = compiler->devinfo;
    struct brw_vue_prog_data *vue_prog_data = &prog_data->base;
    const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_CTRL];
 
index 76b2a05700f6b06d65070f159515186a70c53bb8..22991e911adf4a1096619b22c4faf905cfd0bccd 100644 (file)
@@ -1351,7 +1351,7 @@ vec4_visitor::emit_urb_slot(dst_reg reg, int varying)
 }
 
 static int
-align_interleaved_urb_mlen(const struct brw_device_info *devinfo, int mlen)
+align_interleaved_urb_mlen(const struct gen_device_info *devinfo, int mlen)
 {
    if (devinfo->gen >= 6) {
       /* URB data written (does not include the message header reg) must
index b66c209b24d199f9789ebefd4625abef02000fd8..f1af22147cc68135cec8d6916e873a8e0b6c91e6 100644 (file)
@@ -56,7 +56,7 @@ assign_vue_slot(struct brw_vue_map *vue_map, int varying, int slot)
  * Compute the VUE map for a shader stage.
  */
 void
-brw_compute_vue_map(const struct brw_device_info *devinfo,
+brw_compute_vue_map(const struct gen_device_info *devinfo,
                     struct brw_vue_map *vue_map,
                     GLbitfield64 slots_valid,
                     bool separate)
index 3f929c46cf5cd18d250a254be9d35e0547f747e3..fb96f2f26dbcb456b7809d72cb8293763a535a3a 100644 (file)
@@ -42,7 +42,7 @@
 #include "util/ralloc.h"
 
 static void
-assign_fs_binding_table_offsets(const struct brw_device_info *devinfo,
+assign_fs_binding_table_offsets(const struct gen_device_info *devinfo,
                                 const struct gl_shader_program *shader_prog,
                                 const struct gl_program *prog,
                                 const struct brw_wm_prog_key *key,
index bfd973b0c965d094ee20538831be6a00d6b68609..c347b5d59ca7f7729d991a0973c642b20705b47c 100644 (file)
@@ -1486,7 +1486,7 @@ const struct brw_tracked_state brw_cs_image_surfaces = {
 static uint32_t
 get_image_format(struct brw_context *brw, mesa_format format, GLenum access)
 {
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    uint32_t hw_format = brw_format_for_mesa_format(format);
    if (access == GL_WRITE_ONLY) {
       return hw_format;
index e7c72b6514f50781a8dbfc0ba6bb9da1f5afd210..dded30f7a4a90b4180026b31f65f39d3882dbb35 100644 (file)
@@ -46,7 +46,7 @@ brw_upload_cs_state(struct brw_context *brw)
    struct brw_stage_state *stage_state = &brw->cs.base;
    struct brw_cs_prog_data *cs_prog_data = brw->cs.prog_data;
    struct brw_stage_prog_data *prog_data = &cs_prog_data->base;
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
 
    if (INTEL_DEBUG & DEBUG_SHADER_TIME) {
       brw_emit_buffer_surface_state(
index 49b59040b1cdae1a2b0d843a81387da6f39e79be..741ab776e9c2c42a339cc19b24acffac7e7bcf3c 100644 (file)
@@ -135,7 +135,7 @@ static const struct brw_l3_config chv_l3_configs[] = {
  * specified device.
  */
 static const struct brw_l3_config *
-get_l3_configs(const struct brw_device_info *devinfo)
+get_l3_configs(const struct gen_device_info *devinfo)
 {
    switch (devinfo->gen) {
    case 7:
@@ -156,7 +156,7 @@ get_l3_configs(const struct brw_device_info *devinfo)
  * Return the size of an L3 way in KB.
  */
 static unsigned
-get_l3_way_size(const struct brw_device_info *devinfo)
+get_l3_way_size(const struct gen_device_info *devinfo)
 {
    if (devinfo->is_baytrail)
       return 2;
@@ -245,7 +245,7 @@ diff_l3_weights(struct brw_l3_weights w0, struct brw_l3_weights w1)
  * weight vector.
  */
 static const struct brw_l3_config *
-get_l3_config(const struct brw_device_info *devinfo, struct brw_l3_weights w0)
+get_l3_config(const struct gen_device_info *devinfo, struct brw_l3_weights w0)
 {
    const struct brw_l3_config *const cfgs = get_l3_configs(devinfo);
    const struct brw_l3_config *cfg_best = NULL;
@@ -269,7 +269,7 @@ get_l3_config(const struct brw_device_info *devinfo, struct brw_l3_weights w0)
  * is intended to approximately resemble the hardware defaults.
  */
 static struct brw_l3_weights
-get_default_l3_weights(const struct brw_device_info *devinfo,
+get_default_l3_weights(const struct gen_device_info *devinfo,
                        bool needs_dc, bool needs_slm)
 {
    struct brw_l3_weights w = {{ 0 }};
@@ -448,10 +448,10 @@ setup_l3_config(struct brw_context *brw, const struct brw_l3_config *cfg)
 
 /**
  * Return the unit brw_context::urb::size is expressed in, in KB.  \sa
- * brw_device_info::urb::size.
+ * gen_device_info::urb::size.
  */
 static unsigned
-get_urb_size_scale(const struct brw_device_info *devinfo)
+get_urb_size_scale(const struct gen_device_info *devinfo)
 {
    return (devinfo->gen >= 8 ? devinfo->num_slices : 1);
 }
@@ -463,7 +463,7 @@ get_urb_size_scale(const struct brw_device_info *devinfo)
 static void
 update_urb_size(struct brw_context *brw, const struct brw_l3_config *cfg)
 {
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    /* From the SKL "L3 Allocation and Programming" documentation:
     *
     * "URB is limited to 1008KB due to programming restrictions.  This is not
@@ -581,7 +581,7 @@ const struct brw_tracked_state gen7_l3_state = {
 void
 gen7_restore_default_l3_config(struct brw_context *brw)
 {
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    /* For efficiency assume that the first entry of the array matches the
     * default configuration.
     */
index 24b45f1f0d6fee87aae9caaa0fe79403e256bb1f..da0a3783c21e85e85456ebbcca0526efb40840fb 100644 (file)
@@ -202,7 +202,7 @@ void
 gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
                 bool gs_present, bool tess_present)
 {
-   const struct brw_device_info *devinfo = brw->intelScreen->devinfo;
+   const struct gen_device_info *devinfo = brw->intelScreen->devinfo;
    const int push_size_kB =
       (brw->gen >= 8 || (brw->is_haswell && brw->gt == 3)) ? 32 : 16;
 
index 459ea60690a875a8cea9ab0a53b6bbc008e64599..b01490a1822e341f02d3eae0377b7b452ca47566 100644 (file)
@@ -29,7 +29,7 @@
 
 void
 dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
-              const struct brw_device_info *devinfo)
+              const struct gen_device_info *devinfo)
 {
    const char *last_annotation_string = NULL;
    const void *last_annotation_ir = NULL;
@@ -100,7 +100,7 @@ annotation_array_ensure_space(struct annotation_info *annotation)
    return true;
 }
 
-void annotate(const struct brw_device_info *devinfo,
+void annotate(const struct gen_device_info *devinfo,
               struct annotation_info *annotation, const struct cfg_t *cfg,
               struct backend_instruction *inst, unsigned offset)
 {
index 5faf6c69d46322c277ede23ffa6f52cfa1958144..2d905b10a96be41edf1ca81c1a01ffc1649a837a 100644 (file)
@@ -60,10 +60,10 @@ struct annotation_info {
 
 void
 dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
-              const struct brw_device_info *devinfo);
+              const struct gen_device_info *devinfo);
 
 void
-annotate(const struct brw_device_info *devinfo,
+annotate(const struct gen_device_info *devinfo,
          struct annotation_info *annotation, const struct cfg_t *cfg,
          struct backend_instruction *inst, unsigned offset);
 void
index 84977a7c12192e0709fd741f870f5eebb5a05d14..c431839b144bd819eeff9f598ed13f9d659905e7 100644 (file)
@@ -1300,7 +1300,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
    static const uint8_t multisample_samples[2]  = {4, 8};
 
    struct intel_screen *screen = dri_screen->driverPrivate;
-   const struct brw_device_info *devinfo = screen->devinfo;
+   const struct gen_device_info *devinfo = screen->devinfo;
    uint8_t depth_bits[4], stencil_bits[4];
    __DRIconfig **configs = NULL;
 
index ab1cc28b9659983b4f635a5adf4c54ea972b4585..acf319c4b70cd7894a4327251c4ecf42deb6834a 100644 (file)
 
 #include "dri_util.h"
 #include "intel_bufmgr.h"
-#include "common/brw_device_info.h"
+#include "common/gen_device_info.h"
 #include "i915_drm.h"
 #include "xmlconfig.h"
 
 struct intel_screen
 {
    int deviceID;
-   const struct brw_device_info *devinfo;
+   const struct gen_device_info *devinfo;
 
    __DRIscreen *driScrnPriv;
 
index 59d58a7c6de816ea89fbe964d819f5c8cd339248..874412cd3c3317eb757c7790b3adbe605dbcaea3 100644 (file)
@@ -65,7 +65,7 @@ test_compact_instruction(struct brw_codegen *p, brw_inst src)
  * become meaningless once fuzzing twiddles a related bit.
  */
 static void
-clear_pad_bits(const struct brw_device_info *devinfo, brw_inst *inst)
+clear_pad_bits(const struct gen_device_info *devinfo, brw_inst *inst)
 {
    if (brw_inst_opcode(devinfo, inst) != BRW_OPCODE_SEND &&
        brw_inst_opcode(devinfo, inst) != BRW_OPCODE_SENDC &&
@@ -78,7 +78,7 @@ clear_pad_bits(const struct brw_device_info *devinfo, brw_inst *inst)
 }
 
 static bool
-skip_bit(const struct brw_device_info *devinfo, brw_inst *src, int bit)
+skip_bit(const struct gen_device_info *devinfo, brw_inst *src, int bit)
 {
    /* pad bit */
    if (bit == 7)
@@ -250,7 +250,7 @@ struct {
 };
 
 static bool
-run_tests(const struct brw_device_info *devinfo)
+run_tests(const struct gen_device_info *devinfo)
 {
    bool fail = false;
 
@@ -288,7 +288,7 @@ run_tests(const struct brw_device_info *devinfo)
 int
 main(int argc, char **argv)
 {
-   struct brw_device_info *devinfo = calloc(1, sizeof(*devinfo));
+   struct gen_device_info *devinfo = calloc(1, sizeof(*devinfo));
    devinfo->gen = 6;
    bool fail = false;
 
index 7cd72453b3f5ee33aeefa2f383c69c4fcb4390ae..8ba7bc594816239767cb486512870a4bea638bd6 100644 (file)
@@ -33,7 +33,7 @@ class cmod_propagation_test : public ::testing::Test {
 
 public:
    struct brw_compiler *compiler;
-   struct brw_device_info *devinfo;
+   struct gen_device_info *devinfo;
    struct gl_context *ctx;
    struct brw_wm_prog_data *prog_data;
    struct gl_shader_program *shader_prog;
@@ -56,7 +56,7 @@ void cmod_propagation_test::SetUp()
 {
    ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
    compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
-   devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+   devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
    compiler->devinfo = devinfo;
 
    prog_data = ralloc(NULL, struct brw_wm_prog_data);
index 06caaad7b10e971c33e733690904f5b0b5f42be3..fd623a5e00fd346c159631d9ec48d9656963fb57 100644 (file)
@@ -33,7 +33,7 @@ class saturate_propagation_test : public ::testing::Test {
 
 public:
    struct brw_compiler *compiler;
-   struct brw_device_info *devinfo;
+   struct gen_device_info *devinfo;
    struct gl_context *ctx;
    struct brw_wm_prog_data *prog_data;
    struct gl_shader_program *shader_prog;
@@ -56,7 +56,7 @@ void saturate_propagation_test::SetUp()
 {
    ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
    compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
-   devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+   devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
    compiler->devinfo = devinfo;
 
    prog_data = ralloc(NULL, struct brw_wm_prog_data);
index 1b6a9e7eafc8b9061ddc7c0c5d4e80b89734973f..119293880e023eee73c2701ba04b8042abcfd21a 100644 (file)
@@ -36,7 +36,7 @@ class cmod_propagation_test : public ::testing::Test {
 
 public:
    struct brw_compiler *compiler;
-   struct brw_device_info *devinfo;
+   struct gen_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
    struct brw_vue_prog_data *prog_data;
@@ -98,7 +98,7 @@ void cmod_propagation_test::SetUp()
 {
    ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
    compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
-   devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+   devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;
 
index 901f12a773d26fe60dd815f96d729abadc6e240d..4641a7f2a771f2ceb3c0df17e37922d7f19ce4ab 100644 (file)
@@ -35,7 +35,7 @@ class copy_propagation_test : public ::testing::Test {
 
 public:
    struct brw_compiler *compiler;
-   struct brw_device_info *devinfo;
+   struct gen_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
    struct brw_vue_prog_data *prog_data;
@@ -91,7 +91,7 @@ void copy_propagation_test::SetUp()
 {
    ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
    compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
-   devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+   devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;
 
index 944c7386c069bf14e76f87a1fb98a7efc5b1d91f..357ce5cd68fa606e249b2603621ff1f9c2653328 100644 (file)
@@ -37,7 +37,7 @@ class register_coalesce_test : public ::testing::Test {
 
 public:
    struct brw_compiler *compiler;
-   struct brw_device_info *devinfo;
+   struct gen_device_info *devinfo;
    struct gl_context *ctx;
    struct gl_shader_program *shader_prog;
    struct brw_vue_prog_data *prog_data;
@@ -94,7 +94,7 @@ void register_coalesce_test::SetUp()
 {
    ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
    compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
-   devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
+   devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
    prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
    compiler->devinfo = devinfo;