Commit b96807c2 authored by Timothy Arceri's avatar Timothy Arceri

wip stop calling lower_if_to_cond_assign() for nir drivers

maybe check PIPE_SHADER_CAP_LOWER_IF_THRESHOLD != 0 in
lower_if_to_cond_assign() instead. So we can set
PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH to UINT_MAX for radeonsi
and have it still work for the tgsi path.
parent c8eea804
......@@ -7116,8 +7116,11 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
do {
do_common_optimization(ir, true, true, options,
ctx->Const.NativeIntegers);
lower_if_to_cond_assign((gl_shader_stage)i, ir,
options->MaxIfDepth, if_threshold);
if (!use_nir || options->MaxIfDepth < 16384) {
lower_if_to_cond_assign((gl_shader_stage)i, ir,
options->MaxIfDepth, if_threshold);
}
} while (has_unsupported_control_flow(ir, options));
} else {
/* Repeat it until it stops making changes. */
......@@ -7125,8 +7128,11 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
do {
progress = do_common_optimization(ir, true, true, options,
ctx->Const.NativeIntegers);
progress |= lower_if_to_cond_assign((gl_shader_stage)i, ir,
options->MaxIfDepth, if_threshold);
if (!use_nir || options->MaxIfDepth < 16384) {
progress |= lower_if_to_cond_assign((gl_shader_stage)i, ir,
options->MaxIfDepth, if_threshold);
}
} while (progress);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment