Skip to content

Run on GPUs with only the OpenGL 4.3 minimum of 8 image units - #3

Merged
FueledByRedBull merged 1 commit into
mainfrom
release/v0.7.2
Nov 10, 2026
Merged

FueledByRedBull merged 1 commit into
mainfrom
release/v0.7.2

Conversation

@FueledByRedBull

Copy link
Copy Markdown
Owner

Powder Game wouldn't start on GPUs that offer only the OpenGL 4.3 minimum of 8 image units, which is what NVIDIA and Intel drivers usually report. It showed "GPU supports 8 image units; Powder Game requires 18" and quit.

Shaders now sample any field they don't write (texelFetch, returning zero outside the texture as imageLoad did) and use image units only for writes, all on units 0 to 7. The host binds read-only fields as textures, write-only ones as images and read-write ones as both, and image barriers also cover texture fetches. The startup limit check is gone; gpu-compile now fails any shader that goes over the 4.3 minimums.

Tested on an RX 7800 XT: ctest 103/103, POWDER_REPLAY=all passes, benchmark-realtime passes (combined GPU mean 18.5 ms). The water, sand, boundary and leakage replay signatures match v0.7.1 exactly. Gas and combined end slightly differently; I bisected that to compiler rounding in smoke_correct and gas_velocity_correct, where the values read are identical. Not tested on NVIDIA or Intel hardware.

Shaders now sample the fields they only read and keep image units for writes, numbered below 8, so NVIDIA and Intel drivers no longer refuse to start the game. The startup limit check is gone; gpu-compile checks every program against the OpenGL 4.3 minimums instead.
@FueledByRedBull
FueledByRedBull merged commit c06b1fc into main Nov 10, 2026
2 checks passed
@FueledByRedBull
FueledByRedBull deleted the release/v0.7.2 branch November 10, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant