mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
mesa: add KHR_no_error support to glTexStorage*D()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
14f1613c6f
commit
8ca88da368
3 changed files with 66 additions and 3 deletions
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
<enum name="TEXTURE_IMMUTABLE_FORMAT" value="0x912F"/>
|
||||
|
||||
<function name="TexStorage1D">
|
||||
<function name="TexStorage1D" no_error="true">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="levels" type="GLsizei"/>
|
||||
<param name="internalFormat" type="GLenum"/>
|
||||
<param name="width" type="GLsizei"/>
|
||||
</function>
|
||||
|
||||
<function name="TexStorage2D" es2="3.0">
|
||||
<function name="TexStorage2D" es2="3.0" no_error="true">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="levels" type="GLsizei"/>
|
||||
<param name="internalFormat" type="GLenum"/>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<param name="height" type="GLsizei"/>
|
||||
</function>
|
||||
|
||||
<function name="TexStorage3D" es2="3.0">
|
||||
<function name="TexStorage3D" es2="3.0" no_error="true">
|
||||
<param name="target" type="GLenum"/>
|
||||
<param name="levels" type="GLsizei"/>
|
||||
<param name="internalFormat" type="GLenum"/>
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
*/
|
||||
|
|
@ -575,6 +600,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)
|
||||
|
|
@ -584,6 +617,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)
|
||||
|
|
@ -593,6 +635,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)
|
||||
|
|
|
|||
|
|
@ -59,15 +59,27 @@ _mesa_valid_tex_storage_dim(GLsizei width, GLsizei height, GLsizei depth)
|
|||
*/
|
||||
/*@{*/
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexStorage1D_no_error(GLenum target, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width);
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexStorage2D_no_error(GLenum target, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexStorage3D_no_error(GLenum target, GLsizei levels,
|
||||
GLenum internalformat, GLsizei width,
|
||||
GLsizei height, GLsizei depth);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue