#include "brw_shader.h"
#include "brw_ir_fs.h"
#include "brw_fs_builder.h"
+#include "brw_fs_live_variables.h"
#include "compiler/nir/nir.h"
struct bblock_t;
}
namespace brw {
- class fs_live_variables;
}
struct brw_gs_compile;
void setup_cs_payload();
bool fixup_sends_duplicate_payload();
void fixup_3src_null_dest();
+ bool fixup_nomask_control_flow();
void assign_curb_setup();
void assign_urb_setup();
void convert_attr_sources_to_hw_regs(fs_inst *inst);
unsigned *out_pull_index);
void lower_constant_loads();
void invalidate_live_intervals();
+ virtual void invalidate_analysis(brw::analysis_dependency_class c);
void calculate_live_intervals();
void calculate_register_pressure();
void validate();
bool lower_simd_width();
bool lower_barycentrics();
bool lower_scoreboard();
+ bool lower_sub_sat();
bool opt_combine_constants();
void emit_dummy_fs();
void lower_mul_dword_inst(fs_inst *inst, bblock_t *block);
void lower_mul_qword_inst(fs_inst *inst, bblock_t *block);
void lower_mulh_inst(fs_inst *inst, bblock_t *block);
+
+ unsigned workgroup_size() const;
};
+/**
+ * Return the flag register used in fragment shaders to keep track of live
+ * samples. On Gen7+ we use f1.0-f1.1 to allow discard jumps in SIMD32
+ * dispatch mode, while earlier generations are constrained to f0.1, which
+ * limits the dispatch width to SIMD16 for fragment shaders that use discard.
+ */
+static inline unsigned
+sample_mask_flag_subreg(const fs_visitor *shader)
+{
+ assert(shader->stage == MESA_SHADER_FRAGMENT);
+ return shader->devinfo->gen >= 7 ? 2 : 1;
+}
+
/**
* The fragment shader code generator.
*