perf(display): present copies window rows as-is (scanout R8G8B8X8 = window byte order, Host hands out row bytes, Framebuffer::write_rgba_row); Window copy_from/copy_to one fenced memcpy; full present ~65ms -> ~3ms
This commit is contained in:
@@ -28,9 +28,10 @@ const DISPLAY_H: ByteOffset = ByteOffset::new(24 + 12);
|
||||
|
||||
pub fn create_2d(mmio: &impl MmioAccess, queue: &VirtioQueue, dma: &GpuDmaAddrs, resource_id: u32, width: Dimension, height: Dimension) -> bool {
|
||||
write_cmd_header(&dma.cmd, 0x0101);
|
||||
// Resource id, format (1: B8G8R8A8), width, height.
|
||||
// Resource id, format (134: R8G8B8X8, a window's own byte order, so
|
||||
// its rows are copied as they are), width, height.
|
||||
dma.cmd.write(BODY, resource_id);
|
||||
dma.cmd.write(BODY + 4, 1u32);
|
||||
dma.cmd.write(BODY + 4, 134u32);
|
||||
dma.cmd.write(BODY + 8, width.raw() as u32);
|
||||
dma.cmd.write(BODY + 12, height.raw() as u32);
|
||||
submit_cmd(mmio, queue, dma, 40)
|
||||
|
||||
Reference in New Issue
Block a user