Skip to content

Commit

Permalink
Rename to axslcc [release 1.9.6]
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Dec 13, 2024
1 parent 0fd2c08 commit 0ee54a2
Show file tree
Hide file tree
Showing 30 changed files with 3,448 additions and 995 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
shell: pwsh
run: |
cmake -B build
cmake --build build --config Release --target glslcc
cmake --build build --config Release --target axslcc
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./build/src/Release/glslcc.exe
name: glslcc-win64
path: ./build/src/Release/axslcc.exe
name: axslcc-win64
linux:
runs-on: ubuntu-latest
steps:
Expand All @@ -28,31 +28,31 @@ jobs:
shell: pwsh
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target glslcc
cmake --build build --config Release --target axslcc
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./build/src/glslcc
name: glslcc-linux
path: ./build/src/axslcc
name: axslcc-linux
osx-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.3'
xcode-version: '15.0'
- name: build
shell: pwsh
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
cmake --build build --config Release --target glslcc
lipo -info ./build/src/glslcc
cmake --build build --config Release --target axslcc
lipo -info ./build/src/axslcc
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./build/src/glslcc
name: glslcc-osx-arm64
path: ./build/src/axslcc
name: axslcc-osx-arm64

osx-x64:
runs-on: macos-13
Expand All @@ -61,15 +61,15 @@ jobs:
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.2'
xcode-version: '15.0'
- name: build
shell: pwsh
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
cmake --build build --config Release --target glslcc
lipo -info ./build/src/glslcc
cmake --build build --config Release --target axslcc
lipo -info ./build/src/axslcc
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./build/src/glslcc
name: glslcc-osx-x64
path: ./build/src/axslcc
name: axslcc-osx-x64
34 changes: 17 additions & 17 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ jobs:
- name: Create packages
if: ${{ steps.check_ver.outputs.release_ver != '' }}
run: |
curl -L https://github.com/simdsoft/1kiss/releases/download/devtools/d3dcompiler_47.dll -o ./glslcc-win64/d3dcompiler_47.dll
ls -l ./glslcc-win64
curl -L https://github.com/simdsoft/1kiss/releases/download/devtools/d3dcompiler_47.dll -o ./axslcc-win64/d3dcompiler_47.dll
ls -l ./axslcc-win64
mkdir -p pkg_dir
prefix=glslcc-${{ steps.check_ver.outputs.release_ver }}
ls -l glslcc-linux
ls -l glslcc-osx-x64
ls -l glslcc-osx-arm64
sudo chmod u+x ./glslcc-linux/glslcc
sudo chmod u+x ./glslcc-osx-x64/glslcc
sudo chmod u+x ./glslcc-osx-arm64/glslcc
ls -l glslcc-linux
ls -l glslcc-osx-x64
ls -l glslcc-osx-arm64
tar -czvf ./pkg_dir/$prefix-linux.tar.gz -C ./glslcc-linux glslcc
tar -czvf ./pkg_dir/$prefix-osx-x64.tar.gz -C ./glslcc-osx-x64 glslcc
tar -czvf ./pkg_dir/$prefix-osx-arm64.tar.gz -C ./glslcc-osx-arm64 glslcc
sh -c "cd ./glslcc-win64; zip ../pkg_dir/$prefix-win64.zip glslcc.exe d3dcompiler_47.dll"
prefix=axslcc-${{ steps.check_ver.outputs.release_ver }}
ls -l axslcc-linux
ls -l axslcc-osx-x64
ls -l axslcc-osx-arm64
sudo chmod u+x ./axslcc-linux/axslcc
sudo chmod u+x ./axslcc-osx-x64/axslcc
sudo chmod u+x ./axslcc-osx-arm64/axslcc
ls -l axslcc-linux
ls -l axslcc-osx-x64
ls -l axslcc-osx-arm64
tar -czvf ./pkg_dir/$prefix-linux.tar.gz -C ./axslcc-linux axslcc
tar -czvf ./pkg_dir/$prefix-osx-x64.tar.gz -C ./axslcc-osx-x64 axslcc
tar -czvf ./pkg_dir/$prefix-osx-arm64.tar.gz -C ./axslcc-osx-arm64 axslcc
sh -c "cd ./axslcc-win64; zip ../pkg_dir/$prefix-win64.zip axslcc.exe d3dcompiler_47.dll"
- name: Publish to github release page
if: ${{ steps.check_ver.outputs.release_ver != '' }}
uses: softprops/action-gh-release@v2
Expand All @@ -82,4 +82,4 @@ jobs:
./pkg_dir/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: axmolengine/glslcc
GITHUB_REPOSITORY: axmolengine/axslcc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ install
*.obj
*.zip
*.gz
3rdparty/glslang
23 changes: 19 additions & 4 deletions 3rdparty/spirv-cross/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 2. The MIT License, found at <http://opensource.org/licenses/MIT>.
#

cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand All @@ -28,6 +28,9 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.0.1")
cmake_policy(SET CMP0048 NEW)
endif()

# Avoid error on Android NDK 27+'s CMake files
cmake_policy(SET CMP0057 NEW)

project(SPIRV-Cross LANGUAGES CXX C)
enable_testing()

Expand Down Expand Up @@ -77,7 +80,7 @@ set(spirv-cross-build-version "unknown")
find_package(Git)
if (GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
COMMAND ${GIT_EXECUTABLE} describe --always --tags --dirty=+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE spirv-cross-build-version
ERROR_QUIET
Expand Down Expand Up @@ -243,7 +246,7 @@ set(spirv-cross-util-sources
${CMAKE_CURRENT_SOURCE_DIR}/spirv_cross_util.hpp)

set(spirv-cross-abi-major 0)
set(spirv-cross-abi-minor 58)
set(spirv-cross-abi-minor 64)
set(spirv-cross-abi-patch 0)
set(SPIRV_CROSS_VERSION ${spirv-cross-abi-major}.${spirv-cross-abi-minor}.${spirv-cross-abi-patch})

Expand Down Expand Up @@ -465,7 +468,19 @@ if (SPIRV_CROSS_CLI)
# - Update the reference files
# - Get cycle counts from malisc
# - Keep failing outputs
find_package(PythonInterp)
if (${CMAKE_VERSION} VERSION_GREATER "3.12")
find_package(Python3)
if (${PYTHON3_FOUND})
set(PYTHONINTERP_FOUND ON)
set(PYTHON_VERSION_MAJOR 3)
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
else()
set(PYTHONINTERP_FOUND OFF)
endif()
else()
find_package(PythonInterp)
endif()

find_program(spirv-cross-glslang NAMES glslangValidator
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/external/glslang-build/output/bin
NO_DEFAULT_PATH)
Expand Down
19 changes: 19 additions & 0 deletions 3rdparty/spirv-cross/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,11 +675,13 @@ struct CLIArguments
bool msl_force_sample_rate_shading = false;
bool msl_manual_helper_invocation_updates = true;
bool msl_check_discarded_frag_stores = false;
bool msl_force_fragment_with_side_effects_execution = false;
bool msl_sample_dref_lod_array_as_grad = false;
bool msl_runtime_array_rich_descriptor = false;
bool msl_replace_recursive_inputs = false;
bool msl_readwrite_texture_fences = true;
bool msl_agx_manual_cube_grad_fixup = false;
bool msl_input_attachment_is_ds_attachment = false;
const char *msl_combined_sampler_suffix = nullptr;
bool glsl_emit_push_constant_as_ubo = false;
bool glsl_emit_ubo_as_plain_uniforms = false;
Expand Down Expand Up @@ -872,6 +874,10 @@ static void print_help_msl()
"\t[--msl-runtime-array-rich-descriptor]:\n\t\tWhen declaring a runtime array of SSBOs, declare an array of {ptr, len} pairs to support OpArrayLength.\n"
"\t[--msl-replace-recursive-inputs]:\n\t\tWorks around a Metal 3.1 regression bug, which causes an infinite recursion crash during Metal's analysis of an entry point input structure that itself contains internal recursion.\n"
"\t[--msl-texture-buffer-native]:\n\t\tEnable native support for texel buffers. Otherwise, it is emulated as a normal texture.\n"
"\t[--msl-input-attachment-is-ds-attachment]:\n\t\tAdds a simple depth passthrough in fragment shaders when they do not modify the depth value.\n"
"\t\tRequired to force Metal to write to the depth/stencil attachment post fragment execution.\n"
"\t\tOtherwise, Metal may optimize the write to pre fragment execution which goes against the Vulkan spec.\n"
"\t\tOnly required if an input attachment and depth/stencil attachment reference the same resource.\n"
"\t[--msl-framebuffer-fetch]:\n\t\tImplement subpass inputs with frame buffer fetch.\n"
"\t\tEmits [[color(N)]] inputs in fragment stage.\n"
"\t\tRequires an Apple GPU.\n"
Expand Down Expand Up @@ -956,6 +962,15 @@ static void print_help_msl()
"\t\tSome Metal devices have a bug where stores to resources from a fragment shader\n"
"\t\tcontinue to execute, even when the fragment is discarded. These checks\n"
"\t\tprevent these stores from executing.\n"
"\t[--msl-force-frag-execution]:\n\t\tEnforces fragment execution to avoid early discard by Metal\n"
"\t\tMetal will prematurely discard fragments before execution when side effects are present.\n"
"\t\tThis condition is triggered under the following conditions (side effect operations happen before discard):\n"
"\t\t\t1. Pre fragment depth test fails.\n"
"\t\t\t2. Modify depth value in fragment shader to constant value known at compile time.\n"
"\t\t\t3. Constant value will not pass post fragment depth test.\n"
"\t\t\t4. Fragment is always discarded in fragment execution.\n"
"\t\tHowever, Vulkan expects fragment shader to be executed since it cannot be discarded until the discard\n"
"\t\tpresent in the fragment execution, which would also execute the operations with side effects.\n"
"\t[--msl-sample-dref-lod-array-as-grad]:\n\t\tUse a gradient instead of a level argument.\n"
"\t\tSome Metal devices have a bug where the level() argument to\n"
"\t\tdepth2d_array<T>::sample_compare() in a fragment shader is biased by some\n"
Expand Down Expand Up @@ -1242,10 +1257,12 @@ static string compile_iteration(const CLIArguments &args, std::vector<uint32_t>
msl_opts.force_sample_rate_shading = args.msl_force_sample_rate_shading;
msl_opts.manual_helper_invocation_updates = args.msl_manual_helper_invocation_updates;
msl_opts.check_discarded_frag_stores = args.msl_check_discarded_frag_stores;
msl_opts.force_fragment_with_side_effects_execution = args.msl_force_fragment_with_side_effects_execution;
msl_opts.sample_dref_lod_array_as_grad = args.msl_sample_dref_lod_array_as_grad;
msl_opts.ios_support_base_vertex_instance = true;
msl_opts.runtime_array_rich_descriptor = args.msl_runtime_array_rich_descriptor;
msl_opts.replace_recursive_inputs = args.msl_replace_recursive_inputs;
msl_opts.input_attachment_is_ds_attachment = args.msl_input_attachment_is_ds_attachment;
msl_opts.readwrite_texture_fences = args.msl_readwrite_texture_fences;
msl_opts.agx_manual_cube_grad_fixup = args.msl_agx_manual_cube_grad_fixup;
msl_comp->set_msl_options(msl_opts);
Expand Down Expand Up @@ -1800,6 +1817,7 @@ static int main_inner(int argc, char *argv[])
cbs.add("--msl-no-manual-helper-invocation-updates",
[&args](CLIParser &) { args.msl_manual_helper_invocation_updates = false; });
cbs.add("--msl-check-discarded-frag-stores", [&args](CLIParser &) { args.msl_check_discarded_frag_stores = true; });
cbs.add("--msl-force-frag-with-side-effects-execution", [&args](CLIParser &) { args.msl_force_fragment_with_side_effects_execution = true; });
cbs.add("--msl-sample-dref-lod-array-as-grad",
[&args](CLIParser &) { args.msl_sample_dref_lod_array_as_grad = true; });
cbs.add("--msl-no-readwrite-texture-fences", [&args](CLIParser &) { args.msl_readwrite_texture_fences = false; });
Expand All @@ -1811,6 +1829,7 @@ static int main_inner(int argc, char *argv[])
[&args](CLIParser &) { args.msl_runtime_array_rich_descriptor = true; });
cbs.add("--msl-replace-recursive-inputs",
[&args](CLIParser &) { args.msl_replace_recursive_inputs = true; });
cbs.add("--msl-input-attachment-is-ds-attachment", [&args](CLIParser &) { args.msl_input_attachment_is_ds_attachment = true; });
cbs.add("--extension", [&args](CLIParser &parser) { args.extensions.push_back(parser.next_string()); });
cbs.add("--rename-entry-point", [&args](CLIParser &parser) {
auto old_name = parser.next_string();
Expand Down
25 changes: 24 additions & 1 deletion 3rdparty/spirv-cross/spirv.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** Copyright (c) 2014-2020 The Khronos Group Inc.
** Copyright (c) 2014-2024 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a copy
** of this software and/or associated documentation files (the "Materials"),
Expand Down Expand Up @@ -509,6 +509,9 @@ typedef enum SpvDecoration_ {
SpvDecorationMaxByteOffsetId = 47,
SpvDecorationNoSignedWrap = 4469,
SpvDecorationNoUnsignedWrap = 4470,
SpvDecorationWeightTextureQCOM = 4487,
SpvDecorationBlockMatchTextureQCOM = 4488,
SpvDecorationBlockMatchSamplerQCOM = 4499,
SpvDecorationExplicitInterpAMD = 4999,
SpvDecorationOverrideCoverageNV = 5248,
SpvDecorationPassthroughNV = 5250,
Expand Down Expand Up @@ -991,6 +994,10 @@ typedef enum SpvCapability_ {
SpvCapabilityRayQueryKHR = 4472,
SpvCapabilityRayTraversalPrimitiveCullingKHR = 4478,
SpvCapabilityRayTracingKHR = 4479,
SpvCapabilityTextureSampleWeightedQCOM = 4484,
SpvCapabilityTextureBoxFilterQCOM = 4485,
SpvCapabilityTextureBlockMatchQCOM = 4486,
SpvCapabilityTextureBlockMatch2QCOM = 4498,
SpvCapabilityFloat16ImageAMD = 5008,
SpvCapabilityImageGatherBiasLodAMD = 5009,
SpvCapabilityFragmentMaskAMD = 5010,
Expand Down Expand Up @@ -1596,6 +1603,14 @@ typedef enum SpvOp_ {
SpvOpRayQueryConfirmIntersectionKHR = 4476,
SpvOpRayQueryProceedKHR = 4477,
SpvOpRayQueryGetIntersectionTypeKHR = 4479,
SpvOpImageSampleWeightedQCOM = 4480,
SpvOpImageBoxFilterQCOM = 4481,
SpvOpImageBlockMatchSSDQCOM = 4482,
SpvOpImageBlockMatchSADQCOM = 4483,
SpvOpImageBlockMatchWindowSSDQCOM = 4500,
SpvOpImageBlockMatchWindowSADQCOM = 4501,
SpvOpImageBlockMatchGatherSSDQCOM = 4502,
SpvOpImageBlockMatchGatherSADQCOM = 4503,
SpvOpGroupIAddNonUniformAMD = 5000,
SpvOpGroupFAddNonUniformAMD = 5001,
SpvOpGroupFMinNonUniformAMD = 5002,
Expand Down Expand Up @@ -2271,6 +2286,14 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
case SpvOpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break;
case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
Expand Down
25 changes: 24 additions & 1 deletion 3rdparty/spirv-cross/spirv.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2020 The Khronos Group Inc.
// Copyright (c) 2014-2024 The Khronos Group Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and/or associated documentation files (the "Materials"),
Expand Down Expand Up @@ -505,6 +505,9 @@ enum Decoration {
DecorationMaxByteOffsetId = 47,
DecorationNoSignedWrap = 4469,
DecorationNoUnsignedWrap = 4470,
DecorationWeightTextureQCOM = 4487,
DecorationBlockMatchTextureQCOM = 4488,
DecorationBlockMatchSamplerQCOM = 4499,
DecorationExplicitInterpAMD = 4999,
DecorationOverrideCoverageNV = 5248,
DecorationPassthroughNV = 5250,
Expand Down Expand Up @@ -987,6 +990,10 @@ enum Capability {
CapabilityRayQueryKHR = 4472,
CapabilityRayTraversalPrimitiveCullingKHR = 4478,
CapabilityRayTracingKHR = 4479,
CapabilityTextureSampleWeightedQCOM = 4484,
CapabilityTextureBoxFilterQCOM = 4485,
CapabilityTextureBlockMatchQCOM = 4486,
CapabilityTextureBlockMatch2QCOM = 4498,
CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010,
Expand Down Expand Up @@ -1592,6 +1599,14 @@ enum Op {
OpRayQueryConfirmIntersectionKHR = 4476,
OpRayQueryProceedKHR = 4477,
OpRayQueryGetIntersectionTypeKHR = 4479,
OpImageSampleWeightedQCOM = 4480,
OpImageBoxFilterQCOM = 4481,
OpImageBlockMatchSSDQCOM = 4482,
OpImageBlockMatchSADQCOM = 4483,
OpImageBlockMatchWindowSSDQCOM = 4500,
OpImageBlockMatchWindowSADQCOM = 4501,
OpImageBlockMatchGatherSSDQCOM = 4502,
OpImageBlockMatchGatherSADQCOM = 4503,
OpGroupIAddNonUniformAMD = 5000,
OpGroupFAddNonUniformAMD = 5001,
OpGroupFMinNonUniformAMD = 5002,
Expand Down Expand Up @@ -2267,6 +2282,14 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) {
case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break;
case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break;
case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break;
case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchWindowSSDQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchWindowSADQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchGatherSSDQCOM: *hasResult = true; *hasResultType = true; break;
case OpImageBlockMatchGatherSADQCOM: *hasResult = true; *hasResultType = true; break;
case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break;
case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break;
Expand Down
Loading

0 comments on commit 0ee54a2

Please sign in to comment.