Skip navigation
Currently Being Moderated

Is Pixel Bender 3D Too Aggressive in Attribute Optimizations?

Oct 5, 2011 12:55 PM

Maybe it's just me and I'm missing the off switch, but is anyone else finding Pixel Bender 3D just too aggressive right now at optimizing the vars?  I'm finding myself having to sum up all vertex attributes and multiply by some extremely small constant and then add to the final color just so that the compiler doesn't blow away the registers. 

 

If I'm missing the off switch, please let me know.  Because for development, it's becoming a real source of error.

 
Replies
  • Currently Being Moderated
    Oct 6, 2011 4:05 PM   in reply to fluidllc

    Can you post an example of the actual erors that you're seeing. We are very aggresive about optimizing variables because of the lack of registers available, but the optimizations should not be changing the behaviour of the kernsl.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 16, 2011 11:40 AM   in reply to AIF Bob

    Well, thats indeed a problem. If a shader does not use a parameter, it is simply not counted in and optimized away. This is a huge problem when you not use the ProgramConstantsHelper, because every time the registers and offsets are changing.

    It would somehow be nice if you could set in which register you want to have a parameter or turn this optimization off.

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2011 11:25 AM   in reply to Pak762

    Have you looked at the CylinderSphereNoHelper example? That uses the vertex and fragmber register maps that you can get from the compile programs to tell you how to set the values that are passed in.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 19, 2011 11:53 AM   in reply to AIF Bob

    I already use the registers and wrote my own simple code to get the needed values from the register maps, telling me in which register and which offset I have to put the numbers in.

     

    The only problem is, that PixelBender3D does not put parameters in the registers if they are not used in the shader. But everything else is just fine.

     

    Thanks

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points