Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
33c85ad
Update azure pipelines image
VReaperV May 18, 2025
e101fed
NUKE RDF_SKYBOXPORTAL usages
VReaperV May 19, 2025
801f058
Set totalDrawSurfs correctly
VReaperV May 6, 2025
3885575
Merge material system surfaces
VReaperV May 6, 2025
47afcb3
Merge distant material surfaces separately
VReaperV May 18, 2025
6aa0f9d
Ensure grid size never gets too large
VReaperV May 19, 2025
4a1e331
Make sure surfaceGrid is always processed at the end of the loop
VReaperV May 21, 2025
880bc32
NUKE some unused stuff
VReaperV May 19, 2025
243d2d9
Adjust some comments on srfGeneric_t
VReaperV May 19, 2025
adabe8c
Use MD5_IDENTSTRING
VReaperV May 22, 2025
ef316ed
Remove unused uniform u_ViewUp
slipher May 20, 2025
47b7a81
Move refLight_t out of the IPC types header
slipher May 20, 2025
fdcb49d
Remove "INTERACTLIGHT" from /listshaders
slipher May 20, 2025
9827184
NUKE broken shadow mapping code
slipher May 20, 2025
220c330
NUKE forward lighting dynamic light renderer
slipher May 20, 2025
fe20e6c
Additional cleanup after NUKING forward lighting
slipher May 20, 2025
c17a648
bump version number to 0.55.4
illwieckz May 25, 2025
f9d9aaa
Python 3 migration: external_deps/cygtar.py
slipher Apr 9, 2025
528fc22
external_deps: fix script incompatible with Mac's bash
slipher Apr 10, 2025
54d119a
external_deps: fix pkgconfig macos build
slipher Apr 10, 2025
6941b6f
external_deps: remove pkgconfig from Windows list
slipher Apr 9, 2025
758f196
external_deps: don't munge SDL config
slipher Apr 20, 2025
7f9abc7
external_deps: fix import lib paths for MSVC
slipher Apr 22, 2025
ab623ab
external_deps: check for bad DLL dependencies
slipher Apr 22, 2025
c72b425
external_deps: Fix GLEW armhf build
slipher Apr 4, 2025
5f654ff
external_deps: fix GLEW windows build
slipher Apr 9, 2025
d9e756c
Make BufferBind less noisy
VReaperV May 23, 2025
6dbbd9b
Use explicit bind for u_Lights UBO when possible
VReaperV May 24, 2025
8f4c7fe
Clean-up buffer binds
VReaperV May 24, 2025
633b45a
Only bind the GL buffers once per map
VReaperV May 24, 2025
2bc7f51
Bind the u_Lights UBO only once if GL_ARB_shading_language_420pack is…
VReaperV May 24, 2025
03499db
More BufferBind clean-up
VReaperV May 24, 2025
9a9a5c2
Fix r_showEntityTransforms drawing garbage for sprites
slipher Jun 9, 2025
429171d
Fix wrong culling with r_showEntityTransforms
slipher Jun 9, 2025
c934bb8
Remove field trRefEntity_t::cull
slipher Jun 9, 2025
0fa128f
Add translucent solid option for showing cull bbox
slipher Jun 5, 2025
e658373
Fix r_showLightTiles GLSL code
slipher Jun 12, 2025
d3786be
Implement staging buffer and use it for material system
VReaperV May 29, 2025
3b0674e
Use staging buffer for the geometry cache
VReaperV Jun 8, 2025
ec4ba6a
Fix missing static
VReaperV Jun 8, 2025
c2afb67
Material system clean-up
VReaperV Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:

- job: Linux
pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'
strategy:
matrix:
GCC:
Expand Down
85 changes: 60 additions & 25 deletions external_deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ LDFLAGS=''

log() {
level="${1}"; shift
printf '%s: %s\n' "${level^^}" "${@}" >&2
[ "${level}" != 'error' ]
printf '%s: %s\n' "${level}" "${@}" >&2
[ "${level}" != 'ERROR' ]
}

# Extract an archive into the given subdirectory of the build dir and cd to it
Expand Down Expand Up @@ -120,7 +120,7 @@ extract() {
rmdir "${2}-dmg"
;;
*)
log error "Unknown archive type for ${1}"
log ERROR "Unknown archive type for ${1}"
;;
esac
cd "${2}"
Expand All @@ -132,13 +132,13 @@ download() {
while [ ! -f "${tarball_file}" ]; do
if [ -z "${1:-}" ]
then
log error "No more mirror to download ${tarball_file} from"
log ERROR "No more mirror to download ${tarball_file} from"
fi
local download_url="${1}"; shift
log status "Downloading ${download_url}"
if ! "${CURL}" -R -L --fail -o "${tarball_file}" "${download_url}"
then
log warning "Failed to download ${download_url}"
log WARNING "Failed to download ${download_url}"
rm -f "${tarball_file}"
fi
done
Expand Down Expand Up @@ -167,6 +167,7 @@ download_extract() {
}

# Build pkg-config
# Still needed, at least on macos, for opusfile
build_pkgconfig() {
local dir_name="pkg-config-${PKGCONFIG_VERSION}"
local archive_name="${dir_name}.tar.gz"
Expand All @@ -178,7 +179,7 @@ build_pkgconfig() {

cd "${dir_name}"
# The default -O2 is dropped when there's user-provided CFLAGS.
CFLAGS="${CFLAGS} -O2" ./configure --host="${HOST}" --prefix="${PREFIX}" --libdir="${PREFIX}/lib" --with-internal-glib
CFLAGS="${CFLAGS} -O2 -Wno-error=int-conversion" ./configure --host="${HOST}" --prefix="${PREFIX}" --libdir="${PREFIX}/lib" --with-internal-glib
make
make install
}
Expand All @@ -198,7 +199,7 @@ build_nasm() {
cp "${dir_name}/nasm" "${PREFIX}/bin"
;;
*)
log error 'Unsupported platform for NASM'
log ERROR 'Unsupported platform for NASM'
;;
esac
}
Expand Down Expand Up @@ -340,7 +341,7 @@ build_sdl2() {
case "${PLATFORM}" in
windows-*-mingw)
cd "${dir_name}"
make install-package arch="${HOST}" prefix="${PREFIX}"
cp -rv "${HOST}"/* "${PREFIX}/"
;;
windows-*-msvc)
cd "${dir_name}"
Expand All @@ -357,7 +358,7 @@ build_sdl2() {
local sdl2_lib_dir='lib/x64'
;;
*)
log error 'Unsupported platform for SDL2'
log ERROR 'Unsupported platform for SDL2'
;;
esac

Expand Down Expand Up @@ -396,10 +397,16 @@ build_glew() {
"${download_only}" && return

cd "${dir_name}"
# env hack: CFLAGS.EXTRA is populated with some flags, which are sometimess necessary for
# compilation, in the makefile with +=. If CFLAGS.EXTRA is set on the command line, those
# += will be ignored. But if it is set via the environment, the two sources are actually
# concatenated how we would like. Bash doesn't allow variables with a dot so use env.
# The hack doesn't work on Mac's ancient Make (the env var has no effect), so we have to
# manually re-add the required flags there.
case "${PLATFORM}" in
windows-*-*)
make SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}" CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}"
make install SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}" CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}"
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}"
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make install SYSTEM="linux-mingw${BITNESS}" GLEW_DEST="${PREFIX}" CC="${CC}" AR="${AR}" RANLIB="${RANLIB}" STRIP="${HOST}-strip" LD="${LD}"
mv "${PREFIX}/lib/glew32.dll" "${PREFIX}/bin/"
rm "${PREFIX}/lib/libglew32.a"
cp lib/libglew32.dll.a "${PREFIX}/lib/"
Expand All @@ -410,11 +417,12 @@ build_glew() {
install_name_tool -id "@rpath/libGLEW.${GLEW_VERSION}.dylib" "${PREFIX}/lib/libGLEW.${GLEW_VERSION}.dylib"
;;
linux-*-*)
make GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}"
make install GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" LIBDIR="${PREFIX}/lib"
local strip="${HOST/-unknown-/-}-strip"
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" STRIP="${strip}"
env CFLAGS.EXTRA="${CFLAGS}" LDFLAGS.EXTRA="${LDFLAGS}" make install GLEW_DEST="${PREFIX}" CC="${CC}" LD="${CC}" LIBDIR="${PREFIX}/lib"
;;
*)
log error 'Unsupported platform for GLEW'
log ERROR 'Unsupported platform for GLEW'
;;
esac
}
Expand Down Expand Up @@ -460,7 +468,7 @@ build_jpeg() {
# Other platforms can build but we need need to explicitly
# set CMAKE_SYSTEM_NAME for CMAKE_CROSSCOMPILING to be set
# and CMAKE_SYSTEM_PROCESSOR to not be ignored by cmake.
log error 'Unsupported platform for JPEG'
log ERROR 'Unsupported platform for JPEG'
;;
esac

Expand All @@ -482,7 +490,7 @@ build_jpeg() {
local SYSTEM_PROCESSOR='arm'
;;
*)
log error 'Unsupported platform for JPEG'
log ERROR 'Unsupported platform for JPEG'
;;
esac

Expand Down Expand Up @@ -539,7 +547,7 @@ build_openal() {
-DCMAKE_BUILD_TYPE=Release -DALSOFT_EXAMPLES=OFF)
;;
*)
log error 'Unsupported platform for OpenAL'
log ERROR 'Unsupported platform for OpenAL'
;;
esac

Expand Down Expand Up @@ -695,7 +703,7 @@ build_wasisdk() {
*-amd64-*)
;;
*)
log error "wasi doesn't have release for ${PLATFORM}"
log ERROR "wasi doesn't have release for ${PLATFORM}"
;;
esac

Expand Down Expand Up @@ -735,7 +743,7 @@ build_wasmtime() {
local WASMTIME_ARCH=aarch64
;;
*)
log error "wasmtime doesn't have release for ${PLATFORM}"
log ERROR "wasmtime doesn't have release for ${PLATFORM}"
;;
esac

Expand Down Expand Up @@ -863,7 +871,7 @@ build_naclruntime() {
local NACL_ARCH=x86-64
;;
*)
log error 'Unsupported platform for naclruntime'
log ERROR 'Unsupported platform for naclruntime'
;;
esac

Expand All @@ -881,6 +889,30 @@ build_naclruntime() {
cp "scons-out/opt-linux-${NACL_ARCH}/staging/sel_ldr" "${PREFIX}/nacl_loader"
}

# Check for DLL dependencies on MinGW stuff. For MSVC platforms this is bad because it should work
# without having MinGW installed. For MinGW platforms it is still bad because it might not work
# when building with different flavors, or newer/older versions.
build_depcheck() {
"${download_only}" && return

case "${PLATFORM}" in
windows-*-*)
local good=true
for dll in $(find "${PREFIX}/bin" -type f -name '*.dll'); do
# https://wiki.unvanquished.net/wiki/MinGW#Built-in_DLL_dependencies
if objdump -p "${dll}" | grep -oP '(?<=DLL Name: )(libgcc_s|libstdc|libssp|libwinpthread).*'; then
echo "${dll} depends on above DLLs"
good=false
fi
done
"${good}" || log ERROR 'Built DLLs depend on MinGW runtime DLLs'
;;
*)
log ERROR 'Unsupported platform for depcheck'
;;
esac
}

# The import libraries generated by MinGW seem to have issues, so we use LLVM's version instead.
# So LLVM must be installed, e.g. 'sudo apt install llvm'
build_genlib() {
Expand All @@ -903,7 +935,7 @@ build_genlib() {
local MACHINE='i386:x86-64'
;;
*)
log error 'Unsupported platform for genlib'
log ERROR 'Unsupported platform for genlib'
;;
esac

Expand All @@ -917,7 +949,7 @@ build_genlib() {
done
;;
*)
log error 'Unsupported platform for genlib'
log ERROR 'Unsupported platform for genlib'
;;
esac
}
Expand Down Expand Up @@ -971,6 +1003,9 @@ build_install() {
find "${PKG_PREFIX}/bin" -name '*.dll' -execdir "${HOST}-strip" --strip-unneeded -- {} \;
find "${PKG_PREFIX}/lib" -name '*.a' -execdir rm -f -- {} \;
find "${PKG_PREFIX}/lib" -name '*.exp' -execdir rm -f -- {} \;

# Fix import lib paths to use MSVC-style instead of MinGW ones (see 'genlib' target)
find "${PKG_PREFIX}/lib/cmake" -name '*.cmake' -execdir sed -i -E 's@[.]dll[.]a\[email protected]@g' {} \;
;;
esac

Expand Down Expand Up @@ -1038,7 +1073,7 @@ common_setup_arch() {
CXXFLAGS+=' -march=armv7-a -mfpu=neon'
;;
*)
log error 'Unsupported platform'
log ERROR 'Unsupported platform'
;;
esac
}
Expand Down Expand Up @@ -1140,13 +1175,13 @@ setup_linux-arm64-default() {
common_setup linux aarch64-unknown-linux-gnu
}

base_windows_amd64_msvc_packages='pkgconfig zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk genlib'
base_windows_amd64_msvc_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk depcheck genlib'
all_windows_amd64_msvc_packages="${base_windows_amd64_msvc_packages}"

base_windows_i686_msvc_packages="${base_windows_amd64_msvc_packages}"
all_windows_i686_msvc_packages="${base_windows_amd64_msvc_packages}"

base_windows_amd64_mingw_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk'
base_windows_amd64_mingw_packages='zlib gmp nettle curl sdl2 glew png jpeg webp openal ogg vorbis opus opusfile naclsdk depcheck'
all_windows_amd64_mingw_packages="${base_windows_amd64_mingw_packages}"

base_windows_i686_mingw_packages="${base_windows_amd64_mingw_packages}"
Expand Down
20 changes: 10 additions & 10 deletions external_deps/cygtar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Expand Down Expand Up @@ -78,12 +78,12 @@ def CreateCygwinSymlink(filepath, target):
lnk.close()
break
except EnvironmentError:
print 'Try %d: Failed open %s -> %s\n' % (cnt, filepath, target)
print('Try %d: Failed open %s -> %s\n' % (cnt, filepath, target))

# Verify the file was created
if not os.path.isfile(filepath):
print 'Try %d: Failed create %s -> %s\n' % (cnt, filepath, target)
print 'Giving up.'
print('Try %d: Failed create %s -> %s\n' % (cnt, filepath, target))
print('Giving up.')
return False

# Now set the system attribute bit so that Cygwin knows it's a link.
Expand All @@ -92,8 +92,8 @@ def CreateCygwinSymlink(filepath, target):
return subprocess.call(['cmd', '/C', 'C:\\Windows\\System32\\attrib.exe',
'+S', ToNativePath(filepath)])
except EnvironmentError:
print 'Try %d: Failed attrib %s -> %s\n' % (cnt, filepath, target)
print 'Giving up.'
print('Try %d: Failed attrib %s -> %s\n' % (cnt, filepath, target))
print('Giving up.')
return False


Expand Down Expand Up @@ -122,8 +122,8 @@ def CreateWin32Hardlink(filepath, targpath, try_mklink):
shutil.copyfile(targpath, filepath)
return False
except EnvironmentError:
print 'Try %d: Failed hardlink %s -> %s\n' % (cnt, filepath, targpath)
print 'Giving up.'
print('Try %d: Failed hardlink %s -> %s\n' % (cnt, filepath, targpath))
print('Giving up.')
return try_mklink


Expand Down Expand Up @@ -170,7 +170,7 @@ def __DumpInfo(self, tarinfo):
if tarinfo.isfile():
typeinfo = 'F'
reable_size = ReadableSizeOf(tarinfo.size)
print '%s %s : %s %s' % (reable_size, typeinfo, tarinfo.name, lnk)
print('%s %s : %s %s' % (reable_size, typeinfo, tarinfo.name, lnk))
return tarinfo

def __AddFile(self, tarinfo, fileobj=None):
Expand Down Expand Up @@ -232,7 +232,7 @@ def Add(self, filepath, prefix=None):

# At this point we only allow addition of "FILES"
if not tarinfo.isfile():
print 'Failed to add non real file: %s' % filepath
print('Failed to add non real file: %s' % filepath)
return False

# Now check if it is a Cygwin style link disguised as a file.
Expand Down
Binary file removed pkg/daemon_src.dpkdir/lights/mkintsquarelight1a.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/mkintsquarelight1b.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/round.png
Binary file not shown.
Binary file removed pkg/daemon_src.dpkdir/lights/squarelight1.png
Binary file not shown.
43 changes: 0 additions & 43 deletions pkg/daemon_src.dpkdir/scripts/engine.shader
Original file line number Diff line number Diff line change
Expand Up @@ -28,46 +28,3 @@ gfx/2d/bigchars
rgbgen vertex
}
}

lights/defaultDynamicLight
{
{
stage attenuationMapZ
map lights/mkintsquarelight1a
edgeClamp
}
{
stage attenuationMapXY
forceHighQuality
map lights/round
colored
zeroClamp
}
}

lights/defaultPointLight
{
// this will also be the falloff for any
// point light shaders that don't specify one
lightFalloffImage lights/mkintsquarelight1a
{
stage attenuationMapXY
forceHighQuality
map lights/squarelight1
colored
zeroClamp
}
}

lights/defaultProjectedLight
{
// by default, stay bright almost all the way to the end
lightFalloffImage lights/mkintsquarelight1b
{
stage attenuationMapXY
forceHighQuality
map lights/squarelight1
colored
zeroClamp
}
}
Loading