diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 92d6ffde67f..256d6dc582c 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3762,7 +3762,7 @@ static BOOL device_unit_free_for_vs(IWineD3DDeviceImpl *This, const DWORD *pshad } /* Used by a vertex sampler */ - return !vshader_sampler_tokens[current_mapping]; + return !vshader_sampler_tokens[current_mapping - MAX_FRAGMENT_SAMPLERS]; } static void device_map_vsamplers(IWineD3DDeviceImpl *This, BOOL ps) {