zink: change u_foreach_bit to regular for loop in zink_gfx_program_update
too hot to be using this Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
This commit is contained in:
committed by
Marge Bot
parent
5c7c566bda
commit
d8455e5ebf
@@ -408,8 +408,10 @@ zink_gfx_program_update(struct zink_context *ctx)
|
|||||||
struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(ht, hash, ctx->gfx_stages);
|
struct hash_entry *entry = _mesa_hash_table_search_pre_hashed(ht, hash, ctx->gfx_stages);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
prog = (struct zink_gfx_program*)entry->data;
|
prog = (struct zink_gfx_program*)entry->data;
|
||||||
u_foreach_bit(stage, prog->stages_present & ~ctx->dirty_shader_stages)
|
for (unsigned i = 0; i < ZINK_GFX_SHADER_COUNT; i++) {
|
||||||
ctx->gfx_pipeline_state.modules[stage] = prog->modules[stage]->shader;
|
if (prog->stages_present & ctx->dirty_shader_stages & BITFIELD_BIT(i))
|
||||||
|
ctx->gfx_pipeline_state.modules[i] = prog->modules[i]->shader;
|
||||||
|
}
|
||||||
/* ensure variants are always updated if keys have changed since last use */
|
/* ensure variants are always updated if keys have changed since last use */
|
||||||
ctx->dirty_shader_stages |= prog->stages_present;
|
ctx->dirty_shader_stages |= prog->stages_present;
|
||||||
update_gfx_program(ctx, prog);
|
update_gfx_program(ctx, prog);
|
||||||
|
|||||||
Reference in New Issue
Block a user