intel: Rename gens keyword to gfx_vers
authorAnuj Phogat <anuj.phogat@gmail.com>
Tue, 6 Apr 2021 21:35:53 +0000 (14:35 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 20 Apr 2021 20:06:34 +0000 (20:06 +0000)
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gens" -rIl src/intel/compiler | xargs sed -ie "s/gens/gfx_vers/g"
Exclude changes to few comments.

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>

src/intel/compiler/brw_eu.cpp
src/intel/compiler/brw_eu.h
src/intel/compiler/test_eu_compact.cpp

index 963d371..d52bbb7 100644 (file)
@@ -589,7 +589,7 @@ brw_disassemble(const struct intel_device_info *devinfo,
 }
 
 static const struct opcode_desc opcode_descs[] = {
-   /* IR,                 HW,  name,      nsrc, ndst, gens */
+   /* IR,                 HW,  name,      nsrc, ndst, gfx_vers */
    { BRW_OPCODE_ILLEGAL,  0,   "illegal", 0,    0,    GFX_ALL },
    { BRW_OPCODE_SYNC,     1,   "sync",    1,    0,    GFX_GE(GFX12) },
    { BRW_OPCODE_MOV,      1,   "mov",     1,    1,    GFX_LT(GFX12) },
@@ -721,7 +721,7 @@ lookup_opcode_desc(gfx_ver *index_gen,
          index_descs[l] = NULL;
 
       for (unsigned i = 0; i < ARRAY_SIZE(opcode_descs); i++) {
-         if (opcode_descs[i].gens & *index_gen) {
+         if (opcode_descs[i].gfx_vers & *index_gen) {
             const unsigned l = opcode_descs[i].*key;
             assert(l < index_size && !index_descs[l]);
             index_descs[l] = &opcode_descs[i];
index 340bceb..138eb2b 100644 (file)
@@ -1452,7 +1452,7 @@ struct opcode_desc {
    const char *name;
    int nsrc;
    int ndst;
-   int gens;
+   int gfx_vers;
 };
 
 const struct opcode_desc *
index 07e8b23..db3daa5 100644 (file)
@@ -271,7 +271,7 @@ gen_f0_1_MOV_GRF_GRF(struct brw_codegen *p)
 
 struct {
    void (*func)(struct brw_codegen *p);
-   int gens;
+   int gfx_vers;
 } tests[] = {
    { gen_MOV_GRF_GRF,          GFX_ALL      },
    { gen_ADD_GRF_GRF_GRF,      GFX_ALL      },
@@ -290,7 +290,7 @@ run_tests(const struct intel_device_info *devinfo)
    bool fail = false;
 
    for (unsigned i = 0; i < ARRAY_SIZE(tests); i++) {
-      if ((tests[i].gens & gfx_ver_from_devinfo(devinfo)) == 0)
+      if ((tests[i].gfx_vers & gfx_ver_from_devinfo(devinfo)) == 0)
          continue;
 
       for (int align_16 = 0; align_16 <= 1; align_16++) {