vrend: simple refactor to vrend_hw_emit_framebuffer_state()

no functional change.

Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/725>
macos/master
Ryan Neph 3 years ago committed by Marge Bot
parent 6b3bf717d4
commit cd33353097
  1. 4
      src/vrend_renderer.c

@ -2647,8 +2647,9 @@ static void vrend_hw_emit_framebuffer_state(struct vrend_sub_context *sub_ctx)
sub_ctx->swizzle_output_rgb_to_bgr = 0; sub_ctx->swizzle_output_rgb_to_bgr = 0;
sub_ctx->needs_manual_srgb_encode_bitmask = 0; sub_ctx->needs_manual_srgb_encode_bitmask = 0;
for (int i = 0; i < sub_ctx->nr_cbufs; i++) { for (int i = 0; i < sub_ctx->nr_cbufs; i++) {
if (sub_ctx->surf[i]) {
struct vrend_surface *surf = sub_ctx->surf[i]; struct vrend_surface *surf = sub_ctx->surf[i];
if (!surf)
continue;
/* glTextureView() is not applied to eglimage-backed surfaces, because it /* glTextureView() is not applied to eglimage-backed surfaces, because it
* causes unintended format interpretation errors. But a swizzle may still * causes unintended format interpretation errors. But a swizzle may still
@ -2673,7 +2674,6 @@ static void vrend_hw_emit_framebuffer_state(struct vrend_sub_context *sub_ctx)
sub_ctx->needs_manual_srgb_encode_bitmask |= 1 << i; sub_ctx->needs_manual_srgb_encode_bitmask |= 1 << i;
} }
} }
}
glDrawBuffers(sub_ctx->nr_cbufs, buffers); glDrawBuffers(sub_ctx->nr_cbufs, buffers);
} }

Loading…
Cancel
Save