st/nine: Fix bad light initialization in stateblocks
authorAxel Davy <axel.davy@ens.fr>
Wed, 19 Oct 2016 22:00:57 +0000 (00:00 +0200)
committerAxel Davy <axel.davy@ens.fr>
Tue, 20 Dec 2016 22:44:20 +0000 (23:44 +0100)
src was initialized instead of dst.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/stateblock9.c

index 16e60ef9339298660cbd0a4f15d50a9e8447b6d2..a2b281ed99a04fb4dee1f0534e0407c2ecfa9ae4 100644 (file)
@@ -326,8 +326,8 @@ nine_state_copy_common(struct NineDevice9 *device,
              * "dst->ff.light[i] = src->ff.light[i];" later,
              * which is what we want in that case. */
             if (mask != dst) {
-                for (i = src->ff.num_lights; i < num_lights; ++i)
-                    src->ff.light[i].Type = (D3DLIGHTTYPE)NINED3DLIGHT_INVALID;
+                for (i = dst->ff.num_lights; i < num_lights; ++i)
+                    dst->ff.light[i].Type = (D3DLIGHTTYPE)NINED3DLIGHT_INVALID;
             }
             dst->ff.num_lights = num_lights;
         }