}
static void
-brw_nir_populate_wm_prog_data(const nir_shader *shader,
+brw_nir_populate_wm_prog_data(nir_shader *shader,
const struct intel_device_info *devinfo,
const struct brw_wm_prog_key *key,
struct brw_wm_prog_data *prog_data,
prog_data->coarse_pixel_dispatch = BRW_NEVER;
}
+ /* ICL PRMs, Volume 9: Render Engine, Shared Functions Pixel Interpolater,
+ * Message Descriptor :
+ *
+ * "Message Type. Specifies the type of message being sent when
+ * pixel-rate evaluation is requested :
+ *
+ * Format = U2
+ * 0: Per Message Offset (eval_snapped with immediate offset)
+ * 1: Sample Position Offset (eval_sindex)
+ * 2: Centroid Position Offset (eval_centroid)
+ * 3: Per Slot Offset (eval_snapped with register offset)
+ *
+ * Message Type. Specifies the type of message being sent when
+ * coarse-rate evaluation is requested :
+ *
+ * Format = U2
+ * 0: Coarse to Pixel Mapping Message (internal message)
+ * 1: Reserved
+ * 2: Coarse Centroid Position (eval_centroid)
+ * 3: Per Slot Coarse Pixel Offset (eval_snapped with register offset)"
+ *
+ * The Sample Position Offset is marked as reserved for coarse rate
+ * evaluation and leads to hangs if we try to use it. So disable coarse
+ * pixel shading if we have any intrinsic that will result in a pixel
+ * interpolater message at sample.
+ */
+ if (brw_nir_pulls_at_sample(shader))
+ prog_data->coarse_pixel_dispatch = BRW_NEVER;
+
/* We choose to always enable VMask prior to XeHP, as it would cause
* us to lose out on the eliminate_find_live_channel() optimization.
*/
return sysval;
}
+
+bool
+brw_nir_pulls_at_sample(nir_shader *shader)
+{
+ nir_foreach_function_impl(impl, shader) {
+ nir_foreach_block(block, impl) {
+ nir_foreach_instr(instr, block) {
+ if (instr->type != nir_instr_type_intrinsic)
+ continue;
+
+ nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
+
+ if (intrin->intrinsic == nir_intrinsic_load_barycentric_at_sample)
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
const struct brw_compiler *compiler,
const struct brw_tcs_prog_key *key);
+bool brw_nir_pulls_at_sample(nir_shader *shader);
+
#define BRW_NIR_FRAG_OUTPUT_INDEX_SHIFT 0
#define BRW_NIR_FRAG_OUTPUT_INDEX_MASK INTEL_MASK(0, 0)
#define BRW_NIR_FRAG_OUTPUT_LOCATION_SHIFT 1