Index: trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c
===================================================================
--- trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c	(revision 53276)
+++ trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c	(revision 53277)
@@ -139,8 +139,16 @@
 };
 
+#ifdef VBOX_WITH_VMSVGA
+# define WINEFIXUPINFO_NOINDEX (~0U)
+#else
 #define WINEFIXUPINFO_NOINDEX (~0UL)
+#endif
 #define WINEFIXUPINFO_GET(_p) get_fixup_info((const IWineD3DPixelShaderImpl*)(_p)->pshader, (_p)->inp2Fixup_info)
 #define WINEFIXUPINFO_ISVALID(_p) ((_p)->inp2Fixup_info != WINEFIXUPINFO_NOINDEX)
+#ifdef VBOX_WITH_VMSVGA
+# define WINEFIXUPINFO_INIT(_p) do { (_p)->inp2Fixup_info = WINEFIXUPINFO_NOINDEX; } while (0)
+#else
 #define WINEFIXUPINFO_INIT(_p) ((_p)->inp2Fixup_info == WINEFIXUPINFO_NOINDEX)
+#endif
 
 typedef struct {
@@ -394,5 +402,5 @@
         if (!tmp)
         {
-            ERR("Program %u link status invalid.\n", program);
+            ERR("Program %p link status invalid.\n", (void *)(uintptr_t)program);
 #ifndef VBOXWINEDBG_SHADERS
             shader_glsl_dump_program_source(gl_info, program);
@@ -413,5 +421,5 @@
         if (!tmp)
         {
-            ERR("Shader %u compile status invalid.\n", program);
+            ERR("Shader %p compile status invalid.\n", (void *)(uintptr_t)program);
             shader_glsl_dump_shader_source(gl_info, program);
         }
@@ -3803,5 +3811,5 @@
     if (context_get_current() == entry->context)
     {
-        TRACE("deleting program %u\n", entry->programId);
+        TRACE("deleting program %p\n", (void *)(uintptr_t)entry->programId);
         GL_EXTCALL(glDeleteObjectARB(entry->programId));
         checkGLcall("glDeleteObjectARB");
@@ -3809,5 +3817,5 @@
     else
     {
-        WARN("Attempting to delete program %u created in ctx %p from ctx %p\n", entry->programId, entry->context, context_get_current());
+        WARN("Attempting to delete program %p created in ctx %p from ctx %p\n", (void *)(uintptr_t)entry->programId, entry->context, context_get_current());
     }
     
@@ -4005,8 +4013,8 @@
 /* GL locking is done by the caller */
 static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer *buffer,
-        IWineD3DVertexShader *vertexshader, IWineD3DPixelShader *pixelshader, const struct wined3d_gl_info *gl_info)
+        IWineD3DVertexShader *a_vertexshader, IWineD3DPixelShader *pixelshader, const struct wined3d_gl_info *gl_info)
 {
     GLhandleARB ret = 0;
-    IWineD3DVertexShaderImpl *vs = (IWineD3DVertexShaderImpl *) vertexshader;
+    IWineD3DVertexShaderImpl *vs = (IWineD3DVertexShaderImpl *) a_vertexshader;
     IWineD3DPixelShaderImpl *ps = (IWineD3DPixelShaderImpl *) pixelshader;
     IWineD3DDeviceImpl *device;
@@ -4172,5 +4180,9 @@
 
 /* GL locking is done by the caller */
+#ifdef VBOX_WITH_VMSVGA
+static GLhandleARB shader_glsl_generate_pshader(const struct wined3d_context *context,
+#else
 static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context,
+#endif
         struct wined3d_shader_buffer *buffer, IWineD3DPixelShaderImpl *This,
         const struct ps_compile_args *args, struct ps_np2fixup_info *np2fixup_info)
@@ -4268,5 +4280,5 @@
     shader_addline(buffer, "}\n");
 
-    TRACE("Compiling shader object %u\n", shader_obj);
+    TRACE("Compiling shader object %p\n", (void *)(uintptr_t)shader_obj);
     GL_EXTCALL(glShaderSourceARB(shader_obj, 1, (const char**)&buffer->buffer, NULL));
     GL_EXTCALL(glCompileShaderARB(shader_obj));
@@ -4278,5 +4290,9 @@
 
 /* GL locking is done by the caller */
+#ifdef VBOX_WITH_VMSVGA
+static GLhandleARB shader_glsl_generate_vshader(const struct wined3d_context *context,
+#else
 static GLuint shader_glsl_generate_vshader(const struct wined3d_context *context,
+#endif
         struct wined3d_shader_buffer *buffer, IWineD3DVertexShaderImpl *This,
         const struct vs_compile_args *args)
@@ -4344,5 +4360,5 @@
     shader_addline(buffer, "}\n");
 
-    TRACE("Compiling shader object %u\n", shader_obj);
+    TRACE("Compiling shader object %p\n", (void *)(uintptr_t)shader_obj);
     GL_EXTCALL(glShaderSourceARB(shader_obj, 1, (const char**)&buffer->buffer, NULL));
     GL_EXTCALL(glCompileShaderARB(shader_obj));
@@ -4509,8 +4525,8 @@
 /* GL locking is done by the caller */
 static void set_glsl_shader_program(const struct wined3d_context *context,
-        IWineD3DDeviceImpl *device, BOOL use_ps, BOOL use_vs)
-{
-    IWineD3DVertexShader *vshader = use_vs ? device->stateBlock->vertexShader : NULL;
-    IWineD3DPixelShader *pshader = use_ps ? device->stateBlock->pixelShader : NULL;
+        IWineD3DDeviceImpl *device, BOOL a_use_ps, BOOL a_use_vs)
+{
+    IWineD3DVertexShader *vshader = a_use_vs ? device->stateBlock->vertexShader : NULL;
+    IWineD3DPixelShader *pshader = a_use_ps ? device->stateBlock->pixelShader : NULL;
     const struct wined3d_gl_info *gl_info = context->gl_info;
     struct shader_glsl_priv *priv = device->shader_priv;
@@ -4534,5 +4550,5 @@
     /* If we get to this point, then no matching program exists, so we create one */
     programId = GL_EXTCALL(glCreateProgramObjectARB());
-    TRACE("Created new GLSL shader program %u\n", programId);
+    TRACE("Created new GLSL shader program %p\n", (void *)(uintptr_t)programId);
 
     /* Create the entry */
@@ -4561,5 +4577,5 @@
 
         reorder_shader_id = generate_param_reorder_function(&priv->shader_buffer, vshader, pshader, gl_info);
-        TRACE("Attaching GLSL shader object %u to program %u\n", reorder_shader_id, programId);
+        TRACE("Attaching GLSL shader object %p to program %p\n", (void *)(uintptr_t)reorder_shader_id, (void *)(uintptr_t)programId);
         GL_EXTCALL(glAttachObjectARB(programId, reorder_shader_id));
         checkGLcall("glAttachObjectARB");
@@ -4569,5 +4585,5 @@
         GL_EXTCALL(glDeleteObjectARB(reorder_shader_id));
 
-        TRACE("Attaching GLSL shader object %u to program %u\n", vshader_id, programId);
+        TRACE("Attaching GLSL shader object %p to program %p\n", (void *)(uintptr_t)vshader_id, (void *)(uintptr_t)programId);
         GL_EXTCALL(glAttachObjectARB(programId, vshader_id));
         checkGLcall("glAttachObjectARB");
@@ -4601,5 +4617,5 @@
                 &entry->inp2Fixup_info
                 );
-        TRACE("Attaching GLSL shader object %u to program %u\n", pshader_id, programId);
+        TRACE("Attaching GLSL shader object %p to program %p\n", (void *)(uintptr_t)pshader_id, (void *)(uintptr_t)programId);
         GL_EXTCALL(glAttachObjectARB(programId, pshader_id));
         checkGLcall("glAttachObjectARB");
@@ -4609,5 +4625,5 @@
 
     /* Link the program */
-    TRACE("Linking GLSL shader program %u\n", programId);
+    TRACE("Linking GLSL shader program %p\n", (void *)(uintptr_t)programId);
     GL_EXTCALL(glLinkProgramARB(programId));
     shader_glsl_validate_compile_link(gl_info, programId, TRUE);
@@ -4667,5 +4683,5 @@
             && ((IWineD3DPixelShaderImpl *)pshader)->declared_in_count > vec4_varyings(3, gl_info))
     {
-        TRACE("Shader %d needs vertex color clamping disabled\n", programId);
+        TRACE("Shader %p needs vertex color clamping disabled\n", (void *)(uintptr_t)programId);
         entry->vertex_color_clamp = GL_FALSE;
     } else {
@@ -4817,5 +4833,5 @@
 
     program_id = priv->glsl_program ? priv->glsl_program->programId : 0;
-    if (program_id) TRACE("Using GLSL program %u\n", program_id);
+    if (program_id) TRACE("Using GLSL program %p\n", (void *)(uintptr_t)program_id);
     GL_EXTCALL(glUseProgramObjectARB(program_id));
     checkGLcall("glUseProgramObjectARB");
@@ -4877,5 +4893,5 @@
 
     program_id = priv->glsl_program ? priv->glsl_program->programId : 0;
-    if (program_id) TRACE("Using GLSL program %u\n", program_id);
+    if (program_id) TRACE("Using GLSL program %p\n", (void *)(uintptr_t)program_id);
 
     GL_EXTCALL(glUseProgramObjectARB(program_id));
@@ -4970,5 +4986,5 @@
             if (shader_data->gl_shaders[i].context==context_get_current())
             {
-                TRACE("deleting pshader %u\n", shader_data->gl_shaders[i].prgId);
+                TRACE("deleting pshader %p\n", (void *)(uintptr_t)shader_data->gl_shaders[i].prgId);
                 GL_EXTCALL(glDeleteObjectARB(shader_data->gl_shaders[i].prgId));
                 checkGLcall("glDeleteObjectARB");
@@ -4976,6 +4992,6 @@
             else
             {
-                WARN("Attempting to delete pshader %u created in ctx %p from ctx %p\n", 
-                     shader_data->gl_shaders[i].prgId, shader_data->gl_shaders[i].context, context_get_current());
+                WARN("Attempting to delete pshader %p created in ctx %p from ctx %p\n",
+                     (void *)(uintptr_t)shader_data->gl_shaders[i].prgId, shader_data->gl_shaders[i].context, context_get_current());
             }
         }
@@ -4992,5 +5008,5 @@
             if (shader_data->gl_shaders[i].context==context_get_current())
             {
-                TRACE("deleting vshader %u\n", shader_data->gl_shaders[i].prgId);
+                TRACE("deleting vshader %p\n", (void *)(uintptr_t)shader_data->gl_shaders[i].prgId);
                 GL_EXTCALL(glDeleteObjectARB(shader_data->gl_shaders[i].prgId));
                 checkGLcall("glDeleteObjectARB");
@@ -4998,6 +5014,6 @@
             else
             {
-                WARN("Attempting to delete vshader %u created in ctx %p from ctx %p\n", 
-                     shader_data->gl_shaders[i].prgId, shader_data->gl_shaders[i].context, context_get_current());
+                WARN("Attempting to delete vshader %p created in ctx %p from ctx %p\n",
+                     (void *)(uintptr_t)shader_data->gl_shaders[i].prgId, shader_data->gl_shaders[i].context, context_get_current());
             }
         }
