|
|
|
@ -33,7 +33,7 @@ struct VirtIOGpu {
|
|
|
|
|
rect: VirtIOGpuRect
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuConfig {
|
|
|
|
|
events_read: ReadOnly<u32>,
|
|
|
|
@ -88,7 +88,7 @@ const VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID : u32 = 0x1202;
|
|
|
|
|
|
|
|
|
|
const VIRTIO_GPU_FLAG_FENCE : u32 = 1 << 0;
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuCtrlHdr {
|
|
|
|
|
hdr_type: u32,
|
|
|
|
@ -110,7 +110,7 @@ impl VirtIOGpuCtrlHdr {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug, Copy, Clone, Default)]
|
|
|
|
|
struct VirtIOGpuRect {
|
|
|
|
|
x: u32,
|
|
|
|
@ -119,7 +119,7 @@ struct VirtIOGpuRect {
|
|
|
|
|
height: u32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuRespDisplayInfo {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
@ -130,7 +130,7 @@ struct VirtIOGpuRespDisplayInfo {
|
|
|
|
|
|
|
|
|
|
const VIRTIO_GPU_FORMAT_B8G8R8A8_UNORM: u32 = 1;
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuResourceCreate2D {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
@ -140,7 +140,7 @@ struct VirtIOGpuResourceCreate2D {
|
|
|
|
|
height: u32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuResourceAttachBacking {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
@ -151,7 +151,7 @@ struct VirtIOGpuResourceAttachBacking {
|
|
|
|
|
padding: u32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuSetScanout {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
@ -160,7 +160,7 @@ struct VirtIOGpuSetScanout {
|
|
|
|
|
resource_id: u32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuTransferToHost2D {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
@ -170,7 +170,7 @@ struct VirtIOGpuTransferToHost2D {
|
|
|
|
|
padding: u32
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
|
struct VirtIOGpuResourceFlush {
|
|
|
|
|
header: VirtIOGpuCtrlHdr,
|
|
|
|
|