intel: Rename gen_device prefix to intel_device
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965" grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/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/10241>
This commit is contained in:
@@ -90,7 +90,7 @@ contains(const struct string haystack, const struct string needle)
|
||||
#define WIDTH(width) (1 << (width))
|
||||
|
||||
static bool
|
||||
inst_is_send(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
inst_is_send(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
switch (brw_inst_opcode(devinfo, inst)) {
|
||||
case BRW_OPCODE_SEND:
|
||||
@@ -104,7 +104,7 @@ inst_is_send(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
}
|
||||
|
||||
static bool
|
||||
inst_is_split_send(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
inst_is_split_send(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
if (devinfo->ver >= 12) {
|
||||
return inst_is_send(devinfo, inst);
|
||||
@@ -132,14 +132,14 @@ signed_type(unsigned type)
|
||||
}
|
||||
|
||||
static enum brw_reg_type
|
||||
inst_dst_type(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
inst_dst_type(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
return (devinfo->ver < 12 || !inst_is_send(devinfo, inst)) ?
|
||||
brw_inst_dst_type(devinfo, inst) : BRW_REGISTER_TYPE_D;
|
||||
}
|
||||
|
||||
static bool
|
||||
inst_is_raw_move(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
inst_is_raw_move(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
unsigned dst_type = signed_type(inst_dst_type(devinfo, inst));
|
||||
unsigned src_type = signed_type(brw_inst_src0_type(devinfo, inst));
|
||||
@@ -162,14 +162,14 @@ inst_is_raw_move(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
}
|
||||
|
||||
static bool
|
||||
dst_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
dst_is_null(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
return brw_inst_dst_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
|
||||
brw_inst_dst_da_reg_nr(devinfo, inst) == BRW_ARF_NULL;
|
||||
}
|
||||
|
||||
static bool
|
||||
src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src0_is_null(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
return brw_inst_src0_address_mode(devinfo, inst) == BRW_ADDRESS_DIRECT &&
|
||||
brw_inst_src0_reg_file(devinfo, inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
|
||||
@@ -177,28 +177,28 @@ src0_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
}
|
||||
|
||||
static bool
|
||||
src1_is_null(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src1_is_null(const struct intel_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_acc(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src0_is_acc(const struct intel_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) & 0xF0) == BRW_ARF_ACCUMULATOR;
|
||||
}
|
||||
|
||||
static bool
|
||||
src1_is_acc(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src1_is_acc(const struct intel_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) & 0xF0) == BRW_ARF_ACCUMULATOR;
|
||||
}
|
||||
|
||||
static bool
|
||||
src0_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src0_has_scalar_region(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
return brw_inst_src0_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 &&
|
||||
brw_inst_src0_width(devinfo, inst) == BRW_WIDTH_1 &&
|
||||
@@ -206,7 +206,7 @@ src0_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *in
|
||||
}
|
||||
|
||||
static bool
|
||||
src1_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
src1_has_scalar_region(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
return brw_inst_src1_vstride(devinfo, inst) == BRW_VERTICAL_STRIDE_0 &&
|
||||
brw_inst_src1_width(devinfo, inst) == BRW_WIDTH_1 &&
|
||||
@@ -214,7 +214,7 @@ src1_has_scalar_region(const struct gen_device_info *devinfo, const brw_inst *in
|
||||
}
|
||||
|
||||
static unsigned
|
||||
num_sources_from_inst(const struct gen_device_info *devinfo,
|
||||
num_sources_from_inst(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
const struct opcode_desc *desc =
|
||||
@@ -269,7 +269,7 @@ num_sources_from_inst(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static struct string
|
||||
invalid_values(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
invalid_values(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
unsigned num_sources = num_sources_from_inst(devinfo, inst);
|
||||
struct string error_msg = { .str = NULL, .len = 0 };
|
||||
@@ -339,7 +339,7 @@ invalid_values(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
}
|
||||
|
||||
static struct string
|
||||
sources_not_null(const struct gen_device_info *devinfo,
|
||||
sources_not_null(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
unsigned num_sources = num_sources_from_inst(devinfo, inst);
|
||||
@@ -367,7 +367,7 @@ sources_not_null(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static struct string
|
||||
alignment_supported(const struct gen_device_info *devinfo,
|
||||
alignment_supported(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
struct string error_msg = { .str = NULL, .len = 0 };
|
||||
@@ -379,7 +379,7 @@ alignment_supported(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static bool
|
||||
inst_uses_src_acc(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
inst_uses_src_acc(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
/* Check instructions that use implicit accumulator sources */
|
||||
switch (brw_inst_opcode(devinfo, inst)) {
|
||||
@@ -399,7 +399,7 @@ inst_uses_src_acc(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
}
|
||||
|
||||
static struct string
|
||||
send_restrictions(const struct gen_device_info *devinfo,
|
||||
send_restrictions(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
struct string error_msg = { .str = NULL, .len = 0 };
|
||||
@@ -466,7 +466,7 @@ send_restrictions(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static bool
|
||||
is_unsupported_inst(const struct gen_device_info *devinfo,
|
||||
is_unsupported_inst(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
return brw_inst_opcode(devinfo, inst) == BRW_OPCODE_ILLEGAL;
|
||||
@@ -519,7 +519,7 @@ execution_type_for_type(enum brw_reg_type type)
|
||||
* Returns the execution type of an instruction \p inst
|
||||
*/
|
||||
static enum brw_reg_type
|
||||
execution_type(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
execution_type(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
unsigned num_sources = num_sources_from_inst(devinfo, inst);
|
||||
enum brw_reg_type src0_exec_type, src1_exec_type;
|
||||
@@ -602,7 +602,7 @@ is_packed(unsigned vstride, unsigned width, unsigned hstride)
|
||||
* to/from half-float.
|
||||
*/
|
||||
static bool
|
||||
is_half_float_conversion(const struct gen_device_info *devinfo,
|
||||
is_half_float_conversion(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
|
||||
@@ -627,7 +627,7 @@ is_half_float_conversion(const struct gen_device_info *devinfo,
|
||||
* Returns whether an instruction is using mixed float operation mode
|
||||
*/
|
||||
static bool
|
||||
is_mixed_float(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
is_mixed_float(const struct intel_device_info *devinfo, const brw_inst *inst)
|
||||
{
|
||||
if (devinfo->ver < 8)
|
||||
return false;
|
||||
@@ -662,7 +662,7 @@ is_mixed_float(const struct gen_device_info *devinfo, const brw_inst *inst)
|
||||
* to/from byte.
|
||||
*/
|
||||
static bool
|
||||
is_byte_conversion(const struct gen_device_info *devinfo,
|
||||
is_byte_conversion(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
enum brw_reg_type dst_type = brw_inst_dst_type(devinfo, inst);
|
||||
@@ -687,7 +687,7 @@ is_byte_conversion(const struct gen_device_info *devinfo,
|
||||
* in the "Register Region Restrictions" section.
|
||||
*/
|
||||
static struct string
|
||||
general_restrictions_based_on_operand_types(const struct gen_device_info *devinfo,
|
||||
general_restrictions_based_on_operand_types(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
const struct opcode_desc *desc =
|
||||
@@ -919,7 +919,7 @@ general_restrictions_based_on_operand_types(const struct gen_device_info *devinf
|
||||
* in the "Register Region Restrictions" section.
|
||||
*/
|
||||
static struct string
|
||||
general_restrictions_on_region_parameters(const struct gen_device_info *devinfo,
|
||||
general_restrictions_on_region_parameters(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
const struct opcode_desc *desc =
|
||||
@@ -1078,7 +1078,7 @@ general_restrictions_on_region_parameters(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static struct string
|
||||
special_restrictions_for_mixed_float_mode(const struct gen_device_info *devinfo,
|
||||
special_restrictions_for_mixed_float_mode(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
struct string error_msg = { .str = NULL, .len = 0 };
|
||||
@@ -1359,7 +1359,7 @@ registers_read(const uint64_t access_mask[static 32])
|
||||
* Region Restrictions" section.
|
||||
*/
|
||||
static struct string
|
||||
region_alignment_rules(const struct gen_device_info *devinfo,
|
||||
region_alignment_rules(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
const struct opcode_desc *desc =
|
||||
@@ -1673,7 +1673,7 @@ region_alignment_rules(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
static struct string
|
||||
vector_immediate_restrictions(const struct gen_device_info *devinfo,
|
||||
vector_immediate_restrictions(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
unsigned num_sources = num_sources_from_inst(devinfo, inst);
|
||||
@@ -1735,7 +1735,7 @@ vector_immediate_restrictions(const struct gen_device_info *devinfo,
|
||||
|
||||
static struct string
|
||||
special_requirements_for_handling_double_precision_data_types(
|
||||
const struct gen_device_info *devinfo,
|
||||
const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
unsigned num_sources = num_sources_from_inst(devinfo, inst);
|
||||
@@ -1817,7 +1817,7 @@ special_requirements_for_handling_double_precision_data_types(
|
||||
*/
|
||||
if (is_double_precision &&
|
||||
brw_inst_access_mode(devinfo, inst) == BRW_ALIGN_1 &&
|
||||
(devinfo->is_cherryview || gen_device_info_is_9lp(devinfo))) {
|
||||
(devinfo->is_cherryview || intel_device_info_is_9lp(devinfo))) {
|
||||
ERROR_IF(!is_scalar_region &&
|
||||
(src_stride % 8 != 0 ||
|
||||
dst_stride % 8 != 0 ||
|
||||
@@ -1842,7 +1842,7 @@ special_requirements_for_handling_double_precision_data_types(
|
||||
* We assume that the restriction applies to GLK as well.
|
||||
*/
|
||||
if (is_double_precision &&
|
||||
(devinfo->is_cherryview || gen_device_info_is_9lp(devinfo))) {
|
||||
(devinfo->is_cherryview || intel_device_info_is_9lp(devinfo))) {
|
||||
ERROR_IF(BRW_ADDRESS_REGISTER_INDIRECT_REGISTER == address_mode ||
|
||||
BRW_ADDRESS_REGISTER_INDIRECT_REGISTER == dst_address_mode,
|
||||
"Indirect addressing is not allowed when the execution type "
|
||||
@@ -1859,7 +1859,7 @@ special_requirements_for_handling_double_precision_data_types(
|
||||
* We assume that the restriction does not apply to the null register.
|
||||
*/
|
||||
if (is_double_precision &&
|
||||
(devinfo->is_cherryview || gen_device_info_is_9lp(devinfo))) {
|
||||
(devinfo->is_cherryview || intel_device_info_is_9lp(devinfo))) {
|
||||
ERROR_IF(brw_inst_opcode(devinfo, inst) == BRW_OPCODE_MAC ||
|
||||
brw_inst_acc_wr_control(devinfo, inst) ||
|
||||
(BRW_ARCHITECTURE_REGISTER_FILE == file &&
|
||||
@@ -1946,7 +1946,7 @@ special_requirements_for_handling_double_precision_data_types(
|
||||
* We assume that the restriction applies to GLK as well.
|
||||
*/
|
||||
if (is_double_precision &&
|
||||
(devinfo->is_cherryview || gen_device_info_is_9lp(devinfo))) {
|
||||
(devinfo->is_cherryview || intel_device_info_is_9lp(devinfo))) {
|
||||
ERROR_IF(brw_inst_no_dd_check(devinfo, inst) ||
|
||||
brw_inst_no_dd_clear(devinfo, inst),
|
||||
"DepCtrl is not allowed when the execution type is 64-bit");
|
||||
@@ -1956,7 +1956,7 @@ special_requirements_for_handling_double_precision_data_types(
|
||||
}
|
||||
|
||||
static struct string
|
||||
instruction_restrictions(const struct gen_device_info *devinfo,
|
||||
instruction_restrictions(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst)
|
||||
{
|
||||
struct string error_msg = { .str = NULL, .len = 0 };
|
||||
@@ -2026,7 +2026,7 @@ instruction_restrictions(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
bool
|
||||
brw_validate_instruction(const struct gen_device_info *devinfo,
|
||||
brw_validate_instruction(const struct intel_device_info *devinfo,
|
||||
const brw_inst *inst, int offset,
|
||||
struct disasm_info *disasm)
|
||||
{
|
||||
@@ -2060,7 +2060,7 @@ brw_validate_instruction(const struct gen_device_info *devinfo,
|
||||
}
|
||||
|
||||
bool
|
||||
brw_validate_instructions(const struct gen_device_info *devinfo,
|
||||
brw_validate_instructions(const struct intel_device_info *devinfo,
|
||||
const void *assembly, int start_offset, int end_offset,
|
||||
struct disasm_info *disasm)
|
||||
{
|
||||
|
Reference in New Issue
Block a user