Skip to content

Commit

Permalink
Updated Vulkan third-party dependencies to 1.4.304
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Jan 19, 2025
1 parent 02f6d99 commit 315c2ad
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 10 deletions.
10 changes: 8 additions & 2 deletions Graphics/ShaderTools/src/SPIRVTools.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019-2022 Diligent Graphics LLC
* Copyright 2019-2025 Diligent Graphics LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -117,11 +117,17 @@ std::vector<uint32_t> OptimizeSPIRV(const std::vector<uint32_t>& SrcSPIRV, spv_t
spvtools::Optimizer SpirvOptimizer(TargetEnv);
SpirvOptimizer.SetMessageConsumer(SpvOptimizerMessageConsumer);

spvtools::OptimizerOptions Options;

// SPIR-V bytecode generated from HLSL must be legalized to
// turn it into a valid vulkan SPIR-V shader.
if (Passes & SPIRV_OPTIMIZATION_FLAG_LEGALIZATION)
{
SpirvOptimizer.RegisterLegalizationPasses();

spvtools::ValidatorOptions ValidatorOptions;
ValidatorOptions.SetBeforeHlslLegalization(true);
Options.set_validator_options(ValidatorOptions);
}

if (Passes & SPIRV_OPTIMIZATION_FLAG_PERFORMANCE)
Expand All @@ -137,7 +143,7 @@ std::vector<uint32_t> OptimizeSPIRV(const std::vector<uint32_t>& SrcSPIRV, spv_t
}

std::vector<uint32_t> OptimizedSPIRV;
if (!SpirvOptimizer.Run(SrcSPIRV.data(), SrcSPIRV.size(), &OptimizedSPIRV))
if (!SpirvOptimizer.Run(SrcSPIRV.data(), SrcSPIRV.size(), &OptimizedSPIRV, Options))
OptimizedSPIRV.clear();

return OptimizedSPIRV;
Expand Down
2 changes: 1 addition & 1 deletion ThirdParty/SPIRV-Cross
Submodule SPIRV-Cross updated 70 files
+70 −1 .github/workflows/main.yml
+1 −1 checkout_glslang_spirv_tools.sh
+1 −1 reference/opt/shaders-hlsl/mesh/mesh-shader-basic-lines.spv14.vk.nocompat.mesh
+1 −1 reference/opt/shaders-hlsl/mesh/mesh-shader-basic-triangle.spv14.vk.nocompat.mesh
+9 −3 reference/opt/shaders-msl/asm/comp/uint_smulextended.asm.comp
+9 −3 reference/opt/shaders-msl/asm/comp/ulong_smulextended.asm.msl23.comp
+16 −24 reference/opt/shaders-msl/desktop-only/comp/extended-arithmetic.desktop.comp
+201 −0 reference/opt/shaders-msl/mesh/mesh-shader-basic-lines.msl3.spv14.vk.nocompat.mesh
+202 −0 reference/opt/shaders-msl/mesh/mesh-shader-basic-triangle.msl3.spv14.vk.nocompat.mesh
+121 −0 reference/opt/shaders-msl/mesh/mesh-shader-flat-varying.msl3.spv14.vk.nocompat.mesh
+23 −0 reference/opt/shaders-msl/task/task-basic.msl3.spv14.vk.nocompat.task
+24 −0 reference/opt/shaders-msl/task/task-func.msl3.spv14.vk.nocompat.task
+1 −1 reference/opt/shaders/asm/frag/locations-components.asm.frag
+25 −0 reference/opt/shaders/frag/barycentric-khr-io-block.frag
+7 −7 reference/opt/shaders/vulkan/vert/small-storage.vk.vert
+7 −7 reference/opt/shaders/vulkan/vert/small-storage.vk.vert.vk
+45 −0 reference/shaders-hlsl-no-opt/asm/frag/srem.asm.frag
+31 −0 reference/shaders-hlsl-no-opt/frag/barycentric-khr-nopersp.sm61.fxconly.nofxc.frag
+31 −0 reference/shaders-hlsl-no-opt/frag/barycentric-khr-persp.sm61.fxconly.nofxc.frag
+61 −0 reference/shaders-hlsl-no-opt/frag/barycentric-khr.sm61.fxconly.nofxc.frag
+43 −0 reference/shaders-hlsl-no-opt/mesh/clip-cull-array-load-store.sm65.nofxc.fxconly.spv16.mesh
+1 −1 reference/shaders-hlsl-no-opt/mesh/mesh-shader-basic-triangle.spv14.vk.nocompat.nofxc.flip-vert-y.mesh
+3 −3 reference/shaders-hlsl/mesh/mesh-shader-basic-lines.spv14.vk.nocompat.mesh
+1 −1 reference/shaders-hlsl/mesh/mesh-shader-basic-triangle.spv14.vk.nocompat.mesh
+33 −0 reference/shaders-msl-no-opt/asm/frag/srem.asm.frag
+45 −0 ...ence/shaders-msl-no-opt/comp/simple-bindless-ssbo.msl2.argument.argument-tier-1.device-argument-buffer.comp
+22 −0 reference/shaders-msl-no-opt/frag/explicit-lod-unpack-arguments.frag
+9 −3 reference/shaders-msl/asm/comp/uint_smulextended.asm.comp
+9 −3 reference/shaders-msl/asm/comp/ulong_smulextended.asm.msl23.comp
+16 −24 reference/shaders-msl/desktop-only/comp/extended-arithmetic.desktop.comp
+210 −0 reference/shaders-msl/mesh/mesh-shader-basic-lines.msl3.spv14.vk.nocompat.mesh
+199 −0 reference/shaders-msl/mesh/mesh-shader-basic-triangle.msl3.spv14.vk.nocompat.mesh
+121 −0 reference/shaders-msl/mesh/mesh-shader-flat-varying.msl3.spv14.vk.nocompat.mesh
+23 −0 reference/shaders-msl/task/task-basic.msl3.spv14.vk.nocompat.task
+38 −0 reference/shaders-msl/task/task-func.msl3.spv14.vk.nocompat.task
+5 −0 reference/shaders-no-opt/asm/comp/block-undef.noeliminate.invalid.asm.comp
+21 −0 reference/shaders-no-opt/asm/frag/srem.asm.frag
+1 −1 reference/shaders/asm/frag/locations-components.asm.frag
+25 −0 reference/shaders/frag/barycentric-khr-io-block.frag
+7 −7 reference/shaders/vulkan/vert/small-storage.vk.vert
+7 −7 reference/shaders/vulkan/vert/small-storage.vk.vert.vk
+66 −0 shaders-hlsl-no-opt/asm/frag/srem.asm.frag
+9 −0 shaders-hlsl-no-opt/frag/barycentric-khr-nopersp.sm61.fxconly.nofxc.frag
+9 −0 shaders-hlsl-no-opt/frag/barycentric-khr-persp.sm61.fxconly.nofxc.frag
+23 −0 shaders-hlsl-no-opt/frag/barycentric-khr.sm61.fxconly.nofxc.frag
+26 −0 shaders-hlsl-no-opt/mesh/clip-cull-array-load-store.sm65.nofxc.fxconly.spv16.mesh
+66 −0 shaders-msl-no-opt/asm/frag/srem.asm.frag
+13 −0 shaders-msl-no-opt/comp/simple-bindless-ssbo.msl2.argument.argument-tier-1.device-argument-buffer.comp
+15 −0 shaders-msl-no-opt/frag/explicit-lod-unpack-arguments.frag
+74 −0 shaders-msl/mesh/mesh-shader-basic-lines.msl3.spv14.vk.nocompat.mesh
+65 −0 shaders-msl/mesh/mesh-shader-basic-triangle.msl3.spv14.vk.nocompat.mesh
+23 −0 shaders-msl/mesh/mesh-shader-flat-varying.msl3.spv14.vk.nocompat.mesh
+22 −0 shaders-msl/task/task-basic.msl3.spv14.vk.nocompat.task
+32 −0 shaders-msl/task/task-func.msl3.spv14.vk.nocompat.task
+66 −0 shaders-no-opt/asm/frag/srem.asm.frag
+1 −1 shaders/asm/frag/locations-components.asm.frag
+23 −0 shaders/frag/barycentric-khr-io-block.frag
+1 −1 shaders/vulkan/vert/small-storage.vk.vert
+11 −1 spirv.h
+11 −1 spirv.hpp
+9 −1 spirv_common.hpp
+10 −1 spirv_cross.cpp
+4 −0 spirv_cross_parsed_ir.cpp
+93 −13 spirv_glsl.cpp
+119 −10 spirv_hlsl.cpp
+2 −0 spirv_hlsl.hpp
+643 −54 spirv_msl.cpp
+15 −1 spirv_msl.hpp
+2 −0 spirv_reflect.cpp
+3 −44 test_shaders.py
2 changes: 1 addition & 1 deletion ThirdParty/SPIRV-Tools
Submodule SPIRV-Tools updated 119 files
2 changes: 1 addition & 1 deletion ThirdParty/glslang
Submodule glslang updated 104 files
2 changes: 1 addition & 1 deletion ThirdParty/volk

0 comments on commit 315c2ad

Please sign in to comment.