mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
gpu: panic on z-buffer overflow
Drawing more than 65k objects is reasonable, but not today. Updates gio#127 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -750,6 +750,10 @@ loop:
|
||||
continue
|
||||
}
|
||||
state.z++
|
||||
if state.z != int(uint16(state.z)) {
|
||||
// TODO(eliasnaur) gioui.org/issue/127.
|
||||
panic("more than 65k paint objects not supported")
|
||||
}
|
||||
// Assume 16-bit depth buffer.
|
||||
const zdepth = 1 << 16
|
||||
// Convert z to window-space, assuming depth range [0;1].
|
||||
|
||||
Reference in New Issue
Block a user