Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
c5eab43423 | |||
288d5002f3 | |||
39f3fa7d5b | |||
cf909a81db | |||
f0d99f8f54 | |||
9770391bc4 | |||
eb328fc2df | |||
7e91f70e02 | |||
9c72741e69 | |||
660dd63792 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -20,9 +20,14 @@ libraries/source/cxxtest-4.4/*
|
|||||||
libraries/source/fcollada/*
|
libraries/source/fcollada/*
|
||||||
libraries/source/nvtt/*
|
libraries/source/nvtt/*
|
||||||
libraries/source/spidermonkey/*
|
libraries/source/spidermonkey/*
|
||||||
|
libraries/source/spirv-reflect/*
|
||||||
!libraries/source/**/build.sh
|
!libraries/source/**/build.sh
|
||||||
!libraries/source/**/patches/
|
!libraries/source/**/patches/
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
archives/
|
||||||
|
source/tools/spirv/rules.*.json
|
||||||
|
|
||||||
# premake5 build files, adapted from upstream
|
# premake5 build files, adapted from upstream
|
||||||
build/premake/premake5/**/.gitignore
|
build/premake/premake5/**/.gitignore
|
||||||
build/premake/premake5/**/.travis.yml
|
build/premake/premake5/**/.travis.yml
|
||||||
|
@ -344,15 +344,6 @@
|
|||||||
"dependencies": ["shadows"],
|
"dependencies": ["shadows"],
|
||||||
"config": "shadowpcf"
|
"config": "shadowpcf"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "slider",
|
|
||||||
"label": "Cutoff distance",
|
|
||||||
"tooltip": "Hides shadows beyond a certain distance from a camera.",
|
|
||||||
"dependencies": ["shadows"],
|
|
||||||
"config": "shadowscutoffdistance",
|
|
||||||
"min": 100,
|
|
||||||
"max": 1500
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"label": "Cover whole map",
|
"label": "Cover whole map",
|
||||||
@ -360,6 +351,15 @@
|
|||||||
"dependencies": ["shadows"],
|
"dependencies": ["shadows"],
|
||||||
"config": "shadowscovermap"
|
"config": "shadowscovermap"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "slider",
|
||||||
|
"label": "Cutoff distance",
|
||||||
|
"tooltip": "Hides shadows beyond a certain distance from a camera.",
|
||||||
|
"dependencies": ["shadows", { "config": "shadowscovermap", "value": "false" }],
|
||||||
|
"config": "shadowscutoffdistance",
|
||||||
|
"min": 100,
|
||||||
|
"max": 1500
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"label": "Water effects",
|
"label": "Water effects",
|
||||||
|
@ -56,18 +56,25 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"AINames": [
|
"AINames": [
|
||||||
"Cimon",
|
|
||||||
"Aristides",
|
|
||||||
"Xenophon",
|
|
||||||
"Hippias",
|
|
||||||
"Cleisthenes",
|
|
||||||
"Thucydides",
|
|
||||||
"Alcibiades",
|
"Alcibiades",
|
||||||
"Miltiades",
|
"Aristides",
|
||||||
|
"Callias",
|
||||||
|
"Chabrias",
|
||||||
|
"Cimon",
|
||||||
|
"Cleisthenes",
|
||||||
"Cleon",
|
"Cleon",
|
||||||
"Cleophon",
|
"Cleophon",
|
||||||
|
"Conon",
|
||||||
|
"Demosthenes",
|
||||||
|
"Ephialtes",
|
||||||
|
"Hippias",
|
||||||
|
"Miltiades",
|
||||||
|
"Nicias",
|
||||||
|
"Phocion",
|
||||||
|
"Pisistratus",
|
||||||
"Thrasybulus",
|
"Thrasybulus",
|
||||||
"Demosthenes"
|
"Thucydides",
|
||||||
|
"Xenophon"
|
||||||
],
|
],
|
||||||
"SkirmishReplacements": {
|
"SkirmishReplacements": {
|
||||||
"skirmish/units/default_infantry_ranged_b": "units/athen/infantry_slinger_b",
|
"skirmish/units/default_infantry_ranged_b": "units/athen/infantry_slinger_b",
|
||||||
|
@ -76,13 +76,16 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"AINames": [
|
"AINames": [
|
||||||
"Prasutagus",
|
"Adminius",
|
||||||
"Venutius",
|
"Cassivellaunus",
|
||||||
"Cogidubnus",
|
"Cogidubnus",
|
||||||
"Commius",
|
"Commius",
|
||||||
"Comux",
|
"Comux",
|
||||||
"Adminius",
|
|
||||||
"Dubnovellaunus",
|
"Dubnovellaunus",
|
||||||
|
"Imanuentius",
|
||||||
|
"Mandubracius",
|
||||||
|
"Prasutagus",
|
||||||
|
"Venutius",
|
||||||
"Vosenius"
|
"Vosenius"
|
||||||
],
|
],
|
||||||
"SkirmishReplacements": {
|
"SkirmishReplacements": {
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
"Audax",
|
"Audax",
|
||||||
"Calcus",
|
"Calcus",
|
||||||
"Ditalcus",
|
"Ditalcus",
|
||||||
|
"Litennon",
|
||||||
"Minurus",
|
"Minurus",
|
||||||
"Olyndicus",
|
"Olyndicus",
|
||||||
"Orison",
|
"Orison",
|
||||||
|
@ -60,16 +60,21 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"AINames": [
|
"AINames": [
|
||||||
"Dienekes",
|
|
||||||
"Agis II",
|
|
||||||
"Archidamus",
|
|
||||||
"Lysander",
|
|
||||||
"Pausanias",
|
|
||||||
"Agesilaus",
|
"Agesilaus",
|
||||||
|
"Agesipolis",
|
||||||
|
"Agis II",
|
||||||
|
"Anaxandridas",
|
||||||
|
"Archidamus",
|
||||||
|
"Cleomenes",
|
||||||
|
"Dienekes",
|
||||||
"Echestratus",
|
"Echestratus",
|
||||||
"Eurycrates",
|
|
||||||
"Eucleidas",
|
"Eucleidas",
|
||||||
"Agesipolis"
|
"Eurybiades",
|
||||||
|
"Eurycrates",
|
||||||
|
"Gylippus",
|
||||||
|
"Leotychidas",
|
||||||
|
"Lysander",
|
||||||
|
"Pausanias"
|
||||||
],
|
],
|
||||||
"SkirmishReplacements": {
|
"SkirmishReplacements": {
|
||||||
"skirmish/structures/default_house_10": "structures/{civ}/house",
|
"skirmish/structures/default_house_10": "structures/{civ}/house",
|
||||||
|
@ -127,6 +127,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
ws("workspace/nightly-svn") {
|
ws("workspace/nightly-svn") {
|
||||||
|
bat "del /s /q binaries\\data\\mods\\mod\\shaders\\spirv"
|
||||||
|
bat "del /s /q binaries\\data\\mods\\public\\shaders\\spirv"
|
||||||
bat "python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/mod source/tools/spirv/rules.json binaries/data/mods/mod"
|
bat "python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/mod source/tools/spirv/rules.json binaries/data/mods/mod"
|
||||||
bat "python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/public source/tools/spirv/rules.json binaries/data/mods/public"
|
bat "python source/tools/spirv/compile.py -d binaries/data/mods/mod binaries/data/mods/public source/tools/spirv/rules.json binaries/data/mods/public"
|
||||||
}
|
}
|
||||||
|
@ -811,6 +811,7 @@ GNUTLS_DIR="$(pwd)/gnutls"
|
|||||||
HOGWEED_LIBS="-L${NETTLE_DIR}/lib -lhogweed" \
|
HOGWEED_LIBS="-L${NETTLE_DIR}/lib -lhogweed" \
|
||||||
GMP_CFLAGS="-I${GMP_DIR}/include" \
|
GMP_CFLAGS="-I${GMP_DIR}/include" \
|
||||||
GMP_LIBS="-L${GMP_DIR}/lib -lgmp" \
|
GMP_LIBS="-L${GMP_DIR}/lib -lgmp" \
|
||||||
|
"$HOST_PLATFORM" \
|
||||||
--prefix="$INSTALL_DIR" \
|
--prefix="$INSTALL_DIR" \
|
||||||
--enable-shared=no \
|
--enable-shared=no \
|
||||||
--without-idn \
|
--without-idn \
|
||||||
@ -818,8 +819,10 @@ GNUTLS_DIR="$(pwd)/gnutls"
|
|||||||
--with-included-libtasn1 \
|
--with-included-libtasn1 \
|
||||||
--without-p11-kit \
|
--without-p11-kit \
|
||||||
--without-brotli \
|
--without-brotli \
|
||||||
|
--without-zstd \
|
||||||
|
--without-tpm2 \
|
||||||
|
--disable-libdane \
|
||||||
--disable-tests \
|
--disable-tests \
|
||||||
--disable-guile \
|
|
||||||
--disable-doc \
|
--disable-doc \
|
||||||
--disable-tools \
|
--disable-tools \
|
||||||
--disable-nls
|
--disable-nls
|
||||||
|
@ -24,6 +24,7 @@ esac
|
|||||||
without_nvtt=false
|
without_nvtt=false
|
||||||
with_system_nvtt=false
|
with_system_nvtt=false
|
||||||
with_system_mozjs=false
|
with_system_mozjs=false
|
||||||
|
with_spirv_reflect=false
|
||||||
|
|
||||||
JOBS=${JOBS:="-j2"}
|
JOBS=${JOBS:="-j2"}
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ for i in "$@"; do
|
|||||||
--without-nvtt) without_nvtt=true ;;
|
--without-nvtt) without_nvtt=true ;;
|
||||||
--with-system-nvtt) with_system_nvtt=true ;;
|
--with-system-nvtt) with_system_nvtt=true ;;
|
||||||
--with-system-mozjs) with_system_mozjs=true ;;
|
--with-system-mozjs) with_system_mozjs=true ;;
|
||||||
|
--with-spirv-reflect) with_spirv_reflect=true ;;
|
||||||
-j*) JOBS=$i ;;
|
-j*) JOBS=$i ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -67,5 +69,8 @@ if [ "$with_system_mozjs" = "false" ]; then
|
|||||||
cp source/spidermonkey/bin/* ../binaries/system/
|
cp source/spidermonkey/bin/* ../binaries/system/
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
if [ "$with_spirv_reflect" = "true" ]; then
|
||||||
|
./source/spirv-reflect/build.sh || die "spirv-reflect build failed"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
35
libraries/source/spirv-reflect/build.sh
Executable file
35
libraries/source/spirv-reflect/build.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
PV=1.3.290.0
|
||||||
|
LIB_VERSION=${PV}
|
||||||
|
|
||||||
|
if [ -e .already-built ] && [ "$(cat .already-built || true)" = "${LIB_VERSION}" ]; then
|
||||||
|
echo "spirv-reflect is already up to date."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fetch
|
||||||
|
if [ ! -e "vulkan-sdk-${PV}.tar.gz" ]; then
|
||||||
|
curl -fLo "vulkan-sdk-${PV}.tar.gz" \
|
||||||
|
"https://github.com/KhronosGroup/SPIRV-Reflect/archive/refs/tags/vulkan-sdk-${PV}.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# unpack
|
||||||
|
rm -Rf "SPIRV-Reflect-vulkan-sdk-${PV}"
|
||||||
|
tar xf "vulkan-sdk-${PV}.tar.gz"
|
||||||
|
|
||||||
|
# configure
|
||||||
|
cmake -B build -S "SPIRV-Reflect-vulkan-sdk-${PV}" \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="$(realpath . || true)"
|
||||||
|
|
||||||
|
# build
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
# install
|
||||||
|
rm -Rf bin
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
|
echo "${LIB_VERSION}" >.already-built
|
20
source/tools/dist/build-archives.sh
vendored
20
source/tools/dist/build-archives.sh
vendored
@ -23,7 +23,7 @@ LANGS="ast ca cs de el en_GB es eu fi fr gd hu id it nl pl pt_BR ru sk sv tr uk"
|
|||||||
REGEX=$(printf "\|%s" ${LANGS} | cut -c 2-)
|
REGEX=$(printf "\|%s" ${LANGS} | cut -c 2-)
|
||||||
REGEX=".*/\(${REGEX}\)\.[-A-Za-z0-9_.]\+\.po"
|
REGEX=".*/\(${REGEX}\)\.[-A-Za-z0-9_.]\+\.po"
|
||||||
|
|
||||||
find binaries/ -name "*.po" | grep -v "$REGEX" | xargs rm -v || die "Error filtering languages."
|
find binaries/ -name "*.po" | grep -v "$REGEX" | xargs rm -fv || die "Error filtering languages."
|
||||||
|
|
||||||
# Build archive(s) - don't archive the _test.* mods
|
# Build archive(s) - don't archive the _test.* mods
|
||||||
cd binaries/data/mods || die
|
cd binaries/data/mods || die
|
||||||
@ -40,13 +40,21 @@ cd - || die
|
|||||||
|
|
||||||
BUILD_SHADERS="${BUILD_SHADERS:=true}"
|
BUILD_SHADERS="${BUILD_SHADERS:=true}"
|
||||||
if [ "${BUILD_SHADERS}" = true ]; then
|
if [ "${BUILD_SHADERS}" = true ]; then
|
||||||
PYTHON=${PYTHON:=$(command -v python3 || command -v python)}
|
PYTHON=${PYTHON:=$(command -v python3 || command -v python || true)}
|
||||||
GLSLC=${GLSLC:=$(command -v glslc)}
|
GLSLC=${GLSLC:=$(command -v glslc || true)}
|
||||||
SPIRV_REFLECT=${SPIRV_REFLECT:=$(command -v spirv-reflect)}
|
SPIRV_REFLECT=${SPIRV_REFLECT:=$(command -v spirv-reflect || true)}
|
||||||
|
if [ -e "$(realpath libraries/source/spirv-reflect/bin/spirv-reflect || true)" ]; then
|
||||||
|
: "${SPIRV_REFLECT:=$(realpath libraries/source/spirv-reflect/bin/spirv-reflect || true)}"
|
||||||
|
fi
|
||||||
|
export SPIRV_REFLECT
|
||||||
|
|
||||||
[ -n "${PYTHON}" ] || die "Error: python is not available. Install it before proceeding."
|
[ -n "${PYTHON}" ] || die "Error: python is not available. Install it before proceeding."
|
||||||
[ -n "${GLSLC}" ] || die "Error: glslc is not available. Install it with the Vulkan SDK before proceeding."
|
[ -n "${GLSLC}" ] ||
|
||||||
[ -n "${SPIRV_REFLECT}" ] || die "Error: spirv-reflect is not available. Install it with the Vulkan SDK before proceeding."
|
die "Error: glslc is not available." \
|
||||||
|
" Install it with the Vulkan SDK or shaderc package before proceeding."
|
||||||
|
[ -n "${SPIRV_REFLECT}" ] ||
|
||||||
|
die "Error: spirv-reflect is not available." \
|
||||||
|
" Install it with the Vulkan SDK or build vendored spirv-reflect before proceeding."
|
||||||
|
|
||||||
cd source/tools/spirv || die
|
cd source/tools/spirv || die
|
||||||
|
|
||||||
|
@ -25,10 +25,12 @@ import hashlib
|
|||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
@ -124,7 +126,17 @@ def compile_and_reflect(input_mod_path, dependencies, stage, path, out_path, def
|
|||||||
)
|
)
|
||||||
execute(command[:-2] + ["-g", "-E", "-o", preprocessor_output_path])
|
execute(command[:-2] + ["-g", "-E", "-o", preprocessor_output_path])
|
||||||
raise ValueError(err)
|
raise ValueError(err)
|
||||||
ret, out, err = execute(["spirv-reflect", "-y", "-v", "1", output_path])
|
spirv_reflect = os.getenv("SPIRV_REFLECT", "spirv-reflect")
|
||||||
|
if shutil.which(spirv_reflect) is None:
|
||||||
|
spirv_reflect = (
|
||||||
|
Path(__file__).resolve().parent.parent.parent.parent
|
||||||
|
/ "libraries"
|
||||||
|
/ "source"
|
||||||
|
/ "spirv-reflect"
|
||||||
|
/ "bin"
|
||||||
|
/ "spirv-reflect"
|
||||||
|
)
|
||||||
|
ret, out, err = execute([spirv_reflect, "-y", "-v", "1", output_path])
|
||||||
if ret:
|
if ret:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
"Command returned {}:\nCommand: {}\nInput path: {}\nOutput path: {}\n"
|
"Command returned {}:\nCommand: {}\nInput path: {}\nOutput path: {}\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user