[tint][ir] Begin building proto-based serializer
Change-Id: Idf01b213b642afb4614ee0b0dbc4d1a70979cc70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/155702
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/lang/core/ir/function.h b/src/tint/lang/core/ir/function.h
index 1937673..0193884 100644
--- a/src/tint/lang/core/ir/function.h
+++ b/src/tint/lang/core/ir/function.h
@@ -73,6 +73,9 @@
};
/// Constructor
+ Function();
+
+ /// Constructor
/// @param rt the function return type
/// @param stage the function stage
/// @param wg_size the workgroup_size
@@ -103,6 +106,9 @@
/// @returns the workgroup size information
std::optional<std::array<uint32_t, 3>> WorkgroupSize() const { return workgroup_size_; }
+ /// @param type the return type for the function
+ void SetReturnType(const core::type::Type* type) { return_.type = type; }
+
/// @returns the return type for the function
const core::type::Type* ReturnType() const { return return_.type; }
@@ -165,7 +171,7 @@
void Destroy() override;
private:
- PipelineStage pipeline_stage_;
+ PipelineStage pipeline_stage_ = PipelineStage::kUndefined;
std::optional<std::array<uint32_t, 3>> workgroup_size_;
struct {