Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
edf5b27
Merged PR 5765: Update version to 1.8.2306 and fork commit sha to 6a3…
hekota Jun 20, 2023
7f6d946
Merged PR 5704: Add SM 6.8 preview features to release-preview-1.8.2306
llvm-beanz Jun 21, 2023
657d13c
Merged PR 5769: Replace incorrect sizeof() with strlen() in compiler …
tex3d Jun 21, 2023
3e10584
Merged PR 5770: Remove extra space in sha value in latest-release.json
hekota Jun 21, 2023
25156fb
Add missing dxilver 1.8 to test. (#5313)
tex3d Jun 22, 2023
60719eb
Disambiguate RecordDispatchGrid type name for GCC (#5314)
Jun 22, 2023
6b18a6a
[NFC] Add more information on testing MDVals insertion in EmitDxilFun…
bob80905 Jul 1, 2023
f09905d
Fix include in DxilNodeProps.h (#5433)
jenatali Jul 18, 2023
2f58557
[lit] Add git usr bin to path automatically. (#5355)
python3kgae Jun 29, 2023
fed08e5
[lit] allow find git usr bin in path directly. (#5385)
python3kgae Jul 3, 2023
9468120
[Validation] Prevent instructions that accept handle arguments from a…
bob80905 Jul 22, 2023
29823ab
WaveMatrix test data refactor: remove ShaderOpArithTable.xml dependen…
tex3d Jul 22, 2023
566adca
[lit] Merge git usr bin changes to release branch (#5442)
tex3d Jul 22, 2023
81aa099
Cleanup HLSLCheckForModifiableLValue (#5458)
tcorringham Jul 27, 2023
608e93c
[Verifier] Move shader attribute diagnostics earlier. (#5453)
bob80905 Jul 31, 2023
48c9d78
[Verifier] Add verifier tests to catch MaxRecord errors earlier (#5484)
bob80905 Aug 3, 2023
7eb65ef
[Test] Replace size integer literal with regex (#5495)
bob80905 Aug 7, 2023
912e3a1
[Wave Matrix] Improve stability of wave matrix tests (#5533)
bob80905 Aug 11, 2023
040e407
Update node compute compatibility tests (#5527)
tcorringham Aug 15, 2023
37cf6dd
Move work graph CodeGen diagnostics to Sema (#5467) (#5577)
Aug 22, 2023
9a2d4d8
Fix asserts when compiling node objects with -Od (#5598)
tex3d Aug 26, 2023
f9ceb57
Move entry diagnostics from SemaDXR to SemaHLSL (#5599)
tcorringham Aug 29, 2023
6b70096
[Test][NFC] Add shader stage attribute to test shaders (#5624)
bob80905 Aug 31, 2023
d34dc67
Consolidate EmitInstrNote into common function (#5615)
Sep 5, 2023
af42292
Merge 'main' into 'staging-sm-6.8'
Aug 31, 2023
58a9ac3
Merge branch 'main' into staging-sm-6.8 (#5621)
Sep 6, 2023
816bc8c
Disallow multiple shader attributes from existing on a single declara…
bob80905 Sep 12, 2023
034ed24
[DCE] Move output complete removal code later to DCE (#5620)
bob80905 Sep 13, 2023
a79a8a0
Add profile target shader attribute to entry point function declarati…
bob80905 Sep 14, 2023
e7bbd88
Remove node + compute validation exemption in sema (#5726)
bob80905 Sep 15, 2023
bfa397a
StringSwitch CodeGen/HLops string->enums (#5735)
Sep 15, 2023
3e9e771
WaveMatrix tests cleanup (#5724)
hekota Sep 18, 2023
88c5b41
Remove unneeded Sema equal param special case (#5734)
Sep 18, 2023
eb252f0
Merge branch 'main' into 'staging-sm-6.8' (#5741)
Sep 19, 2023
325096a
Merge commit 'd949f78f69c0620fdba7320c2014424f4ecdd14f' into cbienema…
llvm-beanz Sep 19, 2023
2169fc1
Merge remote-tracking branch 'origin/main' into cbieneman/clang-forma…
llvm-beanz Sep 19, 2023
a1bc696
[NFC] Merge clang-format into 6.8 staging (#5752)
llvm-beanz Sep 20, 2023
2325bc5
Add SampleCmpBias and SampleCmpGrad (#5716)
python3kgae Sep 21, 2023
16fa301
Merge remote-tracking branch 'origin/main' into
llvm-beanz Sep 21, 2023
2b7e144
Indicate extra metadata with unknown nodeio tag (#5711)
Sep 21, 2023
d85fb12
Merge remote-tracking branch 'origin/main' into
llvm-beanz Sep 21, 2023
2b5f69f
Don't string match node type names (#5763)
llvm-beanz Sep 22, 2023
c0327d5
Remove implicit node records from being added when there are no node …
bob80905 Sep 22, 2023
b367ed0
Cbieneman/update staging 2023 09 21 (#5765)
llvm-beanz Sep 22, 2023
20f305c
Allow wavesize attribute on library shaders (#5758)
bob80905 Sep 27, 2023
6382d98
Add test for FieldAnnotationVectorSize and similar metadata tags (#5786)
hekota Sep 27, 2023
525824b
[NFC] Remove unneeded IsComplete parameter (#5793)
llvm-beanz Sep 27, 2023
006fbeb
Make NodeLaunch attribute strings case sensitive (#5622)
tcorringham Sep 27, 2023
f405983
Disallow NodeOutput or EmptyNodeOutput array node parameters (#5588)
tcorringham Oct 2, 2023
2099955
Make member expressions of bitfields emit as an RValue instead of LVa…
bob80905 Oct 3, 2023
da249d8
Improve library profile diagnostics (#5789)
bob80905 Oct 3, 2023
4a5c1ee
Move NodeMaxDispatchGrid diagnostic into Sema (#5806)
hekota Oct 4, 2023
d7d0d66
Allow SamplerComparisonState when CalculateLevelOfDetail (#5802)
python3kgae Oct 5, 2023
9ef3fdb
Flatten non-object parameters for node shaders (#5818)
python3kgae Oct 10, 2023
c03968f
Set tiled resource in shader flags. (#5830)
python3kgae Oct 10, 2023
bdd4a7f
Improve diagnostics for objects in node records (#5712)
tcorringham Oct 10, 2023
3870258
Amend compute node compatibility DXIL validation (#5589)
tcorringham Oct 10, 2023
b8a3529
Support [UnboundedSparseNodes] on node output (#5817)
tex3d Oct 10, 2023
deeb822
Update Barrier intrinsic to merge ACCESS and SYNC flags (#5825)
tex3d Oct 10, 2023
ec34e95
More NodeMaxDispatchGrid diagnostic fixes in Sema (#5844)
hekota Oct 10, 2023
85e6fbb
Fix clang diagnostics overflow in SEMA group; add static_assert (#5853)
tex3d Oct 11, 2023
50e0126
Support globallycoherent RWDispatchNodeInputRecord (#5816)
tex3d Oct 11, 2023
87daeb3
Exec test changes to enable build inside undocked Direct3D repo (#5856)
hekota Oct 12, 2023
2123869
Merge branch 'main' of into staging-sm-6.8
Oct 12, 2023
b358aad
Merge main into staging-sm-6.8 (#5861)
Oct 12, 2023
2775f19
allow [AllowSparseNodes] on non-array outputs (#5865)
tex3d Oct 13, 2023
95d3eeb
Allow DependentType for Node objects template argument. (#5833)
python3kgae Oct 16, 2023
c468d52
Add _FORCE_EXPERIMENTAL_SHADERS define to ExecutionTests (#5874)
hekota Oct 16, 2023
5eaf7a7
Remove implicit record to struct cast intrinsic (#5871)
bob80905 Oct 18, 2023
e464e3d
[lit][SPIRV] move shaders to lit folder
python3kgae Oct 25, 2023
fb2c9f5
[lit][SPIRV] convert shaders to lit FileCheck test
python3kgae Oct 25, 2023
1db04a6
Remove unnecessary in C++11 c_str() calls (#5932) (#5933)
bob80905 Oct 26, 2023
df0287c
[SPIRV] Implement SM6.6 implicit LOD operations in compute shaders (#…
s-perron Oct 27, 2023
6574b84
[Diag] disallow array of WaveMatrix (#5920)
python3kgae Oct 27, 2023
64030a4
Add PixDiaTest to put Dia related PixTests (#5936)
python3kgae Oct 28, 2023
ed1502e
Support PerVertexKHR decorated input and SV_Barycentric (#5649)
ShchchowAMD Oct 30, 2023
c6cf5c9
Add execution mode for derivatives in compute shaders (#5939)
s-perron Oct 31, 2023
d66d34a
[SPIR-V] implement vk::spvexecutionmode attribute for inline SPIR-V (…
cassiebeckley Oct 31, 2023
e496555
[Linux] Enable PixTest for Linux (#5945)
python3kgae Oct 31, 2023
a333d3b
[lit] convert verify test as lit FileCheck test part3 (#5910)
python3kgae Oct 31, 2023
3d1b501
Add SV_BaseVertexLocation and SV_StartInstanceLocation to VSIn (#5770)
python3kgae Oct 31, 2023
245fd12
[Test] enable rewriter test for linux (#5908)
python3kgae Oct 31, 2023
ae85bb8
[lit] convert verify test as lit FileCheck test part1.5 (#5912)
python3kgae Nov 1, 2023
52ace1c
Fix module loading and validation issues (#5880)
tex3d Nov 1, 2023
8377726
Fix RDAT table versioning for ver 1.8 (#5943)
tex3d Nov 2, 2023
00cd76e
[Diag] report error when SV_DispatchGrid has illegal type. (#5953)
python3kgae Nov 2, 2023
2155125
Fix UBSAN out-of-range of representable values errors (#5805)
amaiorano Nov 2, 2023
5f87376
[lit] convert verify test as lit FileCheck test part2 (#5909)
python3kgae Nov 2, 2023
cd03365
[Diagnostics] Improve recursion diagnostics, specifically for library…
bob80905 Nov 2, 2023
2377aa7
Format hctdb.py and hctdb_instrhelp.py with black for conflict resolu…
hekota Nov 2, 2023
96bb59b
Merge branch 'main' into merge-from-main-11-2-no3
hekota Nov 2, 2023
536972d
Add 2 verifier tests that were accidentally removed; update expected …
hekota Nov 2, 2023
627cf78
Update invalid_barrier_1.ll DXIL
hekota Nov 3, 2023
33d695a
Update SPIR-V submodules to be the same as main branch
hekota Nov 3, 2023
f12d91c
Add back shader attribute to couple of PIX dia tests
hekota Nov 3, 2023
273f431
One more conflict resolution fix
hekota Nov 3, 2023
de3339c
Merge main to staging-sm-6.8 (#5968)
tex3d Nov 3, 2023
9ee884f
Use OpDemoteToHelper for clip (#5970)
s-perron Nov 3, 2023
0509463
Add error message for incompatible image format and sampled type. (#5…
s-perron Nov 4, 2023
3ab440c
Fix downlevel validation testing failures (#5979)
tex3d Nov 5, 2023
8f9c501
Merge branch 'staging-sm-6.8' of https://github.com/Microsoft/DirectX…
hekota Nov 6, 2023
3e25309
clang-format
hekota Nov 6, 2023
620c29d
Fix ASAN leak in HLSL/ClangHLSLTests/RewriterTest.RunSpirv (#5972)
amaiorano Nov 7, 2023
519dd5b
Fix ASAN heap-buffer-overflow in PixTests (#5974)
amaiorano Nov 7, 2023
0780548
Fix ASAN stack-use-after-scope in SpirvEmitter::processGetAttributeAt…
amaiorano Nov 7, 2023
0a141e7
Improve pipeline build (#5977)
amaiorano Nov 7, 2023
63cbf4b
Fix enable asan on pipeline (#5976)
amaiorano Nov 7, 2023
8147212
azure-pipelines: Enable UBSAN on Linux_Clang_Release (#5978)
amaiorano Nov 7, 2023
6db52c7
[SPIRV] Implement dot4add_i8packed and dot4add_u8packed intrinsics (#…
apanteleev Nov 8, 2023
01cedea
Addressing code review feedback
hekota Nov 8, 2023
d5ddb1e
Clang formatting
hekota Nov 8, 2023
0e3de87
Turn off clang formatting for RDAT_LibraryTypes.inl and RDAT_Subobjec…
hekota Nov 8, 2023
19fd70a
Merge branch 'main' of https://github.com/Microsoft/DirectXShaderComp…
hekota Nov 8, 2023
89fbd19
Fix typo in Decl.RayQueryInFnSig validation rule
hekota Nov 8, 2023
4b7b4ce
Fix typo in DXIL.rst
hekota Nov 9, 2023
ceff9b8
Shader Model 6.8 (#5982)
hekota Nov 9, 2023
4a6fdfa
[CI] add workflow to apply clang-format diff (#5984)
python3kgae Nov 9, 2023
0c322bd
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (#5929)
Nov 9, 2023
668ecf2
[Linux] Enable PDBUtil test for Linux build (#5942)
python3kgae Nov 9, 2023
8d38549
[SM68] convert workgraph verify test as lit test (#6000)
python3kgae Nov 9, 2023
89710e5
[Build] remove VS_STARTUP_PROJECT to avoid require cmake3.4 (#5994)
python3kgae Nov 11, 2023
3fdcaf9
[SPIRV][NFC] Fix iterator usage after invalidation (#5926)
Keenuts Nov 13, 2023
ba90e24
Remove InsertAddrSpaceCastIfRequired which is redundant (#5862)
python3kgae Nov 13, 2023
bdd7d9b
[lit][SPIRV] move shaders to lit folder (471 left to go) (#5998)
python3kgae Nov 14, 2023
364a523
Make tests robust for high-level opcode changes. (#6010)
tex3d Nov 14, 2023
6c0d4b8
[CI] trigger apply format with task list (#6004)
python3kgae Nov 15, 2023
2c19e81
WinPix: variables in subroutines called from multiple functions (#5954)
jeffnn Nov 15, 2023
37cbb1d
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (425 l…
python3kgae Nov 15, 2023
e3c3114
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (381 l…
python3kgae Nov 15, 2023
7c33007
[Diag] Diagnose missing numthreads in compute shaders
bogner Nov 16, 2023
7cb19f1
Run CI builds only on main and release branches (#6026)
hekota Nov 16, 2023
a2f04b9
[Diag] Treat entry points as active even if they already have a stage
bogner Nov 16, 2023
cfd47e9
[Diag] Warn instead of error on invalid numthreads
bogner Nov 16, 2023
bd659e5
[lit][SPIRV] convert runFileTst shaders to lit FileCheck test (340 le…
python3kgae Nov 16, 2023
c30188e
[Diag] Reword `err_hlsl_missing_attr`
bogner Nov 16, 2023
f102a28
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (294 l…
python3kgae Nov 16, 2023
48842f9
Only diagnose exported library function declarations (#6009)
bob80905 Nov 16, 2023
3db94d1
Add EntryFunctionName to PSV0 data (#5946)
tex3d Nov 16, 2023
9dbfde5
[CI] fix issue when apply format (#6019)
python3kgae Nov 16, 2023
5ffdf14
PIX: Instrument ret instructions for shader debugging (#6033)
jeffnn Nov 17, 2023
9a29cd3
WinPix: Inline functions test update (#6014)
jeffnn Nov 17, 2023
74a3206
Don't rely on a high level opcode in a test (#6035)
bogner Nov 17, 2023
93c4b32
[CI] use build/main_src instead main when checkout main for save diff…
python3kgae Nov 17, 2023
da3a1be
[SM66,SPIRV] Implement InterlockedExchange for floats (#6032)
s-perron Nov 17, 2023
7f073c0
[SPIR-V] Add name to unregisterd decl error (#5957)
sudonatalie Nov 17, 2023
92e96cc
Update WinSDK version with WaveMatrix support (#6040)
hekota Nov 18, 2023
6883e9b
[SPIR-V] Fix interlock output parameter validation (#6029)
Keenuts Nov 20, 2023
115a209
[SPIRV] allow location index to be > than 64 (#6015)
Keenuts Nov 20, 2023
ef8c2f4
[lit][SPIRV] move shaders to lit folder (245 left to go)
python3kgae Nov 16, 2023
42c4293
[lit][SPIRV] convert shaders to lit FileCheck test (245 left to go)
python3kgae Nov 16, 2023
f5b259a
[SPIR-V] Emit error for unsupported HLSL res obj (#5956)
sudonatalie Nov 20, 2023
8c945e8
Update WinSDK version with WaveMatrix support to 613 (#6046)
hekota Nov 20, 2023
dc7a595
[Sema] Move more diagnostics over (#5992)
bob80905 Nov 20, 2023
d712bf3
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (245 l…
Nov 20, 2023
c5ec277
Update submodules (#6043)
Keenuts Nov 20, 2023
c486ec1
[SM6.8] Diagnostic for output records with SV_DispatchGrid (#5996)
python3kgae Nov 21, 2023
62781d0
build: add missing include file (#6045)
Keenuts Nov 21, 2023
f0aed97
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (204 l…
python3kgae Nov 21, 2023
3861c5e
[SPIR-V] disable validation on error (#6044)
Keenuts Nov 21, 2023
773fed3
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (154 l…
python3kgae Nov 22, 2023
2c913d6
[SPIR-V] Fix push_constant and shader_record_ext to work with LowerTy…
cassiebeckley Nov 22, 2023
1b405f6
[SPIR-V] Add support for 64-bit switch sel (#6049)
sudonatalie Nov 22, 2023
71afbcc
PIX: Fix recent regression in debug instrumentation of void instructi…
jeffnn Nov 22, 2023
37a0826
CMake dxc as subproject fixes (#6050)
amaiorano Nov 22, 2023
b32b169
[SPIR-V] Enable vk::ext_extension and vk::ext_capability for variable…
cassiebeckley Nov 23, 2023
f2dd3e3
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (107 l…
python3kgae Nov 24, 2023
5d5a940
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (61 le…
python3kgae Nov 27, 2023
016288f
[lit][SPIRV] move shaders to lit folder (36 left to go)
python3kgae Nov 27, 2023
2f473a3
[lit][SPIRV] convert shaders to lit FileCheck test (36 left to go)
python3kgae Nov 27, 2023
14b0da7
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (36 le…
Nov 27, 2023
59249a1
[lit][SPIRV] move shaders to lit folder
python3kgae Nov 27, 2023
9f2a358
[lit][SPIRV] convert shaders to lit FileCheck test
python3kgae Nov 27, 2023
426f6cb
Update format checker action (#6067)
Nov 27, 2023
7b222ff
[CI] remove contents write permission from code_formatter job. (#6068)
python3kgae Nov 27, 2023
c97d488
Python: fix calls to os.makedirs to avoid existence check races (#6060)
amaiorano Nov 28, 2023
b9c5bec
Fix segfault when compiling hlsl intrinsics with variadic argu… (#6012)
ChristianReinbold Nov 28, 2023
bc56be9
[CMake] add another hint for DIASDK (#6061)
python3kgae Nov 28, 2023
41241d7
[lit][SPIRV] convert runFileTest shaders to lit FileCheck test (#6069)
Nov 28, 2023
079d6cb
[lit][SPIRV] move shaders back to CodeGenSPIRV (#6072)
python3kgae Nov 28, 2023
5cecea9
[Test] add test for different matrix representations in refection (#5…
python3kgae Nov 28, 2023
aa16873
CMake: fix FindD3D12.cmake when using non-VS generators (#6056)
amaiorano Nov 29, 2023
6f516dd
Update DXIL.rst (#6078)
bharadwajy Nov 29, 2023
fc0ecb8
Fixed an OOB that potentially causes a crash (#6079)
adam-yang Nov 30, 2023
6f51315
[SPIRV] Emit OpLine for internally generated SPIR-V wrapper function …
SteveUrquhart Nov 30, 2023
beaf633
Refactor create stage vars (#6059)
s-perron Nov 30, 2023
748a54b
Rename test dir in appveyor (#6083)
s-perron Nov 30, 2023
8b24477
Propagate precise from formal parameter to actual parameter (#6058)
s-perron Nov 30, 2023
ab4c4e5
Remove ExtractRecordStructFromArray intrinsic (#6025)
bob80905 Dec 1, 2023
8a37a92
Update DXIL.rst (#6080)
bharadwajy Dec 1, 2023
f171ae8
[NFC] Remove misleading function (#6088)
bob80905 Dec 2, 2023
79d2b8d
[Sema] Change data type in MaxDispatchGrid validation calculation to …
bob80905 Dec 2, 2023
0abe45d
Check WaveMatrix support; locally declare feature struct for now (#6089)
tex3d Dec 4, 2023
4b5db1c
PIX: Fix scope ascension for variable lookup (#6091)
jeffnn Dec 6, 2023
3f8236e
Revert "Add /bigobj flag on big spirvtest object (#3858)" (#6095)
sudonatalie Dec 6, 2023
ad3958c
Refactor stage var function (#6099)
s-perron Dec 8, 2023
5f7834d
[lit][SPIRV] convert runCodeTest to lit and remove dependence on effc…
python3kgae Dec 14, 2023
3ef6ca2
[ClangCL] fix clang-cl warning (#6106)
python3kgae Dec 14, 2023
a743e97
spirv: fix build for C++20 (#6105)
Keenuts Dec 18, 2023
9dacbe3
[SPIR-V] Implement vk::ext_builtin_input and vk::ext_builtin_output (…
cassiebeckley Jan 2, 2024
7d2f9c7
deps: update SPIRV-Tools for SDK release (#6114)
Keenuts Jan 2, 2024
3c5daf0
Update SPIRV-Headers
deprilula28 Jan 3, 2024
16fc909
Merge branch 'main' of https://github.com/microsoft/DirectXShaderComp…
deprilula28 Jan 3, 2024
e33460f
Update SPIRV-Tools
deprilula28 Jan 3, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[SPIR-V] Emit error for unsupported HLSL res obj (microsoft#5956)
Emit an explicit error message when HLSL `ResourceDescriptorHeap` or `SamplerDescriptorHeap` are used with `-spirv` as they are not yet supported. Fixes microsoft#5913
  • Loading branch information
sudonatalie authored Nov 20, 2023
commit f5b259ad5de3224d0c063ca6faacde938f7f8b81
1 change: 1 addition & 0 deletions tools/clang/include/clang/AST/HlslTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ bool IsHLSLStreamOutputType(clang::QualType type);
bool IsHLSLResourceType(clang::QualType type);
bool IsHLSLNodeInputType(clang::QualType type);
bool IsHLSLDynamicResourceType(clang::QualType type);
bool IsHLSLDynamicSamplerType(clang::QualType type);
bool IsHLSLNodeType(clang::QualType type);
bool IsHLSLObjectWithImplicitMemberAccess(clang::QualType type);
bool IsHLSLObjectWithImplicitROMemberAccess(clang::QualType type);
Expand Down
8 changes: 8 additions & 0 deletions tools/clang/lib/AST/HlslTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ bool IsHLSLDynamicResourceType(clang::QualType type) {
return false;
}

bool IsHLSLDynamicSamplerType(clang::QualType type) {
if (const RecordType *RT = type->getAs<RecordType>()) {
StringRef name = RT->getDecl()->getName();
return name == ".Sampler";
}
return false;
}

bool IsHLSLNodeType(clang::QualType type) {
if (const HLSLNodeObjectAttr *Attr = getNodeAttr(type))
return true;
Expand Down
8 changes: 8 additions & 0 deletions tools/clang/lib/SPIRV/DeclResultIdMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,14 @@ DeclResultIdMapper::getDeclSpirvInfo(const ValueDecl *decl) const {
SpirvInstruction *DeclResultIdMapper::getDeclEvalInfo(const ValueDecl *decl,
SourceLocation loc,
SourceRange range) {
if (hlsl::IsHLSLDynamicResourceType(decl->getType()) ||
hlsl::IsHLSLDynamicSamplerType(decl->getType())) {
emitError("HLSL object %0 not yet supported with -spirv",
decl->getLocation())
<< decl->getName();
return nullptr;
}

const DeclSpirvInfo *info = getDeclSpirvInfo(decl);

// If DeclSpirvInfo is not found for this decl, it might be because it is an
Expand Down
9 changes: 9 additions & 0 deletions tools/clang/lib/SPIRV/InitListHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ bool InitListHandler::tryToSplitStruct() {
return false;

auto *init = initializers.back();
if (!init)
return false;

const QualType initType = init->getAstResultType();
if (!initType->isStructureType() ||
// Sampler types will pass the above check but we cannot split it.
Expand Down Expand Up @@ -171,6 +174,9 @@ bool InitListHandler::tryToSplitConstantArray() {
return false;

auto *init = initializers.back();
if (!init)
return false;

const QualType initType = init->getAstResultType();
if (!initType->isConstantArrayType())
return false;
Expand Down Expand Up @@ -496,6 +502,9 @@ InitListHandler::createInitForBufferOrImageType(QualType type,
auto init = initializers.back();
initializers.pop_back();

if (!init)
return nullptr;

if (init->getAstResultType().getCanonicalType() != type.getCanonicalType()) {
emitError("Cannot cast initializer type %0 into variable type %1", srcLoc)
<< init->getAstResultType() << type;
Expand Down
3 changes: 3 additions & 0 deletions tools/clang/lib/SPIRV/SpirvEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3407,6 +3407,9 @@ SpirvInstruction *SpirvEmitter::doCastExpr(const CastExpr *expr,
if (!subExprInstr)
subExprInstr = loadIfGLValue(subExpr);

if (!subExprInstr)
return nullptr;

auto *val = processFlatConversion(toType, evalType, subExprInstr,
expr->getExprLoc(), range);
val->setRValue();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// RUN: not %dxc -T cs_6_6 -E main -fcgl -spirv %s 2>&1 | FileCheck %s

[numthreads(32, 1, 1)]
void main() {
Texture2D t = ResourceDescriptorHeap[0];
SamplerState s = SamplerDescriptorHeap[0];
}

// CHECK: error: HLSL object ResourceDescriptorHeap not yet supported with -spirv
// CHECK: error: HLSL object SamplerDescriptorHeap not yet supported with -spirv