Commit 8ca5577e authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Recompute sampler count before allocating sampler range for compute shaders.

parent 09fa9fbc
......@@ -3716,7 +3716,9 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
/* A majority of OpenGL implementations allow us to statically partition
* the set of texture bindings into six separate sets. */
gl_info->limits.graphics_samplers = gl_info->limits.combined_samplers;
sampler_count += gl_info->limits.samplers[WINED3D_SHADER_TYPE_COMPUTE];
sampler_count = 0;
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
sampler_count += gl_info->limits.samplers[i];
if (gl_info->limits.combined_samplers >= sampler_count)
gl_info->limits.graphics_samplers -= gl_info->limits.samplers[WINED3D_SHADER_TYPE_COMPUTE];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment