Skip to content

Instantly share code, notes, and snippets.

@vrodic
Created September 4, 2013 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrodic/6437312 to your computer and use it in GitHub Desktop.
Save vrodic/6437312 to your computer and use it in GitHub Desktop.
Dota 2 wine/intel optimizations, patched against Wine git, details here: http://vrodic.blogspot.com/2013/08/dota-2-wine-optimization-for-intel-gpus.html
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 123e9b1..980c389 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2255,8 +2255,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
* driver show that disabling blending when clearing improves the clearing
* performance incredibly. */
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
- gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
- checkGLcall("glEnable GL_SCISSOR_TEST");
+ //gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
+ //checkGLcall("glEnable GL_SCISSOR_TEST");
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1db04b4..9c94066 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -654,7 +654,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
checkGLcall("glClearColor");
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
}
-
+ gl_info->gl_ops.gl.p_glClear(clear_mask);
+
+#if 0
if (!clear_rect)
{
if (render_offscreen)
@@ -710,7 +712,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
checkGLcall("glClear");
}
}
-
+#endif
if (wined3d_settings.strict_draw_ordering || (flags & WINED3DCLEAR_TARGET
&& target->swapchain && target->swapchain->front_buffer == target))
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 6e96233..c649bb0 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2699,12 +2699,14 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
if (gl_info->supported[ARB_VERTEX_SHADER])
{
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &gl_max);
+ gl_max = 256*4;
gl_info->limits.glsl_vs_float_constants = gl_max / 4;
TRACE("Max ARB_VERTEX_SHADER float constants: %u.\n", gl_info->limits.glsl_vs_float_constants);
}
if (gl_info->supported[ARB_FRAGMENT_SHADER])
{
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, &gl_max);
+ gl_max = 256*4;
gl_info->limits.glsl_ps_float_constants = gl_max / 4;
TRACE("Max ARB_FRAGMENT_SHADER float constants: %u.\n", gl_info->limits.glsl_ps_float_constants);
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VARYING_FLOATS_ARB, &gl_max);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment