Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualConny14156

Posted 06 January 2013 - 08:48 AM


and am not sure how am suppose to check the buffer memory location.
so I just took a screenshot >.<
am guessing its nots aligned as there are alot of things that ends with 8 XD
http://imgur.com/eucRH
and this second picture is how it looks like when it does work (by undeclare the string)
http://imgur.com/fyfYs
You are right.
As you can see in first screenshot address of cBufferObject.WVP.r is 0x00c45998 which means it's not aligned.
While in second screenshot it's 0x01de5950 so it is aligned and doesn't crash.

Now you just need to figure which new call to fix, or use special functions to load/unload unaligned data into local variables.

 

Now for the most retard question of the year,

how can commeting/uncommeting a std::string change my buffer into a 16 bit or not? while those two doesnt even have anything to do with each other for now

You're not using new, but you're using smart_ptr, so it's still dynamic memory allocation.

 

 

 

I did some googling and found a page that indicates that Microsoft's implementation of shared_ptr correctly aligns its objects. I also found a 2010 post that said that there was posts known issue with boost::make_shared() such that it did not align dynamically created objects, although explicitly constructing a boost::shared_ptr would properly align the dynamically created object.

 

 

 

So i would try calling shared_ptr() instead of make_shared().

If I try to call shared_ptr it doesn't want to properly work, Its doesnt seem it want to return the component correctly so when I try to add it its complain its empty sad.png

 

 

 

 

 

Edit:
I solved it now I think for good.

I removed every xmmatrix and replaced it with XMFLOAT4x4 and I just use xmstore and xmload to transfer the values.


#1Conny14156

Posted 06 January 2013 - 08:05 AM

and am not sure how am suppose to check the buffer memory location.
so I just took a screenshot >.<
am guessing its nots aligned as there are alot of things that ends with 8 XD
http://imgur.com/eucRH
and this second picture is how it looks like when it does work (by undeclare the string)
http://imgur.com/fyfYs
You are right.
As you can see in first screenshot address of cBufferObject.WVP.r is 0x00c45998 which means it's not aligned.
While in second screenshot it's 0x01de5950 so it is aligned and doesn't crash.

Now you just need to figure which new call to fix, or use special functions to load/unload unaligned data into local variables.

 

Now for the most retard question of the year,

how can commeting/uncommeting a std::string change my buffer into a 16 bit or not? while those two doesnt even have anything to do with each other for now

You're not using new, but you're using smart_ptr, so it's still dynamic memory allocation.

 

 

 

I did some googling and found a page that indicates that Microsoft's implementation of shared_ptr correctly aligns its objects. I also found a 2010 post that said that there was posts known issue with boost::make_shared() such that it did not align dynamically created objects, although explicitly constructing a boost::shared_ptr would properly align the dynamically created object.

 

 

 

So i would try calling shared_ptr() instead of make_shared().

If I try to call shared_ptr it doesn't want to properly work, Its doesnt seem it want to return the component correctly so when I try to add it its complain its empty :(


PARTNERS