-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add astc support #433
Add astc support #433
Conversation
This is the start of astc support. First cli options are provided. Since ktx-software now supports multiple encoder this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h.
I am aware of the tabs introduced that needs fixing. |
Add default options for transfer function and fix typos.
Includes build system changes, command line arguments plumbing support Whitespace changes 'tabs->spaces' astc compression support for 2D images including 'layers, mip-levels, cubefaces' Multi-threaded compresssion support using pthreads and pthreads style api on windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is close. A few things need changing. Note my review comments do not include the need to add back the existing options as deprecated since we covered that in email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments answered in c01d05d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should to complete answering all the review comments except the following:
- create a prototype texture of the correct VkFormat
- Re-add all deprecated options
…re no more levelIndex calculation is required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the wrong indentation is because of the tabs vs spaces you noted, then I apologize for the noise.
I'm having a hard time with GitHub here. It seems difficult to see just the changes since my last review and even some review comments I made before are missing.
Add common '--normal_mode', common 'threadCount' option, replaced delete with free
Fixed in 18af498 |
So should we leave it there or you want me to implement my prosal #433 (comment) |
I have also extracted out the |
Regarding #433 (comment) we could do one internal to KTX-Software. Not possible for astc-encoder though. There is strict requirement to be able to build all the different binaries for testing/benchmarking purposes from single configure. |
How is this possible? A CMake configure includes the target processor. Is there some sort of universal binary for ARM? Even if there is, the encoder still needs to support Intel processors. |
The encoder cmake script has a for loop to generate different executables based on what ISA options are set from the same configure. |
That loop builds for each possible ISA. What are the global config options that are applied to each of these ISA builds? What are the "native" and "none" builds? |
So
Makes sure it only builds for globally set ISA options. The native build uses |
If the global settings are only which ISAs to build for then why
? Presumably you can configure to build for a single ISA so I still don't understand what this requirement really means. Hopefully astc-encoder will be modified to do compile time detection of the ISA as we've previously discussed. In that case the only configure option should be whether to use SIMD instructions or not and this discussion will be irrevelant. Does |
You can indeed build for a single ISA, which is how KTX-Software is using it. This requirement means the maintainer didn't want to
I don't know much about this to be honest. This is just another option that the encoder tests against. IIRC I think clang doesn't support native but I didn't bother testing that. We don't use it in ktx-software. The GCC docs says
Also not sure where this conversation is going. We have previously decide to leave this where it is. Unfortunately I don't maintain the encoder and I have same push back when I try to propose changes there. Its something thats used by other clients as well and maintaining backwards compatibility is important. As I have already proposed quite a few changes to the build system to make it work with ktx-software. Some like detect SIMD didn't go well. Either way I think for this PR thats kind of out of scope. We have a way to use its provided options to make it work with ktx-software. I think we should leave it there for the first version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please answer the various questions and make the small changes requested. They're mostly minor but I did find one bug.
Where are the readers for the .hdr and .exr formats? Are they going to be in a subsequent PR? I'm planning to try using Open ImageIO which supports both of these, but I have so much else to do it will be a while before I can get to it.
Got it. Makes perfect sense.
Why not? The configure command would pick which compilers and targets to use. The SIMD detection can be completely unaware of this. It just looks at whatever pre-defined macros it is presented with.
It sounds like it would be up to the code being compiled to decide whether to invoke SIMD or not.
I agree for the first version we should leave it there. I fully understand the need for compatibility with other encoder clients. I was hoping compile-time detection would simplify things for everybody and we could investigate more deeply for a future version. |
This is the start of astc support using `lib/astc-encoder`, a `git subrepo` clone of ARM's ASTC encoder. Since ktx-software now supports multiple encoders this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h. Similarly the `--threads` option has been moved from the BasisU options to the common options so it can be used for any encoder. The `--bcmp` option has been renamed to `--etc1s` to reflect its actual use. A common '--normal_mode' option has been added replacing the ETC1S encoder's `--normal_map`. The new option is recognized by the ASTC and ETC1S encoders. A very useful feature of uploading the output files of broken toktx-tests to a cloud storage service has been added to `.travis.yml`.
This is the start of astc support using `lib/astc-encoder`, a `git subrepo` clone of ARM's ASTC encoder. Since ktx-software now supports multiple encoders this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h. Similarly the `--threads` option has been moved from the BasisU options to the common options so it can be used for any encoder. The `--bcmp` option has been renamed to `--etc1s` to reflect its actual use. A common '--normal_mode' option has been added replacing the ETC1S encoder's `--normal_map`. The new option is recognized by the ASTC and ETC1S encoders. A very useful feature of uploading the output files of broken toktx-tests to a cloud storage service has been added to `.travis.yml`.
This is the start of astc support using `lib/astc-encoder`, a `git subrepo` clone of ARM's ASTC encoder. Since ktx-software now supports multiple encoders this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h. Similarly the `--threads` option has been moved from the BasisU options to the common options so it can be used for any encoder. The `--bcmp` option has been renamed to `--etc1s` to reflect its actual use. A common '--normal_mode' option has been added replacing the ETC1S encoder's `--normal_map`. The new option is recognized by the ASTC and ETC1S encoders. A very useful feature of uploading the output files of broken toktx-tests to a cloud storage service has been added to `.travis.yml`.
This is the start of astc support using `lib/astc-encoder`, a `git subrepo` clone of ARM's ASTC encoder. Since ktx-software now supports multiple encoders this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h. Similarly the `--threads` option has been moved from the BasisU options to the common options so it can be used for any encoder. The `--bcmp` option has been renamed to `--etc1s` to reflect its actual use. A common '--normal_mode' option has been added replacing the ETC1S encoder's `--normal_map`. The new option is recognized by the ASTC and ETC1S encoders. A very useful feature of uploading the output files of broken toktx-tests to a cloud storage service has been added to `.travis.yml`.
This is the start of astc support using `lib/astc-encoder`, a `git subrepo` clone of ARM's ASTC encoder. Since ktx-software now supports multiple encoders this patch extracts out the common options into '--encode <encoding>' and removes redundant options. Also adds enums for astc compressor into ktx.h. Similarly the `--threads` option has been moved from the BasisU options to the common options so it can be used for any encoder. The `--bcmp` option has been renamed to `--etc1s` to reflect its actual use. A common '--normal_mode' option has been added replacing the ETC1S encoder's `--normal_map`. The new option is recognized by the ASTC and ETC1S encoders. A very useful feature of uploading the output files of broken toktx-tests to a cloud storage service has been added to `.travis.yml`.
This is the start of astc support. First the cli options required are provided.
Since ktx-software now supports multiple encoders this patch extracts
out the common options into '--encode ' and removes redundant options.
Also add enums for astc compressor into ktx.h.