You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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:
groupshared
memory where space is always at a premium.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
oruint
type. CUDA supportschar
andunsigned 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
The text was updated successfully, but these errors were encountered: