12 Replies Latest reply on Mar 29, 2011 5:37 PM by MicahVillmow

    UAV questions

    hazeman
      How to use uav with linear memory format ( possible bug in CAL )

      The general question is how to sucessfully use linear format 2D image ( created with flag CAL_RESALLOC_GLOBAL_BUFFER ) with uav.

      In the CAL Programming guide ( section 7.3 ) we have nice example. There is 2d linear image and IL code uses raw uav to access it. Unfortunatelly it doesn't work. Function calCtxSetMem returns error CAL_RESULT_ERROR.

      Also typed uav returns the same error when we try to use it with linear 2d image format. Although it works with tiled format ( without flag ).

      I think this is a bug in CAL/driver. Linear format should be supported by uavs ( as stated in CAL programming manual ).

      My system is 64 bit ubuntu jaunty with 10.11 driver and 2.2 sdk.

      PS. The code is available in CAL++ uavwrite example ( http://sourceforge.net/projects/calpp/ ), svn version

        • UAV questions
          hazeman

          I'm still waiting for any answer from ATI. I think that ignoring post with bug report is really unprofessional ( but it's not the first time I see it on this forum ... ).

          • UAV questions
            MicahVillmow
            hazeman,
            calpp doesn't build with our internal versions, wavefrontPerSIMD is no longer a member of CALfuncInfoRec.
              • UAV questions
                hazeman

                I've removed references to wavefrontPerSIMD in svn version.

                Also now uavwrite has by default not working version of uav ( with flag CAL_RESALLOC_GLOBAL_BUFFER ). To get working version simply comment line 260 and uncomment line 258 in uawwrite.cpp example.

              • UAV questions
                MicahVillmow
                Thanks, we have someone looking into this.
                • UAV questions
                  MicahVillmow
                  hazeman,
                  The issue is with CAL, so the fix will be in a catalyst release and not a SDK release.
                  • UAV questions
                    MicahVillmow
                    hazeman,
                    I am sorry that this got dropped of my radar. I was on vacation when this got fixed internally. The problem isn't that there is a bug in the driver, but an error in the documentation.
                    Here is the result of investigating the issue:
                    "The issue here per the forum comments is that the user is trying to create a
                    linear 2D UAV, and that is only allowed on 7xx.

                    For 8xx all 2D UAVs are required by hardware to be tiled. Linear is not
                    supported.

                    If you want to use a linear UAV, it should be allocated as 1D with the
                    CAL_RESALLOC_GLOBAL_BUFFER flag set.

                    CAL will fail CalCtxSetMem when a 2D tiled resource is trying to be bound as a
                    UAV. That is the only time that a resource is given a type. So CAL will fail
                    at that time based on the hardware we are running on.

                    The code snippet in the documentation must have been taken from a 7xx example.
                    "
                      • UAV questions
                        hazeman

                        Thank you for replay.

                        I can verify that it's possible to create 1D Image with width>maxResource1DWidth when CAL_RESALLOC_GLOBAL_BUFFER flag is set. This solves the problem for me.

                        But it should be explicitly written in documentation! It really isn't obvious that you can allocate resource with WIDTH greater than MAXIMUM WIDTH !

                         

                      • UAV questions
                        MicahVillmow
                        Yeah, I am pushing to have the documentation updated for our next release.