Commit Graph
34 Commits
Author SHA1 Message Date
Geoffrey McRae 78802319e3 [client] add a MPV glsl style effect loader 2026-07-23 09:43:59 +10:00
Geoffrey McRae cd0d668076 [client] egl: cache renderer GL state
Track context-local GL bindings to avoid redundant program, framebuffer,
buffer, texture, sampler, viewport, blend, and scissor state changes.

Invalidate the cache across context switches, ImGui rendering, and
shared object changes. Preserve CPU-backed texture upload correctness by
explicitly clearing pixel unpack buffer bindings where required.

This reduces hot-path driver overhead without adding waits or GPU
synchronization.
2026-07-23 09:43:59 +10:00
Geoffrey McRae b60fa8756f [client] egl: remove blocking waits from frame submission
Track PBO fences per upload slot and wait only when a slot is reused,
allowing rendering to proceed without a CPU stall. Use GPU-side waits
for cross-context DMABUF synchronization.

Also propagate KVMFR write-completion failures so incomplete
shared-memory frames are never submitted, while retaining incremental
damage-copy waits to avoid added latency.
2026-07-23 09:43:59 +10:00
Geoffrey McRae 69f44a003d [all] refresh copyright 2026-05-31 15:13:57 +10:00
Geoffrey McRae e9b7bdfea1 Revert "[all] refresh copyright"
Corrupted IDD sources due to lack of UTF-8 with BOM support in the
script.
2026-05-31 15:10:44 +10:00
Geoffrey McRae 98602fb95e [all] refresh copyright 2026-05-31 15:03:37 +10:00
Geoffrey McRae e40610ea77 [client] egl: sync on fence without force glFlush in non-dmabuf path 2025-09-02 13:09:39 +10:00
Geoffrey McRae 551298ed5b [doc] all: update copyright year 2025-03-05 12:24:38 +11:00
Jacob McNamee 2067b21d47 [client] egl: fix line copy size computation in texBufferStreamUpdate 2024-05-20 19:42:21 +10:00
Jacob McNamee 9bc82ab1b4 [client] egl: fix misuse of stride vs. pitch in texBufferStreamUpdate 2024-05-20 19:42:21 +10:00
Geoffrey McRae 0b210a280d [all] update the copyright to 2024 2024-02-01 17:16:31 +11:00
Geoffrey McRae 43a3fb0db3 [client] egl: RGB24 improvements
This patch performs several changes.

* Alters the fourcc codes to types that ignore the alpha channel where
  possible to allow the gpu to internally use 24-bit formats.
* Attempts to use DRM_FORMAT_RGB888 first as some GPUs may support this
* If DMABUF is not in use the data is now imported directly as RGB24
  without the post-processing shader
2023-11-21 12:01:45 +11:00
Geoffrey McRae 6357df1a7a [client] egl: fix non-dma texture stride issue 2023-11-15 17:40:57 +11:00
Geoffrey McRae 3af2cf54d6 [client] egl: remove deprecated BGR members and logic 2023-11-10 06:28:05 +11:00
Geoffrey McRae c665044bfa [client] implement support for RGB24 packed data 2023-11-10 06:28:05 +11:00
Geoffrey McRae 2e515657dd [all] update/add license headers 2023-10-20 15:36:34 +11:00
Geoffrey McRae b4b4a37b2b [client] egl: switch to using GL_TEXTURE_EXTERNAL_OES for DMABUF
According to Erik @ NVidia the open source NVidia driver will not
create a EGLImage from a DMABUF if the target is not
GL_TEXTURE_EXTERNAL_OES. This change set converts the dmabuf texture
from GL_TEXTURE_2D to GL_TEXTURE_EXTERNAL_OES and at runtime performs a
global search & replace on fragment shaders as needed to remain
compatible, replacing `sampler2D` with `samplerExternalOES`.

Ref: https://github.com/NVIDIA/open-gpu-kernel-modules/discussions/243#discussioncomment-3283415
2023-03-09 09:20:01 +11:00
Geoffrey McRae b5dfbcb5a2 [client] egl: added missing case from texture init 2022-05-23 20:55:02 +10:00
Geoffrey McRae 247e867f18 [client] egl: implemented SPICE display support 2022-05-22 18:19:58 +10:00
Geoffrey McRae 1fcdcc8725 [client] egl: allow for partial texture updates 2022-05-21 21:21:16 +10:00
Chris Spencer f635077a2c [client] egl: increase texture processing timeout
On my machine (Intel UHD Graphics 770), texture processing occasionally
(about 5% of the time) takes more than 20ms (the highest I have seen is
around 32ms) when the host resolution is 2560x1440. This results in the
frame being discarded and the client displays a stale image. Increase the
timeout to 40ms.
2022-01-14 12:31:02 +11:00
Geoffrey McRae 952ebea2c5 [all] refresh copyright dates 2022-01-05 19:42:46 +11:00
Quantum 81c38e825c [client] remove all casts around malloc
The cast is unnecessary in C and should be removed to avoid clutter.
2021-08-16 16:26:58 +10:00
Quantum 579f998519 [client] all: replace assert with DEBUG_ASSERT 2021-08-14 12:19:07 +10:00
Geoffrey McRae 86d6b67337 [client] egl: rework egl to accomodate post-processing filtering 2021-08-09 14:08:10 +10:00
Geoffrey McRae 266ad27998 [client] egl: refactor to use project naming standard 2021-08-08 17:16:10 +10:00
Geoffrey McRae 037b76750a [client] egl: revert glsync changes
`process` and `bind` are called from the same thread in order, there is
no need for atomic usage here.

This reverts commit 3d7dbd6371.
This reverts commit b3db1ba10b.
2021-08-08 09:44:59 +10:00
Geoffrey McRae 3d7dbd6371 [client] egl: sync is now an atomic, access it as such 2021-08-08 09:26:36 +10:00
Quantum b3db1ba10b [client] egl: eliminate GLsync object leaks
It used to be the case that we overwrite this->sync even if it was non-zero
when updating the texture, without deleting the sync object. If we update
faster than we render, the result would be leaking sync objects.

This commit ensures that sync objects are deleted when they are replaced.
2021-08-08 09:19:04 +10:00
Quantum 51b9cd4e5a [all] copyright: use unicode copyright sign ©
This is done for consistency with the license strings in appstrings.c.
2021-08-04 21:16:35 +10:00
Geoffrey McRae f3413815a9 [client] egl: re-implement DMABUF (untested) 2021-08-03 03:59:03 +10:00
Geoffrey McRae 14839dc54e [client] egl: there should only ever be a single sync object 2021-08-03 00:47:59 +10:00
Geoffrey McRae 037788f562 [client] egl: do not set ops, this is done in texture.c 2021-08-02 23:42:46 +10:00
Geoffrey McRae 13d9c84dc9 [client] egl: replace monolithic EGLTexture with modular version
The way things were handled in EGLTexture is not only very hard to
follow, but broken. This change set breaks up EGLTexture into a modular
design making it easier to implement the various versions.

Note that DMABUF is currently broken and needs to be re-implemented.
2021-08-02 23:37:33 +10:00