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