Skip to content

Commit

Permalink
[vk,mtl] dont use STORE_OP_DONTCARE in begin_render_pass_simple
Browse files Browse the repository at this point in the history
  • Loading branch information
nicebyte committed Jan 12, 2024
1 parent 407a28f commit 698ad0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions source/ngf-mtl/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1887,9 +1887,7 @@ ngf_error ngf_cmd_begin_render_pass_simple(
const bool needs_resolve = rt->attachment_descs.descs[i].type == NGF_ATTACHMENT_COLOR &&
rt->attachment_descs.descs[i].sample_count > NGF_SAMPLE_COUNT_1 &&
(rt->resolve_image_refs || rt->is_default);
store_ops[i] = (needs_resolve) ? NGF_STORE_OP_RESOLVE
: (rt->attachment_descs.descs[i].is_sampled) ? NGF_STORE_OP_STORE
: NGF_STORE_OP_DONTCARE;
store_ops[i] = (needs_resolve) ? NGF_STORE_OP_RESOLVE : NGF_STORE_OP_STORE;
}
const ngf_render_pass_info pass_info =
{.render_target = rt, .load_ops = load_ops, .store_ops = store_ops, .clears = clears};
Expand Down
4 changes: 1 addition & 3 deletions source/ngf-vk/impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4065,9 +4065,7 @@ ngf_error ngf_cmd_begin_render_pass_simple(
const bool needs_resolve = rt->attachment_descs[i].type == NGF_ATTACHMENT_COLOR &&
rt->have_resolve_attachments &&
rt->attachment_descs[i].sample_count > NGF_SAMPLE_COUNT_1;
store_ops[i] = needs_resolve ? NGF_STORE_OP_RESOLVE
: rt->attachment_descs[i].is_sampled ? NGF_STORE_OP_STORE
: NGF_STORE_OP_DONTCARE;
store_ops[i] = needs_resolve ? NGF_STORE_OP_RESOLVE : NGF_STORE_OP_STORE;
}
const ngf_render_pass_info pass_info = {
.render_target = rt,
Expand Down

0 comments on commit 698ad0a

Please sign in to comment.