vkr: pass vkr_resource_attachment to vkr_cs_encoder

We would like to track which resource is bound to the encoder.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
macos/master
Chia-I Wu 3 years ago
parent f4f2b2b7da
commit c1fee683ec
  1. 10
      src/venus/vkr_cs.c
  2. 4
      src/venus/vkr_cs.h
  3. 4
      src/venus/vkr_transport.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 */

@ -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);

@ -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

Loading…
Cancel
Save