diff options
author | Dylan Baker <[email protected]> | 2019-12-09 10:54:16 -0800 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-04-21 11:09:03 -0700 |
commit | bf188f3494b85f550a39dddbf059669c2a9ee324 (patch) | |
tree | ced53e90730a93cef0200b2b974d25ba09a604b5 /src/mesa/main/macros.h | |
parent | c495c3af26b73cb1d444fdd67cc6c1f0226bd168 (diff) |
mesa|mapi: replace _mesa_[v]snprintf with [v]snprintf
MSVC 2015 and newer has perfectly valid snprintf and vsnprintf
implementations, let's just use those.
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r-- | src/mesa/main/macros.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index a4c5ec67a4a..3e1227328e1 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -787,4 +787,13 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y) /* Stringify */ #define STRINGIFY(x) #x +/* + * For GL_ARB_vertex_buffer_object we need to treat vertex array pointers + * as offsets into buffer stores. Since the vertex array pointer and + * buffer store pointer are both pointers and we need to add them, we use + * this macro. + * Both pointers/offsets are expressed in bytes. + */ +#define ADD_POINTERS(A, B) ( (GLubyte *) (A) + (uintptr_t) (B) ) + #endif |