const GLvoid *data_external_mem;
bool data_null; /* If set, no data follows for "data" */
bool named;
+ bool ext_dsa;
/* Next size bytes are GLubyte data[size] */
};
else
data = (const void *) (cmd + 1);
- if (cmd->named) {
+ if (cmd->ext_dsa) {
+ CALL_NamedBufferDataEXT(ctx->CurrentServerDispatch,
+ (target_or_name, size, data, usage));
+ } else if (cmd->named) {
CALL_NamedBufferData(ctx->CurrentServerDispatch,
(target_or_name, size, data, usage));
} else {
unreachable("never used - all BufferData variants use DISPATCH_CMD_BufferData");
}
+void
+_mesa_unmarshal_NamedBufferDataEXT(struct gl_context *ctx,
+ const struct marshal_cmd_BufferData *cmd)
+{
+ unreachable("never used - all BufferData variants use DISPATCH_CMD_BufferData");
+}
+
static void
_mesa_marshal_BufferData_merged(GLuint target_or_name, GLsizeiptr size,
const GLvoid *data, GLenum usage, bool named,
- const char *func)
+ bool ext_dsa, const char *func)
{
GET_CURRENT_CONTEXT(ctx);
bool external_mem = !named &&
cmd->usage = usage;
cmd->data_null = !data;
cmd->named = named;
+ cmd->ext_dsa = ext_dsa;
cmd->data_external_mem = data;
if (copy_data) {
_mesa_marshal_BufferData(GLenum target, GLsizeiptr size, const GLvoid * data,
GLenum usage)
{
- _mesa_marshal_BufferData_merged(target, size, data, usage, false,
+ _mesa_marshal_BufferData_merged(target, size, data, usage, false, false,
"BufferData");
}
_mesa_marshal_NamedBufferData(GLuint buffer, GLsizeiptr size,
const GLvoid * data, GLenum usage)
{
- _mesa_marshal_BufferData_merged(buffer, size, data, usage, true,
+ _mesa_marshal_BufferData_merged(buffer, size, data, usage, true, false,
"NamedBufferData");
}
+void GLAPIENTRY
+_mesa_marshal_NamedBufferDataEXT(GLuint buffer, GLsizeiptr size,
+ const GLvoid *data, GLenum usage)
+{
+ _mesa_marshal_BufferData_merged(buffer, size, data, usage, true, true,
+ "NamedBufferDataEXT");
+}
+
/* BufferSubData: marshalled asynchronously */
struct marshal_cmd_BufferSubData
GLintptr offset;
GLsizeiptr size;
bool named;
+ bool ext_dsa;
/* Next size bytes are GLubyte data[size] */
};
const GLsizeiptr size = cmd->size;
const void *data = (const void *) (cmd + 1);
- if (cmd->named) {
+ if (cmd->ext_dsa) {
+ CALL_NamedBufferSubDataEXT(ctx->CurrentServerDispatch,
+ (target_or_name, offset, size, data));
+ } else if (cmd->named) {
CALL_NamedBufferSubData(ctx->CurrentServerDispatch,
(target_or_name, offset, size, data));
} else {
unreachable("never used - all BufferSubData variants use DISPATCH_CMD_BufferSubData");
}
+void
+_mesa_unmarshal_NamedBufferSubDataEXT(struct gl_context *ctx,
+ const struct marshal_cmd_BufferSubData *cmd)
+{
+ unreachable("never used - all BufferSubData variants use DISPATCH_CMD_BufferSubData");
+}
+
static void
_mesa_marshal_BufferSubData_merged(GLuint target_or_name, GLintptr offset,
GLsizeiptr size, const GLvoid *data,
- bool named, const char *func)
+ bool named, bool ext_dsa, const char *func)
{
GET_CURRENT_CONTEXT(ctx);
size_t cmd_size = sizeof(struct marshal_cmd_BufferSubData) + size;
cmd->offset = offset;
cmd->size = size;
cmd->named = named;
+ cmd->ext_dsa = ext_dsa;
char *variable_data = (char *) (cmd + 1);
memcpy(variable_data, data, size);
const GLvoid * data)
{
_mesa_marshal_BufferSubData_merged(target, offset, size, data, false,
- "BufferSubData");
+ false, "BufferSubData");
}
void GLAPIENTRY
GLsizeiptr size, const GLvoid * data)
{
_mesa_marshal_BufferSubData_merged(buffer, offset, size, data, true,
- "NamedBufferSubData");
+ false, "NamedBufferSubData");
+}
+
+void GLAPIENTRY
+_mesa_marshal_NamedBufferSubDataEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr size, const GLvoid * data)
+{
+ _mesa_marshal_BufferSubData_merged(buffer, offset, size, data, true,
+ true, "NamedBufferSubDataEXT");
}
_mesa_unmarshal_NamedBufferData(struct gl_context *ctx,
const struct marshal_cmd_BufferData *cmd);
+void
+_mesa_unmarshal_NamedBufferDataEXT(struct gl_context *ctx,
+ const struct marshal_cmd_BufferData *cmd);
+
void GLAPIENTRY
_mesa_marshal_BufferData(GLenum target, GLsizeiptr size, const GLvoid * data,
GLenum usage);
_mesa_marshal_NamedBufferData(GLuint buffer, GLsizeiptr size,
const GLvoid * data, GLenum usage);
+void GLAPIENTRY
+_mesa_marshal_NamedBufferDataEXT(GLuint buffer, GLsizeiptr size,
+ const GLvoid *data, GLenum usage);
+
void
_mesa_unmarshal_BufferSubData(struct gl_context *ctx,
const struct marshal_cmd_BufferSubData *cmd);
_mesa_unmarshal_NamedBufferSubData(struct gl_context *ctx,
const struct marshal_cmd_BufferSubData *cmd);
+void
+_mesa_unmarshal_NamedBufferSubDataEXT(struct gl_context *ctx,
+ const struct marshal_cmd_BufferSubData *cmd);
+
void GLAPIENTRY
_mesa_marshal_BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size,
const GLvoid * data);
_mesa_marshal_NamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size,
const GLvoid * data);
+void GLAPIENTRY
+_mesa_marshal_NamedBufferSubDataEXT(GLuint buffer, GLintptr offset,
+ GLsizeiptr size, const GLvoid * data);
+
static inline unsigned
_mesa_buffer_enum_to_count(GLenum buffer)
{