summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/virgl/virgl_encode.c
diff options
context:
space:
mode:
authorGurchetan Singh <[email protected]>2019-01-11 17:29:49 -0800
committerGert Wollny <[email protected]>2019-02-15 11:19:04 +0100
commit5b6a2ae987d6d6895d80ce61292e2025cacb5125 (patch)
treeb2cbf9c3caa8bdc2eef751c1a77fcb1466500beb /src/gallium/drivers/virgl/virgl_encode.c
parent1d294ad264dc85e716bec5b6d0286cc3e10ce224 (diff)
virgl: use virgl_resource_dirty helper
Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_encode.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_encode.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index b7fa31737c8..6fbefc5933b 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -61,12 +61,6 @@ static void virgl_encoder_write_res(struct virgl_context *ctx,
}
}
-static void virgl_dirty_res(struct virgl_resource *res)
-{
- if (res)
- res->clean[0] = FALSE;
-}
-
int virgl_encode_bind_object(struct virgl_context *ctx,
uint32_t handle, uint32_t object)
{
@@ -621,7 +615,7 @@ int virgl_encode_sampler_view(struct virgl_context *ctx,
if (res->u.b.target == PIPE_BUFFER) {
virgl_encoder_write_dword(ctx->cbuf, state->u.buf.offset / elem_size);
virgl_encoder_write_dword(ctx->cbuf, (state->u.buf.offset + state->u.buf.size) / elem_size - 1);
- virgl_dirty_res(res);
+ virgl_resource_dirty(res, 0);
} else {
virgl_encoder_write_dword(ctx->cbuf, state->u.tex.first_layer | state->u.tex.last_layer << 16);
virgl_encoder_write_dword(ctx->cbuf, state->u.tex.first_level | state->u.tex.last_level << 8);
@@ -956,7 +950,7 @@ int virgl_encode_set_shader_buffers(struct virgl_context *ctx,
virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_offset);
virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_size);
virgl_encoder_write_res(ctx, res);
- virgl_dirty_res(res);
+ virgl_resource_dirty(res, 0);
} else {
virgl_encoder_write_dword(ctx->cbuf, 0);
virgl_encoder_write_dword(ctx->cbuf, 0);
@@ -980,7 +974,7 @@ int virgl_encode_set_hw_atomic_buffers(struct virgl_context *ctx,
virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_offset);
virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_size);
virgl_encoder_write_res(ctx, res);
- virgl_dirty_res(res);
+ virgl_resource_dirty(res, 0);
} else {
virgl_encoder_write_dword(ctx->cbuf, 0);
virgl_encoder_write_dword(ctx->cbuf, 0);
@@ -1008,7 +1002,7 @@ int virgl_encode_set_shader_images(struct virgl_context *ctx,
virgl_encoder_write_dword(ctx->cbuf, images[i].u.buf.offset);
virgl_encoder_write_dword(ctx->cbuf, images[i].u.buf.size);
virgl_encoder_write_res(ctx, res);
- virgl_dirty_res(res);
+ virgl_resource_dirty(res, 0);
} else {
virgl_encoder_write_dword(ctx->cbuf, 0);
virgl_encoder_write_dword(ctx->cbuf, 0);