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:
@@ -254,7 +254,7 @@ iris_destroy_context(struct pipe_context *ctx)
|
||||
}
|
||||
|
||||
#define genX_call(devinfo, func, ...) \
|
||||
switch ((devinfo)->genx10) { \
|
||||
switch ((devinfo)->verx10) { \
|
||||
case 125: \
|
||||
gen125_##func(__VA_ARGS__); \
|
||||
break; \
|
||||
|
@@ -59,7 +59,7 @@
|
||||
#include "iris_monitor.h"
|
||||
|
||||
#define genX_call(devinfo, func, ...) \
|
||||
switch ((devinfo)->genx10) { \
|
||||
switch ((devinfo)->verx10) { \
|
||||
case 125: \
|
||||
gen125_##func(__VA_ARGS__); \
|
||||
break; \
|
||||
|
@@ -7988,7 +7988,7 @@ iris_set_frontend_noop(struct pipe_context *ctx, bool enable)
|
||||
void
|
||||
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.init_render_context = iris_init_render_context;
|
||||
screen->vtbl.init_compute_context = iris_init_compute_context;
|
||||
|
@@ -1623,7 +1623,7 @@ fs_visitor::assign_curb_setup()
|
||||
|
||||
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(
|
||||
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)
|
||||
return -1;
|
||||
|
||||
if (devinfo->genx10 >= 125)
|
||||
if (devinfo->verx10 >= 125)
|
||||
return -1;
|
||||
|
||||
/* The local thread id is always the last parameter in the list */
|
||||
|
@@ -108,7 +108,7 @@ fs_visitor::nir_setup_uniforms()
|
||||
uniforms = nir->num_uniforms / 4;
|
||||
|
||||
if ((stage == MESA_SHADER_COMPUTE || stage == MESA_SHADER_KERNEL) &&
|
||||
devinfo->genx10 < 125) {
|
||||
devinfo->verx10 < 125) {
|
||||
/* Add uniforms for builtins after regular NIR uniforms. */
|
||||
assert(uniforms == prog_data->nr_params);
|
||||
|
||||
@@ -3675,7 +3675,7 @@ fs_visitor::nir_emit_cs_intrinsic(const fs_builder &bld,
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_subgroup_id:
|
||||
if (devinfo->genx10 >= 125)
|
||||
if (devinfo->verx10 >= 125)
|
||||
bld.AND(retype(dest, BRW_REGISTER_TYPE_UD),
|
||||
retype(brw_vec1_grf(0, 2), BRW_REGISTER_TYPE_UD),
|
||||
brw_imm_ud(INTEL_MASK(7, 0)));
|
||||
|
@@ -47,7 +47,7 @@ enum gen {
|
||||
static enum gen
|
||||
gen_from_devinfo(const struct gen_device_info *devinfo)
|
||||
{
|
||||
switch (devinfo->genx10) {
|
||||
switch (devinfo->verx10) {
|
||||
case 40: return GEN4;
|
||||
case 45: return GEN45;
|
||||
case 50: return GEN5;
|
||||
|
@@ -337,7 +337,7 @@ main(UNUSED int argc, UNUSED char **argv)
|
||||
if (devinfo->gen == 10)
|
||||
continue;
|
||||
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
fail |= run_tests(devinfo);
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,7 @@ void cmod_propagation_test::SetUp()
|
||||
v = new cmod_propagation_fs_visitor(compiler, ctx, prog_data, shader);
|
||||
|
||||
devinfo->gen = 7;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void cmod_propagation_test::TearDown()
|
||||
|
@@ -67,7 +67,7 @@ void copy_propagation_test::SetUp()
|
||||
v = new copy_propagation_fs_visitor(compiler, ctx, prog_data, shader);
|
||||
|
||||
devinfo->gen = 4;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void copy_propagation_test::TearDown()
|
||||
|
@@ -67,7 +67,7 @@ void saturate_propagation_test::SetUp()
|
||||
v = new saturate_propagation_fs_visitor(compiler, ctx, prog_data, shader);
|
||||
|
||||
devinfo->gen = 6;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void saturate_propagation_test::TearDown()
|
||||
|
@@ -55,7 +55,7 @@ void scoreboard_test::SetUp()
|
||||
v = new fs_visitor(compiler, NULL, ctx, NULL, &prog_data->base, shader, 8, -1, false);
|
||||
|
||||
devinfo->gen = 12;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void scoreboard_test::TearDown()
|
||||
|
@@ -110,7 +110,7 @@ void cmod_propagation_test::SetUp()
|
||||
v = new cmod_propagation_vec4_visitor(compiler, ctx, shader, prog_data);
|
||||
|
||||
devinfo->gen = 4;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void cmod_propagation_test::TearDown()
|
||||
|
@@ -102,7 +102,7 @@ void copy_propagation_test::SetUp()
|
||||
v = new copy_propagation_vec4_visitor(compiler, ctx, shader, prog_data);
|
||||
|
||||
devinfo->gen = 4;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void copy_propagation_test::TearDown()
|
||||
|
@@ -100,7 +100,7 @@ void dead_code_eliminate_test::SetUp()
|
||||
v = new dead_code_eliminate_vec4_visitor(compiler, ctx, shader, prog_data);
|
||||
|
||||
devinfo->gen = 4;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void dead_code_eliminate_test::TearDown()
|
||||
|
@@ -106,7 +106,7 @@ void register_coalesce_test::SetUp()
|
||||
v = new register_coalesce_vec4_visitor(compiler, ctx, shader, prog_data);
|
||||
|
||||
devinfo->gen = 4;
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
}
|
||||
|
||||
void register_coalesce_test::TearDown()
|
||||
|
@@ -109,7 +109,7 @@ static const struct gen_device_info gen_device_info_i965 = {
|
||||
|
||||
static const struct gen_device_info gen_device_info_g4x = {
|
||||
.gen = 4,
|
||||
.genx10 = 45,
|
||||
.verx10 = 45,
|
||||
.has_pln = true,
|
||||
.has_compr4 = true,
|
||||
.has_surface_tile_offset = true,
|
||||
@@ -309,7 +309,7 @@ static const struct gen_device_info gen_device_info_byt = {
|
||||
#define HSW_FEATURES \
|
||||
GEN7_FEATURES, \
|
||||
.is_haswell = true, \
|
||||
.genx10 = 75, \
|
||||
.verx10 = 75, \
|
||||
.supports_simd16_3src = 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));
|
||||
|
||||
if (devinfo->genx10 == 0)
|
||||
devinfo->genx10 = devinfo->gen * 10;
|
||||
if (devinfo->verx10 == 0)
|
||||
devinfo->verx10 = devinfo->gen * 10;
|
||||
|
||||
devinfo->chipset_id = pci_id;
|
||||
return true;
|
||||
|
@@ -48,7 +48,7 @@ struct gen_device_info
|
||||
{
|
||||
int gen; /**< Generation number: 4, 5, 6, 7, ... */
|
||||
/* Driver internal number used to differentiate platforms. */
|
||||
int genx10;
|
||||
int verx10;
|
||||
int revision;
|
||||
int gt;
|
||||
|
||||
|
@@ -79,7 +79,7 @@ from operator import itemgetter
|
||||
static inline uint32_t ATTRIBUTE_PURE
|
||||
${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 120: return ${item.get_prop(prop, 12)};
|
||||
case 110: return ${item.get_prop(prop, 11)};
|
||||
|
@@ -1067,7 +1067,7 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer)
|
||||
const unsigned aligned_total_push_constants_size =
|
||||
ALIGN(total_push_constants_size, push_constant_alignment);
|
||||
struct anv_state state;
|
||||
if (devinfo->genx10 >= 125) {
|
||||
if (devinfo->verx10 >= 125) {
|
||||
state = anv_state_stream_alloc(&cmd_buffer->general_state_stream,
|
||||
aligned_total_push_constants_size,
|
||||
push_constant_alignment);
|
||||
|
@@ -92,7 +92,7 @@ anv_nir_compute_push_layout(const struct anv_physical_device *pdevice,
|
||||
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
|
||||
* 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
|
||||
|
@@ -4533,7 +4533,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_performance_configuration_intel, base,
|
||||
|
||||
#define anv_genX(devinfo, thing) ({ \
|
||||
__typeof(&gen9_##thing) genX_thing; \
|
||||
switch ((devinfo)->genx10) { \
|
||||
switch ((devinfo)->verx10) { \
|
||||
case 70: \
|
||||
genX_thing = &gen7_##thing; \
|
||||
break; \
|
||||
|
@@ -5924,5 +5924,5 @@ genX(init_atoms)(struct brw_context *brw)
|
||||
brw->vtbl.emit_compute_walker = genX(emit_gpgpu_walker);
|
||||
#endif
|
||||
|
||||
assert(brw->screen->devinfo.genx10 == GFX_VERx10);
|
||||
assert(brw->screen->devinfo.verx10 == GFX_VERx10);
|
||||
}
|
||||
|
Reference in New Issue
Block a user