VOGONS


Hardware overlay support

Topic actions

First post, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

Is there any possibility that HW overlay support is brought to dgVoodoo2? HW overlay works perfectly on my Windows 7 machine, but my current Win11 doesn't support HW overlay. There are a few games and benchmark applications that need HW overlay support to run properly, for most games there's already a patch to replace that, but for other apps there aren't any other option.

previously known as Discrete_BOB_058

Reply 2 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Dege wrote on 2022-11-25, 17:58:

Fullscreen hw overlay? Could you give me an example for this plz?

Here's an application that uses HW overlay.
http://www.angelcode.com/dev/overlay/

Some games such as the Godfather uses HW overlay too, and although there's SilentPatch which removes HW overlay cap dependency, it doesn't work with all regional versions (something which I couldn't track but only read in some non-English forums).

On my Intel GPU based Windows 7, the overlay would change the theme to basic and then render it. On my Windows 11 machine, it says HW overlay isn't supported

previously known as Discrete_BOB_058

Reply 3 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

Hi,
Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for every application in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Direct3D\Shims\EnableOverlays]
More info about my original HW overlay related problem and how the workaround works:
https://social.msdn.microsoft.com/Forums/Wind … showdevelopment

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 4 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-26, 07:08:
Hi, Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for […]
Show full quote

Hi,
Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for every application in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Direct3D\Shims\EnableOverlays]
More info about my original HW overlay related problem and how the workaround works:
https://social.msdn.microsoft.com/Forums/Wind … showdevelopment

I tried doing the same as you suggested but the problem still remains, it complains about the lack of HW overlay. I think this is because DDCAPS_OVERLAY is assigned NO in DxCapsViewer?

Edit: I tried your Desktop Movie application, it ran with Admin Privileges but after selecting video, it blackens the desktop and the windows get a higher contrast (the GPU driver didn't crash yet).

Attachments

previously known as Discrete_BOB_058

Reply 5 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2022-11-26, 07:20:
Falcosoft wrote on 2022-11-26, 07:08:
Hi, Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for […]
Show full quote

Hi,
Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for every application in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Direct3D\Shims\EnableOverlays]
More info about my original HW overlay related problem and how the workaround works:
https://social.msdn.microsoft.com/Forums/Wind … showdevelopment

I tried doing the same as you suggested but the problem still remains, it complains about the lack of HW overlay. I think this is because DDCAPS_OVERLAY is assigned NO in DxCapsViewer?

Actually both video driver support AND the above registry key are necessary for HW video overlays to work on Windows 8/10/11. I do not know the intel driver but I know that none of the AMD Windows 10/11 drivers supports HW overlays anymore. But NVIDIA drivers still work.
It's not possible to make screenshots of HW overlay surfaces but as you can see in case of missing/disabled registry key overlaydemo.exe throws an error but in case of enabled registry key it shows the normal application window (and you can actually see the TV noise pattern but screenshots can only show the missing wallpaper and the destination color-key) :
Not working:

ov1.png
Filename
ov1.png
File size
355.22 KiB
Views
2224 views
File license
Public domain

Working:

ov2.png
Filename
ov2.png
File size
300.37 KiB
Views
2224 views
File license
Public domain
Last edited by Falcosoft on 2022-11-26, 07:44. Edited 1 time in total.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 6 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-26, 07:36:
Actually both video driver support AND the above registry key are necessary for HW video overlays to work on Windows 8/10/11. I […]
Show full quote
BEEN_Nath_58 wrote on 2022-11-26, 07:20:
Falcosoft wrote on 2022-11-26, 07:08:
Hi, Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for […]
Show full quote

Hi,
Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for every application in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Direct3D\Shims\EnableOverlays]
More info about my original HW overlay related problem and how the workaround works:
https://social.msdn.microsoft.com/Forums/Wind … showdevelopment

I tried doing the same as you suggested but the problem still remains, it complains about the lack of HW overlay. I think this is because DDCAPS_OVERLAY is assigned NO in DxCapsViewer?

Actually both video driver support AND the above registry key are necessary for HW video overlays to work on Windows 8/10/11. I do not know the intel driver but I know that none of the AMD Windows 10/11 drivers support HW overlays anymore. But NVIDIA drivers still work.
It's not possible to make screenshots of HW overlay surfaces but as you can see in case of missing/disabled registry key overlaydemo.exe throws an error but in case of enabled registry key it shows the normal application window (and you can actually see the TV noise pattern but screenshots can only show the missing wallpaper and the destination color-key) :
Not working:
ov1.png
Working:
ov2.png

Ok both of my Nvidia GPUS don't support HW overlays. Can you mention your Nvidia HW? In my case you can see DxCapsViewer says NO against DDCAPS_OVERLAY so I wonder when it was removed...

Attachments

previously known as Discrete_BOB_058

Reply 7 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2022-11-26, 07:42:

Ok both of my Nvidia GPUS don't support HW overlays. Can you mention your Nvidia HW? In my case you can see DxCapsViewer says NO against DDCAPS_OVERLAY so I wonder when it was removed...

As I have written above you have to explicitly enable HW overlay for every application in the registry. And dxcapsviewer.exe is just an application so you have to add it to the registry shim in order to work.

Not working:

ov1.png
Filename
ov1.png
File size
704.01 KiB
Views
2205 views
File license
Public domain

Working:

ov2.png
Filename
ov2.png
File size
641.78 KiB
Views
2205 views
File license
Public domain

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 8 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-26, 07:55:
As I have written above you have to explicitly enable HW overlay for every application in the registry. And dxcapsviewer.exe is […]
Show full quote
BEEN_Nath_58 wrote on 2022-11-26, 07:42:

Ok both of my Nvidia GPUS don't support HW overlays. Can you mention your Nvidia HW? In my case you can see DxCapsViewer says NO against DDCAPS_OVERLAY so I wonder when it was removed...

As I have written above you have to explicitly enable HW overlay for every application in the registry. And dxcapsviewer.exe is just an application so you have to add it to the registry shim in order to work.

Not working:
ov1.png

Working:
ov2.png

Added it now, there's no change. So probably GeForce 10 series removed overlay support? I will verify from some users. But now it will require emulation to be used, like through dgVoodoo2.

previously known as Discrete_BOB_058

Reply 9 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2022-11-26, 08:02:

Added it now, there's no change. So probably GeForce 10 series removed overlay support? I will verify from some users. But now it will require emulation to be used, like through dgVoodoo2.

Then it can be either GeForce 10 hardware or the Win 11 driver or Win 11 itself. Unfortunately I cannot test Win 11 with my current hardware.
If you have Windows 7/8/10 you can try it to confirm/refute whether this problem is Win 11 specific.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 10 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-26, 08:06:
BEEN_Nath_58 wrote on 2022-11-26, 08:02:

Added it now, there's no change. So probably GeForce 10 series removed overlay support? I will verify from some users. But now it will require emulation to be used, like through dgVoodoo2.

Then it can be either GeForce 10 hardware or the Win 11 driver or Win 11 itself. Unfortunately I cannot test Win 11 with my current hardware.
If you have Windows 7/8/10 you can try it to confirm/refute whether this problem is Win 11 specific.

Currently, my Intel 3rd Gen Pentium CPU with Intel GPU supports HW overlay on both Windows 7 and Windows XP. Both were tested using the latest driver available. For now I can't test Windows 10 anywhere except a VM. As I wrote in my first post, the game "The Godfather" requires HW overlay, so it could be quite interesting to see how that game does (without SilentPatch). Unfortunately, I only could test it on Windows 7 only, and while the game crashes on moving the mouse in main menu, the video playback was very bad. The game played the videos completely well and it also didn't crash on mouse movement on WinXP. I will be interested to know how the game works out on your end if you can test.

On Windows 7, I made a test using my phone camera (Warning, flickering and external sound):
https://www.youtube.com/watch?v=qEOJQcNhI5A

previously known as Discrete_BOB_058

Reply 11 of 22, by Dege

User metadata
Rank l33t
Rank
l33t

So, yes, DD overlays could be implemented in dgVoodoo but it'd never be true hw composition. The other restriction is, that dgVoodoo always needs a window for DD even in windowed mode, and it cannot draw out of the window boundaries, unlike original DDraw. The example application you linked controls the whole primary surface (the full desktop) without creating any rendering window, and places an overlay image to the center. That's what wouldn't work with dgVoodoo unless a borderless window covering the whole screen is created after all. I don't know how DD applications and games utilize overlays in general, but if in the same way as the example app (which can be achieved with a transparent layered window without DD), then there wouldn't be much use for all of it in dgVoodoo.

Btw, Win7 supported hw overlays because if it detects and application trying to create overlays then it shuts down the desktop compositor and switches back to "simplified color scheme" (or sg like that, I cannot remember the English term).
With Win8 the compositor cannot be shut down so it's obvious that hw DD overlays are no longer supported. But a new functionality in DXGI appears in return, you can create swap chains and give them to the compositor to emulate overlays within a window. If the display hw supports true Multiplane Overlays then the composition is done in hardware like it was done in the DD-days. It's transparent to the application but I guess if a certain set of conditions are met (like fullscreen sized non-transparent window, lessequal number of overlays than the hw supports, etc) then the compositor just gives all swapchain overlays directly to the hardware instead of drawing them as texture quads to the screen through shaders. And it's a Win10+ feature.

Reply 12 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
Dege wrote on 2022-11-27, 19:25:

...With Win8 the compositor cannot be shut down so it's obvious that hw DD overlays are no longer supported.

Actually HW Directdraw overlays work on Win8 if the above mentioned registry key is set for the application. What is more HW overlays seemingly work better on Win8 than on Win7 since no Aero/Basic theme switching happens.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 13 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-27, 22:11:
Dege wrote on 2022-11-27, 19:25:

...With Win8 the compositor cannot be shut down so it's obvious that hw DD overlays are no longer supported.

Actually HW Directdraw overlays work on Win8 if the above mentioned registry key is set for the application. What is more HW overlays seemingly work better on Win8 than on Win7 since no Aero/Basic theme switching happens.

Yes I think there's some effect there at least. On Win11 the effect is that I lose the windows background image, so something definitely happens.

Out of curiosity I took the risk to end dwm.exe on my main machine and it killed explorer and restarted all open windows, it also lost the background momentarily, but there was no adverse effect on the UI, the only extreme effect was the driver crashed on 7th or the 8th time ending dwm.exe with Code-43.

But with Falcosoft's technique this ending of process wasn't necessary/talking place.

previously known as Discrete_BOB_058

Reply 14 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

SilentPatch, which was made for the Godfather game, seems to be not supported (he uses an RTX 2070M so that should be okay with D3D9 otherwise, right?) for non-English versions of the game, so having dgVoodoo2 support HW overlay can be much helpful. Here's the case if you want to read it:
https://sourceforge.net/p/dxwnd/discussion/ge … ead/e3cd262b26/

previously known as Discrete_BOB_058

Reply 15 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-11-26, 07:08:
Hi, Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for […]
Show full quote

Hi,
Actually this is a problem since Windows 8. Hardware overlay is deprecated and you have to explicitly enable HW overlay for every application in the registry:
[HKEY_CURRENT_USER\Software\Microsoft\Direct3D\Shims\EnableOverlays]
More info about my original HW overlay related problem and how the workaround works:
https://social.msdn.microsoft.com/Forums/Wind … showdevelopment

On DxWnd forums, people got overlay to work even without this tweak... at least on Win11

previously known as Discrete_BOB_058

Reply 16 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2022-12-28, 05:56:

...
On DxWnd forums, people got overlay to work even without this tweak... at least on Win11

I suspect that with DxWnd some kind of emulation is involved.
The above tweak only makes sure that if you have proper hardware AND driver support for HW overlay then you can use this feature on Win8+ (without emulation or other wrappers/hacks).

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 17 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-12-28, 06:55:
BEEN_Nath_58 wrote on 2022-12-28, 05:56:

...
On DxWnd forums, people got overlay to work even without this tweak... at least on Win11

I suspect that with DxWnd some kind of emulation is involved.
The above tweak only makes sure that if you have proper hardware AND driver support for HW overlay then you can use this feature on Win8+ (without emulation).

That's what I thought, but he explained his tests were without DxWnd
https://sourceforge.net/p/dxwnd/discussion/ge … 26/?page=1#43ad

previously known as Discrete_BOB_058

Reply 18 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
BEEN_Nath_58 wrote on 2022-12-28, 07:16:

That's what I thought, but he explained his tests were without DxWnd
https://sourceforge.net/p/dxwnd/discussion/ge … 26/?page=1#43ad

In that thread in the post right after yours "gho" makes my suspicion quite explicit:

I don't think I am contradicting anything about overlays and vogons because I am emulating overlays, I'm not using them! So the game believes it is showing an overlay, but in reality it is using plain memory surfaces.

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 19 of 22, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Falcosoft wrote on 2022-12-28, 07:22:
BEEN_Nath_58 wrote on 2022-12-28, 07:16:

That's what I thought, but he explained his tests were without DxWnd
https://sourceforge.net/p/dxwnd/discussion/ge … 26/?page=1#43ad

In that thread in the post right after yours "gho" makes my suspicion quite explicit:

I don't think I am contradicting anything about overlays and vogons because I am emulating overlays, I'm not using them! So the game believes it is showing an overlay, but in reality it is using plain memory surfaces.

"Edited post"

Basically he is trying to emulate an overlay, even if he has never tested natively, the confusion comes as:

  • He has an officially overlay supported GPU (Intel) while I don't (Nvidia).
  • Till the latest stable DxWnd release 2.05.90 there is no handling of overlay. Overlays appear black those versions (more on how I know next).
  • We start testing the Godfather and the game works fine on his end, while it doesn't on mine.
  • After many tries, he successfully manages to emulate the overlay with DxWnd interface, but it doesn't work on my end probably because Windows can't get to do anything to the overlay (I only test Godfather and overlaydemo.exe).
  • He tries to force MaxOverlays=0x1 value but the game creates a few more log lines and then crashes. So I stop trying.
  • Now today I move to other games: NASCAR Revolution and NASCAR Road Racing.If I use DxWnd old versions, the video is black always, but it DOESN'T CRASH.
  • If I enable DirectX/Emulate Overlay, the videos appear, and they behave like the games really use overlay (a green colour here and there, screenshots having the infamous purple colour).
  • And if I run the Nascar games directly in Windows, the videos appear fine, plays properly. It is as if overlay is working even though dxviewer.exe says it isn't available; I believe probably it switches to another method to play the video?
  • Maybe DxWnd itself doesn't let/support the "switch to another method", so it was forced to add this overlay emulation. But if this is true, what is the Godfather and overlaydemo.exe doing special that prevents the "switch"?
  • I assume MaxOverlays=0x1 is saying to render the video on "Overlay Surface #1"; so that means the other two apps are not crashing because of lack of overlay surface but something else.
  • This also adds a question for the desktop movie app, if it really needs overlay, is it definitely because of the support for DDSCAPS_OVERLAY or something else?

previously known as Discrete_BOB_058