summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-11 11:05:22 +1000
committerTimothy Arceri <[email protected]>2017-04-13 12:08:31 +1000
commitfbcd709a34ccccf16796b926a3b25d6044fb614b (patch)
treece62f37eef7c9251f79bb9c90994154f69790c81 /src/mesa/state_tracker/st_program.c
parentf30f575e7b4bdb39012709ba2dd3104a97a53ffc (diff)
mesa/st: only update samplers for stages that have changed
Might help reduce cpu for some apps that use sso. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 4d9250b73cc..0dc3b1ea9bd 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -112,7 +112,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog)
set_affected_state_flags(states, prog,
ST_NEW_VS_CONSTANTS,
ST_NEW_VS_SAMPLER_VIEWS,
- ST_NEW_RENDER_SAMPLERS,
+ ST_NEW_VS_SAMPLERS,
ST_NEW_VS_IMAGES,
ST_NEW_VS_UBOS,
ST_NEW_VS_SSBOS,
@@ -127,7 +127,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog)
set_affected_state_flags(states, prog,
ST_NEW_TCS_CONSTANTS,
ST_NEW_TCS_SAMPLER_VIEWS,
- ST_NEW_RENDER_SAMPLERS,
+ ST_NEW_TCS_SAMPLERS,
ST_NEW_TCS_IMAGES,
ST_NEW_TCS_UBOS,
ST_NEW_TCS_SSBOS,
@@ -143,7 +143,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog)
set_affected_state_flags(states, prog,
ST_NEW_TES_CONSTANTS,
ST_NEW_TES_SAMPLER_VIEWS,
- ST_NEW_RENDER_SAMPLERS,
+ ST_NEW_TES_SAMPLERS,
ST_NEW_TES_IMAGES,
ST_NEW_TES_UBOS,
ST_NEW_TES_SSBOS,
@@ -159,7 +159,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog)
set_affected_state_flags(states, prog,
ST_NEW_GS_CONSTANTS,
ST_NEW_GS_SAMPLER_VIEWS,
- ST_NEW_RENDER_SAMPLERS,
+ ST_NEW_GS_SAMPLERS,
ST_NEW_GS_IMAGES,
ST_NEW_GS_UBOS,
ST_NEW_GS_SSBOS,
@@ -177,7 +177,7 @@ st_set_prog_affected_state_flags(struct gl_program *prog)
set_affected_state_flags(states, prog,
ST_NEW_FS_CONSTANTS,
ST_NEW_FS_SAMPLER_VIEWS,
- ST_NEW_RENDER_SAMPLERS,
+ ST_NEW_FS_SAMPLERS,
ST_NEW_FS_IMAGES,
ST_NEW_FS_UBOS,
ST_NEW_FS_SSBOS,
@@ -754,12 +754,12 @@ st_translate_fragment_program(struct st_context *st,
if (stfp->ati_fs) {
/* Just set them for ATI_fs unconditionally. */
stfp->affected_states |= ST_NEW_FS_SAMPLER_VIEWS |
- ST_NEW_RENDER_SAMPLERS;
+ ST_NEW_FS_SAMPLERS;
} else {
/* ARB_fp */
if (stfp->Base.SamplersUsed)
stfp->affected_states |= ST_NEW_FS_SAMPLER_VIEWS |
- ST_NEW_RENDER_SAMPLERS;
+ ST_NEW_FS_SAMPLERS;
}
}