Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#ActualNyssa

Posted 13 January 2013 - 02:20 AM

GPUs tend to compute both sides of an 'if' statement (true and false cases) then after it has done this it picks the side that matches the 'if' statement outcome. It does this because of how parallel processing is handled and doesn't really behave like 'if' statements on the CPU. So my guess would be your having errors because it's reading uninitialized data from "a_Deformers" then accessing data beyond the array bounds of "u_XFormMatrix". Try giving your data default values and see if your errors continue.

 

For example, when a mesh doesn't need skinning set all values of "a_Deformers" to zero, that way its elements are within your array bounds of "40". 


#4Nyssa

Posted 13 January 2013 - 02:16 AM

GPUs tend to compute both sides of an 'if' statement (true and false cases) then after it has done this it picks the side that matches the 'if' statement outcome. It does this because of how parallel processing is handled and doesn't really behave like 'if' statements on the CPU. So my guess would be your having errors because it's reading uninitialized data. Try giving your data default values and see if your errors continue.

 

For example, when a mesh doesn't need skinning set all values of "a_Deformers" to zero, that way its elements are within your array bounds of "40". 


#3Nyssa

Posted 13 January 2013 - 02:12 AM

GPUs tend to compute both sides of an 'if' statement (true and false cases) then after it has done this it picks the side that matches the 'if' statement outcome. It does this because of how parallel processing is handled and doesn't really behave like 'if' statements on the CPU. So my guess would be your having errors because it's reading uninitialized data. Try giving your data default values and see if your errors continue.


#2Nyssa

Posted 13 January 2013 - 02:11 AM

GPUs tend to compute both sides of an 'if' statement (true and false cases) then after it has done this it picks the side that matches the 'if' statement outcome. It does this because of how parallel processing is handled and doesn't really behave like 'if' statements on the CPU. So my guess would be your having errors because it's reading uninitialized data. Try giving your arrays default values and see if your errors continue.


#1Nyssa

Posted 13 January 2013 - 02:10 AM

GPU's tend to compute both sides of an 'if' statement (true and false cases) then after it has done this it picks the side that matches the 'if' statement outcome. It does this because of how parallel processing is handled and doesn't really behave like 'if' statements on the CPU. So my guess would be your having errors because it's reading uninitialized data. Try giving your arrays default values and see if your errors continue.


PARTNERS