mesa/include
Gurchetan Singh bab8e77bb2 drm-uapi: virtgpu_drm.h: context init feature
This change allows creating contexts of depending on set of
context parameters.  The meaning of each of the parameters
is listed below:

1) VIRTGPU_CONTEXT_PARAM_CAPSET_ID

This determines the type of a context based on the capability set
ID.  For example, the current capsets:

VIRTIO_GPU_CAPSET_VIRGL
VIRTIO_GPU_CAPSET_VIRGL2

define a Gallium, TGSI based "virgl" context.  We only need 1 capset
ID per context type, though virgl has two due a bug that has since
been fixed.

The use case is the "gfxstream" rendering library and "venus"
renderer.

gfxstream doesn't do Gallium/TGSI translation and mostly relies on
auto-generated API streaming.  Certain users prefer gfxstream over
virgl for GLES on GLES emulation.  {gfxstream vk}/{venus} are also
required for Vulkan emulation.

The goal is for guest userspace to choose the optimal context type
depending on the situation/hardware.

2) VIRTGPU_CONTEXT_PARAM_NUM_RINGS

This tells the number of independent command rings that the context
will use.  This value may be zero and is inferred to be zero if
VIRTGPU_CONTEXT_PARAM_NUM_RINGS is not passed in.  This is backwards
compatibility for virgl, which has one big giant command ring for all
commands.

The maxiumum number of rings is 32.  In practice, multi-queue or
multi-ring submission is used for powerful dGPUs and virtio-gpu
may not be the best option in that case (see PCI passthrough or
rendernode forwarding).

3) VIRTGPU_CONTEXT_PARAM_POLL_RING_IDX_MASK

This is a mask of ring indices for which the DRM fd is pollable.
For example, if VIRTGPU_CONTEXT_PARAM_NUM_RINGS is 2, then the mask
may be:

[ring idx]  |  [1 << ring_idx] | final mask
-------------------------------------------
    0              1                1
    1              2                3

The "Sommelier" guest Wayland proxy uses this to poll for events
from the host compositor.

Reviewed-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
Tested-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7712>
2021-09-30 16:45:12 +00:00
..
CL CL: update CL headers to 3.0 2020-11-06 17:02:54 +10:00
D3D9 st/nine: Change a few advertised caps 2019-03-09 13:57:49 +01:00
EGL EGL: sync headers with Khronos 2021-07-22 17:12:35 +00:00
GL gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE 2021-09-29 08:14:57 +00:00
GLES include: update GL headers from the registry 2019-06-21 19:00:52 -04:00
GLES2 include/GLES2: Sync GLES2 headers with Khronos 2019-10-08 13:53:01 -07:00
GLES3 include: update GL headers from the registry 2019-06-21 19:00:52 -04:00
HaikuGL hgl: Major refactor and cleanup 2021-01-09 20:51:35 -06:00
KHR EGL: sync headers with Khronos 2019-08-14 21:48:23 +01:00
android_stub egl/android: add aosp_nougat system/window.h back for back compat 2021-06-11 02:33:57 +00:00
c11 c11/threads: Remove Windows XP support 2020-11-26 07:58:56 +00:00
d3dadapter st/nine: skip position checks in SetCursorPosition() 2019-04-20 13:06:29 +02:00
drm-uapi drm-uapi: virtgpu_drm.h: context init feature 2021-09-30 16:45:12 +00:00
pci_ids intel/pci-ids: Re-enable DG1 and add SG1 2021-08-18 17:35:41 +00:00
vulkan vulkan: Update the XML and headers to 1.2.193 2021-09-24 17:55:10 +00:00
winddk d3d10umd,d3d10sw: Initial import. 2021-05-19 13:50:07 +00:00
c11_compat.h introduce c11_compat.h to provide C11 things in C99 2019-08-04 11:14:25 +01:00
c99_alloca.h
c99_compat.h Remove Scons leftovers 2021-03-30 20:17:19 +00:00
c99_math.h
meson.build anv: Remove vkCreateDmaBufINTEL (v4) 2021-04-08 14:15:55 +00:00
no_extern_c.h no_extern_c.h: fix typo in comment 2020-05-21 14:23:41 +00:00