aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_encode.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-07-19 05:35:53 +1000
committerDave Airlie <[email protected]>2018-08-01 14:00:35 +1000
commit2df8b80c4c4842ef80d8b80f1fed53e75a82645d (patch)
tree8bd6dd1b2bb9e9c1e82a2e36705d9f5c4a7cc424 /src/gallium/drivers/virgl/virgl_encode.c
parentf8a8ea6a2da89bb6f7d97f286a0cf1202fb95d8e (diff)
virgl: Support ARB_framebuffer_no_attachments
This uses new protocol to send the default sizes to the host. Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_encode.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_encode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index 0cb5184d193..670c5fe6c3d 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -350,6 +350,12 @@ int virgl_encoder_set_framebuffer_state(struct virgl_context *ctx,
virgl_encoder_write_dword(ctx->cbuf, surf ? surf->handle : 0);
}
+ struct virgl_screen *rs = virgl_screen(ctx->base.screen);
+ if (rs->caps.caps.v2.capability_bits & VIRGL_CAP_FB_NO_ATTACH) {
+ virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_FRAMEBUFFER_STATE_NO_ATTACH, 0, VIRGL_SET_FRAMEBUFFER_STATE_NO_ATTACH_SIZE));
+ virgl_encoder_write_dword(ctx->cbuf, state->width | (state->height << 16));
+ virgl_encoder_write_dword(ctx->cbuf, state->layers | (state->samples << 16));
+ }
return 0;
}