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 "vrend_iov.h"
#include "vkr_context.h"
void void
vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc, vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc,
const struct iovec *iov, const struct vkr_resource_attachment *att,
int iov_count,
size_t offset, size_t offset,
size_t size) size_t size)
{ {
enc->stream.iov = iov; enc->stream.attachment = att;
enc->stream.iov_count = iov_count; enc->stream.iov = att->iov;
enc->stream.iov_count = att->iov_count;
enc->stream.offset = offset; enc->stream.offset = offset;
enc->stream.size = size; enc->stream.size = size;
/* clear cache */ /* clear cache */

@ -16,6 +16,7 @@ struct vkr_cs_encoder {
bool *fatal_error; bool *fatal_error;
struct { struct {
const struct vkr_resource_attachment *attachment;
const struct iovec *iov; const struct iovec *iov;
int iov_count; int iov_count;
size_t offset; size_t offset;
@ -79,8 +80,7 @@ vkr_cs_encoder_set_fatal(const struct vkr_cs_encoder *enc)
void void
vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc, vkr_cs_encoder_set_stream(struct vkr_cs_encoder *enc,
const struct iovec *iov, const struct vkr_resource_attachment *att,
int iov_count,
size_t offset, size_t offset,
size_t size); size_t size);

@ -26,8 +26,8 @@ vkr_dispatch_vkSetReplyCommandStreamMESA(
return; return;
} }
vkr_cs_encoder_set_stream(&ctx->encoder, att->iov, att->iov_count, vkr_cs_encoder_set_stream(&ctx->encoder, att, args->pStream->offset,
args->pStream->offset, args->pStream->size); args->pStream->size);
} }
static void static void

Loading…
Cancel
Save