2

So I had this HLSL structure that compiled successfully in VS2015 when used:

struct SpatialHashingCellData
{
    uint count;
    uint specks[MAX_SPECKS_PER_CELL];
};

It was used like this:

    gSPCells[cellID].specks[posToWrite]= speckIndex;

But then I switched to VS2017 and I had to make this change in order for it to compile because there was an error: internal error : l-value expected

struct SpatialHashingCellData
{
    uint count;
    struct { uint index; } specks[MAX_SPECKS_PER_CELL];
};

... and changed:

    gSPCells[cellID].specks[posToWrite].index = speckIndex;

I feel kinda stupid for not knowing what is happening here. Hope anyone could clear this out for me, please :)

Best regards, Bojan

TheBojanovski
  • 137
  • 1
  • 7
  • 1
    This sounds like a compiler bug. Your best chance is to isolate the failure in a simple hlsl sample file with a fxc command line and post a bug report on the microsoft DirectX forum : http://forums.directxtech.com/index.php – galop1n Aug 01 '17 at 19:44

0 Answers0