Skip to content

Commit

Permalink
kram - fix Win build that doesn't have ATE
Browse files Browse the repository at this point in the history
  • Loading branch information
alecazam committed May 30, 2021
1 parent 90f554d commit 44875cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libkram/kram/KramImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,13 +461,16 @@ bool KramDecoder::decodeBlocks(
// copy srcData if using ATE, it says it needs 16-byte aligned data for encode
// and assume for decode too. Output texture is already 16-byte aligned.
const uint8_t* srcData = blockData;

#if COMPILE_ATE
vector<uint8_t> srcTexture;
if (useATE && (((uintptr_t)srcData & 15) != 0)) {
srcTexture.resize(blockDataSize);
memcpy(srcTexture.data(), srcData, blockDataSize);
srcData = srcTexture.data();
}

#endif

Int2 blockDims = blockDimsOfFormat(blockFormat);
bool isVerbose = params.isVerbose;
const string& swizzleText = params.swizzleText;
Expand Down

0 comments on commit 44875cd

Please sign in to comment.