You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.7 KiB
70 lines
1.7 KiB
#ifndef GRAW_PROTOCOL_H
|
|
#define GRAW_PROTOCOL_H
|
|
|
|
#define VIRGL_QUERY_STATE_NEW 0
|
|
#define VIRGL_QUERY_STATE_DONE 1
|
|
#define VIRGL_QUERY_STATE_WAIT_HOST 2
|
|
|
|
struct virgl_host_query_state {
|
|
uint32_t query_state;
|
|
uint32_t result_size;
|
|
uint64_t result;
|
|
};
|
|
|
|
enum virgl_object_type {
|
|
VIRGL_OBJECT_NULL,
|
|
VIRGL_OBJECT_BLEND,
|
|
VIRGL_OBJECT_RASTERIZER,
|
|
VIRGL_OBJECT_DSA,
|
|
VIRGL_OBJECT_VS,
|
|
VIRGL_OBJECT_FS,
|
|
VIRGL_OBJECT_VERTEX_ELEMENTS,
|
|
VIRGL_OBJECT_SAMPLER_VIEW,
|
|
VIRGL_OBJECT_SAMPLER_STATE,
|
|
VIRGL_OBJECT_SURFACE,
|
|
VIRGL_OBJECT_QUERY,
|
|
VIRGL_OBJECT_STREAMOUT_TARGET,
|
|
VIRGL_MAX_OBJECTS,
|
|
};
|
|
|
|
/* context cmds to be encoded in the command stream */
|
|
enum virgl_context_cmd {
|
|
VIRGL_CCMD_NOP = 0,
|
|
VIRGL_CCMD_CREATE_OBJECT = 1,
|
|
VIRGL_CCMD_BIND_OBJECT,
|
|
VIRGL_CCMD_DESTROY_OBJECT,
|
|
VIRGL_CCMD_SET_VIEWPORT_STATE,
|
|
VIRGL_CCMD_SET_FRAMEBUFFER_STATE,
|
|
VIRGL_CCMD_SET_VERTEX_BUFFERS,
|
|
VIRGL_CCMD_CLEAR,
|
|
VIRGL_CCMD_DRAW_VBO,
|
|
VIRGL_CCMD_RESOURCE_INLINE_WRITE,
|
|
VIRGL_CCMD_SET_SAMPLER_VIEWS,
|
|
VIRGL_CCMD_SET_INDEX_BUFFER,
|
|
VIRGL_CCMD_SET_CONSTANT_BUFFER,
|
|
VIRGL_CCMD_SET_STENCIL_REF,
|
|
VIRGL_CCMD_SET_BLEND_COLOR,
|
|
VIRGL_CCMD_SET_SCISSOR_STATE,
|
|
VIRGL_CCMD_BLIT,
|
|
VIRGL_CCMD_RESOURCE_COPY_REGION,
|
|
VIRGL_CCMD_BIND_SAMPLER_STATES,
|
|
VIRGL_CCMD_BEGIN_QUERY,
|
|
VIRGL_CCMD_END_QUERY,
|
|
VIRGL_CCMD_GET_QUERY_RESULT,
|
|
VIRGL_CCMD_SET_POLYGON_STIPPLE,
|
|
VIRGL_CCMD_SET_CLIP_STATE,
|
|
VIRGL_CCMD_SET_SAMPLE_MASK,
|
|
VIRGL_CCMD_SET_STREAMOUT_TARGETS,
|
|
VIRGL_CCMD_SET_QUERY_STATE,
|
|
VIRGL_CCMD_SET_RENDER_CONDITION,
|
|
};
|
|
|
|
/*
|
|
8-bit cmd headers
|
|
8-bit object type
|
|
16-bit length
|
|
*/
|
|
|
|
#define VIRGL_CMD0(cmd, obj, len) ((cmd) | ((obj) << 8) | ((len) << 16))
|
|
|
|
#endif
|
|
|