Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ Then tune **`BUNDLED_LIBS`** and per-library **`BUNDLED_*`** flags in CMake. Ver
**Vulkan renderer** (`-DFEATURE_RENDERER_VULKAN=ON`)

- **Vulkan loader** — CMake `find_package(Vulkan)` (e.g. LunarG SDK or distro `libvulkan-dev`).
- **easybuild (Linux/macOS):** pass **`-vulkan`** or **`-vk`** to add the Vulkan backend next to OpenGL 1 (dynamic renderer build is forced on if needed). Example: `./easybuild.sh build -64 -vulkan`.
- **Ray-tracing / advanced RHI** work in progress — track **[draft PR #5](https://github.com/timfox/sturmgeist/pull/5)** (`cursor/vulkan-ray-tracing-bee0`) for KHR RT experiments; default Vulkan path remains the shipped renderer stack.

**High refresh displays (e.g. 120 Hz)**

- Default client cap **`com_maxfps`** is **120** (still clamped **20–500**). Raise it if your display and GPU can sustain higher frame times consistently.
- **Vsync** is controlled separately (e.g. **`r_swapInterval`** for OpenGL; use driver or in-game settings as appropriate for Vulkan).

## Clone and sync (this fork)

Expand Down
12 changes: 11 additions & 1 deletion easybuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,14 @@ parse_commandline() {
elif [ "$var" = "-nor2" ] || [ "$var" = "-no-r2" ]; then
einfo "Will disable renderer2"
FEATURE_RENDERER2=0
elif [ "$var" = "-vulkan" ] || [ "$var" = "-vk" ]; then
einfo "Will enable Vulkan renderer (alongside OpenGL 1 when dynamic renderer build is on)"
FEATURE_RENDERER_VULKAN=1
# Multiple backends require RENDERER_DYNAMIC=1 (CMake enforces this).
if [ "${RENDERER_DYNAMIC:-1}" -eq 0 ]; then
einfo "Re-enabling dynamic renderer build (required when building Vulkan + OpenGL)"
RENDERER_DYNAMIC=1
Comment on lines +358 to +360
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate Vulkan/dynamic renderer flags after arg parsing

This re-enable check only executes when -vulkan is parsed, so argument order changes behavior: running easybuild.sh ... -vulkan -nodynamic leaves RENDERER_DYNAMIC=0 while FEATURE_RENDERER1 (default) and FEATURE_RENDERER_VULKAN=1 are both enabled, which then triggers CMake's fatal guard (Only one renderer can be built at a time when building static libraries in cmake/ETLBuildRenderer.cmake). The script should enforce this constraint after all options are processed so -vulkan is safe regardless of flag order.

Useful? React with 👍 / 👎.

fi
elif [ "$var" = "-nodynamic" ] || [ "$var" = "-no-dynamic" ]; then
einfo "Will disable dynamic renderer build"
RENDERER_DYNAMIC=0
Expand Down Expand Up @@ -545,6 +553,7 @@ generate_configuration() {
FEATURE_RENDERER1=${FEATURE_RENDERER1:-1}
FEATURE_RENDERER2=${FEATURE_RENDERER2:-0}
FEATURE_RENDERER_GLES=${FEATURE_RENDERER_GLES:-0}
FEATURE_RENDERER_VULKAN=${FEATURE_RENDERER_VULKAN:-0}
RENDERER_DYNAMIC=${RENDERER_DYNAMIC:-1}

if [ "$FEATURE_SSL" -eq 0 ] && [ "$FEATURE_AUTH" -eq 1 ]; then
Expand Down Expand Up @@ -632,6 +641,7 @@ generate_configuration() {
"-DFEATURE_RENDERER1=${FEATURE_RENDERER1}"
"-DFEATURE_RENDERER2=${FEATURE_RENDERER2}"
"-DFEATURE_RENDERER_GLES=${FEATURE_RENDERER_GLES}"
"-DFEATURE_RENDERER_VULKAN=${FEATURE_RENDERER_VULKAN}"
"-DRENDERER_DYNAMIC=${RENDERER_DYNAMIC}"
"-DFEATURE_LUASQL=${FEATURE_LUASQL}"
"-DFEATURE_OMNIBOT=${FEATURE_OMNIBOT}"
Expand Down Expand Up @@ -1018,7 +1028,7 @@ print_help() {
ehead "help - print this help"
echo
einfo "Properties"
ehead "-64, -32, -debug, -clang, -lsp, -nodb -nor2, -nodynamic, -nossl, -systemlibs"
ehead "-64, -32, -debug, -clang, -lsp, -nodb -nor2, -vulkan (-vk), -nodynamic, -nossl, -systemlibs"
ehead "-noextra, -noupdate, -mod, -server, -ninja, -nopk3, -lsp"
ehead "--build=*, --prefix=*, --osx=* --osx-arc=*"
ehead "--silent -etpub -jaymod -nq"
Expand Down
3 changes: 2 additions & 1 deletion src/qcommon/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -3097,7 +3097,8 @@ void Com_Init(char *commandLine)
// init commands and vars
//
// no need to latch this in ET, our recoil is framerate independant
com_maxfps = Cvar_Get("com_maxfps", "125", CVAR_ARCHIVE /*|CVAR_LATCH*/);
// Default 120: common 120 Hz display refresh; cap still 20..500 via Cvar_CheckRange.
com_maxfps = Cvar_Get("com_maxfps", "120", CVAR_ARCHIVE /*|CVAR_LATCH*/);
Cvar_CheckRange(com_maxfps, 20, 500, qtrue);

com_maxfpsUnfocused = Cvar_Get("com_maxfpsUnfocused", "-1", CVAR_ARCHIVE);
Expand Down
Loading