BufferStorageTests: do not unmap with MapOwner if not needed
This test uses the following method to call MapRange on a buffer:
Buffer::MapOwner Buffer::MapRange(glw::GLintptr offset,
glw::GLsizeiptr length,
glw::GLenum access)
It returns a MapOwner, that unmaps the buffer when it is destroyed.
For some tests, it is called like this:
{ /* start test */
{
buffer.MapRange(<params>);
} /* freed here */
/* Do stuff with the buffer. Assumes to be still mapped */
/* Checks the buffer */
} /* end test */
The problem with this approach is that as the Mapowner returned by
MapRange is not used, it is destroyed (on the previous code snippet at
"freed here"), and the buffer is unmapped unintentionally.
This patch gets out the call to MapRange, so it is not unmapped until
the end (on the code snippet, at "end test").
Fixes the following tests (only Mesa Intel driver tested):
GL45-CTS.buffer_storage.get_buffer_parameter
GL45-CTS.buffer_storage.map_persistent_buffer_sub_data
GL45-CTS.buffer_storage.map_persistent_read_pixels
Components: OpenGL
VK-GL-CTS issue: 148
Change-Id: I676eeaf0808e9bb19617bde7d658c14859f1357d