[Mesa-dev] [PATCH] mesa/bufferobj: use mapping range in BufferSubData.
Nicolai Hähnle
nhaehnle at gmail.com
Tue May 31 11:10:17 UTC 2016
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 25.05.2016 06:03, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> 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
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/main/bufferobj.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 33bc574..795cb16 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;
> }
>
More information about the mesa-dev
mailing list