[Piglit] [PATCH 09/15] arb_direct_state_access: Testing MapNamedBufferRange.
Martin Peres
martin.peres at linux.intel.com
Wed Apr 1 04:53:15 PDT 2015
On 23/01/15 21:03, Laura Ekstrand wrote:
> ---
> tests/spec/arb_direct_state_access/namedbufferstorage.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/tests/spec/arb_direct_state_access/namedbufferstorage.c b/tests/spec/arb_direct_state_access/namedbufferstorage.c
> index c68bc27..a997311 100644
> --- a/tests/spec/arb_direct_state_access/namedbufferstorage.c
> +++ b/tests/spec/arb_direct_state_access/namedbufferstorage.c
> @@ -63,22 +63,19 @@ create_mapped_buffer(GLuint *buffer, GLfloat **map, GLboolean coherent,
> (coherent ? GL_MAP_COHERENT_BIT : 0) |
> GL_DYNAMIC_STORAGE_BIT |
> (client_storage ? GL_CLIENT_STORAGE_BIT : 0));
> - glBindBuffer(GL_ARRAY_BUFFER, *buffer);
>
> piglit_check_gl_error(GL_NO_ERROR);
>
> - *map = glMapBufferRange(GL_ARRAY_BUFFER, 0, BUF_SIZE,
> - GL_MAP_WRITE_BIT |
> - GL_MAP_PERSISTENT_BIT |
> - (coherent ? GL_MAP_COHERENT_BIT : 0));
> + *map = glMapNamedBufferRange(*buffer, 0, BUF_SIZE,
> + GL_MAP_WRITE_BIT |
> + GL_MAP_PERSISTENT_BIT |
> + (coherent ? GL_MAP_COHERENT_BIT : 0));
>
> piglit_check_gl_error(GL_NO_ERROR);
>
> if (!*map)
> return false;
>
> - glBindBuffer(GL_ARRAY_BUFFER, 0);
> -
> return true;
> }
>
Same as patch 4.
More information about the Piglit
mailing list