gallium/u_threaded: always unmap const_uploader
authorMarek Olšák <marek.olsak@amd.com>
Thu, 31 Jan 2019 01:49:22 +0000 (20:49 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 21 Feb 2019 02:04:29 +0000 (21:04 -0500)
radeonsi will require this. It's a no-op for drivers supporting persistent
mappings.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/gallium/auxiliary/util/u_threaded_context.c

index b596c3229189e7fe3923ed7088ece58676b30ec3..bd2c8f57a10cc1041f082257f4875d1130e9bd40 100644 (file)
@@ -676,6 +676,7 @@ tc_set_constant_buffer(struct pipe_context *_pipe,
    if (cb && cb->user_buffer) {
       u_upload_data(tc->base.const_uploader, 0, cb->buffer_size, 64,
                     cb->user_buffer, &offset, &buffer);
+      u_upload_unmap(tc->base.const_uploader);
    }
 
    struct tc_constant_buffer *p =