How to enable 2D acceleration

Postings relating to old VirtualBox pre-releases
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to enable 2D acceleration

Post by mpack »

Technologov wrote:I am unable to enable it too on my Windows hosts.
My experience is similar to that of xasx.
Just to be clear, I was never able to enable (i.e. not grayed out) the GUI checkbox, but I was able to enable the 2D acceleration feature itself by editing the xml, after which it showed up in the GUI as checked but still grayed out.

Did you try editing the xml? Following my experience I would recommend that you set VRAM to 24MB, shut down all VMs and the GUI, add/edit the accelerate2DVideo="true" manually, THEN REBOOT THE HOST before running the GUI again. Hopefully you will now find that the option is enabled in the GUI, and you can run the guest.

The thing about VRAM is only a suspicion, it seems to need at least 20MB. There doesn't seem to be any other requirement (e.g. it doesn't need VT-x).
misha
Posts: 289
Joined: 19. Dec 2008, 11:10

Re: How to enable 2D acceleration

Post by misha »

For the 2D feature to be enabled 1. The guest OS type in VM Settings should be Windows and 2. Host Opengl should support a number of features used by the 2D functionality,
namely GL_ARB_multitexture, GL_ARB_shader_objects, GL_ARB_fragment_shader, GL_[ARB|EXT|NV]_texture_rectangle, GL_ARB_texture_non_power_of_two extension must be supported.

The test for the necessary functionality is done by a separate app and is NOT reflected in VBox logs. We'll add the possibility to view the 2D test results for discovering the exact reason of why 2D is not supported in any particular case.

Also note that enabling the 2D feature via xml will not actually enable it in case it is unsupported since the 2D support will be disabled on VM startup based on result of the 2D support test performed at that time.
There is also no much sense in measuring the dxdiag perfrmance for detecting whether the 2D is on since dxdiag is using Blit operations while 2D accelerates overlays only.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to enable 2D acceleration

Post by mpack »

misha wrote:Also note that enabling the 2D feature via xml will not actually enable it in case it is unsupported since the 2D support will be disabled on VM startup based on result of the 2D support test performed at that time.
There is also no much sense in measuring the dxdiag perfrmance for detecting whether the 2D is on since dxdiag is using Blit operations while 2D accelerates overlays only.
Sorry, I see you are from Sun, but that information is clearly wrong IMHO. Once you get the option enabled there is a huge and totally unmistakeable difference in performance, so editing the xml does seem to work, and running the dxdiag DirectDraw test does highlight that difference. 2D acceleration is about video overlays - DirectDraw, what else would highlight the benefit if not a DirectDraw test?

Also, are you sure that the OpenGL features you mention are 2D? Textures and shaders etc sound like 3D stuff to me.
misha
Posts: 289
Joined: 19. Dec 2008, 11:10

Re: How to enable 2D acceleration

Post by misha »

mpack wrote:Sorry, I see you are from Sun, but that information is clearly wrong IMHO. Once you get the option enabled there is a huge and totally unmistakeable difference in performance, so editing the xml does seem to work,
That certainly points out that the 2D support is available on your system and the 2D test made on vm startup succeedes. Are you sure you have OS type in VM settings set to "Windows"?
mpack wrote: and running the dxdiag DirectDraw test does highlight that difference. 2D acceleration is about video overlays - DirectDraw, what else would highlight the benefit if not a DirectDraw test?
Well, I'm actually glad that the dxdiag works better with 2D enabled in your case. This perhaps is caused by that the 2D functionality guest->host transport being faster than that used with the 2D off. In any way the dxdiag does test only Blt Lock/Unlock and does not test overlays IIRC, at least on XP.
But you can test whether the 2D is enabled with DX Caps Viewer (available e.g. with DirectX SDK) by checking the supported DDraw caps.
mpack wrote: Also, are you sure that the OpenGL features you mention are 2D? Textures and shaders etc sound like 3D stuff to me.
The OpenGL is actually a 3D engine per se, isn't it? So the 2D functionality is actually using the 3D API including textures and fragment shaders (for color conversion needs) for displaying the 2D video.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to enable 2D acceleration

Post by mpack »

misha wrote:
mpack wrote:Sorry, I see you are from Sun, but that information is clearly wrong IMHO. Once you get the option enabled there is a huge and totally unmistakeable difference in performance, so editing the xml does seem to work,
That certainly points out that the 2D support is available on your system and the 2D test made on vm startup succeedes. Are you sure you have OS type in VM settings set to "Windows"?
The settings summary for the VM in question says "OS type: Windows XP". I already knew that my hardware was capable of video overlays, the question was why the option was grayed out in the GUI.
misha wrote:
mpack wrote: and running the dxdiag DirectDraw test does highlight that difference. 2D acceleration is about video overlays - DirectDraw, what else would highlight the benefit if not a DirectDraw test?
Well, I'm actually glad that the dxdiag works better with 2D enabled in your case. This perhaps is caused by that the 2D functionality guest->host transport being faster than that used with the 2D off. In any way the dxdiag does test only Blt Lock/Unlock and does not test overlays IIRC, at least on XP.
Whatever the reason for the speed benefit, it's a valuable benefit. Incidentally, I thought that one reason why DirectDraw is faster is that the app is drawing directly into VRAM, so less blit overhead?
misha wrote:
mpack wrote: Also, are you sure that the OpenGL features you mention are 2D? Textures and shaders etc sound like 3D stuff to me.
The OpenGL is actually a 3D engine per se, isn't it?
Beats me - I have zero interest in 3D or OpenGL (I'm not a gamer or CAD user), but video is a job related interest of mine.
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: PUEL
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Re: How to enable 2D acceleration

Post by frank »

To be more specific: We are using 3D features of the host to accelerate 2D of the guest. So your graphics card has to support the proper 3D features to get 2D support for the guest.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: How to enable 2D acceleration

Post by mpack »

I'd just like to confirm that beta 2 now allows me access the "Enable 2D" option - it is no longer grayed out. I'm a happy bunny! :-)
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: How to enable 2D acceleration

Post by Technologov »

same here
Post Reply