Skip to content

Commit

Permalink
Fix lingering KTXwriterScParams metadata from encode/transcode inputs (
Browse files Browse the repository at this point in the history
  • Loading branch information
aqnuep authored Feb 6, 2024
1 parent 572e610 commit d3010bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/cts
Submodule cts updated 124 files
1 change: 1 addition & 0 deletions tools/ktx/command_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ void CommandEncode::executeEncode() {

// Add KTXwriterScParams metadata
const auto writerScParams = fmt::format("{}{}", options.codecOptions, options.compressOptions);
ktxHashList_DeleteKVPair(&texture->kvDataHead, KTX_WRITER_SCPARAMS_KEY);
if (writerScParams.size() > 0) {
// Options always contain a leading space
assert(writerScParams[0] == ' ');
Expand Down
1 change: 1 addition & 0 deletions tools/ktx/command_transcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ void CommandTranscode::executeTranscode() {

// Add KTXwriterScParams metadata if supercompression was used
const auto writerScParams = options.compressOptions;
ktxHashList_DeleteKVPair(&texture->kvDataHead, KTX_WRITER_SCPARAMS_KEY);
if (writerScParams.size() > 0) {
// Options always contain a leading space
assert(writerScParams[0] == ' ');
Expand Down

0 comments on commit d3010bd

Please sign in to comment.