intel/fs: Don't bother checking if load_frag_coord uses interpolation.
This was leftover dead code from 4bb6e6817e ("intel: Use a system value
for gl_FragCoord") -- the sysval doesn't do any interpolation and doesn't
have sources that could use a barycentric.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
This commit is contained in:
@@ -765,23 +765,6 @@ calculate_urb_setup(const struct intel_device_info *devinfo,
|
||||
|
||||
brw_compute_urb_setup_index(prog_data);
|
||||
}
|
||||
static bool
|
||||
is_used_in_not_interp_frag_coord(nir_def *def)
|
||||
{
|
||||
nir_foreach_use_including_if(src, def) {
|
||||
if (nir_src_is_if(src))
|
||||
return true;
|
||||
|
||||
if (nir_src_parent_instr(src)->type != nir_instr_type_intrinsic)
|
||||
return true;
|
||||
|
||||
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(nir_src_parent_instr(src));
|
||||
if (intrin->intrinsic != nir_intrinsic_load_frag_coord)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a bitfield where bit n is set if barycentric interpolation mode n
|
||||
@@ -816,10 +799,6 @@ brw_compute_barycentric_interp_modes(const struct intel_device_info *devinfo,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore WPOS; it doesn't require interpolation. */
|
||||
if (!is_used_in_not_interp_frag_coord(&intrin->def))
|
||||
continue;
|
||||
|
||||
enum intel_barycentric_mode bary =
|
||||
brw_barycentric_mode(key, intrin);
|
||||
|
||||
|
||||
@@ -6361,24 +6361,6 @@ elk_fs_visitor::run_cs(bool allow_spilling)
|
||||
return !failed;
|
||||
}
|
||||
|
||||
static bool
|
||||
is_used_in_not_interp_frag_coord(nir_def *def)
|
||||
{
|
||||
nir_foreach_use_including_if(src, def) {
|
||||
if (nir_src_is_if(src))
|
||||
return true;
|
||||
|
||||
if (nir_src_parent_instr(src)->type != nir_instr_type_intrinsic)
|
||||
return true;
|
||||
|
||||
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(nir_src_parent_instr(src));
|
||||
if (intrin->intrinsic != nir_intrinsic_load_frag_coord)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a bitfield where bit n is set if barycentric interpolation mode n
|
||||
* (see enum elk_barycentric_mode) is needed by the fragment shader.
|
||||
@@ -6411,10 +6393,6 @@ elk_compute_barycentric_interp_modes(const struct intel_device_info *devinfo,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore WPOS; it doesn't require interpolation. */
|
||||
if (!is_used_in_not_interp_frag_coord(&intrin->def))
|
||||
continue;
|
||||
|
||||
nir_intrinsic_op bary_op = intrin->intrinsic;
|
||||
enum elk_barycentric_mode bary =
|
||||
elk_barycentric_mode(intrin);
|
||||
|
||||
Reference in New Issue
Block a user