mirror of
https://github.com/godotengine/godot-nir-static.git
synced 2026-01-02 21:48:24 +03:00
Compare commits
10 Commits
23.1.0-dev
...
23.1.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eaadef72f | ||
|
|
d6fe1ff902 | ||
|
|
0985547d67 | ||
|
|
9557f078cd | ||
|
|
f2e0daf5eb | ||
|
|
938501d717 | ||
|
|
5435ae8bae | ||
|
|
149bcf6cff | ||
|
|
aa5c9775c7 | ||
|
|
d1ca231620 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.sconsign.dblite
|
||||
bin/
|
||||
godot-mesa/
|
||||
*.pyc
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "mesa"]
|
||||
path = mesa
|
||||
url = https://github.com/Mesa3D/mesa
|
||||
url = https://gitlab.freedesktop.org/mesa/mesa
|
||||
|
||||
25
SConstruct
25
SConstruct
@@ -113,6 +113,13 @@ opts.Add(
|
||||
)
|
||||
)
|
||||
|
||||
opts.Add("cppdefines", "Custom defines for the pre-processor")
|
||||
opts.Add("ccflags", "Custom flags for both the C and C++ compilers")
|
||||
opts.Add("cxxflags", "Custom flags for the C++ compiler")
|
||||
opts.Add("cflags", "Custom flags for the C compiler")
|
||||
opts.Add("linkflags", "Custom flags for the linker")
|
||||
opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files.", "")
|
||||
|
||||
# Targets flags tool (optimizations, debug symbols)
|
||||
target_tool = Tool("targets", toolpath=["godot-tools"])
|
||||
target_tool.options(opts)
|
||||
@@ -157,6 +164,12 @@ if unknown:
|
||||
|
||||
print("Building for architecture " + env["arch"] + " on platform " + env["platform"])
|
||||
|
||||
env.Append(CPPDEFINES=env.get("cppdefines", "").split())
|
||||
env.Append(CCFLAGS=env.get("ccflags", "").split())
|
||||
env.Append(CXXFLAGS=env.get("cxxflags", "").split())
|
||||
env.Append(CFLAGS=env.get("cflags", "").split())
|
||||
env.Append(LINKFLAGS=env.get("linkflags", "").split())
|
||||
|
||||
# Require C++17
|
||||
if env.get("is_msvc", False):
|
||||
env.Append(CXXFLAGS=["/std:c++17"])
|
||||
@@ -279,7 +292,7 @@ extra_defines += [
|
||||
"__STDC_CONSTANT_MACROS",
|
||||
"__STDC_FORMAT_MACROS",
|
||||
"__STDC_LIMIT_MACROS",
|
||||
("PACKAGE_VERSION", '\\"' + Path(mesa_absdir + "/VERSION").read_text().strip() + '\\"'),
|
||||
("PACKAGE_VERSION", '\\"' + Path(mesa_absdir + "/VERSION.info").read_text().strip() + '\\"'),
|
||||
("PACKAGE_BUGREPORT", '\\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\\"'),
|
||||
"PIPE_SUBSYSTEM_WINDOWS_USER",
|
||||
"_USE_MATH_DEFINES",
|
||||
@@ -297,6 +310,7 @@ if env.get("is_msvc", False):
|
||||
("_HAS_EXCEPTIONS", 0),
|
||||
"NOMINMAX",
|
||||
"HAVE_STRUCT_TIMESPEC",
|
||||
"HAVE_TIMESPEC_GET",
|
||||
("_Static_assert", "static_assert"),
|
||||
]
|
||||
env.Append(CFLAGS=["/std:c11"])
|
||||
@@ -308,12 +322,21 @@ else:
|
||||
]
|
||||
)
|
||||
env.Append(CFLAGS=["-std=c11"])
|
||||
env.Append(CXXFLAGS=["-fno-exceptions"])
|
||||
|
||||
if env.get("use_llvm", False):
|
||||
extra_defines += [
|
||||
"HAVE_TIMESPEC_GET",
|
||||
"_UCRT",
|
||||
]
|
||||
|
||||
env.Append(CPPDEFINES=extra_defines)
|
||||
env.Append(CPPPATH=".")
|
||||
env.Append(CPPPATH="#vulkan/include")
|
||||
|
||||
suffix = ".{}.{}".format(env["platform"], env["arch"])
|
||||
if env.get("extra_suffix", "") != "":
|
||||
suffix += "." + env["extra_suffix"]
|
||||
|
||||
# Expose it when included from another project
|
||||
env["suffix"] = suffix
|
||||
|
||||
@@ -718,14 +718,15 @@ index 245c5140f9..d6c9d06c30 100644
|
||||
}
|
||||
|
||||
static const struct dxil_value *
|
||||
@@ -5079,6 +5083,11 @@ emit_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *intr)
|
||||
@@ -5079,6 +5083,12 @@ emit_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *intr)
|
||||
case nir_intrinsic_exclusive_scan:
|
||||
return emit_reduce(ctx, intr);
|
||||
|
||||
+ case nir_intrinsic_load_constant_non_opt:
|
||||
+ case nir_intrinsic_load_constant_non_opt: {
|
||||
+ const struct dxil_value* value = get_src(ctx, &intr->src[0], 0, nir_type_uint);
|
||||
+ store_dest_value(ctx, &intr->dest, 0, value);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
case nir_intrinsic_load_num_workgroups:
|
||||
case nir_intrinsic_load_workgroup_size:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -23,8 +23,13 @@ def generate(env):
|
||||
if not env["use_mingw"] and msvc.exists(env):
|
||||
if env["arch"] == "x86_64":
|
||||
env["TARGET_ARCH"] = "amd64"
|
||||
elif env["arch"] == "arm64":
|
||||
env["TARGET_ARCH"] = "arm64"
|
||||
elif env["arch"] == "arm32":
|
||||
env["TARGET_ARCH"] = "arm"
|
||||
elif env["arch"] == "x86_32":
|
||||
env["TARGET_ARCH"] = "x86"
|
||||
|
||||
env["is_msvc"] = True
|
||||
|
||||
# MSVC, linker, and archiver.
|
||||
@@ -63,7 +68,15 @@ def generate(env):
|
||||
else:
|
||||
env["use_mingw"] = True
|
||||
# Cross-compilation using MinGW
|
||||
prefix = "i686" if env["arch"] == "x86_32" else env["arch"]
|
||||
if env["arch"] == "x86_64":
|
||||
prefix = "x86_64"
|
||||
elif env["arch"] == "arm64":
|
||||
prefix = "aarch64"
|
||||
elif env["arch"] == "arm32":
|
||||
prefix = "armv7"
|
||||
elif env["arch"] == "x86_32":
|
||||
prefix = "i686"
|
||||
|
||||
if env["use_llvm"]:
|
||||
env["CXX"] = prefix + "-w64-mingw32-clang"
|
||||
env["CC"] = prefix + "-w64-mingw32-clang++"
|
||||
|
||||
2
mesa
2
mesa
Submodule mesa updated: 9085c9d43e...52ab5584b8
4
update_mesa.sh
Normal file → Executable file
4
update_mesa.sh
Normal file → Executable file
@@ -89,7 +89,6 @@ copy_sources() {
|
||||
}
|
||||
|
||||
# These are the first we know for sure we want to copy.
|
||||
copy_file . VERSION
|
||||
copy_file . .editorconfig
|
||||
copy_subir_sources src/microsoft/compiler
|
||||
copy_subir_sources src/microsoft/spirv_to_dxil
|
||||
@@ -106,6 +105,7 @@ copy_sources() {
|
||||
copy_subir_headers include/KHR
|
||||
copy_subir_headers src/c11
|
||||
copy_file src/c11/impl threads_win32.*
|
||||
copy_file src/c11/impl time.c
|
||||
copy_subir_sources src/compiler
|
||||
copy_subir_headers src/compiler/glsl
|
||||
copy_subir_sources src/compiler/nir
|
||||
@@ -146,7 +146,7 @@ copy_sources() {
|
||||
copy_file src/util u_vector.c
|
||||
copy_file src/util u_worklist.c
|
||||
|
||||
cp ./mesa/VERSION godot-mesa
|
||||
cp ./mesa/VERSION godot-mesa/VERSION.info
|
||||
check_error
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user