diff --git a/src/venus/vkr_cs.c b/src/venus/vkr_cs.c index ad26106..9886494 100644 --- a/src/venus/vkr_cs.c +++ b/src/venus/vkr_cs.c @@ -7,15 +7,17 @@ #include "vrend_iov.h" +#include "vkr_context.h" + void vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc, - const struct iovec *iov, - int iov_count, + const struct vkr_resource_attachment *att, size_t offset, size_t size) { - enc->stream.iov = iov; - enc->stream.iov_count = iov_count; + enc->stream.attachment = att; + enc->stream.iov = att->iov; + enc->stream.iov_count = att->iov_count; enc->stream.offset = offset; enc->stream.size = size; /* clear cache */ diff --git a/src/venus/vkr_cs.h b/src/venus/vkr_cs.h index 9bf755b..b6baf57 100644 --- a/src/venus/vkr_cs.h +++ b/src/venus/vkr_cs.h @@ -16,6 +16,7 @@ struct vkr_cs_encoder { bool *fatal_error; struct { + const struct vkr_resource_attachment *attachment; const struct iovec *iov; int iov_count; size_t offset; @@ -79,8 +80,7 @@ vkr_cs_encoder_set_fatal(const struct vkr_cs_encoder *enc) void vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc, - const struct iovec *iov, - int iov_count, + const struct vkr_resource_attachment *att, size_t offset, size_t size); diff --git a/src/venus/vkr_transport.c b/src/venus/vkr_transport.c index 9455baf..0b8e2b0 100644 --- a/src/venus/vkr_transport.c +++ b/src/venus/vkr_transport.c @@ -26,8 +26,8 @@ vkr_dispatch_vkSetReplyCommandStreamMESA( return; } - vkr_cs_encoder_set_stream(&ctx->encoder, att->iov, att->iov_count, - args->pStream->offset, args->pStream->size); + vkr_cs_encoder_set_stream(&ctx->encoder, att, args->pStream->offset, + args->pStream->size); } static void