diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-09-28 02:46:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-27 11:46:03 -0700 |
| commit | 8326248542c2196b4a4ba80f068adb8a0edd6006 (patch) | |
| tree | b8fc963b827547c1d13cd2aee4510abf16eaf702 /source/slang/slang-ir.cpp | |
| parent | 771b3ef47d48f5277ac9f23ee8a49548a430d107 (diff) | |
WIP Mesh shaders for SPIR-V (#3226)
* SPIR-V impl for SetMeshOutputCounts and DispatchMesh
* Unsightly fix for legalization ordering differences between GLSL and SPIR-V
* spelling
* Start a new block after terminating one in the OpEmitMeshTasksExt SPIR-V asm block
* Emit mesh shader decorations in SPIR-V
* Mesh and task shader stages for spir-v
* Output explicit gl builtins for spir-v
* Be more hygenic when SOAizing mesh outputs
* Do not create builtin paramter block for spirv mesh outputs
* Pass mesh payloads around by ref
* comment
* less expected failure
* remove unused
* Add spirv op
* Correct type query for default flat modifier
---------
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 5fa558e15..675667dbc 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -4288,6 +4288,20 @@ namespace Slang return globalVar; } + IRGlobalVar* IRBuilder::createGlobalVar( + IRType* valueType, + IRIntegerValue addressSpace) + { + auto ptrType = getPtrType(kIROp_PtrType, valueType, addressSpace); + IRGlobalVar* globalVar = createInst<IRGlobalVar>( + this, + kIROp_GlobalVar, + ptrType); + _maybeSetSourceLoc(globalVar); + addGlobalValue(this, globalVar); + return globalVar; + } + IRGlobalParam* IRBuilder::createGlobalParam( IRType* valueType) { |
