diff options
author | Axel Davy <[email protected]> | 2016-10-16 11:34:35 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:21 +0100 |
commit | 64e232bd60336591e55e6c95112bac334cb38970 (patch) | |
tree | fded32b8b5e54f34cf430e947614eb468a6d245f /src/gallium/state_trackers/nine/stateblock9.c | |
parent | f72d8719ebecce0937087a56eec24a51bea9e27a (diff) |
st/nine: Move draw calls to nine_state
Part of the refactor to move all gallium calls to
nine_state.c, and have all internal states required
for those calls in nine_context.
v2: Release buffers for Draw*Up functions in device9.c,
instead of nine_context. This prevents a leak with csmt
where the wrong pointers were released.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/stateblock9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/stateblock9.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/stateblock9.c b/src/gallium/state_trackers/nine/stateblock9.c index fbbd41b43fd..0a5641f831a 100644 --- a/src/gallium/state_trackers/nine/stateblock9.c +++ b/src/gallium/state_trackers/nine/stateblock9.c @@ -225,8 +225,7 @@ nine_state_copy_common(struct NineDevice9 *device, while (m) { const int r = ffs(m) - 1; m &= ~(1 << r); - dst->rs[i * 32 + r] = src->rs[i * 32 + r]; - DBG("State %d %s = %d\n", i * 32 + r, nine_d3drs_to_string(i * 32 + r), (int)src->rs[i * 32 + r]); + DBG("State %d %s = %d\n", i * 32 + r, nine_d3drs_to_string(i * 32 + r), (int)src->rs_advertised[i * 32 + r]); dst->rs_advertised[i * 32 + r] = src->rs_advertised[i * 32 + r]; } } @@ -438,7 +437,6 @@ nine_state_copy_common_all(struct NineDevice9 *device, } /* Render states. */ - memcpy(dst->rs, src->rs, sizeof(dst->rs)); memcpy(dst->rs_advertised, src->rs_advertised, sizeof(dst->rs_advertised)); if (apply) memcpy(dst->changed.rs, src->changed.rs, sizeof(dst->changed.rs)); @@ -572,6 +570,8 @@ NineStateBlock9_Apply( struct NineStateBlock9 *This ) else nine_state_copy_common(device, dst, src, src, TRUE, pool); + nine_context_apply_stateblock(&device->context, src); + if ((src->changed.group & NINE_STATE_VDECL) && src->vdecl) NineDevice9_SetVertexDeclaration(This->base.device, (IDirect3DVertexDeclaration9 *)src->vdecl); |