Remove GNU extension codes

They were detected with clang-1200.0.32.29.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Akihiko Odaki 4 years ago committed by Gert Wollny
parent 0bf0fa4f8a
commit acf0fe9d99
  1. 2
      src/vrend_debug.h
  2. 14
      src/vrend_renderer.c

@ -97,7 +97,7 @@ virgl_debug_callback_type vrend_set_debug_callback(virgl_debug_callback_type cb)
} while (0)
#else
#define VREND_DEBUG(flag, ctx, fmt, ...)
#define VREND_DEBUG(flag, ctx, ...)
#define VREND_DEBUG_EXT(flag, ctx, X)
#define VREND_DEBUG_NOCTX(flag, ctx, ...)
#endif

@ -9514,7 +9514,11 @@ void vrend_get_query_result(struct vrend_context *ctx, uint32_t handle,
if (buf) memcpy(buf, &value, size); \
glUnmapBuffer(GL_QUERY_BUFFER);
#define BUFFER_OFFSET(i) ((void *)((char *)NULL + i))
static inline void *buffer_offset(intptr_t i)
{
return (void *)i;
}
void vrend_get_query_result_qbo(struct vrend_context *ctx, uint32_t handle,
uint32_t qbo_handle,
uint32_t wait, uint32_t result_type, uint32_t offset,
@ -9549,16 +9553,16 @@ void vrend_get_query_result_qbo(struct vrend_context *ctx, uint32_t handle,
glBindBuffer(GL_QUERY_BUFFER, res->id);
switch ((enum pipe_query_value_type)result_type) {
case PIPE_QUERY_TYPE_I32:
glGetQueryObjectiv(q->id, qtype, BUFFER_OFFSET(offset));
glGetQueryObjectiv(q->id, qtype, buffer_offset(offset));
break;
case PIPE_QUERY_TYPE_U32:
glGetQueryObjectuiv(q->id, qtype, BUFFER_OFFSET(offset));
glGetQueryObjectuiv(q->id, qtype, buffer_offset(offset));
break;
case PIPE_QUERY_TYPE_I64:
glGetQueryObjecti64v(q->id, qtype, BUFFER_OFFSET(offset));
glGetQueryObjecti64v(q->id, qtype, buffer_offset(offset));
break;
case PIPE_QUERY_TYPE_U64:
glGetQueryObjectui64v(q->id, qtype, BUFFER_OFFSET(offset));
glGetQueryObjectui64v(q->id, qtype, buffer_offset(offset));
break;
}
} else {

Loading…
Cancel
Save