Skip to content

Fix KTX file format support and unify image reader logs #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 13, 2020
Merged

Fix KTX file format support and unify image reader logs #335

merged 9 commits into from
May 13, 2020

Conversation

dimhotepus
Copy link
Contributor

@dimhotepus dimhotepus commented Apr 27, 2020

  • Handle case for non-array cubemap textures.
  • Fix out of buffer read for KTX numberOfMipmapLevels.
  • Better checks for KTX structure errors.
  • Cleanup WebP image reader.
  • Common image readers log format like <image type> image '<image path>' <log message>.

Fixes #244
@illwieckz could you please check the patch?

@illwieckz
Copy link
Member

Now the engine says:

Warn: KTX texture 'textures/test-pbr_custom_src/wall01_d.ktx' may be valid, but not supported 

Note that I don't know if my KTX file is either valid either using a supported format. I produced it myself with a tool that says the support may not be good.

At least the engine does not crash, and at this point it's enough to call this a success. So, thank you!

@dimhotepus
Copy link
Contributor Author

Now the engine says:

Warn: KTX texture 'textures/test-pbr_custom_src/wall01_d.ktx' may be valid, but not supported 

Note that I don't know if my KTX file is either valid either using a supported format. I produced it myself with a tool that says the support may not be good.

At least the engine does not crash, and at this point it's enough to call this a success. So, thank you!

Could you please share the map with KTX textures? I'll try to debug with problem on hands :)

* Handle case for non-array cubemap textures.
* Fix out of buffer read for numberOfMipmapLevels.
* Better checks for KTX structure errors.
@illwieckz
Copy link
Member

Could you please share the map with KTX textures? I'll try to debug with problem on hands :)

I added it to #244.

@dimhotepus dimhotepus changed the title Fix KTX file format support Fix KTX file format support and unify image reader logs Apr 27, 2020
@dimhotepus
Copy link
Contributor Author

Look good enough to merge.

@slipher, @illwieckz what do you think?

@illwieckz
Copy link
Member

LGTM

@illwieckz
Copy link
Member

@slipher do you have anything more to say?

@dimhotepus dimhotepus requested a review from slipher May 12, 2020 17:20
@slipher slipher merged commit 0b93b9e into DaemonEngine:master May 13, 2020
@dimhotepus dimhotepus deleted the fix_ktx_format_support branch May 13, 2020 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KTX support seems to be broken (engine SIGSEGV)
3 participants