intel: Rename genx10 field in gen_device_info struct to verx10

Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "info\)*(.|->)genx10" -rIl $SEARCH_PATH | xargs sed -ie "s/info\()*\)\(\.\|->\)genx10/info\1\2verx10/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936>
This commit is contained in:
Anuj Phogat
2021-03-29 13:43:47 -07:00
committed by Marge Bot
parent cc422fa498
commit 99331f6deb
22 changed files with 27 additions and 27 deletions

View File

@@ -254,7 +254,7 @@ iris_destroy_context(struct pipe_context *ctx)
} }
#define genX_call(devinfo, func, ...) \ #define genX_call(devinfo, func, ...) \
switch ((devinfo)->genx10) { \ switch ((devinfo)->verx10) { \
case 125: \ case 125: \
gen125_##func(__VA_ARGS__); \ gen125_##func(__VA_ARGS__); \
break; \ break; \

View File

@@ -59,7 +59,7 @@
#include "iris_monitor.h" #include "iris_monitor.h"
#define genX_call(devinfo, func, ...) \ #define genX_call(devinfo, func, ...) \
switch ((devinfo)->genx10) { \ switch ((devinfo)->verx10) { \
case 125: \ case 125: \
gen125_##func(__VA_ARGS__); \ gen125_##func(__VA_ARGS__); \
break; \ break; \

View File

@@ -7988,7 +7988,7 @@ iris_set_frontend_noop(struct pipe_context *ctx, bool enable)
void void
genX(init_screen_state)(struct iris_screen *screen) genX(init_screen_state)(struct iris_screen *screen)
{ {
assert(screen->devinfo.genx10 == GFX_VERx10); assert(screen->devinfo.verx10 == GFX_VERx10);
screen->vtbl.destroy_state = iris_destroy_state; screen->vtbl.destroy_state = iris_destroy_state;
screen->vtbl.init_render_context = iris_init_render_context; screen->vtbl.init_render_context = iris_init_render_context;
screen->vtbl.init_compute_context = iris_init_compute_context; screen->vtbl.init_compute_context = iris_init_compute_context;

View File

@@ -1623,7 +1623,7 @@ fs_visitor::assign_curb_setup()
uint64_t used = 0; uint64_t used = 0;
if (stage == MESA_SHADER_COMPUTE && devinfo->genx10 >= 125) { if (stage == MESA_SHADER_COMPUTE && devinfo->verx10 >= 125) {
fs_builder ubld = bld.exec_all().group(8, 0).at( fs_builder ubld = bld.exec_all().group(8, 0).at(
cfg->first_block(), cfg->first_block()->start()); cfg->first_block(), cfg->first_block()->start());
@@ -2270,7 +2270,7 @@ get_subgroup_id_param_index(const gen_device_info *devinfo,
if (prog_data->nr_params == 0) if (prog_data->nr_params == 0)
return -1; return -1;
if (devinfo->genx10 >= 125) if (devinfo->verx10 >= 125)
return -1; return -1;
/* The local thread id is always the last parameter in the list */ /* The local thread id is always the last parameter in the list */

View File

@@ -108,7 +108,7 @@ fs_visitor::nir_setup_uniforms()
uniforms = nir->num_uniforms / 4; uniforms = nir->num_uniforms / 4;
if ((stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL) && if ((stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL) &&
devinfo->genx10 < 125) { devinfo->verx10 < 125) {
/* Add uniforms for builtins after regular NIR uniforms. */ /* Add uniforms for builtins after regular NIR uniforms. */
assert(uniforms == prog_data->nr_params); assert(uniforms == prog_data->nr_params);
@@ -3675,7 +3675,7 @@ fs_visitor::nir_emit_cs_intrinsic(const fs_builder &bld,
break; break;
case nir_intrinsic_load_subgroup_id: case nir_intrinsic_load_subgroup_id:
if (devinfo->genx10 >= 125) if (devinfo->verx10 >= 125)
bld.AND(retype(dest, BRW_REGISTER_TYPE_UD), bld.AND(retype(dest, BRW_REGISTER_TYPE_UD),
retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD), retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD),
brw_imm_ud(INTEL_MASK(7, 0))); brw_imm_ud(INTEL_MASK(7, 0)));

View File

@@ -47,7 +47,7 @@ enum gen {
static enum gen static enum gen
gen_from_devinfo(const struct gen_device_info *devinfo) gen_from_devinfo(const struct gen_device_info *devinfo)
{ {
switch (devinfo->genx10) { switch (devinfo->verx10) {
case 40: return GEN4; case 40: return GEN4;
case 45: return GEN45; case 45: return GEN45;
case 50: return GEN5; case 50: return GEN5;

View File

@@ -337,7 +337,7 @@ main(UNUSED int argc, UNUSED char **argv)
if (devinfo->gen == 10) if (devinfo->gen == 10)
continue; continue;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
fail |= run_tests(devinfo); fail |= run_tests(devinfo);
} }

View File

@@ -77,7 +77,7 @@ void cmod_propagation_test::SetUp()
v = new cmod_propagation_fs_visitor(compiler, ctx, prog_data, shader); v = new cmod_propagation_fs_visitor(compiler, ctx, prog_data, shader);
devinfo->gen = 7; devinfo->gen = 7;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void cmod_propagation_test::TearDown() void cmod_propagation_test::TearDown()

View File

@@ -67,7 +67,7 @@ void copy_propagation_test::SetUp()
v = new copy_propagation_fs_visitor(compiler, ctx, prog_data, shader); v = new copy_propagation_fs_visitor(compiler, ctx, prog_data, shader);
devinfo->gen = 4; devinfo->gen = 4;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void copy_propagation_test::TearDown() void copy_propagation_test::TearDown()

View File

@@ -67,7 +67,7 @@ void saturate_propagation_test::SetUp()
v = new saturate_propagation_fs_visitor(compiler, ctx, prog_data, shader); v = new saturate_propagation_fs_visitor(compiler, ctx, prog_data, shader);
devinfo->gen = 6; devinfo->gen = 6;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void saturate_propagation_test::TearDown() void saturate_propagation_test::TearDown()

View File

@@ -55,7 +55,7 @@ void scoreboard_test::SetUp()
v = new fs_visitor(compiler, NULL, ctx, NULL, &prog_data->base, shader, 8, -1, false); v = new fs_visitor(compiler, NULL, ctx, NULL, &prog_data->base, shader, 8, -1, false);
devinfo->gen = 12; devinfo->gen = 12;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void scoreboard_test::TearDown() void scoreboard_test::TearDown()

View File

@@ -110,7 +110,7 @@ void cmod_propagation_test::SetUp()
v = new cmod_propagation_vec4_visitor(compiler, ctx, shader, prog_data); v = new cmod_propagation_vec4_visitor(compiler, ctx, shader, prog_data);
devinfo->gen = 4; devinfo->gen = 4;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void cmod_propagation_test::TearDown() void cmod_propagation_test::TearDown()

View File

@@ -102,7 +102,7 @@ void copy_propagation_test::SetUp()
v = new copy_propagation_vec4_visitor(compiler, ctx, shader, prog_data); v = new copy_propagation_vec4_visitor(compiler, ctx, shader, prog_data);
devinfo->gen = 4; devinfo->gen = 4;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void copy_propagation_test::TearDown() void copy_propagation_test::TearDown()

View File

@@ -100,7 +100,7 @@ void dead_code_eliminate_test::SetUp()
v = new dead_code_eliminate_vec4_visitor(compiler, ctx, shader, prog_data); v = new dead_code_eliminate_vec4_visitor(compiler, ctx, shader, prog_data);
devinfo->gen = 4; devinfo->gen = 4;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void dead_code_eliminate_test::TearDown() void dead_code_eliminate_test::TearDown()

View File

@@ -106,7 +106,7 @@ void register_coalesce_test::SetUp()
v = new register_coalesce_vec4_visitor(compiler, ctx, shader, prog_data); v = new register_coalesce_vec4_visitor(compiler, ctx, shader, prog_data);
devinfo->gen = 4; devinfo->gen = 4;
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
} }
void register_coalesce_test::TearDown() void register_coalesce_test::TearDown()

View File

@@ -109,7 +109,7 @@ static const struct gen_device_info gen_device_info_i965 = {
static const struct gen_device_info gen_device_info_g4x = { static const struct gen_device_info gen_device_info_g4x = {
.gen = 4, .gen = 4,
.genx10 = 45, .verx10 = 45,
.has_pln = true, .has_pln = true,
.has_compr4 = true, .has_compr4 = true,
.has_surface_tile_offset = true, .has_surface_tile_offset = true,
@@ -309,7 +309,7 @@ static const struct gen_device_info gen_device_info_byt = {
#define HSW_FEATURES \ #define HSW_FEATURES \
GEN7_FEATURES, \ GEN7_FEATURES, \
.is_haswell = true, \ .is_haswell = true, \
.genx10 = 75, \ .verx10 = 75, \
.supports_simd16_3src = true, \ .supports_simd16_3src = true, \
.has_resource_streamer = true .has_resource_streamer = true
@@ -1279,8 +1279,8 @@ gen_get_device_info_from_pci_id(int pci_id,
assert(devinfo->num_slices <= ARRAY_SIZE(devinfo->num_subslices)); assert(devinfo->num_slices <= ARRAY_SIZE(devinfo->num_subslices));
if (devinfo->genx10 == 0) if (devinfo->verx10 == 0)
devinfo->genx10 = devinfo->gen * 10; devinfo->verx10 = devinfo->gen * 10;
devinfo->chipset_id = pci_id; devinfo->chipset_id = pci_id;
return true; return true;

View File

@@ -48,7 +48,7 @@ struct gen_device_info
{ {
int gen; /**< Generation number: 4, 5, 6, 7, ... */ int gen; /**< Generation number: 4, 5, 6, 7, ... */
/* Driver internal number used to differentiate platforms. */ /* Driver internal number used to differentiate platforms. */
int genx10; int verx10;
int revision; int revision;
int gt; int gt;

View File

@@ -79,7 +79,7 @@ from operator import itemgetter
static inline uint32_t ATTRIBUTE_PURE static inline uint32_t ATTRIBUTE_PURE
${item.token_name}_${prop}(const struct gen_device_info *devinfo) ${item.token_name}_${prop}(const struct gen_device_info *devinfo)
{ {
switch (devinfo->genx10) { switch (devinfo->verx10) {
case 125: return ${item.get_prop(prop, 12.5)}; case 125: return ${item.get_prop(prop, 12.5)};
case 120: return ${item.get_prop(prop, 12)}; case 120: return ${item.get_prop(prop, 12)};
case 110: return ${item.get_prop(prop, 11)}; case 110: return ${item.get_prop(prop, 11)};

View File

@@ -1067,7 +1067,7 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer)
const unsigned aligned_total_push_constants_size = const unsigned aligned_total_push_constants_size =
ALIGN(total_push_constants_size, push_constant_alignment); ALIGN(total_push_constants_size, push_constant_alignment);
struct anv_state state; struct anv_state state;
if (devinfo->genx10 >= 125) { if (devinfo->verx10 >= 125) {
state = anv_state_stream_alloc(&cmd_buffer->general_state_stream, state = anv_state_stream_alloc(&cmd_buffer->general_state_stream,
aligned_total_push_constants_size, aligned_total_push_constants_size,
push_constant_alignment); push_constant_alignment);

View File

@@ -92,7 +92,7 @@ anv_nir_compute_push_layout(const struct anv_physical_device *pdevice,
push_end = MAX2(push_end, push_reg_mask_end); push_end = MAX2(push_end, push_reg_mask_end);
} }
if (nir->info.stage == MESA_SHADER_COMPUTE && devinfo->genx10 < 125) { if (nir->info.stage == MESA_SHADER_COMPUTE && devinfo->verx10 < 125) {
/* For compute shaders, we always have to have the subgroup ID. The /* For compute shaders, we always have to have the subgroup ID. The
* back-end compiler will "helpfully" add it for us in the last push * back-end compiler will "helpfully" add it for us in the last push
* constant slot. Yes, there is an off-by-one error here but that's * constant slot. Yes, there is an off-by-one error here but that's

View File

@@ -4533,7 +4533,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_performance_configuration_intel, base,
#define anv_genX(devinfo, thing) ({ \ #define anv_genX(devinfo, thing) ({ \
__typeof(&gen9_##thing) genX_thing; \ __typeof(&gen9_##thing) genX_thing; \
switch ((devinfo)->genx10) { \ switch ((devinfo)->verx10) { \
case 70: \ case 70: \
genX_thing = &gen7_##thing; \ genX_thing = &gen7_##thing; \
break; \ break; \

View File

@@ -5924,5 +5924,5 @@ genX(init_atoms)(struct brw_context *brw)
brw->vtbl.emit_compute_walker = genX(emit_gpgpu_walker); brw->vtbl.emit_compute_walker = genX(emit_gpgpu_walker);
#endif #endif
assert(brw->screen->devinfo.genx10 == GFX_VERx10); assert(brw->screen->devinfo.verx10 == GFX_VERx10);
} }