summaryrefslogtreecommitdiff
path: root/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pipeline.cpp')
-rw-r--r--pipeline.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/pipeline.cpp b/pipeline.cpp
index 0636a1c..374dad8 100644
--- a/pipeline.cpp
+++ b/pipeline.cpp
@@ -23,6 +23,7 @@ Pipeline_Builder& Pipeline_Builder::rp_target(Texture_Id id, Colour clear) {
Render_Pass::Target t{
.id = id,
.fmt = texture.fmt,
+ .samples = texture.samples,
.mode = Clear_Mode::clear,
.clear = { .colour = clear }
};
@@ -37,6 +38,7 @@ Pipeline_Builder& Pipeline_Builder::rp_target(Texture_Id id, Clear_Mode clear) {
Render_Pass::Target t{
.id = id,
.fmt = texture.fmt,
+ .samples = texture.samples,
.mode = clear,
.clear = { .depth = 0.0f }
};
@@ -51,6 +53,7 @@ Pipeline_Builder& Pipeline_Builder::rp_depth_target(Texture_Id id, float clear)
Render_Pass::Target t{
.id = id,
.fmt = texture.fmt,
+ .samples = texture.samples,
.mode = Clear_Mode::clear,
.clear = { .depth = clear }
};
@@ -63,6 +66,7 @@ Pipeline_Builder& Pipeline_Builder::rp_depth_target(Texture_Id id, Clear_Mode mo
Render_Pass::Target t{
.id = id,
.fmt = texture.fmt,
+ .samples = texture.samples,
.mode = mode,
.clear = { .depth = 0.0f }
};
@@ -73,7 +77,7 @@ Pipeline_Builder& Pipeline_Builder::rp_depth_target(Texture_Id id, Clear_Mode mo
void Pipeline_Builder::validate_rp() {
int i, c = pass->colour_count;
- int w, h;
+ int w, h, s;
assert(c || pass->depth.id);
if (c) {
Texture& tex = dev->get_texture(pass->colours[0].id);
@@ -81,7 +85,8 @@ void Pipeline_Builder::validate_rp() {
assert(pass->colours[0].fmt == tex.fmt);
w = tex.w;
h = tex.h;
- assert(w && h);
+ s = tex.samples;
+ assert(w && h && s);
}
for (i = 1; i < c; i++) {
Texture& tex = dev->get_texture(pass->colours[i].id);
@@ -89,6 +94,7 @@ void Pipeline_Builder::validate_rp() {
assert(pass->colours[i].fmt == tex.fmt);
assert(tex.w == w);
assert(tex.h == h);
+ assert(tex.samples == s);
}
if (pass->depth.id) {
Texture& d = dev->get_texture(pass->depth.id);
@@ -101,6 +107,7 @@ void Pipeline_Builder::validate_rp() {
if (c) {
assert(d.w == w);
assert(d.h == h);
+ assert(d.samples == s);
}
}
}