diff options
author | Axel Davy <[email protected]> | 2016-10-19 23:06:05 +0200 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-12-20 23:44:22 +0100 |
commit | c5af96aebd2be165e29124c1e5d5bb3b7021bb30 (patch) | |
tree | 7c4778700863624468e82ad92cc5c7c3611c679c /src/gallium/state_trackers/nine/nine_state.c | |
parent | 4a6d83ebc29546e8a70b4187bf1b66f6d745ef2e (diff) |
st/nine: Put ff data in a separate structure
And make nine_state_access_transform take this
new structure as input.
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.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/nine_state.c')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index c99c3734750..47fe31d391c 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -2783,7 +2783,7 @@ const uint32_t nine_render_state_group[NINED3DRS_LAST + 1] = /* Misc */ D3DMATRIX * -nine_state_access_transform(struct nine_state *state, D3DTRANSFORMSTATETYPE t, +nine_state_access_transform(struct nine_ff_state *ff_state, D3DTRANSFORMSTATETYPE t, boolean alloc) { static D3DMATRIX Identity = { .m[0] = { 1, 0, 0, 0 }, @@ -2810,20 +2810,20 @@ nine_state_access_transform(struct nine_state *state, D3DTRANSFORMSTATETYPE t, break; } - if (index >= state->ff.num_transforms) { + if (index >= ff_state->num_transforms) { unsigned N = index + 1; - unsigned n = state->ff.num_transforms; + unsigned n = ff_state->num_transforms; if (!alloc) return &Identity; - state->ff.transform = REALLOC(state->ff.transform, + ff_state->transform = REALLOC(ff_state->transform, n * sizeof(D3DMATRIX), N * sizeof(D3DMATRIX)); for (; n < N; ++n) - state->ff.transform[n] = Identity; - state->ff.num_transforms = N; + ff_state->transform[n] = Identity; + ff_state->num_transforms = N; } - return &state->ff.transform[index]; + return &ff_state->transform[index]; } #define D3DRS_TO_STRING_CASE(n) case D3DRS_##n: return "D3DRS_"#n |