This is not GPU rendered

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

This is not GPU rendered

Post by devc1 »

Image

Hello everyone 🙂

I wanted to share progress on my compositor. It is entirely CPU-rendered and uses multiple threads to render different screen regions in parallel.

The compositor uses a dirty-rectangle approach: when windows move, only the updated regions are redrawn. Each region is processed by worker threads, which allows even relatively heavy effects like Gaussian blur (radius ~10) and per-pixel opacity blending to remain smooth on Vms with VMX on good cpus.

Key points of the design:
• Multithreaded tile/region-based rendering
• AVX2-accelerated two-pass Gaussian blur
• Premultiplied alpha blending with both per-pixel and global opacity
• Shared temporary buffers for blur passes indexed by real screen coordinates
• Smooth window dragging even with blur and transparency enabled

Interestingly, on bare metal with an 8-thread CPU, moving windows feels almost like GPU compositing. Even inside a VM (with enough vCPUs and vmx), the compositor remains reasonably smooth.


Performance difference between environments is also noticeable:
• QEMU with WHPX: smooth
• Bare metal: smooth with a lot of cuts in fast movements, maybe due to frame canceling

At this point, the main challenges seem to be pipeline correctness and surface separation rather than performance.

I’d love feedback from people experienced with compositors or graphics pipelines on how they handle blur + alpha + partial redraw without artifacts.
Last edited by devc1 on Wed Feb 04, 2026 2:01 am, edited 2 times in total.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

Update:
Added frame canceling in the blur, and until now I did not see visible backlog artifacts, and it seems reasonnably smooth even in VMWARE VM with Vt-x disabled (while moving window at low speeds), and even smoother on QEMU with whpx, is it possible to send videos?

And this time tried it with a big 800x800 Window, still did not apply backlog in blending and other stuff, because it did artifacts at first, but for blur, "it just works" haha

Update: tried it on bare metal, when moving window at high speeds there are visible frame cuts, maybe should implement full frame canceling of both the blur and the alpha blending, but for now it is not that bad for a big window, also I think maybe I should reimplement the blur using integer implementation as it may give visible performance improvements.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

Guys why does it seem smoother on QEMU with WHPX than on bare metal? I tried moving Window fast on QEMU and it seems smooth most of the time almost as if it were gpu rendered? Also, should maybe optimize AVX2 Blur implementation more.
Octocontrabass
Member
Member
Posts: 6258
Joined: Mon Mar 25, 2013 7:01 pm

Re: This is not GPU rendered

Post by Octocontrabass »

QEMU is faster because it's using the Windows driver for your GPU. The Windows driver knows how to use DMA to copy pixels into the framebuffer, and it might also run the GPU in a high-performance mode. On bare metal, you have to copy pixels using the CPU, and the GPU might be stuck in a low-power mode.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

How to get basic 3D acceleration on igpus like Intel Iris XE for TigerLake or on gpus like Nvidia MX450, or at least in a VM in Windows, VMSVGA found it disabling 3d and needing older versions to enable it,

Is there something straightforward that can be read to get basic 3d acceleration on such platforms.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

I also found bare metal slower in many things like IPC, Memory allocations. And it is slower in blur even if not drawn to the screen, only in a backbuffer, and even if mapped as large pages.
Is it needed to configure cpu clocks?
Octocontrabass
Member
Member
Posts: 6258
Joined: Mon Mar 25, 2013 7:01 pm

Re: This is not GPU rendered

Post by Octocontrabass »

devc1 wrote: ↑Mon Feb 02, 2026 2:38 pmIntel Iris XE for TigerLake
Here are the manuals.
devc1 wrote: ↑Mon Feb 02, 2026 2:38 pmNvidia MX450
Good luck.
devc1 wrote: ↑Mon Feb 02, 2026 2:38 pmVMSVGA
The "documentation" is other drivers.
devc1 wrote: ↑Mon Feb 02, 2026 2:41 pmIs it needed to configure cpu clocks?
Maybe, if the firmware's default settings are limiting performance. It could also be throttling due to power or thermal limits, in which case you could try placing idle cores in deeper sleep states.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

With AVX2 got around 170 FPS full 1080p blur

Update: got around 240 FPS With AVX512, radius 15, full 1080p 2 pass gaussian blur
Last edited by devc1 on Wed Feb 11, 2026 1:17 am, edited 1 time in total.
devc1
Member
Member
Posts: 461
Joined: Fri Feb 11, 2022 4:55 am

Re: This is not GPU rendered

Post by devc1 »

with VMSVGA, 3D gets disabled maybe when Vmware tools are not detected I think, because I tried their own examples and they worked, but after updating to newer VM version, they gave same results as my OS. which is that VMSVGA3D supported but SVGA_FIFO_3D_HWVERSION was set to 0.
Also I am using Windows, so I do not think I have 3d acceleration support in QEMU.
for Intel Iris Xe, that is a huge spec.
Post Reply