mirror of
https://github.com/godotengine/godot-nir-static.git
synced 2025-12-31 13:48:20 +03:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7719abc192 | ||
|
|
e20edfeddb | ||
|
|
2c12ce242a | ||
|
|
6e377555a0 | ||
|
|
c2ae0c3cb6 | ||
|
|
eb3eef2b98 | ||
|
|
c95c0dc8b0 | ||
|
|
f4466616e6 | ||
|
|
226205dac0 | ||
|
|
28a96cc196 |
25
.github/workflows/ci.yaml
vendored
25
.github/workflows/ci.yaml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
# MinGW/LLVM libs using UCRT
|
||||
- name: 🏁 Windows - MinGW/LLVM (UCRT) x86_64
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_64-llvm-release
|
||||
artifact-path: bin/libNIR.windows.x86_64.a
|
||||
flags: use_mingw=yes arch=x86_64 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- name: 🏁 Windows - MinGW/LLVM (UCRT) x86_32
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_32-llvm-release
|
||||
artifact-path: bin/libNIR.windows.x86_32.a
|
||||
flags: use_mingw=yes arch=x86_32 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
- name: 🏁 Windows - MinGW/LLVM (UCRT) arm64
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-arm64-llvm-release
|
||||
artifact-path: bin/libNIR.windows.arm64.a
|
||||
flags: use_mingw=yes arch=arm64 use_llvm=yes mingw_prefix=$HOME/llvm-mingw
|
||||
@@ -39,36 +39,29 @@ jobs:
|
||||
# MSVC libs
|
||||
- name: 🏁 Windows - MSVC x86_64
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_64-msvc-release
|
||||
artifact-path: bin/libNIR.windows.x86_64.lib
|
||||
flags: use_mingw=no arch=x86_64
|
||||
|
||||
- name: 🏁 Windows - MSVC x86_32
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_32-msvc-release
|
||||
artifact-path: bin/libNIR.windows.x86_32.lib
|
||||
flags: use_mingw=no arch=x86_32
|
||||
|
||||
- name: 🏁 Windows - MSVC arm64
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-arm64-msvc-release
|
||||
artifact-path: bin/libNIR.windows.arm64.lib
|
||||
flags: use_mingw=no arch=arm64
|
||||
|
||||
- name: 🏁 Windows - MSVC arm32
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
artifact-name: godot-nir-static-arm32-msvc-release
|
||||
artifact-path: bin/libNIR.windows.arm32.lib
|
||||
flags: use_mingw=no arch=arm32
|
||||
|
||||
# MinGW/GCC libs using MSVCRT
|
||||
- name: 🏁 Windows - MinGW/GCC (MSVCRT) x86_64
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_64-gcc-release
|
||||
artifact-path: bin/libNIR.windows.x86_64.a
|
||||
flags: use_mingw=yes arch=x86_64
|
||||
@@ -78,7 +71,7 @@ jobs:
|
||||
|
||||
- name: 🏁 Windows - MinGW/GCC (MSVCRT) x86_32
|
||||
platform: windows
|
||||
os: windows-2019
|
||||
os: windows-2022
|
||||
artifact-name: godot-nir-static-x86_32-gcc-release
|
||||
artifact-path: bin/libNIR.windows.x86_32.a
|
||||
flags: use_mingw=yes arch=x86_32
|
||||
@@ -101,7 +94,7 @@ jobs:
|
||||
- name: Install SCons (Native env)
|
||||
if: ${{ matrix.mingw != 'yes' }}
|
||||
run: |
|
||||
python -m pip install scons==4.0.0
|
||||
python -m pip install scons==4.9.0
|
||||
|
||||
- name: Install mako
|
||||
run: |
|
||||
|
||||
@@ -292,6 +292,9 @@ extra_defines = [
|
||||
"WINDOWS_NO_FUTEX",
|
||||
]
|
||||
|
||||
if env["optimize"] != "debug":
|
||||
extra_defines += ["NDEBUG"]
|
||||
|
||||
# These defines are inspired by the Meson build scripts in the original repo.
|
||||
extra_defines += [
|
||||
"__STDC_CONSTANT_MACROS",
|
||||
@@ -322,7 +325,6 @@ if env.get("is_msvc", False):
|
||||
else:
|
||||
env.Append(
|
||||
CPPDEFINES=[
|
||||
("__MSVCRT_VERSION__", 0x0700),
|
||||
"HAVE_STRUCT_TIMESPEC",
|
||||
]
|
||||
)
|
||||
@@ -331,6 +333,7 @@ else:
|
||||
|
||||
if env.get("use_llvm", False):
|
||||
extra_defines += [
|
||||
("__MSVCRT_VERSION__", 0x0700),
|
||||
"HAVE_TIMESPEC_GET",
|
||||
"_UCRT",
|
||||
]
|
||||
|
||||
@@ -13,7 +13,7 @@ index 7474afb..119b832 100644
|
||||
load("global", [1], [ACCESS, ALIGN_MUL, ALIGN_OFFSET], [CAN_ELIMINATE])
|
||||
# src[] = { address }.
|
||||
diff --git a/godot-mesa/src/compiler/spirv/spirv_to_nir.c b/godot-mesa/src/compiler/spirv/spirv_to_nir.c
|
||||
index 6f87ff9..da61ec5 100644
|
||||
index 6f87ff9..3684b32 100644
|
||||
--- a/godot-mesa/src/compiler/spirv/spirv_to_nir.c
|
||||
+++ b/godot-mesa/src/compiler/spirv/spirv_to_nir.c
|
||||
@@ -39,6 +39,8 @@
|
||||
@@ -320,7 +320,7 @@ index 6f87ff9..da61ec5 100644
|
||||
case SpvOpConstantNull:
|
||||
val->constant = vtn_null_constant(b, val->type);
|
||||
val->is_null_constant = true;
|
||||
@@ -6393,6 +6183,106 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
|
||||
@@ -6393,6 +6183,93 @@ vtn_handle_body_instruction(struct vtn_builder *b, SpvOp opcode,
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -357,32 +357,19 @@ index 6f87ff9..da61ec5 100644
|
||||
+ vtn_assert(b->nb.cursor.option == nir_cursor_after_instr);
|
||||
+ vtn_assert(b->nb.cursor.instr->type == nir_instr_type_intrinsic);
|
||||
+
|
||||
+ nir_ssa_def *temp = nir_build_alu(
|
||||
+ &b->nb,
|
||||
+ nir_op_iand,
|
||||
+ non_opt_const,
|
||||
+ nir_imm_int(&b->nb, 0xbfffffff),
|
||||
+ NULL,
|
||||
+ NULL);
|
||||
+ val->ssa = vtn_create_ssa_value(b, val->type->type);
|
||||
+ if (val->type->type == glsl_uint_type()) {
|
||||
+ val->ssa->def = temp;
|
||||
+ val->ssa->def = non_opt_const;
|
||||
+ } else if (val->type->type == glsl_bool_type()) {
|
||||
+ val->ssa->def = nir_build_alu(
|
||||
+ &b->nb,
|
||||
+ nir_op_ine,
|
||||
+ temp,
|
||||
+ non_opt_const,
|
||||
+ nir_imm_int(&b->nb, 0),
|
||||
+ NULL,
|
||||
+ NULL);
|
||||
+ } else if (val->type->type == glsl_float_type()) {
|
||||
+ val->ssa->def = nir_build_alu(
|
||||
+ &b->nb,
|
||||
+ nir_op_ishl,
|
||||
+ temp,
|
||||
+ nir_imm_int(&b->nb, 1),
|
||||
+ NULL,
|
||||
+ NULL);
|
||||
+ val->ssa->def = non_opt_const;
|
||||
+ } else {
|
||||
+ vtn_assert(false);
|
||||
+ }
|
||||
@@ -427,7 +414,7 @@ index 6f87ff9..da61ec5 100644
|
||||
static bool
|
||||
is_glslang(const struct vtn_builder *b)
|
||||
{
|
||||
@@ -6632,6 +6522,8 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
||||
@@ -6632,6 +6509,8 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
||||
/* Skip the SPIR-V header, handled at vtn_create_builder */
|
||||
words+= 5;
|
||||
|
||||
@@ -436,7 +423,7 @@ index 6f87ff9..da61ec5 100644
|
||||
/* Handle all the preamble instructions */
|
||||
words = vtn_foreach_instruction(b, words, word_end,
|
||||
vtn_handle_preamble_instruction);
|
||||
@@ -6713,7 +6605,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
||||
@@ -6713,7 +6592,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count,
|
||||
if ((options->create_library || func->referenced) && !func->emitted) {
|
||||
b->const_table = _mesa_pointer_hash_table_create(b);
|
||||
|
||||
@@ -610,7 +597,7 @@ index b3279ee..08ab970 100644
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
diff --git a/godot-mesa/src/microsoft/compiler/dxil_module.c b/godot-mesa/src/microsoft/compiler/dxil_module.c
|
||||
index 6b7f455..af322a7 100644
|
||||
index 773e564..57b6a62 100644
|
||||
--- a/godot-mesa/src/microsoft/compiler/dxil_module.c
|
||||
+++ b/godot-mesa/src/microsoft/compiler/dxil_module.c
|
||||
@@ -32,6 +32,8 @@
|
||||
@@ -747,6 +734,40 @@ index bdfbe23..b95ca1d 100644
|
||||
};
|
||||
|
||||
typedef void (*dxil_msg_callback)(void *priv, const char *msg);
|
||||
diff --git a/godot-mesa/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c b/godot-mesa/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c
|
||||
index 43de965..8965ecc 100644
|
||||
--- a/godot-mesa/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c
|
||||
+++ b/godot-mesa/src/microsoft/spirv_to_dxil/dxil_spirv_nir.c
|
||||
@@ -1068,28 +1068,7 @@ dxil_spirv_nir_passes(nir_shader *nir,
|
||||
NIR_PASS_V(nir, nir_lower_alu_to_scalar, NULL, NULL);
|
||||
NIR_PASS_V(nir, nir_opt_dce);
|
||||
NIR_PASS_V(nir, dxil_nir_lower_double_math);
|
||||
-
|
||||
- {
|
||||
- bool progress;
|
||||
- do
|
||||
- {
|
||||
- progress = false;
|
||||
- NIR_PASS(progress, nir, nir_copy_prop);
|
||||
- NIR_PASS(progress, nir, nir_opt_copy_prop_vars);
|
||||
- NIR_PASS(progress, nir, nir_opt_deref);
|
||||
- NIR_PASS(progress, nir, nir_opt_dce);
|
||||
- NIR_PASS(progress, nir, nir_opt_undef);
|
||||
- NIR_PASS(progress, nir, nir_opt_constant_folding);
|
||||
- NIR_PASS(progress, nir, nir_opt_cse);
|
||||
- if (nir_opt_trivial_continues(nir)) {
|
||||
- progress = true;
|
||||
- NIR_PASS(progress, nir, nir_copy_prop);
|
||||
- NIR_PASS(progress, nir, nir_opt_dce);
|
||||
- }
|
||||
- NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
|
||||
- NIR_PASS(progress, nir, nir_opt_algebraic);
|
||||
- } while (progress);
|
||||
- }
|
||||
+ NIR_PASS_V(nir, nir_lower_vars_to_ssa);
|
||||
|
||||
if (conf->declared_read_only_images_as_srvs)
|
||||
NIR_PASS_V(nir, nir_lower_readonly_images_to_tex, true);
|
||||
diff --git a/godot-mesa/src/microsoft/spirv_to_dxil/spirv_to_dxil.c b/godot-mesa/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
|
||||
index 76cf6b0..819339a 100644
|
||||
--- a/godot-mesa/src/microsoft/spirv_to_dxil/spirv_to_dxil.c
|
||||
|
||||
Reference in New Issue
Block a user