summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-19 12:12:54 -0600
committerBrian Paul <brianp@vmware.com>2009-06-19 12:13:15 -0600
commit1ffd074436949f3958127cc5ae7c7c9e9e9e0bf8 (patch)
tree861af5e1c468ef7f8332c172911f5267293aa279 /src
parent7ce814b25f8c216c7897904cbce7f570112e60ef (diff)
st/mesa: no longer special-case buffer object 0 in st_buffer_object() cast wrapper
Since commit 6629a35559ff7e3b993966f697f7c7f68e5a38d9 "mesa: create/destroy buffer objects via driver functions" this is no longer needed, and actually was causing a crash during context tear-down.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.h b/src/mesa/state_tracker/st_cb_bufferobjects.h
index dcbb5a5233..0adda5d460 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.h
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.h
@@ -44,18 +44,11 @@ struct st_buffer_object
};
-/* Are the obj->Name tests necessary? Unfortunately yes, mesa
- * allocates a couple of gl_buffer_object structs statically, and the
- * Name == 0 test is the only way to identify them and avoid casting
- * them erroneously to our structs.
- */
+/** cast wrapper */
static INLINE struct st_buffer_object *
st_buffer_object(struct gl_buffer_object *obj)
{
- if (obj->Name)
- return (struct st_buffer_object *) obj;
- else
- return NULL;
+ return (struct st_buffer_object *) obj;
}