[Mesa-stable] [PATCH 11/15] Revert "mesa: Add ARB_direct_state_access checks in buffer object functions"
Ian Romanick
idr at freedesktop.org
Mon May 18 14:28:20 PDT 2015
From: Ian Romanick <ian.d.romanick at intel.com>
This reverts commit 339ed0984d4f54fca91235a1df2ce3a850f6123f.
Cc: "10.6" <mesa-stable at lists.freedesktop.org>
---
src/mesa/main/bufferobj.c | 105 ----------------------------------------------
1 file changed, 105 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 660bc94..66dee68 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1303,12 +1303,6 @@ create_buffers(GLsizei n, GLuint *buffers, bool dsa)
const char *func = dsa ? "glCreateBuffers" : "glGenBuffers";
- if (dsa && !ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(GL_ARB_direct_state_access is not supported)", func);
- return;
- }
-
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "%s(%d)\n", func, n);
@@ -1483,13 +1477,6 @@ _mesa_NamedBufferStorage(GLuint buffer, GLsizeiptr size, const GLvoid *data,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glNamedBufferStorage(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferStorage");
if (!bufObj)
return;
@@ -1616,13 +1603,6 @@ _mesa_NamedBufferData(GLuint buffer, GLsizeiptr size, const GLvoid *data,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glNamedBufferData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferData");
if (!bufObj)
return;
@@ -1693,13 +1673,6 @@ _mesa_NamedBufferSubData(GLuint buffer, GLintptr offset,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glNamedBufferSubData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glNamedBufferSubData");
if (!bufObj)
return;
@@ -1737,13 +1710,6 @@ _mesa_GetNamedBufferSubData(GLuint buffer, GLintptr offset,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetNamedBufferSubData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glGetNamedBufferSubData");
if (!bufObj)
@@ -1839,13 +1805,6 @@ _mesa_ClearNamedBufferData(GLuint buffer, GLenum internalformat,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glClearNamedBufferData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glClearNamedBufferData");
if (!bufObj)
return;
@@ -1883,13 +1842,6 @@ _mesa_ClearNamedBufferSubData(GLuint buffer, GLenum internalformat,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glClearNamedBufferSubData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glClearNamedBufferSubData");
if (!bufObj)
@@ -1978,13 +1930,6 @@ _mesa_UnmapNamedBuffer(GLuint buffer)
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glUnmapNamedBuffer(GL_ARB_direct_state_access "
- "is not supported)");
- return GL_FALSE;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer, "glUnmapNamedBuffer");
if (!bufObj)
return GL_FALSE;
@@ -2094,13 +2039,6 @@ _mesa_GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
struct gl_buffer_object *bufObj;
GLint64 parameter;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetNamedBufferParameteriv(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glGetNamedBufferParameteriv");
if (!bufObj)
@@ -2121,13 +2059,6 @@ _mesa_GetNamedBufferParameteri64v(GLuint buffer, GLenum pname,
struct gl_buffer_object *bufObj;
GLint64 parameter;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetNamedBufferParameteri64v(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glGetNamedBufferParameteri64v");
if (!bufObj)
@@ -2167,13 +2098,6 @@ _mesa_GetNamedBufferPointerv(GLuint buffer, GLenum pname, GLvoid **params)
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetNamedBufferPointerv(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
if (pname != GL_BUFFER_MAP_POINTER) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetNamedBufferPointerv(pname != "
"GL_BUFFER_MAP_POINTER)");
@@ -2288,13 +2212,6 @@ _mesa_CopyNamedBufferSubData(GLuint readBuffer, GLuint writeBuffer,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *src, *dst;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyNamedBufferSubData(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
src = _mesa_lookup_bufferobj_err(ctx, readBuffer,
"glCopyNamedBufferSubData");
if (!src)
@@ -2513,13 +2430,6 @@ _mesa_MapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glMapNamedBufferRange(GL_ARB_direct_state_access "
- "is not supported)");
- return NULL;
- }
-
if (!ctx->Extensions.ARB_map_buffer_range) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glMapNamedBufferRange("
@@ -2587,13 +2497,6 @@ _mesa_MapNamedBuffer(GLuint buffer, GLenum access)
struct gl_buffer_object *bufObj;
GLbitfield accessFlags;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glMapNamedBuffer(GL_ARB_direct_state_access "
- "is not supported)");
- return NULL;
- }
-
if (!get_map_buffer_access_flags(ctx, access, &accessFlags)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glMapNamedBuffer(invalid access)");
return NULL;
@@ -2684,14 +2587,6 @@ _mesa_FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset,
GET_CURRENT_CONTEXT(ctx);
struct gl_buffer_object *bufObj;
- if (!ctx->Extensions.ARB_direct_state_access) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glFlushMappedNamedBufferRange(GL_ARB_direct_state_access "
- "is not supported)");
- return;
- }
-
-
bufObj = _mesa_lookup_bufferobj_err(ctx, buffer,
"glFlushMappedNamedBufferRange");
if (!bufObj)
--
2.1.0
More information about the mesa-stable
mailing list