Repository navigation
constexpr constants not recognized as compile-time constants
#12087
static constexpr let RADIUS = 2;
static constexpr let BLOCK_SIZE = 16;
static groupshared float shmem[BLOCK_SIZE + RADIUS * 2][24];
[[shader("compute"), numthreads(BLOCK_SIZE, BLOCK_SIZE, 1)]]
func main() {}When compiling the above shader example with:
these error are reported by the compiler: This is quite confusing for a C++ dev like me, that a constant with a |
Answered by
jkwak-work
Oct 6, 2026
Replies: 2 comments
|
Update: static const let RADIUS = 2; |
0 replies
|
The implementation |
0 replies
Answer selected by
Stehsaer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The implementation
constexpris currently incomplete.static constis the right approach for this case.