Only RWByteAddressBuffer::Load is supported in this PR.
Implement Load by cast handle to uint8_t ptr first.
Then add the byte address to get target address.
Cast the target address to target type ptr and deref.
struct RWByteAddressBuffer {
void *handle; template<typename T> Load(uint i) { return *((T*)(((uint8_t*)handle) + i)); }
};
Allow ref/ptr use for HLSLExternalSemaSource to skip the check when Location is invalid.
Also add HLSLResourceHelper to share code for RWByteAddressBuffer and RWBuffer.