diff options
author | Timothy Arceri <[email protected]> | 2018-10-20 15:02:59 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-10-31 09:33:17 +1100 |
commit | 31596836fc22e1f5b4cf85abc012acd27366db87 (patch) | |
tree | 2d1ca080d5caa8c360c8f2cb2c3cbc5f1edcad16 /src/mesa/state_tracker | |
parent | 9ec4a5ef29cd94c7d810cad5aa58c0c59148c88f (diff) |
st/glsl_to_nir: fix next_stage gathering
ffs() just returns the bit that is set, we need to know what
stage that bit represents so use u_bit_scan() instead.
Fixes: 2ca5d9548fc4 ("st/glsl_to_nir: gather next_stage in shader_info")
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index fe85eeb458d..c58deadc957 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -373,7 +373,7 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog, ~prev_stages & shader_program->data->linked_stages; nir->info.next_stage = stages_mask ? - (gl_shader_stage) ffs(stages_mask) : MESA_SHADER_FRAGMENT; + (gl_shader_stage) u_bit_scan(&stages_mask) : MESA_SHADER_FRAGMENT; } else { nir->info.next_stage = MESA_SHADER_FRAGMENT; } |