summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer_upload.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 61f6fb0f03c..104cb6dbd2c 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -1003,6 +1003,12 @@ svga_buffer_handle(struct svga_context *svga, struct pipe_resource *buf,
return NULL;
}
} else {
+ if (!sbuf->bind_flags) {
+ sbuf->bind_flags = tobind_flags;
+ }
+
+ assert((sbuf->bind_flags & tobind_flags) == tobind_flags);
+
/* This call will set sbuf->handle */
if (svga_have_gb_objects(svga)) {
ret = svga_buffer_update_hw(svga, sbuf, sbuf->bind_flags);