7686729069
Extract protocol-agnostic FenceTimeline from Intel to shared src/drivers/fence.rs — atomic-based fence tracking suitable for Intel, VIRGL, and AMD drivers. Extract protocol-agnostic SyncobjManager from Intel to shared src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/ wait/query and sync_file fd export/import. Wire both into VirtioDriver: - Add FenceTimeline + SyncobjManager fields - Implement all 5 GpuDriver syncobj trait methods (create, destroy, wait, export_fd, import_fd) - Track fence seqnos in virgl_submit_3d (allocate before submit, signal after completion) Intel fence.rs and syncobj.rs converted to thin re-export modules pointing at shared sources — no behavioral change for Intel driver. This gives Mesa VIRGL userspace the standard DRM syncobj API for GPU/compositor synchronization.
20 lines
433 B
C
20 lines
433 B
C
#ifndef XBUF_H_
|
|
#define XBUF_H_
|
|
|
|
struct xbuffer
|
|
{
|
|
unsigned char *data;
|
|
int end;
|
|
int size;
|
|
};
|
|
|
|
void xbuf_init(struct xbuffer *xbuf);
|
|
void xbuf_deinit(struct xbuffer *xbuf);
|
|
void xbuf_reset(struct xbuffer *xbuf);
|
|
void xbuf_add_byte(struct xbuffer *xbuf, unsigned char b);
|
|
void xbuf_add_data(struct xbuffer *xbuf, unsigned char *data, int len);
|
|
int xbuf_pop(struct xbuffer *xbuf);
|
|
char *xbuf_char_data(struct xbuffer *xbuf);
|
|
|
|
#endif
|