diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_encode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index a0da36cdb89..72fecf43d02 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -963,7 +963,7 @@ int virgl_encode_set_shader_buffers(struct virgl_context *ctx, virgl_encoder_write_dword(ctx->cbuf, shader); virgl_encoder_write_dword(ctx->cbuf, start_slot); for (i = 0; i < count; i++) { - if (buffers) { + if (buffers && buffers[i].buffer) { struct virgl_resource *res = virgl_resource(buffers[i].buffer); virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_offset); virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_size); @@ -987,7 +987,7 @@ int virgl_encode_set_hw_atomic_buffers(struct virgl_context *ctx, virgl_encoder_write_dword(ctx->cbuf, start_slot); for (i = 0; i < count; i++) { - if (buffers) { + if (buffers && buffers[i].buffer) { struct virgl_resource *res = virgl_resource(buffers[i].buffer); virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_offset); virgl_encoder_write_dword(ctx->cbuf, buffers[i].buffer_size); @@ -1013,7 +1013,7 @@ int virgl_encode_set_shader_images(struct virgl_context *ctx, virgl_encoder_write_dword(ctx->cbuf, shader); virgl_encoder_write_dword(ctx->cbuf, start_slot); for (i = 0; i < count; i++) { - if (images) { + if (images && images[i].resource) { struct virgl_resource *res = virgl_resource(images[i].resource); virgl_encoder_write_dword(ctx->cbuf, images[i].format); virgl_encoder_write_dword(ctx->cbuf, images[i].access); |