From: Dave Airlie Date: Wed, 25 May 2016 04:02:27 +0000 (+1000) Subject: mesa/bufferobj: use mapping range in BufferSubData. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e891f7cf55f2f3e3d37ece12e5c64f4be70e3845;p=mesa.git mesa/bufferobj: use mapping range in BufferSubData. According to GL4.5 spec: An INVALID_OPERATION error is generated if any part of the speci- fied buffer range is mapped with MapBufferRange or MapBuffer (see sec- tion 6.3), unless it was mapped with MAP_PERSISTENT_BIT set in the Map- BufferRange access flags. So we should use the if range is mapped path. This fixes: GL45-CTS.buffer_storage.map_persistent_buffer_sub_data Reviewed-by: Nicolai Hähnle Cc: "12.0, 11.2" Signed-off-by: Dave Airlie --- diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 33bc57409b1..795cb1618fd 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -1765,7 +1765,7 @@ _mesa_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *bufObj, const char *func) { if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, - false, func)) { + true, func)) { /* error already recorded */ return; }