aboutsummaryrefslogtreecommitdiff
path: root/src/pipeline.h
diff options
context:
space:
mode:
authordan sinclair <dsinclair@google.com>2019-09-30 13:22:18 -0400
committerGitHub <noreply@github.com>2019-09-30 13:22:18 -0400
commit8348fd411b80336dbf013305e861570c50d53f40 (patch)
tree99910d0617227c58d6b8f51db5ac5c2b656f2e0c /src/pipeline.h
parent3624da9a117643a3d6cb12f80838f668f763c89e (diff)
downloadamber-8348fd411b80336dbf013305e861570c50d53f40.tar.gz
Store formats in pipeline and scripts. (#677)
This CL removes the unique_ptr from the probe and buffer classes and stores pointers instead. The lifetimes are managed by the pipeline and script objects. This removes the need to do the copy and assignment operators for the format class.
Diffstat (limited to 'src/pipeline.h')
-rw-r--r--src/pipeline.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pipeline.h b/src/pipeline.h
index 5cb63d4..a13347c 100644
--- a/src/pipeline.h
+++ b/src/pipeline.h
@@ -237,15 +237,15 @@ class Pipeline {
Result Validate() const;
/// Generates a default color attachment in B8G8R8A8_UNORM.
- std::unique_ptr<Buffer> GenerateDefaultColorAttachmentBuffer() const;
+ std::unique_ptr<Buffer> GenerateDefaultColorAttachmentBuffer();
/// Generates a default depth attachment in D32_SFLOAT_S8_UINT format.
- std::unique_ptr<Buffer> GenerateDefaultDepthAttachmentBuffer() const;
+ std::unique_ptr<Buffer> GenerateDefaultDepthAttachmentBuffer();
/// Information on values set for OpenCL-C plain-old-data args.
struct ArgSetInfo {
std::string name;
uint32_t ordinal = 0;
- std::unique_ptr<Format> fmt;
+ Format* fmt = nullptr;
Value value;
};
@@ -271,6 +271,7 @@ class Pipeline {
std::vector<BufferInfo> color_attachments_;
std::vector<BufferInfo> vertex_buffers_;
std::vector<BufferInfo> buffers_;
+ std::vector<std::unique_ptr<Format>> formats_;
BufferInfo depth_buffer_;
BufferInfo push_constant_buffer_;
Buffer* index_buffer_ = nullptr;