Jump to content
  • Advertisement
Sign in to follow this  
AverageJoeSSU

DX11 Strategies for implementing GUIMark2 Bitmap with DX11

This topic is 2069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Topic sums it up really...

 

What is the best/quickest way to push independently transformed bitmaps to the screen?

 

Particularly from the perspective of, doing it in DX9, and then changing subsystems to leverage DX11 features.

 

For Example, perhaps using the compute stage to calculate transforms on the individual bitmaps.

 

Or perhaps binding a texture array to prevent state switching. (that may be a previous OGL limitation)

 

Thanks,

Joe

 

For those of you who don't know what this benchmark is....

http://www.craftymind.com/factory/guimark2/FlashGamingTest.html

Share this post


Link to post
Share on other sites
Advertisement

The best way to do is to do all the transformation in software and store the vertices in a huge buffer that is already transformed. Then send the whole batch to the screen to draw the whole thing at once.

Share this post


Link to post
Share on other sites

The best way to do is to do all the transformation in software and store the vertices in a huge buffer that is already transformed. Then send the whole batch to the screen to draw the whole thing at once.

Okay so is this largely unchanged in dx11?

 

by calcing transforms in software that means you have to push a full transform for each bitmap. Seems to me like you could instead pass translates and calc transforms on the GPU.

 

and compute shaders wouldnt be useful? or passing in points and reconstructing the quad for the bitmap in a geometry shader?????

 

come on guys i know some of you out there can think up tweaks!

 

-J

Share this post


Link to post
Share on other sites

Okay so is this largely unchanged in dx11?
 
by calcing transforms in software that means you have to push a full transform for each bitmap. Seems to me like you could instead pass translates and calc transforms on the GPU.
 
and compute shaders wouldnt be useful? or passing in points and reconstructing the quad for the bitmap in a geometry shader?????
 
come on guys i know some of you out there can think up tweaks!

 

The only way you could batch that way is to pass an array of matrices to your vertex shader along with some id for each image that tells you which index of the array you want to use for each image. You either do it on the CPU side or waste Shader Registers. Pick your poison

Edited by BornToCode

Share this post


Link to post
Share on other sites

You can absolutely do almost everything on the GPU if DX11 is your target spec. Take a look at the code for SpriteBatch for some ideas.

 

Also you don't have to pass an entire matrix per sprite if you don't need that much information, nor do you have to pass an ID (vertex shaders have access to SV_InstanceID which is automatically generated by the GPU). You also don't  waste "Shader Registers", that's an outdated notion from DX9. In DX11 you have the option of using constant buffers, vertex buffers, or even structured buffers for storing per-instance data.

Share this post


Link to post
Share on other sites

Awesome!

 

You can absolutely do almost everything on the GPU if DX11 is your target spec. Take a look at the code for SpriteBatch for some ideas.

 

Also you don't have to pass an entire matrix per sprite if you don't need that much information, nor do you have to pass an ID (vertex shaders have access to SV_InstanceID which is automatically generated by the GPU). You also don't  waste "Shader Registers", that's an outdated notion from DX9. In DX11 you have the option of using constant buffers, vertex buffers, or even structured buffers for storing per-instance data.

 

This is exactly the kind of stuff i was looking for!!!

Share this post


Link to post
Share on other sites

I'm a bit surprised that i do not see use of the other shader stages.

 

Things like http://zeeky-h-bomb.blogspot.com/2010/03/instancing-and-geometry-shader.html

 

what he is doing (midway through the article). I guess this prohibits you from doing other things on the CPU kind of like an ALL or Nothing kind of thing.

 

For Example generating mirrored tex coords would then have to be done in a shader... but i guess it isnt that big of a deal.

Edited by AverageJoeSSU

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!