Skip to content

Commit

Permalink
[VP] Add Assert Message in GenKrnBin
Browse files Browse the repository at this point in the history
Hex file may be not 28 bytes aligned. Add assert message if hex is not aligned.
  • Loading branch information
peiyigu-intel authored and intel-mediadev committed Aug 2, 2023
1 parent de03244 commit be4e290
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Tools/MediaDriverTools/GenKrnBin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,19 @@ void ConcatenateKernelBinary(char *pKernelName, bool bVerbose)
// no data to read - EOF
if (dwBytesRead == 0)
{
if (iBuffLeft > 4)
{
fprintf(stderr, "Hex file %s is not 32 bytes aligned. Left %d bytes not processed. May have critical issue!!!\n", pKernelName, iBuffLeft);
}
iBuffLeft = -1;
}
}
else
{
if (iBuffLeft > 4)
{
fprintf(stderr, "Hex file %s is not 32 bytes aligned. Left %d bytes not processed. May have critical issue!!!\n", pKernelName, iBuffLeft);
}
iBuffLeft = -1;
}
}
Expand Down

0 comments on commit be4e290

Please sign in to comment.