Skip to content

Commit

Permalink
Fix SRGB asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
wasimabbas-arm committed Sep 7, 2024
1 parent c1b8938 commit ba5a425
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/astc_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,10 @@ ktxTexture2_CompressAstcEx(ktxTexture2* This, ktxAstcParams* params) {
assert(KHR_DFDVAL(prototype->pDfd+1, MODEL) == KHR_DF_MODEL_ASTC
&& "Invalid dfd generated for ASTC image\n");
assert((transfer == KHR_DF_TRANSFER_SRGB
? KHR_DFDVAL(prototype->pDfd+1, PRIMARIES) == KHR_DF_PRIMARIES_SRGB
: true) && "Not a valid sRGB image\n");
? KHR_DFDVAL(prototype->pDfd+1, TRANSFER) == KHR_DF_TRANSFER_SRGB &&
KHR_DFDVAL(prototype->pDfd+1, PRIMARIES) == KHR_DF_PRIMARIES_SRGB
: true) && "Not a valid sRGB image\n");


// Fix up the current (This) texture
#undef DECLARE_PRIVATE
Expand Down

0 comments on commit ba5a425

Please sign in to comment.