-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid adding types to default namespace (#6700)
Some of the types that have been added to the vk namespace were being added to the default namespace when compiling for DXIL. The if conditions were such that they would fall through to a default case. The solution is to explicitly add code that we should skip adding those builtin types when the vk namespace is not defined. Fixes #6646.
- Loading branch information
Showing
2 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: %dxc -T ps_6_0 -E PSMain -fcgl %s -verify | ||
|
||
static const integral_constant MyVar; // expected-error{{unknown type name 'integral_constant'}} | ||
static const SpirvType MyVar; // expected-error{{unknown type name 'SpirvType'}} | ||
static const SpirvOpaqueType MyVar; // expected-error{{unknown type name 'SpirvOpaqueType'}} | ||
static const Literal MyVar; // expected-error{{unknown type name 'Literal'}} | ||
|
||
float4 PSMain() : SV_TARGET | ||
{ | ||
return float4(1.0, 1.0, 1.0, 1.0); | ||
} | ||
|