st/nine: Fix bad tracking of vs textures for NINESBT_ALL
authorAxel Davy <davyaxel0@gmail.com>
Sat, 10 Mar 2018 13:23:43 +0000 (14:23 +0100)
committerAxel Davy <davyaxel0@gmail.com>
Sun, 18 Mar 2018 21:53:36 +0000 (22:53 +0100)
Stateblocks with NINESBT_ALL should track all textures.
For better performance they have a faster path which
copies all the required.

This path was only tracking ps textures.

Fixes: https://github.com/iXit/Mesa-3D/issues/303
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
CC: "17.3 18.0" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/nine/stateblock9.c

index 4b7166f0da85119429a1cc69baece49569681ad9..54bf1e3c9558f2210c9e617549a0a90605cc5918 100644 (file)
@@ -454,7 +454,7 @@ nine_state_copy_common_all(struct NineDevice9 *device,
 
     /* Textures */
     if (1) {
-        for (i = 0; i < device->caps.MaxSimultaneousTextures; i++)
+        for (i = 0; i < NINE_MAX_SAMPLERS; i++)
             NineStateBlock9_BindTexture(device, apply, &dst->texture[i], src->texture[i]);
     }