mesa: add EXT_dsa + EXT_texture_buffer_object functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2019-09-09 16:22:29 +02:00
parent 28cc07a876
commit 2bdf809e66
5 changed files with 85 additions and 2 deletions

View File

@ -1085,5 +1085,19 @@
<param name="params" type="GLint*" />
</function>
<!-- EXT_texture_buffer_object -->
<function name="TextureBufferEXT">
<param name="texture" type="GLuint" />
<param name="target" type="GLenum" />
<param name="internalformat" type="GLenum" />
<param name="buffer" type="GLuint" />
</function>
<function name="MultiTexBufferEXT">
<param name="texunit" type="GLenum" />
<param name="target" type="GLenum" />
<param name="internalformat" type="GLenum" />
<param name="buffer" type="GLuint" />
</function>
</category>
</OpenGLAPI>

View File

@ -1582,6 +1582,8 @@ offsets = {
"NamedProgramLocalParameter4dvEXT": 1546,
"GetNamedProgramLocalParameterdvEXT": 1547,
"GetNamedProgramivEXT": 1548,
"TextureBufferEXT": 1549,
"MultiTexBufferEXT": 1550,
}
functions = [

View File

@ -1137,8 +1137,8 @@ const struct function common_desktop_functions_possible[] = {
/* GL_EXT_direct_state_access - GL 2.1 */
/* Added glProgramUniformMAtrix*EXT functions are aliases */
/* GL_EXT_direct_state_access - EXT_texture_buffer_object */
//{ "glTextureBufferEXT", 10, -1 },
//{ "glMultiTexBufferEXT", 10, -1 },
{ "glTextureBufferEXT", 10, -1 },
{ "glMultiTexBufferEXT", 10, -1 },
/* GL_EXT_direct_state_access - EXT_texture_integer */
//{ "glTextureParameterIivEXT", 10, -1 },
//{ "glTextureParameterIuivEXT", 10, -1 },

View File

@ -6428,6 +6428,65 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
bufObj, 0, buffer ? -1 : 0, "glTextureBuffer");
}
void GLAPIENTRY
_mesa_TextureBufferEXT(GLuint texture, GLenum target,
GLenum internalFormat, GLuint buffer)
{
struct gl_texture_object *texObj;
struct gl_buffer_object *bufObj;
GET_CURRENT_CONTEXT(ctx);
if (buffer) {
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glTextureBuffer");
if (!bufObj)
return;
} else
bufObj = NULL;
/* Get the texture object by Name. */
texObj = _mesa_lookup_or_create_texture(ctx, target, texture,
false, true,
"glTextureBufferEXT");
if (!texObj ||
!check_texture_buffer_target(ctx, texObj->Target, "glTextureBufferEXT"))
return;
texture_buffer_range(ctx, texObj, internalFormat,
bufObj, 0, buffer ? -1 : 0, "glTextureBufferEXT");
}
void GLAPIENTRY
_mesa_MultiTexBufferEXT(GLenum texunit, GLenum target,
GLenum internalFormat, GLuint buffer)
{
struct gl_texture_object *texObj;
struct gl_buffer_object *bufObj;
GET_CURRENT_CONTEXT(ctx);
if (buffer) {
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glMultiTexBufferEXT");
if (!bufObj)
return;
} else
bufObj = NULL;
/* Get the texture object */
texObj = _mesa_get_texobj_by_target_and_texunit(ctx, target,
texunit - GL_TEXTURE0,
true,
"glMultiTexBufferEXT");
if (!texObj ||
!check_texture_buffer_target(ctx, texObj->Target, "glMultiTexBufferEXT"))
return;
texture_buffer_range(ctx, texObj, internalFormat,
bufObj, 0, buffer ? -1 : 0, "glMultiTexBufferEXT");
}
void GLAPIENTRY
_mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
GLintptr offset, GLsizeiptr size)

View File

@ -787,6 +787,14 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
extern void GLAPIENTRY
_mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer);
extern void GLAPIENTRY
_mesa_TextureBufferEXT(GLuint texture, GLenum target, GLenum internalFormat,
GLuint buffer);
extern void GLAPIENTRY
_mesa_MultiTexBufferEXT(GLenum texunit, GLenum target, GLenum internalFormat,
GLuint buffer);
extern void GLAPIENTRY
_mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
GLintptr offset, GLsizeiptr size);