Skip to content

Commit

Permalink
git subrepo pull (merge) lib/astc-encoder (#540)
Browse files Browse the repository at this point in the history
* git subrepo pull (merge) lib/astc-encoder

subrepo:
  subdir:   "lib/astc-encoder"
  merged:   "7a0d929e"
upstream:
  origin:   "https://github.com/ARM-software/astc-encoder.git"
  branch:   "main"
  commit:   "a33dbb44"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

Co-authored-by: Wasim Abbas <abbas.wasim@gmail.com>
  • Loading branch information
wasimabbas-arm and abbaswasim committed Feb 25, 2022
1 parent dbfeb82 commit d98aa68
Show file tree
Hide file tree
Showing 25 changed files with 793 additions and 192 deletions.
4 changes: 2 additions & 2 deletions lib/astc-encoder/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/ARM-software/astc-encoder.git
branch = main
commit = 42a8f6ee01715f45edffb6773e34b8bb914a47df
parent = 2b1c072a13e9b69ada8457665b51ed5b59ddb408
commit = a33dbb44739da188e32d8f90e2342a780cf751fe
parent = dbfeb82a731c534f0ad830800a9cd7e68755cc0d
method = merge
cmdver = 0.4.3
9 changes: 6 additions & 3 deletions lib/astc-encoder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# ----------------------------------------------------------------------------
# Copyright 2020-2021 Arm Limited
# Copyright 2020-2022 Arm Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
Expand Down Expand Up @@ -183,12 +183,15 @@ endif()

function(printopt optName optVal)
if(${optVal})
message(STATUS " ${optName} - ON")
message(STATUS " ${optName} - ON")
else()
message(STATUS " ${optName} - OFF")
message(STATUS " ${optName} - OFF")
endif()
endfunction()

if("${BLOCK_MAX_TEXELS}")
message(STATUS " Max block texels - ${BLOCK_MAX_TEXELS}")
endif()
printopt("AVX2 backend " ${ISA_AVX2})
printopt("SSE4.1 backend " ${ISA_SSE41})
printopt("SSE2 backend " ${ISA_SSE2})
Expand Down
35 changes: 24 additions & 11 deletions lib/astc-encoder/Docs/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,6 @@ make install -j16

For codec developers there are a number of useful features in the build system.

### No intrinsics build

All normal builds will use SIMD accelerated code paths using intrinsics, as all
target architectures (x86-64 and aarch64) guarantee SIMD availability. For
development purposes it is possible to build an intrinsic-free build which uses
no explicit SIMD acceleration (the compiler may still auto-vectorize).

To enable this binary variant add `-DISA_NONE=ON` to the CMake command line
when configuring. It is NOT recommended to use this for production; it is
significantly slower than the vectorized SIMD builds.

### Build Types

We support and test the following `CMAKE_BUILD_TYPE` options.
Expand All @@ -142,6 +131,26 @@ We support and test the following `CMAKE_BUILD_TYPE` options.
Note that optimized release builds are compiled with link-time optimization,
which can make profiling more challenging ...

### No intrinsics builds

All normal builds will use SIMD accelerated code paths using intrinsics, as all
target architectures (x86-64 and aarch64) guarantee SIMD availability. For
development purposes it is possible to build an intrinsic-free build which uses
no explicit SIMD acceleration (the compiler may still auto-vectorize).

To enable this binary variant add `-DISA_NONE=ON` to the CMake command line
when configuring. It is NOT recommended to use this for production; it is
significantly slower than the vectorized SIMD builds.

### Constrained block sizebuilds

All normal builds will support all ASTC block sizes, including the worst case
6x6x6 3D block size (216 texels per block). Compressor memory footprint and
performance can be improved by limiting the block sizes supported in the build
by adding `-DBLOCK_MAX_TEXELS=<texel_count>` to to CMake command line when
configuring. Legal block sizes that are unavailable in a restricted build will
return the error `ASTCENC_ERR_NOT_IMPLEMENTED` during context creation.

### Testing

We support building unit tests.
Expand Down Expand Up @@ -186,3 +195,7 @@ integrated into other projects using CMake. An example of the CMake integration
and the codec API usage can be found in the `./Utils/Example` directory in the
repository. See the [Example Readme](../Utils/Example/README.md) for more
details.

- - -

_Copyright © 2019-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/ChangeLog-2x.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,7 @@ Key for performance charts
**Relative performance vs 1.7 release:**

![Relative scores 2.0 vs 1.7](./ChangeLogImg/relative-1.7-to-2.0.png)

- - -

_Copyright © 2020-2022, Arm Limited and contributors. All rights reserved._
11 changes: 11 additions & 0 deletions lib/astc-encoder/Docs/ChangeLog-3x.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ The 3.4 release introduces another round of optimizations, removing a number
of power-user configuration options to simplify the core compressor data path.

* **General:**
* **Feature:** Many memory allocations have been moved off the stack into
dynamically allocated working memory. This significantly reduces the peak
stack usage, allowing the compressor to run in systems with 128KB stack
limits.
* **Feature:** Builds now support `-DBLOCK_MAX_TEXELS=<count>` to allow a
compressor to support a subset of block sizes. This can reduce binary size
and runtime memory footprint, and improve performance.
* **Feature:** The `-v` and `-va` options to set a per-texel error weight
function are no longer supported.
* **Feature:** The `-b` option to set a per-texel error weight boost for
Expand Down Expand Up @@ -186,3 +193,7 @@ Key for charts:
**Relative performance vs 2.5 release:**

![Relative scores 3.0 vs 2.5](./ChangeLogImg/relative-2.5-to-3.0.png)

- - -

_Copyright © 2021-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/Encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,7 @@ A channel as LDR.
For other use cases the alpha channel is simply a fourth data channel which is
also storing an HDR value. For these cases use the `-cH` compressor option
which will treat all channels as HDR data.

- - -

_Copyright © 2019-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/FileFormat.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ Binary payload
The binary payload is a byte stream that immediately follows the header. It
contains 16 bytes per compressed block. The number of compressed blocks is
determined from the header information.

- - -

_Copyright © 2020-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/FormatOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,3 +482,7 @@ which allow applications to reduce the intermediate precision to either UNORM8
[astc_3d]: https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_sliced_3d.txt
[astc_full]: https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt
[astc_decode]: https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_astc_decode_mode.txt

- - -

_Copyright © 2019-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/Profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ Standard syntax x86-64 disassembly can be generated using:
```shell
objdump -C -M intel --no-show-raw -d -S <binary> > dis.txt
```

- - -

_Copyright © 2020-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/Terminology.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ interpolation weights. This gets very confusing in functions using all three!
We are slowly refactoring the code to only use "weight" to mean the endpoint
interpolation weights. The error weighting factors used for other purposes are
being updated to use the using the term "significance".

- - -

_Copyright © 2020-2022, Arm Limited and contributors. All rights reserved._
4 changes: 4 additions & 0 deletions lib/astc-encoder/Docs/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,7 @@ not introduced any obvious memory errors. Build a release build with symbols
information with `-DCMAKE_BUILD_TYPE=RelWithDebInfo` and then run:

valgrind --tool=memcheck --track-origins=yes <command>

- - -

_Copyright © 2019-2022, Arm Limited and contributors. All rights reserved._
Loading

0 comments on commit d98aa68

Please sign in to comment.