KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
861 stars 225 forks source link

Create should verify ASTC options and the format provided #808

Closed abbaswasim closed 9 months ago

abbaswasim commented 9 months ago

If an ASTC encode is intended by providing any of the astc encode options to "ktx create" the options should be verified for compatibility along side the VK_FORMAT provided.

MarkCallow commented 9 months ago

Currently, per the documentation, astc encoder arguments are ignored if create's --format argument is not an ASTC format. It seems like users will easily be caught out by this. I agree with @abbaswasim that an error should be flagged in this case. @lexaknyazev, @aqnuep what do you think?

lexaknyazev commented 9 months ago

Makes sense to reject invalid commands.

aqnuep commented 9 months ago

Can you clarify which argument combinations are you talking about? It is unclear from the description.

wasimabbas-arm commented 9 months ago

I tried --format R8G8B8A8_SRGB --astc-quality fastest --astc-perceptual and apparently these are incompatible but not reported.

I guess generally any format that is not ASTC format should be flagged if used with those ASTC options.

aqnuep commented 9 months ago

I see, so the problem is that the ASTC options are accepted to be specified even when the format is not ASTC. Understood.