Hash :
0bd5cac2
Author :
Date :
2021-08-06T17:56:58
Allow BufferSubData with persistently mapped buffers
Per the GL_EXT_buffer_storage extension:
What commands are affected by the relaxed errors for persistently
mapped buffers?
RESOLVED: In GL 4.5 the following commands have the relaxed
language BufferSubData, ClearBufferSubData, CopyBufferSubData,
GetBufferSubData and InvalidateBufferSubData. Of these commands
the only ones that apply to ES 3.1 are BufferSubData and
CopyBufferSubData. However, if additional extensions add any of
the other commands and EXT_buffer_storage is supported, they
would have the same behavior in ES.
Therefore we need to allow BufferSubData and CopyBufferSubData on
persistently mapped buffers.
Current we fail these scenarios in validation. This was detected when
running Fortnite on Android using the game's GLES backend.
Also added two tests:
- StorageCopyBufferSubDataMapped to recreate the exact Fortnite
scenario using glCopyBufferSubData.
- StorageBufferSubDataMapped is a contrived case to cover
glBufferSubData
Test: BufferStorageTestES3.StorageCopyBufferSubDataMapped/*
Test: BufferStorageTestES3.StorageBufferSubDataMapped/*
Bug: b/180418810
Bug: angleproject:5658
Change-Id: Ib678e84f367934656ec10f0f4ad0d35ac687f0b0
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3078316
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Cody Northrop <cnorthrop@google.com>