aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/intel/Makefile.sources4
-rw-r--r--src/intel/blorp/blorp_blit.c4
-rw-r--r--src/intel/blorp/blorp_genX_exec.h2
-rw-r--r--src/intel/common/gen_device_info.c (renamed from src/intel/common/brw_device_info.c)60
-rw-r--r--src/intel/common/gen_device_info.h (renamed from src/intel/common/brw_device_info.h)4
-rw-r--r--src/intel/isl/isl.c2
-rw-r--r--src/intel/isl/isl.h22
-rw-r--r--src/intel/isl/isl_format.c16
-rw-r--r--src/intel/isl/isl_priv.h2
-rw-r--r--src/intel/isl/isl_storage_image.c4
-rw-r--r--src/intel/isl/tests/isl_surf_get_image_offset_test.c2
-rw-r--r--src/intel/tools/disasm.c6
-rw-r--r--src/intel/vulkan/anv_allocator.c2
-rw-r--r--src/intel/vulkan/anv_device.c2
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py6
-rw-r--r--src/intel/vulkan/anv_formats.c6
-rw-r--r--src/intel/vulkan/anv_pipeline.c14
-rw-r--r--src/intel/vulkan/anv_private.h10
-rw-r--r--src/intel/vulkan/genX_l3.c16
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_tri.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_compiler.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c36
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h26
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c50
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c142
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_validate.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp30
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp18
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_inst.h48
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_fs.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_vec4.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_nir.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_nir.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_pipe_control.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_reg.h4
-rw-r--r--src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp10
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.h10
-rw-r--r--src/mesa/drivers/dri/i965/brw_surface_formats.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_tes.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp6
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_generator.cpp20
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vue_map.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen7_cs_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen7_l3_state.c16
-rw-r--r--src/mesa/drivers/dri/i965/gen7_urb.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_asm_annotation.c4
-rw-r--r--src/mesa/drivers/dri/i965/intel_asm_annotation.h4
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c2
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.h4
-rw-r--r--src/mesa/drivers/dri/i965/test_eu_compact.c8
-rw-r--r--src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp4
-rw-r--r--src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp4
75 files changed, 380 insertions, 380 deletions
diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
index 97f2328fefe..af4174fc5c0 100644
--- a/src/intel/Makefile.sources
+++ b/src/intel/Makefile.sources
@@ -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 \
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 170c3816e38..f5cb16a2c2a 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -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);
diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index 461cfe0abc8..d049eb0912e 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -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/gen_device_info.c
index fb224fae234..6ee55e187fc 100644
--- a/src/intel/common/brw_device_info.c
+++ b/src/intel/common/gen_device_info.c
@@ -23,9 +23,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include "brw_device_info.h"
+#include "gen_device_info.h"
-static const struct brw_device_info brw_device_info_i965 = {
+static const struct gen_device_info gen_device_info_i965 = {
.gen = 4,
.has_negative_rhw_bug = true,
.num_slices = 1,
@@ -37,7 +37,7 @@ static const struct brw_device_info brw_device_info_i965 = {
},
};
-static const struct brw_device_info brw_device_info_g4x = {
+static const struct gen_device_info gen_device_info_g4x = {
.gen = 4,
.has_pln = true,
.has_compr4 = true,
@@ -52,7 +52,7 @@ static const struct brw_device_info brw_device_info_g4x = {
},
};
-static const struct brw_device_info brw_device_info_ilk = {
+static const struct gen_device_info gen_device_info_ilk = {
.gen = 5,
.has_pln = true,
.has_compr4 = true,
@@ -66,7 +66,7 @@ static const struct brw_device_info brw_device_info_ilk = {
},
};
-static const struct brw_device_info brw_device_info_snb_gt1 = {
+static const struct gen_device_info gen_device_info_snb_gt1 = {
.gen = 6,
.gt = 1,
.has_hiz_and_separate_stencil = true,
@@ -86,7 +86,7 @@ static const struct brw_device_info brw_device_info_snb_gt1 = {
},
};
-static const struct brw_device_info brw_device_info_snb_gt2 = {
+static const struct gen_device_info gen_device_info_snb_gt2 = {
.gen = 6,
.gt = 2,
.has_hiz_and_separate_stencil = true,
@@ -114,7 +114,7 @@ static const struct brw_device_info brw_device_info_snb_gt2 = {
.has_pln = true, \
.has_surface_tile_offset = true
-static const struct brw_device_info brw_device_info_ivb_gt1 = {
+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,
@@ -134,7 +134,7 @@ static const struct brw_device_info brw_device_info_ivb_gt1 = {
},
};
-static const struct brw_device_info brw_device_info_ivb_gt2 = {
+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,
@@ -154,7 +154,7 @@ static const struct brw_device_info brw_device_info_ivb_gt2 = {
},
};
-static const struct brw_device_info brw_device_info_byt = {
+static const struct gen_device_info gen_device_info_byt = {
GEN7_FEATURES, .is_baytrail = true, .gt = 1,
.num_slices = 1,
.has_llc = false,
@@ -181,7 +181,7 @@ static const struct brw_device_info brw_device_info_byt = {
.supports_simd16_3src = true, \
.has_resource_streamer = true
-static const struct brw_device_info brw_device_info_hsw_gt1 = {
+static const struct gen_device_info gen_device_info_hsw_gt1 = {
HSW_FEATURES, .gt = 1,
.num_slices = 1,
.max_vs_threads = 70,
@@ -201,7 +201,7 @@ static const struct brw_device_info brw_device_info_hsw_gt1 = {
},
};
-static const struct brw_device_info brw_device_info_hsw_gt2 = {
+static const struct gen_device_info gen_device_info_hsw_gt2 = {
HSW_FEATURES, .gt = 2,
.num_slices = 1,
.max_vs_threads = 280,
@@ -221,7 +221,7 @@ static const struct brw_device_info brw_device_info_hsw_gt2 = {
},
};
-static const struct brw_device_info brw_device_info_hsw_gt3 = {
+static const struct gen_device_info gen_device_info_hsw_gt3 = {
HSW_FEATURES, .gt = 3,
.num_slices = 2,
.max_vs_threads = 280,
@@ -256,7 +256,7 @@ static const struct brw_device_info brw_device_info_hsw_gt3 = {
.max_gs_threads = 504, \
.max_wm_threads = 384
-static const struct brw_device_info brw_device_info_bdw_gt1 = {
+static const struct gen_device_info gen_device_info_bdw_gt1 = {
GEN8_FEATURES, .gt = 1,
.num_slices = 1,
.max_cs_threads = 42,
@@ -271,7 +271,7 @@ static const struct brw_device_info brw_device_info_bdw_gt1 = {
}
};
-static const struct brw_device_info brw_device_info_bdw_gt2 = {
+static const struct gen_device_info gen_device_info_bdw_gt2 = {
GEN8_FEATURES, .gt = 2,
.num_slices = 1,
.max_cs_threads = 56,
@@ -286,7 +286,7 @@ static const struct brw_device_info brw_device_info_bdw_gt2 = {
}
};
-static const struct brw_device_info brw_device_info_bdw_gt3 = {
+static const struct gen_device_info gen_device_info_bdw_gt3 = {
GEN8_FEATURES, .gt = 3,
.num_slices = 2,
.max_cs_threads = 56,
@@ -301,7 +301,7 @@ static const struct brw_device_info brw_device_info_bdw_gt3 = {
}
};
-static const struct brw_device_info brw_device_info_chv = {
+static const struct gen_device_info gen_device_info_chv = {
GEN8_FEATURES, .is_cherryview = 1, .gt = 1,
.has_llc = false,
.num_slices = 1,
@@ -347,23 +347,23 @@ static const struct brw_device_info brw_device_info_chv = {
.max_gs_entries = 640, \
}
-static const struct brw_device_info brw_device_info_skl_gt1 = {
+static const struct gen_device_info gen_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 = {
+static const struct gen_device_info gen_device_info_skl_gt2 = {
GEN9_FEATURES, .gt = 2,
.num_slices = 1,
};
-static const struct brw_device_info brw_device_info_skl_gt3 = {
+static const struct gen_device_info gen_device_info_skl_gt3 = {
GEN9_FEATURES, .gt = 3,
.num_slices = 2,
};
-static const struct brw_device_info brw_device_info_skl_gt4 = {
+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:
@@ -377,7 +377,7 @@ static const struct brw_device_info brw_device_info_skl_gt4 = {
.urb.size = 1008 / 3,
};
-static const struct brw_device_info brw_device_info_bxt = {
+static const struct gen_device_info gen_device_info_bxt = {
GEN9_FEATURES,
.is_broxton = 1,
.gt = 1,
@@ -400,7 +400,7 @@ static const struct brw_device_info brw_device_info_bxt = {
}
};
-static const struct brw_device_info brw_device_info_bxt_2x6 = {
+static const struct gen_device_info gen_device_info_bxt_2x6 = {
GEN9_FEATURES,
.is_broxton = 1,
.gt = 1,
@@ -433,7 +433,7 @@ static const struct brw_device_info brw_device_info_bxt_2x6 = {
*/
#define KBL_MAX_THREADS_PER_PSD 64
-static const struct brw_device_info brw_device_info_kbl_gt1 = {
+static const struct gen_device_info gen_device_info_kbl_gt1 = {
GEN9_FEATURES,
.gt = 1,
@@ -443,7 +443,7 @@ static const struct brw_device_info brw_device_info_kbl_gt1 = {
.num_slices = 1,
};
-static const struct brw_device_info brw_device_info_kbl_gt1_5 = {
+static const struct gen_device_info gen_device_info_kbl_gt1_5 = {
GEN9_FEATURES,
.gt = 1,
@@ -452,7 +452,7 @@ static const struct brw_device_info brw_device_info_kbl_gt1_5 = {
.num_slices = 1,
};
-static const struct brw_device_info brw_device_info_kbl_gt2 = {
+static const struct gen_device_info gen_device_info_kbl_gt2 = {
GEN9_FEATURES,
.gt = 2,
@@ -460,7 +460,7 @@ static const struct brw_device_info brw_device_info_kbl_gt2 = {
.num_slices = 1,
};
-static const struct brw_device_info brw_device_info_kbl_gt3 = {
+static const struct gen_device_info gen_device_info_kbl_gt3 = {
GEN9_FEATURES,
.gt = 3,
@@ -468,7 +468,7 @@ static const struct brw_device_info brw_device_info_kbl_gt3 = {
.num_slices = 2,
};
-static const struct brw_device_info brw_device_info_kbl_gt4 = {
+static const struct gen_device_info gen_device_info_kbl_gt4 = {
GEN9_FEATURES,
.gt = 4,
@@ -487,14 +487,14 @@ static const struct brw_device_info brw_device_info_kbl_gt4 = {
.num_slices = 3,
};
-const struct brw_device_info *
+const struct gen_device_info *
brw_get_device_info(int devid)
{
- const struct brw_device_info *devinfo;
+ const struct gen_device_info *devinfo;
switch (devid) {
#undef CHIPSET
#define CHIPSET(id, family, name) \
- case id: devinfo = &brw_device_info_##family; break;
+ 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);
diff --git a/src/intel/common/brw_device_info.h b/src/intel/common/gen_device_info.h
index 0869063df32..ea1b75068cc 100644
--- a/src/intel/common/brw_device_info.h
+++ b/src/intel/common/gen_device_info.h
@@ -28,7 +28,7 @@
/**
* Intel hardware information and quirks
*/
-struct brw_device_info
+struct gen_device_info
{
int gen; /**< Generation number: 4, 5, 6, 7, ... */
int gt;
@@ -143,5 +143,5 @@ struct brw_device_info
/** @} */
};
-const struct brw_device_info *brw_get_device_info(int devid);
+const struct gen_device_info *brw_get_device_info(int devid);
const char *brw_get_device_name(int devid);
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index 0487515d1d6..c7639d0164e 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -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;
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index 5e56f28545e..bb20d1772d1 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -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
diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c
index c41a0bfcced..2804463b127 100644
--- a/src/intel/isl/isl_format.c
+++ b/src/intel/isl/isl_format.c
@@ -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)
diff --git a/src/intel/isl/isl_priv.h b/src/intel/isl/isl_priv.h
index 0c2ac2553fb..b539f10638d 100644
--- a/src/intel/isl/isl_priv.h
+++ b/src/intel/isl/isl_priv.h
@@ -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"
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c
index 01d388180d6..ffd03e4ad01 100644
--- a/src/intel/isl/isl_storage_image.c
+++ b/src/intel/isl/isl_storage_image.c
@@ -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) {
diff --git a/src/intel/isl/tests/isl_surf_get_image_offset_test.c b/src/intel/isl/tests/isl_surf_get_image_offset_test.c
index 0c9173deab4..8c44b37dc06 100644
--- a/src/intel/isl/tests/isl_surf_get_image_offset_test.c
+++ b/src/intel/isl/tests/isl_surf_get_image_offset_test.c
@@ -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"
diff --git a/src/intel/tools/disasm.c b/src/intel/tools/disasm.c
index fcb61c44acb..29c06413ab9 100644
--- a/src/intel/tools/disasm.c
+++ b/src/intel/tools/disasm.c
@@ -32,14 +32,14 @@
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)
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index f268e721fa8..457a88ff0cd 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -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,
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index cf6399364c5..08dfa18defe 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -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;
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index dcf25ee76c6..b0264950d62 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -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;
}
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index bbfb2925d77..a746cd3545b 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -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)
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 52ab7d0bf2d..151073eee5c 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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 ?
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 74c1e5ba65f..7cab99e952b 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -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;
diff --git a/src/intel/vulkan/genX_l3.c b/src/intel/vulkan/genX_l3.c
index a74071cf124..36bf57c35b9 100644
--- a/src/intel/vulkan/genX_l3.c
+++ b/src/intel/vulkan/genX_l3.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index d59e8849314..2c7f85a0e60 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -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:
diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c
index 0bac76096f8..4caa8f5aa07 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_tri.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c
@@ -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:
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c
index afb70a139ae..86b1eaa4b2e 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.c
+++ b/src/mesa/drivers/dri/i965/brw_compiler.c
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
index b45fba13043..84d3dde8c99 100644
--- a/src/mesa/drivers/dri/i965/brw_compiler.h
+++ b/src/mesa/drivers/dri/i965/brw_compiler.h
@@ -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.
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index fec6df8ae46..d3f3ae1c699 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index bcda0ab74c8..829e78d6bc4 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c
index 6685acde9d6..30ff190df4e 100644
--- a/src/mesa/drivers/dri/i965/brw_cs.c
+++ b/src/mesa/drivers/dri/i965/brw_cs.c
@@ -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)
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index cca4c8ba8b9..32cf134ea8f 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_eu.c b/src/mesa/drivers/dri/i965/brw_eu.c
index 3a309dce8fa..6a422bb798b 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.c
+++ b/src/mesa/drivers/dri/i965/brw_eu.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 2898b2ffc8b..3e527643704 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 5ae3fdd88cc..68321e785e8 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 6da47f26f72..da6354e587a 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -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();
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c
index 15fc25b126a..0e736ed01d8 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_validate.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 80c2e5fd80e..d0b55aeb513 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -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 =
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 6ac3d27511b..663b3eac5de 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
index af1e3ebbaa2..3b123a7a18d 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
index 5bd5343b8b4..5c1a00141ab 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_combine_constants.cpp
@@ -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:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 438f6812adb..518827b9fab 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index d604a5d2cb6..0ea10eee4a0 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -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)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index 9dc3a0db2e0..5576163f783 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
index a4774e6cac6..5fa7c42d2ee 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_surface_builder.cpp
@@ -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 =
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index dd1ec4b02fe..152013f647f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -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)
diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h
index f45e56400c9..d98bbf538a8 100644
--- a/src/mesa/drivers/dri/i965/brw_inst.h
+++ b/src/mesa/drivers/dri/i965/brw_inst.h
@@ -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); \
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index f2144835584..dd5f82aabe1 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
index 81b6a139f44..3813bb8d0ea 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c
index 24a64cb09f0..e8dafaebc91 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.c
+++ b/src/mesa/drivers/dri/i965/brw_nir.c
@@ -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)
{
diff --git a/src/mesa/drivers/dri/i965/brw_nir.h b/src/mesa/drivers/dri/i965/brw_nir.h
index 12f31db1ac9..b025d55a135 100644
--- a/src/mesa/drivers/dri/i965/brw_nir.h
+++ b/src/mesa/drivers/dri/i965/brw_nir.h
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_pipe_control.c b/src/mesa/drivers/dri/i965/brw_pipe_control.c
index 3d9afc9cdde..640bfdc4283 100644
--- a/src/mesa/drivers/dri/i965/brw_pipe_control.c
+++ b/src/mesa/drivers/dri/i965/brw_pipe_control.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index 5b427b22230..d6f22ed5a12 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index f15c0dfc55a..ff733c89d18 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -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];
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index b1632a66af3..ea39252b586 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -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];
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 2ef9fb7e3b0..0102098e4cd 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index a9d8544f340..40b2689e4e0 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c
index 2a4c7754182..44629ad3465 100644
--- a/src/mesa/drivers/dri/i965/brw_tcs.c
+++ b/src/mesa/drivers/dri/i965/brw_tcs.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index e14ae865a39..c2f78226086 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index a7398a797bb..d52fdc06edd 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -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)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
index 8faa241bd55..cc0e44cc8e1 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
@@ -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)
{
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 9f943839f80..256abae55e5 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
index 9944803f31b..498fb7cfbcf 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_tcs.cpp
@@ -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];
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 76b2a05700f..22991e911ad 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -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
diff --git a/src/mesa/drivers/dri/i965/brw_vue_map.c b/src/mesa/drivers/dri/i965/brw_vue_map.c
index b66c209b24d..f1af22147cc 100644
--- a/src/mesa/drivers/dri/i965/brw_vue_map.c
+++ b/src/mesa/drivers/dri/i965/brw_vue_map.c
@@ -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)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 3f929c46cf5..fb96f2f26db 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index bfd973b0c96..c347b5d59ca 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/gen7_cs_state.c b/src/mesa/drivers/dri/i965/gen7_cs_state.c
index e7c72b6514f..dded30f7a4a 100644
--- a/src/mesa/drivers/dri/i965/gen7_cs_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_cs_state.c
@@ -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(
diff --git a/src/mesa/drivers/dri/i965/gen7_l3_state.c b/src/mesa/drivers/dri/i965/gen7_l3_state.c
index 49b59040b1c..741ab776e9c 100644
--- a/src/mesa/drivers/dri/i965/gen7_l3_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_l3_state.c
@@ -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.
*/
diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c
index 24b45f1f0d6..da0a3783c21 100644
--- a/src/mesa/drivers/dri/i965/gen7_urb.c
+++ b/src/mesa/drivers/dri/i965/gen7_urb.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.c b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
index 459ea60690a..b01490a1822 100644
--- a/src/mesa/drivers/dri/i965/intel_asm_annotation.c
+++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.c
@@ -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)
{
diff --git a/src/mesa/drivers/dri/i965/intel_asm_annotation.h b/src/mesa/drivers/dri/i965/intel_asm_annotation.h
index 5faf6c69d46..2d905b10a96 100644
--- a/src/mesa/drivers/dri/i965/intel_asm_annotation.h
+++ b/src/mesa/drivers/dri/i965/intel_asm_annotation.h
@@ -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
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 84977a7c121..c431839b144 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/intel_screen.h b/src/mesa/drivers/dri/i965/intel_screen.h
index ab1cc28b965..acf319c4b70 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.h
+++ b/src/mesa/drivers/dri/i965/intel_screen.h
@@ -33,14 +33,14 @@
#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;
diff --git a/src/mesa/drivers/dri/i965/test_eu_compact.c b/src/mesa/drivers/dri/i965/test_eu_compact.c
index 59d58a7c6de..874412cd3c3 100644
--- a/src/mesa/drivers/dri/i965/test_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/test_eu_compact.c
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
index 7cd72453b3f..8ba7bc59481 100644
--- a/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_fs_cmod_propagation.cpp
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
index 06caaad7b10..fd623a5e00f 100644
--- a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp
@@ -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);
diff --git a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
index 1b6a9e7eafc..119293880e0 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_cmod_propagation.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
index 901f12a773d..4641a7f2a77 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_copy_propagation.cpp
@@ -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;
diff --git a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
index 944c7386c06..357ce5cd68f 100644
--- a/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+++ b/src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
@@ -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;