Skip to content

Commit

Permalink
Fix KTX2 header initialization in included BasisU code (KhronosGroup#848
Browse files Browse the repository at this point in the history
)

A change we made to the the subrepo'ed BasisU code as part of the
mass warning fixes in PR KhronosGroup#687 broke initialization of the KTX2 header
when BasisU is creating a .ktx2 file. This code is not used by libktx.
The fix is being committed to avoid inadvertently pushing the broken
code upstream.

The user who encountered this was doing something unsupported by libktx.
  • Loading branch information
IceLuna authored Feb 4, 2024
1 parent 15068ea commit 99f332c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/basisu/encoder/basisu_comp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,7 @@ namespace basisu
}

basist::ktx2_header header = {};
memset(&header, 0, sizeof(header));

memcpy(header.m_identifier, basist::g_ktx2_file_identifier, sizeof(basist::g_ktx2_file_identifier));
header.m_pixel_width = base_width;
Expand Down

0 comments on commit 99f332c

Please sign in to comment.