summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-05-11 14:40:07 +0100
committerJeremy Huddleston Sequoia <jeremyhu@apple.com>2016-01-20 16:22:15 -0800
commitd99f49955f4b5f611964a45312a40bec08d86a0e (patch)
tree30e299d63809fe9a8460442048682db96600ff81
parent92f69b77daf44a15b01eb0148c3c12ef723c223f (diff)
darwin: Suppress type conversion warnings for GLhandleARB
On darwin, GLhandleARB is defined as a void *, not the unsigned int it is on linux. For the moment, apply a cast to supress the warning Possibly this is safe, as for the mesa software renderer the shader program handle is not a real pointer, but a integer handle Probably this is not the right thing to do, and we should pay closer attention to how the GLhandlerARB type is used. main/shader_query.cpp:49:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:111:13: error: no matching function for call to '_mesa_lookup_shader_program_err' shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:218:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> (cherry picked from commit 24eefbd4ca271f22400549dd44ccd409263089e1)
-rw-r--r--src/mesa/main/shader_query.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 4032919f3a..ff48f2067b 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -70,7 +70,7 @@ _mesa_BindAttribLocation(GLhandleARB program, GLuint index,
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *const shProg =
- _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation");
+ _mesa_lookup_shader_program_err(ctx, (uintptr_t)program, "glBindAttribLocation");
if (!shProg)
return;
@@ -138,7 +138,7 @@ _mesa_GetActiveAttrib(GLhandleARB program, GLuint desired_index,
return;
}
- shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib");
+ shProg = _mesa_lookup_shader_program_err(ctx, (uintptr_t)program, "glGetActiveAttrib");
if (!shProg)
return;
@@ -195,7 +195,7 @@ _mesa_GetAttribLocation(GLhandleARB program, const GLcharARB * name)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_shader_program *const shProg =
- _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation");
+ _mesa_lookup_shader_program_err(ctx, (uintptr_t)program, "glGetAttribLocation");
if (!shProg) {
return -1;