Skip to content

Instantly share code, notes, and snippets.

@vrodic
Created August 16, 2013 13:24
Show Gist options
  • Save vrodic/6249950 to your computer and use it in GitHub Desktop.
Save vrodic/6249950 to your computer and use it in GitHub Desktop.
Dota 2 wine/intel optimizations, patched against Wine git 1825bddbff5db772cc82613bf854e25154bafbaf , details here: http://vrodic.blogspot.com/2013/08/dota-2-wine-optimization-for-intel-gpus.html
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index de36741..e5111e39 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -657,6 +657,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
if (!clear_rect)
{
+ /*
if (render_offscreen)
{
gl_info->gl_ops.gl.p_glScissor(draw_rect->left, draw_rect->top,
@@ -667,8 +668,11 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
gl_info->gl_ops.gl.p_glScissor(draw_rect->left, drawable_height - draw_rect->bottom,
draw_rect->right - draw_rect->left, draw_rect->bottom - draw_rect->top);
}
- checkGLcall("glScissor");
+
+ checkGLcall("glScissor"); */
+ gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
gl_info->gl_ops.gl.p_glClear(clear_mask);
+
checkGLcall("glClear");
}
else
@@ -693,7 +697,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
TRACE("Rectangle with negative dimensions, ignoring.\n");
continue;
}
-
+ /*
if (render_offscreen)
{
gl_info->gl_ops.gl.p_glScissor(current_rect.left, current_rect.top,
@@ -704,8 +708,8 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
gl_info->gl_ops.gl.p_glScissor(current_rect.left, drawable_height - current_rect.bottom,
current_rect.right - current_rect.left, current_rect.bottom - current_rect.top);
}
- checkGLcall("glScissor");
-
+ checkGLcall("glScissor");*/
+ gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
gl_info->gl_ops.gl.p_glClear(clear_mask);
checkGLcall("glClear");
}
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 8320852..b43f1da 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2713,12 +2713,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