diff options
author | Samuel Pitoiset <[email protected]> | 2017-07-18 14:42:59 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-07-31 13:53:39 +0200 |
commit | 3e637918ec24f795ecf41c07a434a40c6f4ae8b0 (patch) | |
tree | 928ce26ff377f9f52fe32d1ae5f73488ce3a0d6a | |
parent | bc38214d76cea8f0e67aa90ac41014ac2973154e (diff) |
mesa: add KHR_no_error support to glTextureStorage*D()
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r-- | src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 | ||||
-rw-r--r-- | src/mesa/main/texstorage.c | 40 | ||||
-rw-r--r-- | src/mesa/main/texstorage.h | 12 |
3 files changed, 55 insertions, 3 deletions
diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 0c34b638546..f1ae6e97902 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -331,14 +331,14 @@ <param name="size" type="GLsizeiptr" /> </function> - <function name="TextureStorage1D"> + <function name="TextureStorage1D" no_error="true"> <param name="texture" type="GLuint" /> <param name="levels" type="GLsizei" /> <param name="internalformat" type="GLenum" /> <param name="width" type="GLsizei" /> </function> - <function name="TextureStorage2D"> + <function name="TextureStorage2D" no_error="true"> <param name="texture" type="GLuint" /> <param name="levels" type="GLsizei" /> <param name="internalformat" type="GLenum" /> @@ -346,7 +346,7 @@ <param name="height" type="GLsizei" /> </function> - <function name="TextureStorage3D"> + <function name="TextureStorage3D" no_error="true"> <param name="texture" type="GLuint" /> <param name="levels" type="GLsizei" /> <param name="internalformat" type="GLenum" /> diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 0117ab6c81d..7a61a4f4786 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -600,6 +600,19 @@ texturestorage_error(GLuint dims, GLuint texture, GLsizei levels, } +static void +texturestorage_no_error(GLuint dims, GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, GLsizei height, + GLsizei depth) +{ + GET_CURRENT_CONTEXT(ctx); + + struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture); + texture_storage_no_error(ctx, dims, texObj, texObj->Target, + levels, internalformat, width, height, depth, true); +} + + void GLAPIENTRY _mesa_TexStorage1D_no_error(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) @@ -654,6 +667,14 @@ _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, void GLAPIENTRY +_mesa_TextureStorage1D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width) +{ + texturestorage_no_error(1, texture, levels, internalformat, width, 1, 1); +} + + +void GLAPIENTRY _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { @@ -663,6 +684,15 @@ _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, void GLAPIENTRY +_mesa_TextureStorage2D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, + GLsizei width, GLsizei height) +{ + texturestorage_no_error(2, texture, levels, internalformat, width, height, 1); +} + + +void GLAPIENTRY _mesa_TextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) @@ -673,6 +703,16 @@ _mesa_TextureStorage2D(GLuint texture, GLsizei levels, void GLAPIENTRY +_mesa_TextureStorage3D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth) +{ + texturestorage_no_error(3, texture, levels, internalformat, width, height, + depth); +} + + +void GLAPIENTRY _mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { diff --git a/src/mesa/main/texstorage.h b/src/mesa/main/texstorage.h index 269c8bdc272..66b77be4e14 100644 --- a/src/mesa/main/texstorage.h +++ b/src/mesa/main/texstorage.h @@ -85,15 +85,27 @@ extern void GLAPIENTRY _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +void GLAPIENTRY +_mesa_TextureStorage1D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width); + extern void GLAPIENTRY _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width); +void GLAPIENTRY +_mesa_TextureStorage2D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height); extern void GLAPIENTRY _mesa_TextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +void GLAPIENTRY +_mesa_TextureStorage3D_no_error(GLuint texture, GLsizei levels, + GLenum internalformat, GLsizei width, + GLsizei height, GLsizei depth); extern void GLAPIENTRY _mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, |