Implement data packing intrinsics

* Fix how the HLSL writer determines how to use a RWByteAddressBuffer
* Fix how the HLSL writer decides the register space for a storage
  variable
* Fix inference of hlsl format in the tint executable
* Add support for data packing intrinsics
  * type determination
  * validation
  * writers
  * spirv reader

Bug: tint:340, tint:473, tint:474
Change-Id: I45dc8fd7c6f9abc7d30f617c7e3d713d7965b76e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/40342
Commit-Queue: Alan Baker <alanbaker@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Alan Baker
2021-02-04 16:17:49 +00:00
committed by Commit Bot service account
parent fbd47c752e
commit c63e1c0791
16 changed files with 706 additions and 130 deletions

View File

@@ -164,7 +164,13 @@ Format infer_format(const std::string& filename) {
if (ends_with(filename, ".metal")) {
return Format::kMsl;
}
#endif // TINT_BUILD_WGSL_WRITER
#endif // TINT_BUILD_MSL_WRITER
#if TINT_BUILD_HLSL_WRITER
if (ends_with(filename, ".hlsl")) {
return Format::kHlsl;
}
#endif // TINT_BUILD_HLSL_WRITER
return Format::kNone;
}