summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/nine_state.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-02-15 09:19:16 +0100
committerAxel Davy <[email protected]>2015-08-21 22:21:46 +0200
commit99537f68db829bd4708eb8e1b1ef0948f3dd3c66 (patch)
treec01c93e2574a03d33819eb23535ce5f17b481af9 /src/gallium/state_trackers/nine/nine_state.c
parent360ba5b74858b3854784e3d4678c242140088395 (diff)
st/nine: Remove group_mask argument from nine_update_state
It was only used to discriminate update framebuffer vs update everything. Instead use two functions. 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.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 403cd23c0a5..68f14d2419a 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -885,8 +885,21 @@ update_textures_and_samplers(struct NineDevice9 *device)
NINE_STATE_VS | \
NINE_STATE_PS)
+void
+nine_update_state_framebuffer(struct NineDevice9 *device)
+{
+ struct nine_state *state = &device->state;
+
+ validate_textures(device);
+
+ if (state->changed.group & NINE_STATE_FB)
+ update_framebuffer(device);
+
+ state->changed.group &= ~NINE_STATE_FB;
+}
+
boolean
-nine_update_state(struct NineDevice9 *device, uint32_t mask)
+nine_update_state(struct NineDevice9 *device)
{
struct pipe_context *pipe = device->pipe;
struct nine_state *state = &device->state;
@@ -905,16 +918,16 @@ nine_update_state(struct NineDevice9 *device, uint32_t mask)
validate_textures(device); /* may clobber state */
/* ff_update may change VS/PS dirty bits */
- if ((mask & NINE_STATE_FF) && unlikely(!state->vs || !state->ps))
+ if (unlikely(!state->vs || !state->ps))
nine_ff_update(device);
- group = state->changed.group & mask;
+ group = state->changed.group;
if (group & NINE_STATE_SHADER_VARIANT_GROUP)
group |= update_shader_variant_keys(device);
if (group & NINE_STATE_FREQ_GROUP_0) {
if (group & NINE_STATE_FB)
- group = update_framebuffer(device) & mask;
+ group = update_framebuffer(device);
if (group & NINE_STATE_VIEWPORT)
update_viewport(device);
if (group & NINE_STATE_SCISSOR)
@@ -981,7 +994,7 @@ nine_update_state(struct NineDevice9 *device, uint32_t mask)
if (state->changed.vtxbuf)
update_vertex_buffers(device);
- device->state.changed.group &= ~mask |
+ device->state.changed.group &=
(NINE_STATE_FF | NINE_STATE_VS_CONST | NINE_STATE_PS_CONST);
DBG("finished\n");