[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [QEMU PATCH v5 06/13] virtio-gpu: Support context init feature with virglrenderer
On 2023/09/15 20:11, Huang Rui wrote: Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. We would like to enable the feature with virglrenderer, so add to create virgl renderer context with flags using context_id when valid. Originally-by: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx> Signed-off-by: Huang Rui <ray.huang@xxxxxxx> --- V4 -> V5: - Inverted patch 5 and 6 because we should configure HAVE_VIRGL_CONTEXT_INIT firstly. (Philippe) hw/display/virtio-gpu-virgl.c | 13 +++++++++++-- hw/display/virtio-gpu.c | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index 8bb7a2c21f..312953ec16 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -106,8 +106,17 @@ static void virgl_cmd_context_create(VirtIOGPU *g, trace_virtio_gpu_cmd_ctx_create(cc.hdr.ctx_id, cc.debug_name);- virgl_renderer_context_create(cc.hdr.ctx_id, cc.nlen,- cc.debug_name); + if (cc.context_init) { +#ifdef HAVE_VIRGL_CONTEXT_INIT + virgl_renderer_context_create_with_flags(cc.hdr.ctx_id, + cc.context_init, + cc.nlen, + cc.debug_name); + return; +#endif This should deal with the case when context_init is set while HAVE_VIRGL_CONTEXT_INIT is not defined.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |