From: Axel Davy Date: Wed, 19 Oct 2016 22:00:57 +0000 (+0200) Subject: st/nine: Fix bad light initialization in stateblocks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=503d72902955441425fa7f612026c0188c4cc0ac;p=mesa.git st/nine: Fix bad light initialization in stateblocks src was initialized instead of dst. Signed-off-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/stateblock9.c b/src/gallium/state_trackers/nine/stateblock9.c index 16e60ef9339..a2b281ed99a 100644 --- a/src/gallium/state_trackers/nine/stateblock9.c +++ b/src/gallium/state_trackers/nine/stateblock9.c @@ -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; }