summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2024-03-01warnings (#3653)Ellie Hermaszewska
* Remove unused code * unused variable warnings * unused variable --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-02-29Fix various crashes when generating debug info. (#3650)Yong He
* Fix crash when generating debug info for geometry shaders. * Fix. * Fix source language field in DebugCompilationUnit. * Fix. * Emit DebugEntryPoint inst. * Add trivial test. * Cleanup. * More cleanup.
2024-02-28[SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644)Yong He
* [SPIRV] Add NonSemanticDebugInfo for step-through debugging. * Fix. * Fix.
2024-02-27add support for shared resources on vulkan/linux (#3636)skallweitNV
2024-02-26Allow default values for `extern` symbols. (#3632)Yong He
* Allow default values for `extern` symbols. * Fix. * Fix test.
2024-02-26switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain (#3627)Simon Kallweit
* switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain * fix window content size on macos --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-02-23Add slangc interface to compile and use ir modules. (#3615)Yong He
* Add slangc interface to compile and use ir modules. * Fix glsl scalar layout settings not copied to target. * Fix. * Cleanups.
2024-02-22Add API for querying and reusing precompiled binary modules. (#3614)Yong He
2024-02-20derive approximate DX12 shader model in vulkan (#3596)skallweitNV
Co-authored-by: Yong He <yonghe@outlook.com>
2024-02-20Add wrapper type syntax for link time specialization. (#3606)Yong He
* Add wrapper type syntax for link time specialization. * Cleanup.
2024-02-20Support link time type specialization. (#3604)Yong He
2024-02-20Refactor compiler option representations. (#3598)Yong He
* Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish.
2024-02-15Support loading serialized modules. (#3588)Yong He
* Support loading serialized modules. * Fix. * Fix vs solution files * Fix glsl module loading. * C++ fix. * Fix. * Try fix c++ error. * Try fix. * Fix. * Fix.
2024-02-09Support link-time constants. (#3564)Yong He
* Support link-time constants. * Fix. * Fix.
2024-02-06gfx:Add callback to IPipelineCreationAPIDispatcher (#3556)kaizhangNV
* gfx:Add callback to IPipelineCreationAPIDispatcher Add the callback to IPipelineCreationAPIDispatcher in Vulkan backend in slang-gfx lib. * gfx:add uuid for vulkan pipeline dispatcher Add a define of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher for Vulkan specific IPipelineCreationAPIDispatcher such that libgfx.so can have special handle to Vulkan pipeline dispatcher without break binary compatibility. In the RendererBase::initialize call, we will provide this new UUID when the DeviceType is Vulkan. * gfx: add new variable to GfxGUID Add new variable to GfxGUID IID_IVulkanPipelineCreationAPIDispatcher with initialization of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher to make the implementation aligned with existing GfxGUID::IID_IPipelineCreationAPIDispatcher. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-02-02Capability type checking. (#3530)Yong He
* Capability type checking. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2024-02-02Atomics+Wave ops intrinsics fixes. (#3542)Yong He
* Fix atomics intrinsics, increase kMaxDescriptorSets. * Add SPIRVASM to known non-differentiable insts. * Support fp16 wave ops when targeting glsl. * Fixes. * Fix vk validation errors. * Fix. * Add to allowed failures.
2024-02-02GLSL Passthrough support for SSBO types (#3446)Ellie Hermaszewska
* GLSL Passthrough support for SSBO types * GLSL Passthrough support for SSBO types * Correctly apply glsl local size layout to entry points during lowering * Test for glsl layout correctness * typo * Reflect GLSL SSBO as raw buffers * Functional test for glsl ssbo * Allow allow glsl for render tests * Functional test for ssbo passthrough * Functional test for ssbo passthrough with spirv-direct * fix windows build error --------- Co-authored-by: Yong He <yonghe@outlook.com>
2024-02-02adding required extensions to gfx to enable basic vulkan printf ↵Nathan V. Morrical
functionality (#3541)
2024-01-26Fix LSP compatibility issues with Visual Studio. (#3520)Yong He
* [LSP] compatibility logic for Visual Studio. * [LSP] Fix diagnostic rank parsing. * [LSP] Fix semantic highlighting of cbuffer types. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2024-01-18Capability def parsing & codegen + disjoint sets (#3451)Yong He
* Capability def parsing & codegen + disjoint sets This change adds a capability definition file, and a code generator to produce C++ code that defines the capability enums and necessary data structures around the capabilities. Extends the existing CapabilitySet class to support expressing disjoint sets of capabilities. This sets up for the next change that will enhance our type checking with reasoning of capability requirements. * Fix cmake. * Fix warning. * Fix. * Fix isBetterForTarget to prefer less specialized option. * Fix. * Fix premake. * Fix intrinsic. * Fix vs sln file. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-18macos/vulkan support (#3418)skallweitNV
2023-12-08WIP: CMake (#3326)Ellie Hermaszewska
* More robust input and output selection in generator tools * Add cmake build system * Get slang-test running with cmake * Bump lz4 and miniz dependencies * Make cmake build more declarative * Correct preprocessor logic in slang.h * Add cuda test to compute/simple * Remove empty cmake files * output placement for cmake, and commenting * Correct include paths in spirv-embed-generator * Format cmake with gersemi * Make cmake build clerer * Neaten header generation Also work around https://gitlab.kitware.com/cmake/cmake/-/issues/18399 by introducing correct_generated_properties to set the GENERATED flag in the correct scope * remove unused files * use 3.20 to set GENERATOR property properly * spelling * more flexible linker arg setting * replace slang-static with obj collection * Set rpath and linker path correctly * neaten generated file generation * tests working with cmake build * fix premake5 build * comment and neaten cmake * remove unnecessary dependency * Build aftermath example only when aftermath is enabled * Add slang-llvm and other dependencies * Put modules alongside binaries * Find slang-glslang correctly * Better option handling * comments * add llvm build test * Better option handling * cmake wobble * use UNICODE and _UNICODE * remove other workflows * use ccache * neaten * limit parallel for llvm build * use ninja for build * Windows and Darwin slang-llvm builds * cache key * verbose llvm build * cl on windows * sccache and cl.exe * use cl.exe * Correct package detection * less verbosity * Simplify miniz inclusion * fix build with sccache * Neaten llvm building * neaten * Neaten slang-llvm fetching * more surgical workarounds * Add ci action * Get version from git * better variable naming * add missing include * clean up after premake in cmake * more docs on cmake build * ci wobble * add imgui target * more selective source * do not download swiftshader * Some missing dependencies * only build llvm on dispatch * Disable /Zi in CI where sccache is present * simplify * set PIC for miniz * set policies before project * reengage workaround * more runs on ci * Add cmake presets * Add cpack * move iterator debug level to preset * Correct lib flag * simplify action * Neaten cmake init * Add todo * Add simple test wrapper * Add tests to workflow presets * rename packing preset * Correctly set definitions * docs * correct preset names * Make slang-test depend on test-server/test-process * neaten * use workflow in actions * install docs * Correct module install dir * debug dist workflow * Install headers * neaten header globbing * Neaten dependency handling * make lib and bin variables * Do not set compiler for vs builds, unnecessary * docs * allow setting explicit source for target * maintain archive subdir * cmake docs * install headers * place targets into folders * cmake docs * nest external projects in folder * remove name clash * Neater external packages * meta targets in folder structure * cleaner slang-glslang dll * Add missing static directive to slang-no-embedded-stdlib * more robust module copying * make slang-test the startup project * folder tweak * Make FETCH_BINARY the default on all platforms * Set DEBUG_DIR * add natvis files to source * skip spirv tests * remove test step from debug dist * Add build to .gitignore * redo warnings to be more like premake * Update imgui * clean more premake files * Disable PCH for glslang, gcc throws a warning * Add /MP for msvc builds * warning wobble * Add script to build llvm * Add slang-llvm and generators components * Build slang-llvm in ci * comments * fetch llvm with git * better abi approximation for cache * better sccache key * formatting * Correct logic around disabling problematic debug info for ccache * exclude gcc and clang from windows ci * Make dist workflows use system llvm * naming * restore normal dist builds * formatting * run tests in ci * Correct slang-llvm url setting * Rely on the system to find the test tool library * actions matrix wiggle * cope with OSX ancient bash * Correct compilers on windows * more ci debugging * Correct rpath handling on OSX * neaten * correct path to slang-llvm * Correct rpath separator on osx * Find slang-llvm correctly * smoke tests only on osx * ci wobble * Give MacOS module a dylib suffix * get swiftshader correctly * cope with bsd cp * remove debug output * full tests on osx * ci wobble * Add some vk tests to expected failures * simplify ci * ci wobble * exclude dx12 tests from github ci * remove cmake code for building llvm * warnings * warnings as errors for cl * spirv-tools in path * add aarch64 ci build * Add SLANG_GENERATORS_PATH option for prebuilt generators * neaten * Correct generator target name * remove yaml anchors because github actions does not support them * Demote CMake in docs Also add info on cross compiling * Restore premake CI * use minimal ci for cmake * Write miniz_export for premake build and .gitignore it * Mention build config tool options in docs * Remove redefined macro for miniz * regenerate vs project
2023-12-06Support visibility control and default to `internal`. (#3380)Yong He
* Support visibility control and default to `internal`. * Fix wip. * Fixes. * Fix. * Fix test. * Add legacy language detection and compatibility for existing code. * Add doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-12-05squash warnings (#3378)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-28Misc language server fixes. (#3357)Yong He
2023-11-17warnings (#3335)Ellie Hermaszewska
* ignores * Remove unused variables * Squash out of bounds warning --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-11-16Unify stdlib `Texture` types into one generic type. (#3327)Yong He
* Unify Texture types in stdlib into 1 generic type. * Fixes. * Fix. * Fixes. * Fix reflection. * Fix binding reflection. * Add gather intrinsics. * Fix gather intrinsics. * Fix texture type toText. * Fix intrinsic. * fix cuda intrinsic. * Fix project files. * cleanup. * Fix. * Fix. * Fix sampler feedback test. * Fix getDimension intrinsics. * Fix spirv sample image intrinsics. * Fix test. * Fix GLSL intrinsic. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-11-01Parameter binding and gfx fixes. (#3302)Yong He
* Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-25Fix warnings for gcc 12.3 (#3286)Ellie Hermaszewska
* Silence a few gcc out of bounds warnings * Search upwards from executable for prelude directory instead of assuming depth * comment wording * Check return values of read and write * Correct path to vulkan headers in gfx * Correct diagnostic on missing file in slang-embed * Do not use absolute path to libraries in test-context.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-10-25Use GLSL Scalar layout for vulkan device. (#3285)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-19Add a tool to dump/replay compute pipeline creation from gfx. (#3275)Yong He
* Add a tool to dump/replay compute pipeline creation from gfx. * Fix x86 build. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-17Type layouts for structured buffers with counters (#3269)Ellie Hermaszewska
* More tests for append structured buffer * Append and Consume structured buffer tests for DX12 * neaten * test wobble * Add counter layout information to append/consume structured buffers * add getRWStructuredBufferType * Correct definition of get size for append/consume structured buffers * tweak append structured buffer test * Allow initializing counter buffer in render test * vulkan test for consume structured buffer * Handle null counterVarLayout in getExplicitCounterBindingRangeOffset * remove dead code * Implement atomic counter increment/decrement for spirv * explicit spirv test * Add missing check on result * Hold on to counter resources --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-10-09Run curated spirv-opt passes through slang-glslang. (#3266)Yong He
* Run curated spirv-opt passes through slang-glslang. * Cleanup. * Replace spirv-dis downstream compiler with glslang. * delete slang-spirv-opt.cpp. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-05Check for extension support before enabling a feature (#3262)Ellie Hermaszewska
Co-authored-by: Yong He <yonghe@outlook.com>
2023-10-02More direct-SPIRV fixes. (#3257)Yong He
* More direct-SPIRV fixes. * Fix array-reg-to-mem. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-10-02Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)Yong He
* Add SPIRV intrinsics for ShaderExecutionReordering. * Add intrinsics for `Buffer` and `RWBuffer`. * Various spirv fixes. * Marshal bool vector type. * Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-09-18Use direct spirv in hello-world example. (#3207)Yong He
* Use direct spirv in hello-world example. * Use vulkan 1.1 * Use vulkan 1.2. * fix. * Fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-09-13Fix build with --enable-xlib=false (#3203)Ellie Hermaszewska
* Fix build with --enable-xlib=false * Correct brace location --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-09-13Add gfx d3d12 TextureCube UAV case (#3205)SirKero
Co-authored-by: Yong He <yonghe@outlook.com>
2023-09-13Add all RayQuery SPIRV Intrinsics. (#3204)Yong He
* Add all RayQuery SPIRV Intrinsics. * Fix * Fix. * fix. * Fix. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-09-11Add Mesh and Task shader support to GFX (#3190)Ellie Hermaszewska
* Bump vulkan headers Also just use vulkan-headers as a submodule * Add drawMeshTasks to gfx graphics pipelines * Add DispatchMesh overload with no payload, with GLSL intrinsic * Require spirv 1.4 for mesh shaders * Add vulkan mesh shader feature discovery * Add mesh shader stage bits to vk-util * Add mesh and task shader support to render-test * Add mesh and task tests * Preserve "payload" specifier in task shaders * Add mesh shader pipeline support to gfx * Add TODO * Add numThreads attribute for amplification stage * Add payload to task shader test * Drop dependency on d3dx12 * Allow passing payloads from task to mesh shaders * regenerate vs projects * check DispatchMesh name correctly * Add mesh shader tests to failing tests * Detect wave-ops feature on vulkan * Add fuse-product to expected failures This fails because the global varaible `count` is not initialized * Add required extension to WaveMaskMatch SPIR-V impl * Remove meshShader member from pipeline desc * Identify mesh shader support on d3d12
2023-09-05Fix HLSL SER Intrinsics. (#3183)Yong He
* Fix HLSL SER Intrinsics. * Fix GFX Vulkan shader creation bug. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-09-06Add support for getting external semaphore handles (#3181)skallweitNV
* Add support for getting external semaphore handles * Fixes * Linux fix * Address reviewer comments --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-09-01Fix CI related issues. (#3175)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-09-01Fix GLSL code gen around RayQuery and HitObject types. (#3173)Yong He
* Update slang-llvm. * Fix. * fix. * Fix unit tests for multi-thread execution. * Fix tests. * fixes. * update tests. * Add gfx-smoke to linux expected failure list. * Try fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-08-31Remove redundant define form synchapi emulation (#3169)Ellie Hermaszewska
2023-08-29Avoid empty lines when not finding a render api (#3160)Ellie Hermaszewska
2023-08-28Allow bitwise or expressions and numeric literals in spirv_asm blocks (#3157)Ellie Hermaszewska
* Add -spirv-core-grammar option to load alternate spirv defs Also embed a version to use by default * Use perfect hash for spv op lookup * Neaten perfect hash embedding * Refactor spirv grammar lookup in preperation for more kinds of lookups * Load spirv capability list from spec * Add all SPIR-V enums to lookup table * regenerate vs projects * appease msvc * Use string slices for spir-v core grammar lookups * wiggle * comment * Add OpInfo for spv ops * regenerate vs projects * Embed op names * Add min/max operand counts and enum categories to spirv info * neaten * Operand kinds for spirv ops * Store and embed all information relating to spirv enums and qualifiers * Use SPIR-V spec to position instructions in spirv_asm blocks * Neaten spir-v info embedding * Neaten perfect hash embedding * Add assignment syntax to spirv_asm snippets * Better errors for spirv_asm parser * Add warning for too many operands in spirv asm * squash warnings * neaten * test wiggle * Lookup enums for spirv * Put OpCapability and OpExtension in the correct place for spirv_asm blocks * Tests for OpCapability and OpExtension * ci wiggle * Add expected failure * Allow raising immediate values to constant ids where necessary in spirv_asm blocks * Allow bitwise or expressions and numeric literals in spirv_asm blocks * test numeric literals * Fix memory issues. * fix. --------- Co-authored-by: Yong He <yonghe@outlook.com>
2023-08-25Support SPIRV Capability declaration on intrinsic functions. (#3150)Yong He
* Spirv Capability lookup. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>