From a7ef36bc519dff1700048ba8f21658daa138a81a Mon Sep 17 00:00:00 2001 From: quou Date: Mon, 10 Mar 2025 13:18:03 +1100 Subject: msaa --- pipeline.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'pipeline.cpp') 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); } } } -- cgit v1.2.3-54-g00ecf