Jump to content
  • Advertisement
Sign in to follow this  
akhin

HLSL SMs & Arithmetic Instruction Slots

This topic is 2757 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

Hi all ,

Recently , when I was implementing a shader , I got this error from compiler :

....fx(55,6):
error X5608: Compiled shader code uses too many arithmetic instruction slots (67).
Max. allowed by the target (ps_2_0) is 64.


So for the solution , I first converted my PS to SM3 ( (ps_3_0)

but it did not work , then I also used vs_3_0 for the vertex shader in the same technique

with that pixel shader and it worked,

What I want to ask is how I can learn about the limits of SMs , such as how many operations I can make ,

how much memory/variables I can use etc...

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the links , as I looked at two pages :

http://msdn.microsoft.com/en-us/library/bb509655(v=vs.85).aspx

http://msdn.microsoft.com/en-us/library/bb509656(v=vs.85).aspx



I have also some questions about implementing shaders.
I currently use 1 FX file and collecting all my ligh related techniques,VSs and PSs in that one.


In CPU side , when I "set" a technique , is what is beling loaded on the GPU ,

the all compiled instructions in that FX file

or

just the ones in the techniques I am using ?

Share this post


Link to post
Share on other sites
When you begin a technique and then begin a pass from that technique, the effect sets the vertex shader + pixel shader from that pass onto the device. The device only supports setting one of each shader type, so that's all the effect can do.

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!