Skip to content

Commit a966c38

Browse files
committed
Update cbuffer changes
1 parent 256d762 commit a966c38

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

proposals/NNNN-202x-deprecations.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,11 @@ used for and should be the supported path going forward.
5050
In DXC the `uniform` keyword is parsed and ignored. This may lead users to
5151
believing it has some impact when it does not. We should remove it.
5252

53-
## Stricter restrictions on cbuffer Members
53+
## Disallow `cbuffer` initializers
5454

55-
DXC's implementation of `cbuffer` declarations allows all sorts of declarations
56-
inside the scope of a `cbuffer`, and does not interoperate well with C++
57-
namespaces.
58-
59-
In HLSL 202x we should disallow any declaration that isn't a variable
60-
declaration to be a member of a cbuffer, and we should seek to clearly define
61-
the relationship between cbuffer declarations and their enclosing scope (i.e.
62-
namespace).
55+
DXC allows variables within a `cbuffer` to have initializer clauses. The
56+
initializer clauses are ignored, and DXC does not issue a diagnostic. In HLSL
57+
202x initializer clauses on declarations placed into an implicit or explicit
58+
`cbuffer` declaration are illegal and will produce an error.
6359

6460
<!-- {% endraw %} -->

0 commit comments

Comments
 (0)