mesa/bufferobj: use mapping range in BufferSubData.
authorDave Airlie <airlied@redhat.com>
Wed, 25 May 2016 04:02:27 +0000 (14:02 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 1 Jun 2016 03:30:40 +0000 (13:30 +1000)
commite891f7cf55f2f3e3d37ece12e5c64f4be70e3845
tree904a912087ee8374755e90be5586912e85c05bb0
parent18d11c998940d4228ce0f5057042a885f1aa65af
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 <nicolai.haehnle@amd.com>
Cc: "12.0, 11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/bufferobj.c