brw/iris: remove fs key for coherent_fb_fetch
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38737>
This commit is contained in:
Lionel Landwerlin 2025-12-01 10:45:55 +02:00 committed by Marge Bot
parent 296325b787
commit a4e9e660d4
6 changed files with 12 additions and 9 deletions

View file

@ -580,7 +580,6 @@ iris_to_brw_fs_key(const struct iris_screen *screen,
.persample_interp = key->persample_interp ? INTEL_ALWAYS : INTEL_NEVER,
.multisample_fbo = key->multisample_fbo ? INTEL_ALWAYS : INTEL_NEVER,
.force_dual_color_blend = key->force_dual_color_blend,
.coherent_fb_fetch = key->coherent_fb_fetch,
.color_outputs_valid = key->color_outputs_valid,
.ignore_sample_mask_out = !key->multisample_fbo,
.null_push_constant_tbimr_workaround =

View file

@ -1350,7 +1350,6 @@ run_fs(brw_shader &s, bool allow_spilling, bool do_rep_send)
{
const struct intel_device_info *devinfo = s.devinfo;
struct brw_wm_prog_data *wm_prog_data = brw_wm_prog_data(s.prog_data);
brw_wm_prog_key *wm_key = (brw_wm_prog_key *) s.key;
const brw_builder bld = brw_builder(&s);
const nir_shader *nir = s.nir;
@ -1367,7 +1366,7 @@ run_fs(brw_shader &s, bool allow_spilling, bool do_rep_send)
} else {
if (nir->info.inputs_read > 0 ||
BITSET_TEST(nir->info.system_values_read, SYSTEM_VALUE_FRAG_COORD) ||
(nir->info.outputs_read > 0 && !wm_key->coherent_fb_fetch)) {
(nir->info.outputs_read > 0 && !brw_can_coherent_fb_fetch(devinfo))) {
brw_emit_interpolation_setup(s);
}
@ -1509,7 +1508,7 @@ brw_compile_fs(const struct brw_compiler *compiler,
brw_nir_lower_fs_inputs(nir, devinfo, key);
brw_nir_lower_fs_outputs(nir);
if (!key->coherent_fb_fetch)
if (!brw_can_coherent_fb_fetch(devinfo))
NIR_PASS(_, nir, brw_nir_lower_fs_load_output, key);
NIR_PASS(_, nir, nir_opt_frag_coord_to_pixel_coord);

View file

@ -431,12 +431,11 @@ struct brw_wm_prog_key {
/* Is provoking vertex last? */
enum intel_sometimes provoking_vertex_last:2;
bool coherent_fb_fetch:1;
bool ignore_sample_mask_out:1;
bool coarse_pixel:1;
bool null_push_constant_tbimr_workaround:1;
bool api_sample_shading:1;
unsigned pad:2;
unsigned pad:3;
};
static inline bool

View file

@ -138,7 +138,6 @@ debug_fs_recompile(const struct brw_compiler *c, void *log,
found |= check("per-sample interpolation", persample_interp);
found |= check("multisampled FBO", multisample_fbo);
found |= check("force dual color blending", force_dual_color_blend);
found |= check("coherent fb fetch", coherent_fb_fetch);
found |= check("ignore sample mask out", ignore_sample_mask_out);
found |= check("coarse pixel", coarse_pixel);

View file

@ -3931,7 +3931,8 @@ brw_from_nir_emit_fs_intrinsic(nir_to_brw_state &ntb,
const unsigned target = l - FRAG_RESULT_DATA0 + load_offset;
const brw_reg tmp = bld.vgrf(dest.type, 4);
assert(reinterpret_cast<const brw_wm_prog_key *>(s.key)->coherent_fb_fetch);
/* Not functional after Gfx20 */
assert(brw_can_coherent_fb_fetch(devinfo));
emit_coherent_fb_read(bld, tmp, target);
brw_combine_with_vec(bld, dest,

View file

@ -251,6 +251,13 @@ void brw_print_instruction(const brw_shader &s, const brw_inst *inst,
void brw_print_swsb(FILE *f, const struct intel_device_info *devinfo, const tgl_swsb swsb);
static inline bool
brw_can_coherent_fb_fetch(const struct intel_device_info *devinfo)
{
/* Not functional after Gfx20 */
return devinfo->ver >= 9 && devinfo->ver < 20;
}
/**
* Return the flag register used in fragment shaders to keep track of live
* samples. On Gfx7+ we use f1.0-f1.1 to allow discard jumps in SIMD32
@ -406,4 +413,3 @@ brw_inst *brw_clone_inst(brw_shader &s, const brw_inst *inst);
*/
brw_inst *brw_transform_inst(brw_shader &s, brw_inst *inst, enum opcode new_opcode,
unsigned new_num_srcs = UINT_MAX);