Jump to content
  • Advertisement
Sign in to follow this  
TheKrust

anybody have a clue what this means?

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

teamCol.ps(92): error X6077: texld/texldb/texldp/dsx/dsy instructions with r# as source cannot be used inside dynamic conditional 'if' blocks, dynamic conditional subroutine calls, or loop/rep with break*. it comes up when I put parts of my pixel shader in a loop. I checked to see if I might have been defining multiple times, but that's not the case ~_~

Share this post


Link to post
Share on other sites
Advertisement
The error is actually very descriptive. You should try reading your error message sometime. The compiler designers put them in for a reason.

Basically, the error is saying the texld, texldb, texldp, dsx, and dsy instructions cannot be used inside of dynamic if blocks, dynamic subroutine calls, or loops, which is why putting them in a loop causes the error.

Share this post


Link to post
Share on other sites
Yes, I posted this question because I knew EXACTLY what that meant. Not like I would have tried to figure it out before hand.

Oh, and not even to mention that none of those words ever appear inside my code. Ever.

Share this post


Link to post
Share on other sites
While posting the loop that won't compile would have been nice, I'm pretty sure I know what's up even without it. You're trying to sample a texture inside an if, or inside a loop with a break, which isn't supported.

Share this post


Link to post
Share on other sites
There we go, yes, thank you very much. That fixed it. Now I just need to find another method, but that shouldn't be a huge problem.

Share this post


Link to post
Share on other sites
It's referring to the assembly instructions rather than HLSL. Admittedly that might not be so useful, but a search in the SDK doc for any of those instructions does in fact yield a doc page [wink]

FWIW, you're restricted on texture instructions inside conditional shader code because there is dependence on neighbouring pixels (derivatives feed into mip level selection) and by definition those neighbouring pixels may not have executed the same branch as the current one.

Computing ddx() and ddy() outside the branch and then using tex2Dgrad() is the usual solution.

hth
Jack

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!