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
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
'.github/workflows/dist.yml'

jobs:
win64:
win-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
Expand All @@ -19,9 +19,9 @@ jobs:
uses: actions/upload-artifact@v6
with:
path: ./build/src/Release/axslcc.exe
name: axslcc-win64
linux:
runs-on: debian-11 # self-hosted on org simdsoft, @halx99 personal machine
name: axslcc-win-x64
linux-x64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: build
Expand All @@ -33,7 +33,21 @@ jobs:
uses: actions/upload-artifact@v6
with:
path: ./build/src/axslcc
name: axslcc-linux
name: axslcc-linux-x64
linux-arm64:
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v6
- name: build
shell: pwsh
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --target axslcc
- name: Upload
uses: actions/upload-artifact@v6
with:
path: ./build/src/axslcc
name: axslcc-linux-arm64
osx-arm64:
runs-on: macos-latest
steps:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,27 @@ 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 ./axslcc-win64/d3dcompiler_47.dll
ls -l ./axslcc-win64
curl -L https://github.com/simdsoft/1kiss/releases/download/devtools/d3dcompiler_47.dll -o ./axslcc-win-x64/d3dcompiler_47.dll
ls -l ./axslcc-win-x64
mkdir -p pkg_dir
prefix=axslcc-${{ steps.check_ver.outputs.release_ver }}
ls -l axslcc-linux
ls -l axslcc-linux-x64
ls -l axslcc-linux-arm64
ls -l axslcc-osx-x64
ls -l axslcc-osx-arm64
sudo chmod u+x ./axslcc-linux/axslcc
sudo chmod u+x ./axslcc-linux-x64/axslcc
sudo chmod u+x ./axslcc-linux-arm64/axslcc
sudo chmod u+x ./axslcc-osx-x64/axslcc
sudo chmod u+x ./axslcc-osx-arm64/axslcc
ls -l axslcc-linux
ls -l axslcc-linux-x64
ls -l axslcc-linux-arm64
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-linux-x64.tar.gz -C ./axslcc-linux-x64 axslcc
tar -czvf ./pkg_dir/$prefix-linux-arm64.tar.gz -C ./axslcc-linux-arm64 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"
sh -c "cd ./axslcc-win-x64; zip ../pkg_dir/$prefix-win-x64.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 Down
14 changes: 13 additions & 1 deletion 3rdparty/spirv-cross/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,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 67)
set(spirv-cross-abi-minor 68)
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 @@ -551,6 +551,14 @@ if (SPIRV_CROSS_CLI)
target_link_libraries(spirv-cross-typed-id-test spirv-cross-core)
set_target_properties(spirv-cross-typed-id-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")

add_executable(spirv-cross-debug-lines-test tests-other/debug-lines.cpp)
target_link_libraries(spirv-cross-debug-lines-test spirv-cross-core)
set_target_properties(spirv-cross-debug-lines-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")

add_executable(spirv-cross-debug-info-test tests-other/debug-info.cpp)
target_link_libraries(spirv-cross-debug-info-test spirv-cross-core)
set_target_properties(spirv-cross-debug-info-test PROPERTIES LINK_FLAGS "${spirv-cross-link-flags}")

if (CMAKE_COMPILER_IS_GNUCXX OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
target_compile_options(spirv-cross-c-api-test PRIVATE -std=c89 -Wall -Wextra)
endif()
Expand All @@ -573,6 +581,10 @@ if (SPIRV_CROSS_CLI)
COMMAND $<TARGET_FILE:spirv-cross-msl-ycbcr-conversion-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/msl_ycbcr_conversion_test_2.spv)
add_test(NAME spirv-cross-typed-id-test
COMMAND $<TARGET_FILE:spirv-cross-typed-id-test>)
add_test(NAME spirv-cross-debug-lines-test
COMMAND $<TARGET_FILE:spirv-cross-debug-lines-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/debug-lines.spv)
add_test(NAME spirv-cross-debug-info-test
COMMAND $<TARGET_FILE:spirv-cross-debug-info-test> ${CMAKE_CURRENT_SOURCE_DIR}/tests-other/debug-info.spv)
add_test(NAME spirv-cross-test
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test_shaders.py --parallel
${spirv-cross-externals}
Expand Down
171 changes: 171 additions & 0 deletions 3rdparty/spirv-cross/NonSemanticShaderDebugInfo100.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
// Copyright (c) 2018-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"),
// to deal in the Materials without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Materials, and to permit persons to whom the
// Materials are furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Materials.
//
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS
// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND
// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/
//
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS
// IN THE MATERIALS.

#ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_

#ifdef __cplusplus
extern "C" {
#endif

enum {
NonSemanticShaderDebugInfo100Version = 100,
NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff
};
enum {
NonSemanticShaderDebugInfo100Revision = 6,
NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100Instructions {
NonSemanticShaderDebugInfo100DebugInfoNone = 0,
NonSemanticShaderDebugInfo100DebugCompilationUnit = 1,
NonSemanticShaderDebugInfo100DebugTypeBasic = 2,
NonSemanticShaderDebugInfo100DebugTypePointer = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifier = 4,
NonSemanticShaderDebugInfo100DebugTypeArray = 5,
NonSemanticShaderDebugInfo100DebugTypeVector = 6,
NonSemanticShaderDebugInfo100DebugTypedef = 7,
NonSemanticShaderDebugInfo100DebugTypeFunction = 8,
NonSemanticShaderDebugInfo100DebugTypeEnum = 9,
NonSemanticShaderDebugInfo100DebugTypeComposite = 10,
NonSemanticShaderDebugInfo100DebugTypeMember = 11,
NonSemanticShaderDebugInfo100DebugTypeInheritance = 12,
NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13,
NonSemanticShaderDebugInfo100DebugTypeTemplate = 14,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15,
NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16,
NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17,
NonSemanticShaderDebugInfo100DebugGlobalVariable = 18,
NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19,
NonSemanticShaderDebugInfo100DebugFunction = 20,
NonSemanticShaderDebugInfo100DebugLexicalBlock = 21,
NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22,
NonSemanticShaderDebugInfo100DebugScope = 23,
NonSemanticShaderDebugInfo100DebugNoScope = 24,
NonSemanticShaderDebugInfo100DebugInlinedAt = 25,
NonSemanticShaderDebugInfo100DebugLocalVariable = 26,
NonSemanticShaderDebugInfo100DebugInlinedVariable = 27,
NonSemanticShaderDebugInfo100DebugDeclare = 28,
NonSemanticShaderDebugInfo100DebugValue = 29,
NonSemanticShaderDebugInfo100DebugOperation = 30,
NonSemanticShaderDebugInfo100DebugExpression = 31,
NonSemanticShaderDebugInfo100DebugMacroDef = 32,
NonSemanticShaderDebugInfo100DebugMacroUndef = 33,
NonSemanticShaderDebugInfo100DebugImportedEntity = 34,
NonSemanticShaderDebugInfo100DebugSource = 35,
NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101,
NonSemanticShaderDebugInfo100DebugSourceContinued = 102,
NonSemanticShaderDebugInfo100DebugLine = 103,
NonSemanticShaderDebugInfo100DebugNoLine = 104,
NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105,
NonSemanticShaderDebugInfo100DebugStoragePath = 106,
NonSemanticShaderDebugInfo100DebugEntryPoint = 107,
NonSemanticShaderDebugInfo100DebugTypeMatrix = 108,
NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff
};


enum NonSemanticShaderDebugInfo100DebugInfoFlags {
NonSemanticShaderDebugInfo100None = 0x0000,
NonSemanticShaderDebugInfo100FlagIsProtected = 0x01,
NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02,
NonSemanticShaderDebugInfo100FlagIsPublic = 0x03,
NonSemanticShaderDebugInfo100FlagIsLocal = 0x04,
NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08,
NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10,
NonSemanticShaderDebugInfo100FlagArtificial = 0x20,
NonSemanticShaderDebugInfo100FlagExplicit = 0x40,
NonSemanticShaderDebugInfo100FlagPrototyped = 0x80,
NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100,
NonSemanticShaderDebugInfo100FlagStaticMember = 0x200,
NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400,
NonSemanticShaderDebugInfo100FlagLValueReference = 0x800,
NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000,
NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000,
NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000,
NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000,
NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000,
NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000,
NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100BuildIdentifierFlags {
NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01,
NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding {
NonSemanticShaderDebugInfo100Unspecified = 0,
NonSemanticShaderDebugInfo100Address = 1,
NonSemanticShaderDebugInfo100Boolean = 2,
NonSemanticShaderDebugInfo100Float = 3,
NonSemanticShaderDebugInfo100Signed = 4,
NonSemanticShaderDebugInfo100SignedChar = 5,
NonSemanticShaderDebugInfo100Unsigned = 6,
NonSemanticShaderDebugInfo100UnsignedChar = 7,
NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100DebugCompositeType {
NonSemanticShaderDebugInfo100Class = 0,
NonSemanticShaderDebugInfo100Structure = 1,
NonSemanticShaderDebugInfo100Union = 2,
NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100DebugTypeQualifier {
NonSemanticShaderDebugInfo100ConstType = 0,
NonSemanticShaderDebugInfo100VolatileType = 1,
NonSemanticShaderDebugInfo100RestrictType = 2,
NonSemanticShaderDebugInfo100AtomicType = 3,
NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100DebugOperation {
NonSemanticShaderDebugInfo100Deref = 0,
NonSemanticShaderDebugInfo100Plus = 1,
NonSemanticShaderDebugInfo100Minus = 2,
NonSemanticShaderDebugInfo100PlusUconst = 3,
NonSemanticShaderDebugInfo100BitPiece = 4,
NonSemanticShaderDebugInfo100Swap = 5,
NonSemanticShaderDebugInfo100Xderef = 6,
NonSemanticShaderDebugInfo100StackValue = 7,
NonSemanticShaderDebugInfo100Constu = 8,
NonSemanticShaderDebugInfo100Fragment = 9,
NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff
};

enum NonSemanticShaderDebugInfo100DebugImportedEntity {
NonSemanticShaderDebugInfo100ImportedModule = 0,
NonSemanticShaderDebugInfo100ImportedDeclaration = 1,
NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff
};


#ifdef __cplusplus
}
#endif

#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_
4 changes: 4 additions & 0 deletions 3rdparty/spirv-cross/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ struct CLIArguments
bool hlsl_enable_16bit_types = false;
bool hlsl_flatten_matrix_vertex_input_semantics = false;
bool hlsl_preserve_structured_buffers = false;
bool hlsl_user_semantic = false;
HLSLBindingFlags hlsl_binding_flags = 0;
bool vulkan_semantics = false;
bool flatten_multidimensional_arrays = false;
Expand Down Expand Up @@ -852,6 +853,7 @@ static void print_help_hlsl()
"\t[--hlsl-enable-16bit-types]:\n\t\tEnables native use of half/int16_t/uint16_t and ByteAddressBuffer interaction with these types. Requires SM 6.2.\n"
"\t[--hlsl-flatten-matrix-vertex-input-semantics]:\n\t\tEmits matrix vertex inputs with input semantics as if they were independent vectors, e.g. TEXCOORD{2,3,4} rather than matrix form TEXCOORD2_{0,1,2}.\n"
"\t[--hlsl-preserve-structured-buffers]:\n\t\tEmit SturucturedBuffer<T> rather than ByteAddressBuffer. Requires UserTypeGOOGLE to be emitted. Intended for DXC roundtrips.\n"
"\t[--hlsl-user-semantic]:\n\t\tUses UserSemantic decoration to generate vertex input and output semantics.\n"
);
// clang-format on
}
Expand Down Expand Up @@ -1471,6 +1473,7 @@ static string compile_iteration(const CLIArguments &args, std::vector<uint32_t>
hlsl_opts.enable_16bit_types = args.hlsl_enable_16bit_types;
hlsl_opts.flatten_matrix_vertex_input_semantics = args.hlsl_flatten_matrix_vertex_input_semantics;
hlsl_opts.preserve_structured_buffers = args.hlsl_preserve_structured_buffers;
hlsl_opts.user_semantic = args.hlsl_user_semantic;
hlsl->set_hlsl_options(hlsl_opts);
hlsl->set_resource_binding_flags(args.hlsl_binding_flags);
if (args.hlsl_base_vertex_index_explicit_binding)
Expand Down Expand Up @@ -1673,6 +1676,7 @@ static int main_inner(int argc, char *argv[])
cbs.add("--hlsl-flatten-matrix-vertex-input-semantics",
[&args](CLIParser &) { args.hlsl_flatten_matrix_vertex_input_semantics = true; });
cbs.add("--hlsl-preserve-structured-buffers", [&args](CLIParser &) { args.hlsl_preserve_structured_buffers = true; });
cbs.add("--hlsl-user-semantic", [&args](CLIParser &) { args.hlsl_user_semantic = true; });
cbs.add("--vulkan-semantics", [&args](CLIParser &) { args.vulkan_semantics = true; });
cbs.add("-V", [&args](CLIParser &) { args.vulkan_semantics = true; });
cbs.add("--flatten-multidimensional-arrays", [&args](CLIParser &) { args.flatten_multidimensional_arrays = true; });
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/spirv-cross/spirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ typedef enum SpvDecoration_ {
SpvDecorationConditionalINTEL = 6247,
SpvDecorationCacheControlLoadINTEL = 6442,
SpvDecorationCacheControlStoreINTEL = 6443,
SpvDecorationSamplerSlot = 7000, // axslcc spec
SpvDecorationSamplerSlot = 7000, // axslcc spec
SpvDecorationMax = 0x7fffffff,
} SpvDecoration;

Expand Down Expand Up @@ -3694,7 +3694,7 @@ inline const char* SpvDecorationToString(SpvDecoration value) {
case SpvDecorationIndex: return "Index";
case SpvDecorationBinding: return "Binding";
case SpvDecorationDescriptorSet: return "DescriptorSet";
case SpvDecorationSamplerSlot: return "SamplerSlot"; // axslcc spec
case SpvDecorationSamplerSlot: return "SamplerSlot"; // axslcc spec
case SpvDecorationOffset: return "Offset";
case SpvDecorationXfbBuffer: return "XfbBuffer";
case SpvDecorationXfbStride: return "XfbStride";
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/spirv-cross/spirv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ enum Decoration {
DecorationConditionalINTEL = 6247,
DecorationCacheControlLoadINTEL = 6442,
DecorationCacheControlStoreINTEL = 6443,
DecorationSamplerSlot = 7000, // axslcc spec
DecorationSamplerSlot = 7000, // axslcc spec
DecorationMax = 0x7fffffff,
};

Expand Down
Loading