summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/bufferobj.c35
-rw-r--r--src/mesa/main/bufferobj.h11
-rw-r--r--src/mesa/main/tests/dispatch_sanity.cpp2
3 files changed, 48 insertions, 0 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index b2d0ef9cfc8..ae086a66b06 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1773,6 +1773,22 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format,
"glClearBufferData", false);
}
+void GLAPIENTRY
+_mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
+ GLenum format, GLenum type, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glClearNamedBufferData");
+ if (!bufObj)
+ return;
+
+ _mesa_clear_buffer_sub_data(ctx, bufObj, internalformat, 0, bufObj->Size,
+ format, type, data,
+ "glClearNamedBufferData", false);
+}
+
void GLAPIENTRY
_mesa_ClearBufferSubData(GLenum target, GLenum internalformat,
@@ -1792,6 +1808,25 @@ _mesa_ClearBufferSubData(GLenum target, GLenum internalformat,
"glClearBufferSubData", true);
}
+void GLAPIENTRY
+_mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
+ GLintptr offset, GLsizeiptr size,
+ GLenum format, GLenum type,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
+ "glClearNamedBufferSubData");
+ if (!bufObj)
+ return;
+
+ _mesa_clear_buffer_sub_data(ctx, bufObj, internalformat, offset, size,
+ format, type, data,
+ "glClearNamedBufferSubData", true);
+}
+
void * GLAPIENTRY
_mesa_MapBuffer(GLenum target, GLenum access)
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 5911270c0e8..52547274ff2 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -223,11 +223,22 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat,
const GLvoid * data);
void GLAPIENTRY
+_mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
+ GLenum format, GLenum type,
+ const GLvoid *data);
+
+void GLAPIENTRY
_mesa_ClearBufferSubData(GLenum target, GLenum internalformat,
GLintptr offset, GLsizeiptr size,
GLenum format, GLenum type,
const GLvoid * data);
+void GLAPIENTRY
+_mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
+ GLintptr offset, GLsizeiptr size,
+ GLenum format, GLenum type,
+ const GLvoid *data);
+
void * GLAPIENTRY
_mesa_MapBuffer(GLenum target, GLenum access);
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 63b9dcfa385..aff5cd6319c 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -958,6 +958,8 @@ const struct function gl_core_functions_possible[] = {
{ "glNamedBufferData", 45, -1 },
{ "glNamedBufferSubData", 45, -1 },
{ "glCopyNamedBufferSubData", 45, -1 },
+ { "glClearNamedBufferData", 45, -1 },
+ { "glClearNamedBufferSubData", 45, -1 },
{ "glCreateTextures", 45, -1 },
{ "glTextureStorage1D", 45, -1 },
{ "glTextureStorage2D", 45, -1 },