diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bufferobjects.h | 11 |
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 dcbb5a52336..0adda5d4604 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; } |