Skip to content

Commit

Permalink
mesa: update mesa to df62471
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Dec 10, 2023
1 parent 130e384 commit 265f1d2
Show file tree
Hide file tree
Showing 12 changed files with 47,928 additions and 46,851 deletions.
26 changes: 0 additions & 26 deletions clone_mesa.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,3 @@ git -C spirv-to-dxil-sys/native/mesa config core.symlinks false
copy spirv-to-dxil-sys/native/mesa-sparse-checkout .git/modules/spirv-to-dxil-sys/native/mesa/info/sparse-checkout
git submodule foreach git sparse-checkout reapply

mkdir spirv-to-dxil-sys/native/mesa_mako 2> NUL

python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.h
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_c.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_cpp_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types_cpp.h

python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv_info_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json spirv-to-dxil-sys/native/mesa_mako/spirv_info.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_gather_types_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json vtn_gather_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_generator_ids_h.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spir-v.xml vtn_generator_ids.h

python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_builder_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_builder_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_constant_expressions.py > spirv-to-dxil-sys/native/mesa_mako/nir_constant_expressions.c

python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_c.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opt_algebraic.py > spirv-to-dxil-sys/native/mesa_mako/nir_opt_algebraic.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_h.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_c.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_indices_h.py --outdir spirv-to-dxil-sys/native/mesa_mako

python spirv-to-dxil-sys/native/mesa/src/util/format_srgb.py > spirv-to-dxil-sys/native/mesa_mako/format_srgb.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv > spirv-to-dxil-sys/native/mesa_mako/u_format_table.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv --header > spirv-to-dxil-sys/native/mesa_mako/u_format_pack.h


python spirv-to-dxil-sys/native/mesa/src/microsoft/compiler/dxil_nir_algebraic.py -p spirv-to-dxil-sys/native/mesa/src/compiler/nir/ > spirv-to-dxil-sys/native/mesa_mako/dxil_nir_algebraic.c
27 changes: 0 additions & 27 deletions clone_mesa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,3 @@ git -C spirv-to-dxil-sys/native/mesa config core.sparseCheckout true
git -C spirv-to-dxil-sys/native/mesa config core.symlinks false
cp spirv-to-dxil-sys/native/mesa-sparse-checkout .git/modules/spirv-to-dxil-sys/native/mesa/info/sparse-checkout
git submodule foreach git sparse-checkout reapply

mkdir -p spirv-to-dxil-sys/native/mesa_mako

python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.h
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_c.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_cpp_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types_cpp.h

python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv_info_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json spirv-to-dxil-sys/native/mesa_mako/spirv_info.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_gather_types_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json spirv-to-dxil-sys/native/mesa_mako/vtn_gather_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_generator_ids_h.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spir-v.xml spirv-to-dxil-sys/native/mesa_mako/vtn_generator_ids.h


python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_builder_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_builder_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_constant_expressions.py > spirv-to-dxil-sys/native/mesa_mako/nir_constant_expressions.c

python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_c.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opt_algebraic.py > spirv-to-dxil-sys/native/mesa_mako/nir_opt_algebraic.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_h.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_c.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_indices_h.py --outdir spirv-to-dxil-sys/native/mesa_mako

python spirv-to-dxil-sys/native/mesa/src/util/format_srgb.py > spirv-to-dxil-sys/native/mesa_mako/format_srgb.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv > spirv-to-dxil-sys/native/mesa_mako/u_format_table.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv --header > spirv-to-dxil-sys/native/mesa_mako/u_format_pack.h

python spirv-to-dxil-sys/native/mesa/src/microsoft/compiler/dxil_nir_algebraic.py -p spirv-to-dxil-sys/native/mesa/src/compiler/nir/ > spirv-to-dxil-sys/native/mesa_mako/dxil_nir_algebraic.c
27 changes: 27 additions & 0 deletions mesa_mako
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

mkdir -p spirv-to-dxil-sys/native/mesa_mako

python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.h
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_c.py spirv-to-dxil-sys/native/mesa_mako/builtin_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/builtin_types_cpp_h.py spirv-to-dxil-sys/native/mesa_mako/builtin_types_cpp.h

python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv_info_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json spirv-to-dxil-sys/native/mesa_mako/spirv_info.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_gather_types_c.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spirv.core.grammar.json spirv-to-dxil-sys/native/mesa_mako/vtn_gather_types.c
python spirv-to-dxil-sys/native/mesa/src/compiler/spirv/vtn_generator_ids_h.py spirv-to-dxil-sys/native/mesa/src/compiler/spirv/spir-v.xml spirv-to-dxil-sys/native/mesa_mako/vtn_generator_ids.h


python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_builder_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_builder_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_constant_expressions.py > spirv-to-dxil-sys/native/mesa_mako/nir_constant_expressions.c

python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_h.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.h
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opcodes_c.py > spirv-to-dxil-sys/native/mesa_mako/nir_opcodes.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_opt_algebraic.py > spirv-to-dxil-sys/native/mesa_mako/nir_opt_algebraic.c
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_h.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_c.py --outdir spirv-to-dxil-sys/native/mesa_mako
python spirv-to-dxil-sys/native/mesa/src/compiler/nir/nir_intrinsics_indices_h.py --outdir spirv-to-dxil-sys/native/mesa_mako

python spirv-to-dxil-sys/native/mesa/src/util/format_srgb.py > spirv-to-dxil-sys/native/mesa_mako/format_srgb.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv > spirv-to-dxil-sys/native/mesa_mako/u_format_table.c
python spirv-to-dxil-sys/native/mesa/src/util/format/u_format_table.py spirv-to-dxil-sys/native/mesa/src/util/format/u_format.csv --header > spirv-to-dxil-sys/native/mesa_mako/u_format_pack.h

python spirv-to-dxil-sys/native/mesa/src/microsoft/compiler/dxil_nir_algebraic.py -p spirv-to-dxil-sys/native/mesa/src/compiler/nir/ > spirv-to-dxil-sys/native/mesa_mako/dxil_nir_algebraic.c
133 changes: 2 additions & 131 deletions spirv-to-dxil-sys/native/mesa_mako/dxil_nir_algebraic.c
Original file line number Diff line number Diff line change
Expand Up @@ -6221,12 +6221,10 @@ dxil_nir_lower_16bit_conv(nir_shader *shader)
#include "nir_search.h"
#include "nir_search_helpers.h"

/* What follows is NIR algebraic transform code for the following 4
/* What follows is NIR algebraic transform code for the following 2
* transforms:
* ('b2b32', 'a') => ('b2i32', 'a')
* ('b2b1', 'a') => ('ine', ('b2i32', 'a'), 0)
* ('sdot_4x8_iadd_sat', 'a', 'b', 'c') => ('iadd_sat', ('sdot_4x8_iadd', 'a', 'b', 0), 'c')
* ('udot_4x8_uadd_sat', 'a', 'b', 'c') => ('uadd_sat', ('udot_4x8_uadd', 'a', 'b', 0), 'c')
*/


Expand Down Expand Up @@ -6293,107 +6291,6 @@ static const nir_search_value_union dxil_nir_algebraic_values[] = {
-1,
} },

/* ('sdot_4x8_iadd_sat', 'a', 'b', 'c') => ('iadd_sat', ('sdot_4x8_iadd', 'a', 'b', 0), 'c') */
{ .variable = {
{ nir_search_value_variable, 32 },
0, /* a */
false,
nir_type_invalid,
-1,
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
} },
{ .variable = {
{ nir_search_value_variable, 32 },
1, /* b */
false,
nir_type_invalid,
-1,
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
} },
{ .variable = {
{ nir_search_value_variable, 32 },
2, /* c */
false,
nir_type_invalid,
-1,
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
} },
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_sdot_4x8_iadd_sat,
0, 1,
{ 6, 7, 8 },
-1,
} },

/* replace180_0_0 -> 6 in the cache */
/* replace180_0_1 -> 7 in the cache */
/* replace180_0_2 -> 4 in the cache */
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_sdot_4x8_iadd,
1, 1,
{ 6, 7, 4 },
-1,
} },
/* replace180_1 -> 8 in the cache */
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_iadd_sat,
0, 2,
{ 10, 8 },
-1,
} },

/* ('udot_4x8_uadd_sat', 'a', 'b', 'c') => ('uadd_sat', ('udot_4x8_uadd', 'a', 'b', 0), 'c') */
/* search181_0 -> 6 in the cache */
/* search181_1 -> 7 in the cache */
/* search181_2 -> 8 in the cache */
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_udot_4x8_uadd_sat,
0, 1,
{ 6, 7, 8 },
-1,
} },

/* replace181_0_0 -> 6 in the cache */
/* replace181_0_1 -> 7 in the cache */
/* replace181_0_2 -> 4 in the cache */
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_udot_4x8_uadd,
1, 1,
{ 6, 7, 4 },
-1,
} },
/* replace181_1 -> 8 in the cache */
{ .expression = {
{ nir_search_value_expression, 32 },
false,
false,
false,
nir_op_uadd_sat,
0, 2,
{ 13, 8 },
-1,
} },

};


Expand All @@ -6407,12 +6304,6 @@ static const struct transform dxil_nir_algebraic_transforms[] = {
{ 3, 5, 0 },
{ ~0, ~0, ~0 }, /* Sentinel */

{ 9, 11, 0 },
{ ~0, ~0, ~0 }, /* Sentinel */

{ 12, 14, 0 },
{ ~0, ~0, ~0 }, /* Sentinel */

};

static const struct per_op_table dxil_nir_algebraic_pass_op_table[nir_num_search_ops] = {
Expand All @@ -6434,24 +6325,6 @@ static const struct per_op_table dxil_nir_algebraic_pass_op_table[nir_num_search
3,
},
},
[nir_op_sdot_4x8_iadd_sat] = {
.filter = NULL,

.num_filtered_states = 1,
.table = (const uint16_t []) {

4,
},
},
[nir_op_udot_4x8_uadd_sat] = {
.filter = NULL,

.num_filtered_states = 1,
.table = (const uint16_t []) {

5,
},
},
};

/* Mapping from state index to offset in transforms (0 being no transforms) */
Expand All @@ -6460,8 +6333,6 @@ static const uint16_t dxil_nir_algebraic_transform_offsets[] = {
0,
1,
3,
5,
7,
};

static const nir_algebraic_table dxil_nir_algebraic_table = {
Expand All @@ -6483,7 +6354,7 @@ dxil_nir_algebraic(nir_shader *shader)
(void) options;
(void) info;

STATIC_ASSERT(15 == ARRAY_SIZE(dxil_nir_algebraic_values));
STATIC_ASSERT(6 == ARRAY_SIZE(dxil_nir_algebraic_values));
condition_flags[0] = true;

nir_foreach_function_impl(impl, shader) {
Expand Down
Loading

0 comments on commit 265f1d2

Please sign in to comment.