|
|
|
@@ -514,39 +514,6 @@ static void virgl_set_constant_buffer(struct pipe_context *ctx, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void virgl_transfer_inline_write(struct pipe_context *ctx, |
|
|
|
struct pipe_resource *res, |
|
|
|
unsigned level, |
|
|
|
unsigned usage, |
|
|
|
const struct pipe_box *box, |
|
|
|
const void *data, |
|
|
|
unsigned stride, |
|
|
|
unsigned layer_stride) |
|
|
|
{ |
|
|
|
struct virgl_context *vctx = virgl_context(ctx); |
|
|
|
struct virgl_screen *vs = virgl_screen(ctx->screen); |
|
|
|
struct virgl_resource *grres = virgl_resource(res); |
|
|
|
struct virgl_transfer trans = { 0 }; |
|
|
|
|
|
|
|
trans.base.resource = res; |
|
|
|
trans.base.level = level; |
|
|
|
trans.base.usage = usage; |
|
|
|
trans.base.box = *box; |
|
|
|
trans.base.stride = stride; |
|
|
|
trans.base.layer_stride = layer_stride; |
|
|
|
trans.offset = box->x; |
|
|
|
|
|
|
|
virgl_resource_dirty(grres, 0); |
|
|
|
|
|
|
|
if (virgl_res_needs_flush(vctx, &trans)) { |
|
|
|
ctx->flush(ctx, NULL, 0); |
|
|
|
vs->vws->resource_wait(vs->vws, grres->hw_res); |
|
|
|
} |
|
|
|
|
|
|
|
virgl_encoder_inline_write(vctx, grres, level, usage, |
|
|
|
box, data, stride, layer_stride); |
|
|
|
} |
|
|
|
|
|
|
|
static void *virgl_shader_encoder(struct pipe_context *ctx, |
|
|
|
const struct pipe_shader_state *shader, |
|
|
|
unsigned type) |