HLSL - Two or more loop attributes

Started by
1 comment, last by Migi0027 10 years, 7 months ago

Hi guys! wink.png

Just one quick question, how would one specify multiple attributes to a loop, the attributes that are needed for my shader to operate are the following:

  • loop (The number of iterations is dynamic (float, cpu -> gpu), the compiler tries to unroll to infinity)
  • allow_uav_condition (Well, I need to read an UAV)

But for now I haven't found the syntax anywhere. Please don't say this is impossible...

Thanks!

-MIGI0027

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

Advertisement
You can concatenate attributes (remember the tesselation attributes) like so:

[loop]
[allow_uav_condition]
for (int i = 0; i < 12; i++)
{
   // blah...
}
Haven't really checked it with a sensible sample, but at least it compiles.

Thanks!

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

This topic is closed to new replies.

Advertisement