Sign in to follow this  
inspired

newer graphic cards forsaking 2D support

Recommended Posts

Apparently some graphic cards do not provide very well accelerated support for 2D of any sort, and in some cases introduce extreme delays. This would seem to indicate that until card makers catch up with and cater to DX9, there will be a bunch of cards made that, based upon their look at DX8, provide poor 2D support. Here is what I have found; I hope you find the results of my investigation useful: http://inspiredcode.com/2Dslow.htm

Share this post


Link to post
Share on other sites
I would guess that the manufacturers are doing this for cost savings. 2D operations are probably emulated by converting them to 3D operations then sending them down the 3D pipeline, just like someone_at_microsoft suggested. It would seem to me to be cheaper to omit some dedicated 2D hardware which can be emulated in software. The biggest issue is probably poorly written drivers. I think the fixed-function pipeline is also emulated with shaders in most new graphics hardware now too.

Share this post


Link to post
Share on other sites
I don't see anything surprising about the IHV's optimizing both their hardware and their drivers based on the expected/common usage scenarios. Purely as a guess I'd imagine that IHV's spend little (if any) time on their fixed-function pipelines in favour of focusing on the programmable pipeline.

I'm not up to speed on the current state of play, but under Vista (as I understand it) there is no hardware acceleration for GDI/GDI+. The new DWM runs all of that stuff on the CPU now. I think there might be similar characteristics with current OS's.

Quote:
I was told well by someone that I need to think about D3D from a totally new mindset and not to force it to conform to the old ways I knew
This was very good advice, had I not read it in your write-up I would have said almost exactly the same [smile]

VB6 and D3D8 knowledge are pretty limited now. I used to do a lot of work with it, but I stopped several years ago. At a quick glance I think you're misunderstanding the clear operation, but equally I'm not entirely sure what you're trying to do. I'd hazard a guess that using render-to-texture for video (not to the backbuffer directly, this is your old-school way creeping in) and then using blending effects and/or per-vertex attributes to colorise it accordingly.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
"but under Vista (as I understand it) there is no hardware acceleration for GDI/GDI+. The new DWM runs all of that stuff on the CPU now. I think there might be similar characteristics with current OS's."

Win98 and Win2000 and possibly XP (I'll have to check) pass the GDI stuff to the acceleration, but not the GDIplus as far as I can tell so far. I have a GDI+ sub called strytchblt that I use in place of stretchblt to prevent the card from unsuccessfully trying to accelerate the GDI call.

Results:

GDI with Harware Acceleration ON: .7fps (yes, less than one fps)
GDI with Harware Acceleration OFF: 15fps approximately

GDI+ with Harware Acceleration ON: 15fps approximately
GDI+ with Harware Acceleration OFF: 15fps approximately

(GDI BitBlt with Harware Acceleration ON: 0 milliseconds approximately)
(GDI BitBlt with Harware Acceleration OFF: 16 milliseconds approximately)


From this I conclude:

1. Win98 & Win2000 pass GDI StretchBlt to the hardware accelerator.
2. Win98 & Win2000 pass GDI+ "StrytchBlt" to software, NOT Hardware.
3. Clearly the card is doing much worse than merely not accelerating.
4. StretchBlt is handled badly but BitBlt is accelerated properly.

----

I am showing the GDI and GDI+ results here as a point of reference regarding the 2D acceleration of cards. Because BitBlt is accelerated I expect it will be subject to the same size limitations as DX by graphic card. So I've also now posted my GDI+ StrytchBlt (in the link above) for those wanting to maintain an awesomely huge map in system memory to then parsel out piecemeal to DX.

----

I had previously found that with just a few API calls to GDI or GDI+ I could do some simple things, and had hoped that in DX8 D3D I might be able to do simple things in a simple way. But it is not so simple as I find out. Apparently in DX8 one needs to set up the whole world in order to set the table for tea.

But I have found the answer to life, the universe and everything in DirectX4VB; it could have been called "42". (Hitchhiker joke). I am now on lesson 3, and by the end of the weekend should be more than halfway through them, and in a week I should be done. Then if I don't see how to do what I need I'll ask something in a more intelligible way.

Until then, Jack, thanks very much for all the fish!

[Edited by - inspired on August 19, 2006 9:25:52 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this