nir/linker: add option to ignore the IO precisions for better varying packing
Backends that don't handle IO component precision can pack more varyings
into one slot if the linker ignores the precision. If the IO is vectorized
then this can save IO instructions.
Related: 165a69d2f7
nir: handle mediump varyings in varying compaction helpers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10722>
This commit is contained in:
@@ -582,9 +582,9 @@ gather_varying_component_info(nir_shader *producer, nir_shader *consumer,
|
||||
vc_info->interp_loc = get_interp_loc(in_var);
|
||||
vc_info->is_32bit = glsl_type_is_32bit(type);
|
||||
vc_info->is_patch = in_var->data.patch;
|
||||
vc_info->is_mediump =
|
||||
in_var->data.precision == GLSL_PRECISION_MEDIUM ||
|
||||
in_var->data.precision == GLSL_PRECISION_LOW;
|
||||
vc_info->is_mediump = !producer->options->linker_ignore_precision &&
|
||||
(in_var->data.precision == GLSL_PRECISION_MEDIUM ||
|
||||
in_var->data.precision == GLSL_PRECISION_LOW);
|
||||
vc_info->is_intra_stage_only = false;
|
||||
vc_info->initialised = true;
|
||||
}
|
||||
@@ -647,9 +647,9 @@ gather_varying_component_info(nir_shader *producer, nir_shader *consumer,
|
||||
vc_info->interp_loc = get_interp_loc(out_var);
|
||||
vc_info->is_32bit = glsl_type_is_32bit(type);
|
||||
vc_info->is_patch = out_var->data.patch;
|
||||
vc_info->is_mediump =
|
||||
out_var->data.precision == GLSL_PRECISION_MEDIUM ||
|
||||
out_var->data.precision == GLSL_PRECISION_LOW;
|
||||
vc_info->is_mediump = !producer->options->linker_ignore_precision &&
|
||||
(out_var->data.precision == GLSL_PRECISION_MEDIUM ||
|
||||
out_var->data.precision == GLSL_PRECISION_LOW);
|
||||
vc_info->is_intra_stage_only = true;
|
||||
vc_info->initialised = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user