Implement ASTC support
This cl adds both LDR and HDR support for ASTC compressed
textures. Only LDR formats are exposed in the
PhysicalDevice's properties, but HDR support can be added
trivially later by adding the HDR formats and exposing
"VK_EXT_texture_compression_astc_hdr".
Pulled from: https://github.com/ARM-software/astc-encoder
Git hash: 81a5e50741b4c8302cf7d78f314a53e44ee68e1f
The astc-encode git repo was added to third-party, with a
few minor modifications:
1) All encoding related code has been ripped out, only
decoding related code remains
2) Replaced ASTC_CODEC_INTERNAL_ERROR() with UNREACHABLE()
in a switch statement in astc_color_unquantize.cpp
3) Some functions were using a lot of stack memory, so I
added a unique_ptr to allocate the same objects on the
heap, to avoid potential issues.
LDR ASTC is decoded to 8bit unsigned RGBA.
HDR ASTC is decoded to 32b floating point.
Tests: dEQP-VK.*astc*
Bug: b/150130101
Change-Id: I6b03fed6e1f326a95c7aefe9f9a9d0a89cf24428
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41568Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Showing
src/Device/ASTC_Decoder.cpp
0 → 100644
src/Device/ASTC_Decoder.hpp
0 → 100644
This diff is collapsed.
Click to expand it.
third_party/astc-encoder/Android.bp
0 → 100644
third_party/astc-encoder/LICENSE.txt
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment