AnsweredAssumed Answered

wrong alignment on amd graphic card

Question asked by gidden on Jun 28, 2013
Latest reply on Jul 2, 2013 by gbilotta

i have this struct :

 

#pragma pack(push)

#pragma pack(1)

typedef struct

{

  uint a;

  uint b;

  float c;

  float2 d;

  float2 e;

} TMyStruct;

#pragma pack(pop)

 

When I try acces "c" it is ok. But when I try acces d.x, it returns d.y

Problably it aligns "c" on float2.

When I put "c" on end, struct has good size.

On nVidia cards it works ok, but on AMD Radeon HD 7670M it does not work.

Outcomes