diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-18 14:14:48 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:39 +0200 |
commit | 8ca88da368c55252c18e50b6e4789561f9fb5ebd (patch) | |
tree | a88c3eebc8acb8cb2ddbf0c98f3f89beb50ed816 /src/mesa/main/texstorage.c | |
parent | 14f1613c6f3c892684b3e479e649ce8eefa173ce (diff) |
mesa: add KHR_no_error support to glTexStorage*D()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/texstorage.c')
-rw-r--r-- | src/mesa/main/texstorage.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 854a2ed5660..ede3159f058 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -487,6 +487,18 @@ texture_storage_error(struct gl_context *ctx, GLuint dims, } +static void +texture_storage_no_error(struct gl_context *ctx, GLuint dims, + struct gl_texture_object *texObj, + GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth, bool dsa) +{ + texture_storage(ctx, dims, texObj, target, levels, internalformat, width, + height, depth, dsa, true); +} + + /** * Helper used by _mesa_TexStorage1/2/3D(). */ @@ -531,6 +543,19 @@ texstorage_error(GLuint dims, GLenum target, GLsizei levels, } +static void +texstorage_no_error(GLuint dims, GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth) +{ + GET_CURRENT_CONTEXT(ctx); + + struct gl_texture_object *texObj = _mesa_get_current_tex_object(ctx, target); + texture_storage_no_error(ctx, dims, texObj, target, levels, + internalformat, width, height, depth, false); +} + + /** * Helper used by _mesa_TextureStorage1/2/3D(). */ @@ -576,6 +601,14 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels, void GLAPIENTRY +_mesa_TexStorage1D_no_error(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width) +{ + texstorage_no_error(1, target, levels, internalformat, width, 1, 1); +} + + +void GLAPIENTRY _mesa_TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { @@ -585,6 +618,15 @@ _mesa_TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, void GLAPIENTRY +_mesa_TexStorage2D_no_error(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height) +{ + texstorage_no_error(2, target, levels, internalformat, width, height, 1); +} + + +void GLAPIENTRY _mesa_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { @@ -594,6 +636,15 @@ _mesa_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, void GLAPIENTRY +_mesa_TexStorage3D_no_error(GLenum target, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth) +{ + texstorage_no_error(3, target, levels, internalformat, width, height, depth); +} + + +void GLAPIENTRY _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { |