Roxie/cef accelerated - #5597
Draft
roxanneskelly wants to merge 10 commits into
Draft
Conversation
|
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days |
…CPU space First part - windows
The adapter_luid functionality is Windows-only, matching the existing guards on the member declaration, initialization, and message passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass gGLManager.mHasNVDXInterop from the viewer through the plugin init message so the CEF plugin can conditionally set shared_texture_enable. When the extension is not available, Dullahan falls back to the standard OnPaint software rendering path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Let CEF texture size match the viewer window size instead of clamping to 2048. The accelerated path clamps to the GPU max texture size (GL_MAX_TEXTURE_SIZE) as a safety limit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roxanneskelly
force-pushed
the
roxie/CEF-accelerated
branch
from
July 8, 2026 21:30
bf33d53 to
5e8ca89
Compare
callumlinden
approved these changes
Jul 8, 2026
callumlinden
left a comment
Contributor
There was a problem hiding this comment.
Approved - with a single LL_WINDOWS0 typo to be fixed
| { | ||
| mEnableMediaPluginDebugging = message_in.getValueBoolean("enable"); | ||
| } | ||
| #if LL_WINDOWS0 |
Contributor
Author
There was a problem hiding this comment.
still a wip. my way of temporarily commenting this section out
Previously each media texture lazily created its own D3D11 device, context and wglDXOpenDeviceNV interop device, and any transient failure tore the whole device down and forced an expensive rebuild on the next frame. Both caused rendering stutters when using handle-based accelerated media. Move the D3D11 device, context and interop GL device to a process-wide shared holder created once and reused by every texture. Trim releaseInteropResources() to only tear down per-texture resources so a stale handle during a CEF resize no longer rebuilds the device, and close the shared device from LLGLManager::shutdownGL() while the GL context is still valid. Also extract GL adapter LUID detection into LLGLManager::detectGLAdapterLuid(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework the Windows NV_DX_interop accelerated-media path to sample the interop source texture directly instead of flip-blitting into a separate output texture. dullahan now delivers the shared texture already in GL orientation (flip_pixels_y honored in OnAcceleratedPaint), so the FBO, blit, and persistent output texture are no longer needed. The interop source name is installed into the GL texture as a *borrowed* name: sampled by the renderer but owned solely by the interop layer, which frees it only after unregistering. This fixes a double-free where LLImageGL's ordinary lifecycle (deferred deletes, name-pool recycling, background createGLTexture/discard) could delete a still-registered interop name, recycling it into an unrelated texture and crashing in LLNetMap::mObjectImage's destructor. - Add mBorrowedName tracking plus setBorrowedTexName/clearBorrowedTexName to LLImageGL; guard all delete paths against borrowed names. - Tear down interop resources before mGLTexturep in destroyGLTexture, unregistering before the GL name is freed. - Bump dullahan to v1.40.0 (CEF 150) and link d3dcompiler.lib. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable accelerated painting from CEF/Dullahan. Dullahan will now hand the CEF media plugin a handle to the painted texture in the GPU, which can be shared with the viewer process. This avoids the previous case where we needed to copy the texture into system RAM and then put it back to VRAM after the bits were transferred to the viewer.