wined3d: Recompute sampler count before allocating sampler range for compute shaders.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
09fa9fbcf1
commit
8ca5577ed1
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue