-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hi,
While this may/may not come naturally with other endeavours in the land of HLSL, I'd like to keep this on the radar.
HLSL currently lacks an 8-bit datatype both for arithmetic and for storage. The primary motivation for having an 8-bit datatype is not for general-purpose arithmetic, but rather:
- Support storage of smaller types in structures (e.g. StructuredBuffer) and in
groupshared
memory where space is always at a premium. - Ease the sharing of code between C/C++ and HLSL.
It's very difficult to safely load, store and manipulate 8-bit datatypes in groupshared memory without resorting to bitwise operations, masking and even atomics to affect only a single byte of a uint16_t
or uint
type. CUDA supports char
and unsigned char
datatypes in its language.
Whether the 8-bit datatypes have any operators (such as +, -, /, * etc) depends on what the level of support for that is in the ecosystem, but Load/Store is the primary motivator here.
Thanks,
Adam
Metadata
Metadata
Assignees
Labels
Type
Projects
Status