feat: vendor QSGBatchRenderer as WSGBatchRenderer - #1275
Conversation
There was a problem hiding this comment.
Sorry @zccrs, your pull request is larger than the review limit of 150000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideVendors Qt Quick’s QSGBatchRenderer into waylib as WSGBatchRenderer, wires it through a custom scene graph context (WSGContext) so QQuickRenderControl and window renderers use the fork, and updates the existing buffer/render paths to depend on WSGBatchRenderer while preserving the software backend and adding version/ABI guards. Sequence diagram for installing WSGContext before QQuickRenderControl creationsequenceDiagram
actor App
participant WOutputRenderWindow
participant WSGContext
participant QQuickRenderControlPrivate
participant WSGRenderContext
participant WSGBatchRenderer_Renderer
App->>WOutputRenderWindow: constructor
WOutputRenderWindow->>WSGContext: ensureInstalled()
WSGContext->>QQuickRenderControlPrivate: check sg
alt sg is null or QSGDefaultContext
WSGContext->>QQuickRenderControlPrivate: sg = new WSGDefaultContext
else sg is nondefault
WSGContext-->>QQuickRenderControlPrivate: keep existing sg
end
WOutputRenderWindow->>WOutputRenderWindow: createOutputRenderControl()
WOutputRenderWindow->>QQuickRenderControlPrivate: new RenderControl()
QQuickRenderControlPrivate->>WSGRenderContext: createRenderContext()
WSGRenderContext->>WSGBatchRenderer_Renderer: createRenderer(RenderMode2D)
WSGBatchRenderer_Renderer-->>WSGRenderContext: Renderer instance
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1e310ab to
b53de02
Compare
|
TAG Bot New tag: 0.8.18 |
2815e84 to
f91d626
Compare
|
大佬今天能合入嘛( |
今天肯定不行,本月能合入就不错了。 |
7c799c8 to
76f4495
Compare
|
大佬, 这个跑分
个人认为体现的作用不大, 因为它超出了实际显示器的极限帧率太多, 以至于性能瓶颈几乎不在GPU上, 这边建议跑毒蘑菇这样榨干显卡的, 预设设置为高即可: https://www.volumeshader.dev/zh-CN/gpu-test |
553a89f to
7f6b59f
Compare
|
我弄了个review, 希望对大佬有帮助(08/19跑的): 08/20跑的: |
|
TAG Bot New tag: 0.9.0 |
2c9e5ad to
2322f9f
Compare
|
TAG Bot New tag: 0.9.1 |
先不着急做这件事,这个pr还不稳定,可能会有很大的代码变更,中间过程的review token都浪费了。 |
好的( |
ac8b38f to
b3bf190
Compare
59550f4 to
59d4abb
Compare
40199bd to
1c55921
Compare
1. Vendor qtdeclarative v6.11.1 QSGBatchRenderer/QSGRhiVisualizer into waylib as WSGBatchRenderer, version-gated for Qt 6.8-6.12. 2. Install WSGContext as QQuickRenderControlPrivate::sg before any QQuickRenderControl so RHI createRenderer() returns the fork. 3. Route extra sources and WRenderBufferNode through createRenderer(); keep the software backend on Qt's own scene graph adaptation. Log: RHI path uses a vendored Scene Graph batch renderer. No user-facing changes yet; damage tracking is not in this step. Influence: 1. Launch tinywl-qtquick on the default RHI backend and verify windows, titlebar, lockscreen, overview, Blur/Glass still render. 2. Run with QT_QUICK_BACKEND=software and confirm the software path is unchanged and RenderControl creation does not crash. 3. Confirm that creating a QQuickRenderControl before WOutputRenderWindow fatals with the WSGContext install error. feat: 将 Qt BatchRenderer 以 WSGBatchRenderer 接入 RHI 1. 从 qtdeclarative v6.11.1 引入 QSGBatchRenderer/QSGRhiVisualizer, 命名空间改为 WSGBatchRenderer,并用版本宏兼容 Qt 6.8-6.12。 2. 在任何 QQuickRenderControl 构造前安装 WSGContext 覆盖 sg, 使 RHI 路径的 createRenderer() 直接创建 fork。 3. extra source 与 WRenderBufferNode 改为走 createRenderer(); software 仍使用 Qt 自己的 scene graph adaptation。 Log: RHI 路径改用自带的 Scene Graph batch renderer。暂无用户可见 变化,本步未做 damage tracking。 Influence: 1. 用默认 RHI 启动 tinywl-qtquick,检查窗口、标题栏、锁屏、多任务、 Blur/Glass 绘制是否正常。 2. 设置 QT_QUICK_BACKEND=software,确认 software 路径不变、不崩溃。 3. 若在 WOutputRenderWindow 之前创建 QQuickRenderControl,应 qFatal。
1c55921 to
43a6405
Compare
|
TAG Bot New tag: 0.10.0 |
43a6405 to
f9c215a
Compare
1. Map the output QSG tree onto WSGDamageNode and run a three-phase tracker (prepareFrame/commit/finishFrame) per compositor output. 2. GPU scissors are sceneFlush ∪ bufferAge; ring write-back is sceneFlush from accumulateFlush, including backdrop dilation. 3. Glass recapture is flush accumulator ∩ node bounds, then kernel dilation, with a per-output capture cache. 4. WAYLIB_DAMAGE=off|commit|on kill-switch; highlight overlay via WAYLIB_DEBUG_DAMAGE and the debug menu Off/Highlight. 5. Add unit, scene, visual, lockscreen, and manual playground coverage. Log: Partial GPU redraw follows Scene Graph damage. Debug highlight via WAYLIB_DEBUG_DAMAGE=highlight. Kill-switch WAYLIB_DAMAGE=off|commit|on. Influence: 1. Run test_wdamagegraph and test_wsgdamage (gles2; vulkan if available). 2. WAYLIB_DEBUG_DAMAGE=highlight, move a window: red then fade to green. 3. WAYLIB_DAMAGE=off matches the vendored batch renderer full redraw. 4. Open a glass/blur window and confirm recapture only on dirty backdrop. feat: 跟踪场景图 damage 并按区域裁剪 GPU 重绘 1. 将输出 QSG 树映射为 WSGDamageNode,每个输出走三阶段 tracker (prepareFrame/commit/finishFrame)。 2. GPU scissors 为 sceneFlush ∪ bufferAge;送显 ring 只写 sceneFlush (accumulateFlush,含 backdrop 膨胀)。 3. Glass 回读为 flush 累加器 ∩ 节点 bounds,再按 kernel 膨胀; 每路输出独立缓存,不复用仍在使用的纹理池条目。 4. WAYLIB_DAMAGE=off|commit|on 开关;高亮由 WAYLIB_DEBUG_DAMAGE 与调试菜单 Off/Highlight 控制。 5. 补充 unit/scene/visual/锁屏与 manual playground 覆盖。 Log: 局部 GPU 重绘跟随场景图 damage。WAYLIB_DEBUG_DAMAGE=highlight 高亮脏区。WAYLIB_DAMAGE=off|commit|on 为生产开关。 Influence: 1. 运行 test_wdamagegraph 与 test_wsgdamage(gles2;有条件再跑 vulkan)。 2. 设置 highlight,移动窗口:本帧红,随后变绿并淡出。 3. WAYLIB_DAMAGE=off 应与 vendored batch renderer 全量重绘一致。 4. 打开玻璃/模糊窗口,确认只在脏 backdrop 上回读。
f9c215a to
fe24a79
Compare
Summary
QSGBatchRenderer(qtdeclarative v6.11.1) into waylib asWSGBatchRenderer, with version gates so one copy builds against Qt 6.8.0, 6.11.x and 6.12.x.WSGContextonQQuickRenderControlPrivate::sgbefore anyQQuickRenderControlis constructed, so the RHI window renderer and extra sources come from the fork viacreateRenderer().Test plan
QT_QUICK_BACKEND=software: software path unchanged, no crash on RenderControl creationQQuickRenderControlbeforeWOutputRenderWindowfatals (WSGContext must be installed first)Benchmark
glmark2-es2-wayland, 800×600 windowed, 2s per scene (not the official 10s run). Same GLES client against compositor
WLR_RENDERER=gles2|vulkan.WLR_SCENE_DISABLE_DIRECT_SCANOUT=1. Intel Arc Pro (ARL), Mesa 24.3. Isolated builds under~/tmp/glmark-bench/, no system install.Overall score (higher is better):
Per scene (FPS)
tinywl GLES logged
Atomic commit failed: Device or resource busymid-run; all 31 scenes still recorded.Summary by Sourcery
Vendor and integrate a Waylib scene-graph renderer with end-to-end partial-damage tracking, preserved-buffer rendering, and runtime diagnostics while retaining Qt's software path.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests:
Chores: