Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/verify-shaders-and-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Preprocess all HLSL block-size and Fast-only variants
- name: Preprocess all HLSL block-size, quality, and LDR/HDR variants
run: |
set -e
SHADERS="Assets/ASTC Encoder/Runtime/Gpu/Shaders"
for bx in 4 5 6 8 10 12; do
clang -E -P -x c -I"$SHADERS" -DBLOCK_X=$bx -DBLOCK_Y=$bx "$SHADERS/AstcGpuCore.hlsl" > /dev/null
clang -E -P -x c -I"$SHADERS" -DBLOCK_X=$bx -DBLOCK_Y=$bx -DASTC_FAST_ONLY=1 "$SHADERS/AstcGpuCore.hlsl" > /dev/null
RES="Assets/ASTC Encoder/Runtime/Resources"
for f in "$RES"/AstcGpuEncoder_*.compute; do
EXTRA=""
case "$f" in *_Hdr.compute) EXTRA="-DASTC_HDR_VARIANT=1" ;; esac
clang -E -P -x c $EXTRA "$f" > /dev/null
clang -E -P -x c $EXTRA -DASTC_NO_2P=1 "$f" > /dev/null
clang -E -P -x c $EXTRA -DASTC_FAST_ONLY=1 "$f" > /dev/null
done
clang -E -P -x c "Assets/ASTC Encoder/Runtime/Resources/AstcGpuMipGenerator.compute" > /dev/null
clang -E -P -x c "$RES/AstcGpuBufferCopy.compute" > /dev/null
clang -E -P -x c "$RES/AstcGpuMipGenerator.compute" > /dev/null
echo "All HLSL shader variants preprocessed cleanly!"

- name: Verify Unity .meta files and GUID uniqueness
Expand Down
3 changes: 0 additions & 3 deletions Assets/ASTC Encoder/Runtime/Encoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ public static GraphicsFormat GetTargetAstcFormat(GraphicsFormat sourceFormat, Bl

internal static bool CanCreateAstcTexture(GraphicsFormat format)
{
if (Application.isEditor)
return true;

#if UNITY_2023_2_OR_NEWER
return SystemInfo.IsFormatSupported(format, GraphicsFormatUsage.Sample);
#else
Expand Down
304 changes: 152 additions & 152 deletions Assets/ASTC Encoder/Runtime/Gpu/AstcGpuBackend.cs

Large diffs are not rendered by default.

Loading
Loading