mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/vulkan: replace wlr_vk_render_pass.srgb_pathway with two_pass
The important bit here is whether this is using a single or two sub-passes. The flag isn't used for anything else. Preparation for an upcoming one-subpass codepath.
This commit is contained in:
parent
b2d09cdee9
commit
3e88a79e6f
2 changed files with 5 additions and 5 deletions
|
|
@ -405,7 +405,7 @@ struct wlr_vk_render_pass {
|
|||
VkPipeline bound_pipeline;
|
||||
float projection[9];
|
||||
bool failed;
|
||||
bool srgb_pathway; // if false, rendering via intermediate blending buffer
|
||||
bool two_pass; // rendering via intermediate blending buffer
|
||||
struct wlr_color_transform *color_transform;
|
||||
|
||||
bool has_primaries;
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ static bool render_pass_submit(struct wlr_render_pass *wlr_pass) {
|
|||
assert(stage_cb != NULL);
|
||||
renderer->stage.cb = NULL;
|
||||
|
||||
if (!pass->srgb_pathway) {
|
||||
if (pass->two_pass) {
|
||||
// Apply output shader to map blend image to actual output image
|
||||
vkCmdNextSubpass(render_cb->vk, VK_SUBPASS_CONTENTS_INLINE);
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ static bool render_pass_submit(struct wlr_render_pass *wlr_pass) {
|
|||
pass->render_buffer_out->transitioned = true;
|
||||
}
|
||||
|
||||
if (!pass->srgb_pathway) {
|
||||
if (pass->two_pass) {
|
||||
// The render pass changes the blend image layout from
|
||||
// color attachment to read only, so on each frame, before
|
||||
// the render pass starts, we change it back
|
||||
|
|
@ -614,7 +614,7 @@ error:
|
|||
|
||||
static void render_pass_mark_box_updated(struct wlr_vk_render_pass *pass,
|
||||
const struct wlr_box *box) {
|
||||
if (pass->srgb_pathway) {
|
||||
if (!pass->two_pass) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1217,7 +1217,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend
|
|||
|
||||
wlr_render_pass_init(&pass->base, &render_pass_impl);
|
||||
pass->renderer = renderer;
|
||||
pass->srgb_pathway = using_srgb_pathway;
|
||||
pass->two_pass = !using_srgb_pathway;
|
||||
if (options != NULL && options->color_transform != NULL) {
|
||||
pass->color_transform = wlr_color_transform_ref(options->color_transform);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue