diff options
Diffstat (limited to 'src/vrend_decode.c')
-rw-r--r-- | src/vrend_decode.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 1da942c..26b4a30 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -343,7 +343,7 @@ static int vrend_decode_resource_inline_write(struct vrend_decode_ctx *ctx, uint static int vrend_decode_draw_vbo(struct vrend_decode_ctx *ctx, int length) { struct pipe_draw_info info; - + uint32_t cso; if (length != VIRGL_DRAW_VBO_SIZE) return EINVAL; memset(&info, 0, sizeof(struct pipe_draw_info)); @@ -359,7 +359,10 @@ static int vrend_decode_draw_vbo(struct vrend_decode_ctx *ctx, int length) info.restart_index = get_buf_entry(ctx, VIRGL_DRAW_VBO_RESTART_INDEX); info.min_index = get_buf_entry(ctx, VIRGL_DRAW_VBO_MIN_INDEX); info.max_index = get_buf_entry(ctx, VIRGL_DRAW_VBO_MAX_INDEX); - vrend_draw_vbo(ctx->grctx, &info); + + cso = get_buf_entry(ctx, VIRGL_DRAW_VBO_COUNT_FROM_SO); + + vrend_draw_vbo(ctx->grctx, &info, cso); return 0; } @@ -994,16 +997,17 @@ static int vrend_decode_set_streamout_targets(struct vrend_decode_ctx *ctx, uint16_t length) { uint32_t handles[16]; - uint32_t num_handles = length - 1; - uint32_t append_bitmask; + uint32_t num_handles = length - 2; + uint32_t append_bitmask, flags; int i; if (length < 1) return EINVAL; append_bitmask = get_buf_entry(ctx, VIRGL_SET_STREAMOUT_TARGETS_APPEND_BITMASK); + flags = get_buf_entry(ctx, VIRGL_SET_STREAMOUT_TARGETS_FLAGS); for (i = 0; i < num_handles; i++) handles[i] = get_buf_entry(ctx, VIRGL_SET_STREAMOUT_TARGETS_H0 + i); - vrend_set_streamout_targets(ctx->grctx, append_bitmask, num_handles, handles); + vrend_set_streamout_targets(ctx->grctx, append_bitmask, flags,num_handles, handles); return 0; } |