diff options
author | Dave Airlie <[email protected]> | 2019-02-11 10:51:01 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-04-09 14:15:24 +1000 |
commit | 05ff2dbf137c03b7c7e47f606b930e0afddaedee (patch) | |
tree | 816154464e54f606a79259d559da0a1337e99b3c /src/gallium/drivers/virgl/virgl_encode.c | |
parent | 316b785c59446c9206343d5349091d797f677f2b (diff) |
virgl: add support for ARB_multi_draw_indirect
This will pass the multi draw through to the host if it has
support for it instead of using the st to emulate it
Reviewed-By: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_encode.c')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_encode.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index a3029e6f213..a0da36cdb89 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -469,10 +469,13 @@ int virgl_encoder_draw_vbo(struct virgl_context *ctx, if (length == VIRGL_DRAW_VBO_SIZE_INDIRECT) { virgl_encoder_write_res(ctx, virgl_resource(info->indirect->buffer)); virgl_encoder_write_dword(ctx->cbuf, info->indirect->offset); - virgl_encoder_write_dword(ctx->cbuf, 0); /* indirect stride */ - virgl_encoder_write_dword(ctx->cbuf, 0); /* indirect draw count */ - virgl_encoder_write_dword(ctx->cbuf, 0); /* indirect draw count offset */ - virgl_encoder_write_dword(ctx->cbuf, 0); /* indirect draw count handle */ + virgl_encoder_write_dword(ctx->cbuf, info->indirect->stride); /* indirect stride */ + virgl_encoder_write_dword(ctx->cbuf, info->indirect->draw_count); /* indirect draw count */ + virgl_encoder_write_dword(ctx->cbuf, info->indirect->indirect_draw_count_offset); /* indirect draw count offset */ + if (info->indirect->indirect_draw_count) + virgl_encoder_write_res(ctx, virgl_resource(info->indirect->indirect_draw_count)); + else + virgl_encoder_write_dword(ctx->cbuf, 0); /* indirect draw count handle */ } return 0; } |