Index: /trunk/src/VBox/Devices/Graphics/shaderlib/shaderapi.c
===================================================================
--- /trunk/src/VBox/Devices/Graphics/shaderlib/shaderapi.c	(revision 73517)
+++ /trunk/src/VBox/Devices/Graphics/shaderlib/shaderapi.c	(revision 73518)
@@ -333,4 +333,12 @@
     }
 
+    /* Tweak the float constants limit to use a greater number of constants.
+     * Keep some space for the internal usage.
+     * The shader creation code artificially sets the limit according to D3D shader version.
+     * But the guest may use more constants and we are not required to strictly follow D3D specs.
+     */
+    object->baseShader.limits.constant_float = RT_MAX(g_adapter.gl_info.limits.glsl_vs_float_constants / 2,
+                                                      object->baseShader.limits.constant_float);
+
 #ifdef VBOX_WINE_WITH_SHADER_CACHE
     object = vertexshader_check_cached(This, object);
@@ -366,4 +374,12 @@
         return VERR_INTERNAL_ERROR;
     }
+
+    /* Tweak the float constants limit to use a greater number of constants.
+     * Keep some space for the internal usage.
+     * The shader creation code artificially sets the limit according to D3D shader version.
+     * But the guest may use more constants and we are not required to strictly follow D3D specs.
+     */
+    object->baseShader.limits.constant_float = RT_MAX(g_adapter.gl_info.limits.glsl_ps_float_constants / 2,
+                                                      object->baseShader.limits.constant_float);
 
 #ifdef VBOX_WINE_WITH_SHADER_CACHE
