mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-24 15:33:42 +00:00
Stub out the method to generate individual entry points.
This CL adds the stub methods for the various backends to generate individual <pipeline stage, entry point> pairs. Bug: tint:211 Change-Id: I7c5c6af4b44cb78976e4388a2b2174ee1a116531 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28044 Commit-Queue: David Neto <dneto@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
0f49753f35
commit
2dc982f7ea
@ -40,6 +40,10 @@ bool Generator::Generate() {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Generator::GenerateEntryPoint(ast::PipelineStage, const std::string&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string Generator::result() const {
|
std::string Generator::result() const {
|
||||||
return out_.str();
|
return out_.str();
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,13 @@ class Generator : public Text {
|
|||||||
/// @returns true on successful generation; false otherwise
|
/// @returns true on successful generation; false otherwise
|
||||||
bool Generate() override;
|
bool Generate() override;
|
||||||
|
|
||||||
|
/// Converts a single entry point
|
||||||
|
/// @param stage the pipeline stage
|
||||||
|
/// @param name the entry point name
|
||||||
|
/// @returns true on succes; false on failure
|
||||||
|
bool GenerateEntryPoint(ast::PipelineStage stage,
|
||||||
|
const std::string& name) override;
|
||||||
|
|
||||||
/// @returns the result data
|
/// @returns the result data
|
||||||
std::string result() const override;
|
std::string result() const override;
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ bool Generator::Generate() {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Generator::GenerateEntryPoint(ast::PipelineStage, const std::string&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string Generator::result() const {
|
std::string Generator::result() const {
|
||||||
return impl_->result();
|
return impl_->result();
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,13 @@ class Generator : public Text {
|
|||||||
/// @returns true on successful generation; false otherwise
|
/// @returns true on successful generation; false otherwise
|
||||||
bool Generate() override;
|
bool Generate() override;
|
||||||
|
|
||||||
|
/// Converts a single entry point
|
||||||
|
/// @param stage the pipeline stage
|
||||||
|
/// @param name the entry point name
|
||||||
|
/// @returns true on succes; false on failure
|
||||||
|
bool GenerateEntryPoint(ast::PipelineStage stage,
|
||||||
|
const std::string& name) override;
|
||||||
|
|
||||||
/// @returns the result data
|
/// @returns the result data
|
||||||
std::string result() const override;
|
std::string result() const override;
|
||||||
|
|
||||||
|
@ -43,6 +43,10 @@ bool Generator::Generate() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Generator::GenerateEntryPoint(ast::PipelineStage, const std::string&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace spirv
|
} // namespace spirv
|
||||||
} // namespace writer
|
} // namespace writer
|
||||||
} // namespace tint
|
} // namespace tint
|
||||||
|
@ -42,6 +42,13 @@ class Generator : public writer::Writer {
|
|||||||
/// @returns true on successful generation; false otherwise
|
/// @returns true on successful generation; false otherwise
|
||||||
bool Generate() override;
|
bool Generate() override;
|
||||||
|
|
||||||
|
/// Converts a single entry point
|
||||||
|
/// @param stage the pipeline stage
|
||||||
|
/// @param name the entry point name
|
||||||
|
/// @returns true on succes; false on failure
|
||||||
|
bool GenerateEntryPoint(ast::PipelineStage stage,
|
||||||
|
const std::string& name) override;
|
||||||
|
|
||||||
/// @returns the result data
|
/// @returns the result data
|
||||||
const std::vector<uint32_t>& result() const { return writer_->result(); }
|
const std::vector<uint32_t>& result() const { return writer_->result(); }
|
||||||
|
|
||||||
|
@ -38,6 +38,10 @@ bool Generator::Generate() {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Generator::GenerateEntryPoint(ast::PipelineStage, const std::string&) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string Generator::result() const {
|
std::string Generator::result() const {
|
||||||
return impl_->result();
|
return impl_->result();
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,13 @@ class Generator : public Text {
|
|||||||
/// @returns true on successful generation; false otherwise
|
/// @returns true on successful generation; false otherwise
|
||||||
bool Generate() override;
|
bool Generate() override;
|
||||||
|
|
||||||
|
/// Converts a single entry point
|
||||||
|
/// @param stage the pipeline stage
|
||||||
|
/// @param name the entry point name
|
||||||
|
/// @returns true on succes; false on failure
|
||||||
|
bool GenerateEntryPoint(ast::PipelineStage stage,
|
||||||
|
const std::string& name) override;
|
||||||
|
|
||||||
/// @returns the result data
|
/// @returns the result data
|
||||||
std::string result() const override;
|
std::string result() const override;
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "src/ast/module.h"
|
#include "src/ast/module.h"
|
||||||
|
#include "src/ast/pipeline_stage.h"
|
||||||
|
|
||||||
namespace tint {
|
namespace tint {
|
||||||
namespace writer {
|
namespace writer {
|
||||||
@ -37,6 +38,13 @@ class Writer {
|
|||||||
/// @returns true on success; false on failure
|
/// @returns true on success; false on failure
|
||||||
virtual bool Generate() = 0;
|
virtual bool Generate() = 0;
|
||||||
|
|
||||||
|
/// Converts a single entry point
|
||||||
|
/// @param stage the pipeline stage
|
||||||
|
/// @param name the entry point name
|
||||||
|
/// @returns true on succes; false on failure
|
||||||
|
virtual bool GenerateEntryPoint(ast::PipelineStage stage,
|
||||||
|
const std::string& name) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// @param module the tint module to convert
|
/// @param module the tint module to convert
|
||||||
|
Loading…
x
Reference in New Issue
Block a user