Browse Source

st/mesa: unmap pbo after updating cache

Unmapping first leads to accessing an invalid pointer. So let's switch
these lines around.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
master
Erik Faye-Lund 7 years ago
parent
commit
c7c0bd9f1e
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/mesa/state_tracker/st_cb_drawpixels.c

+ 2
- 2
src/mesa/state_tracker/st_cb_drawpixels.c View File

@@ -722,12 +722,12 @@ make_texture(struct st_context *st,
ctx->_ImageTransferState = imageTransferStateSave;
}

_mesa_unmap_pbo_source(ctx, unpack);

#if USE_DRAWPIXELS_CACHE
cache_drawpixels_image(st, width, height, format, type, unpack, pixels, pt);
#endif

_mesa_unmap_pbo_source(ctx, unpack);

return pt;
}


Loading…
Cancel
Save