if (!buffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glNamedBufferDataEXT(invalid buffer 0)");
+ "glNamedBufferDataEXT(buffer=0)");
return;
}
if (!buffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glNamedBufferSubDataEXT(invalid buffer 0)");
+ "glNamedBufferSubDataEXT(buffer=0)");
return;
}
}
+void GLAPIENTRY
+_mesa_GetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr size, GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetNamedBufferSubDataEXT(buffer=0)");
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+ &bufObj, "glGetNamedBufferSubDataEXT"))
+ return;
+
+ if (!buffer_object_subdata_range_good(ctx, bufObj, offset, size, false,
+ "glGetNamedBufferSubDataEXT")) {
+ return;
+ }
+
+ assert(ctx->Driver.GetBufferSubData);
+ ctx->Driver.GetBufferSubData(ctx, offset, size, data, bufObj);
+}
+
/**
* \param subdata true if caller is *SubData, false if *Data
*/
if (!buffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glUnmapNamedBufferEXT(invalid buffer 0)");
+ "glUnmapNamedBufferEXT(buffer=0)");
return GL_FALSE;
}
}
void GLAPIENTRY
+_mesa_GetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+ GLint64 parameter;
+
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetNamedBufferParameterivEXT: buffer=0");
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+ &bufObj, "glGetNamedBufferParameterivEXT"))
+ return;
+
+ if (!get_buffer_parameter(ctx, bufObj, pname, ¶meter,
+ "glGetNamedBufferParameterivEXT"))
+ return; /* Error already recorded. */
+
+ *params = (GLint) parameter;
+}
+
+void GLAPIENTRY
_mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
GLint64 *params)
{
*params = bufObj->Mappings[MAP_USER].Pointer;
}
+void GLAPIENTRY
+_mesa_GetNamedBufferPointervEXT(GLuint buffer, GLenum pname, GLvoid **params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetNamedBufferPointervEXT(buffer=0)");
+ return;
+ }
+ if (pname != GL_BUFFER_MAP_POINTER) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointervEXT(pname != "
+ "GL_BUFFER_MAP_POINTER)");
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+ &bufObj, "glGetNamedBufferPointervEXT"))
+ return;
+
+ *params = bufObj->Mappings[MAP_USER].Pointer;
+}
static void
copy_buffer_sub_data(struct gl_context *ctx, struct gl_buffer_object *src,
GET_CURRENT_CONTEXT(ctx);
if (!buffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glMapNamedBufferRangeEXT(invalid buffer 0)");
+ "glMapNamedBufferRangeEXT(buffer=0)");
return NULL;
}
return map_named_buffer_range(buffer, offset, length, access, true,
GLbitfield accessFlags;
if (!buffer) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glMapNamedBufferEXT(invalid buffer 0)");
+ "glMapNamedBufferEXT(buffer=0)");
return NULL;
}
if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
"glFlushMappedNamedBufferRange");
}
+void GLAPIENTRY
+_mesa_FlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr length)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFlushMappedNamedBufferRangeEXT(buffer=0)");
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (!_mesa_handle_bind_buffer_gen(ctx, buffer,
+ &bufObj, "glFlushMappedNamedBufferRangeEXT"))
+ return;
+
+ flush_mapped_buffer_range(ctx, bufObj, offset, length,
+ "glFlushMappedNamedBufferRangeEXT");
+}
+
static void
bind_buffer_range_uniform_buffer(struct gl_context *ctx, GLuint index,
struct gl_buffer_object *bufObj,
GLsizeiptr size, GLvoid *data);
void GLAPIENTRY
+_mesa_GetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr size, GLvoid *data);
+
+void GLAPIENTRY
_mesa_ClearBufferData_no_error(GLenum target, GLenum internalformat,
GLenum format, GLenum type, const GLvoid *data);
_mesa_GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params);
void GLAPIENTRY
+_mesa_GetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint *params);
+
+void GLAPIENTRY
_mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
GLint64 *params);
_mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params);
void GLAPIENTRY
+_mesa_GetNamedBufferPointervEXT(GLuint buffer, GLenum pname, GLvoid **params);
+
+void GLAPIENTRY
_mesa_CopyBufferSubData_no_error(GLenum readTarget, GLenum writeTarget,
GLintptr readOffset, GLintptr writeOffset,
GLsizeiptr size);
GLsizeiptr length);
void GLAPIENTRY
+_mesa_FlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr length);
+
+void GLAPIENTRY
_mesa_BindBufferRange_no_error(GLenum target, GLuint index, GLuint buffer,
GLintptr offset, GLsizeiptr size);
void GLAPIENTRY
{ "glNamedBufferSubDataEXT", 15, -1 },
{ "glMapNamedBufferEXT", 15, -1 },
{ "glUnmapNamedBufferEXT", 15, -1 },
- //{ "glGetNamedBufferParameterivEXT", 15, -1 },
- //{ "glGetNamedBufferPointervEXT", 15, -1 },
- //{ "glGetNamedBufferSubDataEXT", 15, -1 },
+ { "glGetNamedBufferParameterivEXT", 15, -1 },
+ { "glGetNamedBufferPointervEXT", 15, -1 },
+ { "glGetNamedBufferSubDataEXT", 15, -1 },
/* GL_EXT_direct_state_access - GL 2.0 */
//{ "glProgramUniform1iEXT", 20, -1 },
//{ "glProgramUniform1ivEXT", 20, -1 },
//{ "glGetVertexArrayIntegeri_vEXT", 30, -1 },
//{ "glGetVertexArrayPointeri_vEXT", 30, -1 },
{ "glMapNamedBufferRangeEXT", 30, -1 },
- //{ "glFlushMappedNamedBufferRangeEXT", 30, -1 },
+ { "glFlushMappedNamedBufferRangeEXT", 30, -1 },
/* GL_ARB_internalformat_query */
{ "glGetInternalformativ", 30, -1 },