diff options
author | Dave Airlie <[email protected]> | 2018-05-22 09:32:42 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-01-31 11:23:38 +1000 |
commit | 9279a28f07fd65fa94831f7f9fb80b35921f6805 (patch) | |
tree | 7ca3776a22df8debf1a56032c312b14f86b40acf /src/gallium/drivers/virgl/virgl_encode.c | |
parent | 38658c6d4dda1df12690c1f4c01b993862d6fe68 (diff) |
virgl: ARB_query_buffer_object support
v1.1: fix size define.
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_encode.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_encode.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 403f54e2842..5b8575699dc 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -1075,6 +1075,22 @@ int virgl_encode_host_debug_flagstring(struct virgl_context *ctx, virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_DEBUG_FLAGS, 0, sslen)); virgl_encoder_write_block(ctx->cbuf, (const uint8_t *)flagstring, string_length); + return 0; +} +int virgl_encode_get_query_result_qbo(struct virgl_context *ctx, + uint32_t handle, + struct virgl_resource *res, boolean wait, + uint32_t result_type, + uint32_t offset, + uint32_t index) +{ + virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_GET_QUERY_RESULT_QBO, 0, VIRGL_QUERY_RESULT_QBO_SIZE)); + virgl_encoder_write_dword(ctx->cbuf, handle); + virgl_encoder_write_res(ctx, res); + virgl_encoder_write_dword(ctx->cbuf, wait ? 1 : 0); + virgl_encoder_write_dword(ctx->cbuf, result_type); + virgl_encoder_write_dword(ctx->cbuf, offset); + virgl_encoder_write_dword(ctx->cbuf, index); return 0; } |