Add a flag but don't use it yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
uint32_t num_sampler_prefetch;
struct ir3_sampler_prefetch sampler_prefetch[IR3_MAX_SAMPLER_PREFETCH];
+ /* If true, the last use of helper invocations is the texture prefetch and
+ * they should be disabled for the actual shader. Equivalent to adding
+ * (eq)nop at the beginning of the shader.
+ */
+ bool prefetch_end_of_quad;
+
uint16_t local_size[3];
bool local_size_variable;
tu_cs_emit_pkt4(cs, REG_A6XX_SP_FS_PREFETCH_CNTL, 1 + fs->num_sampler_prefetch);
tu_cs_emit(cs, A6XX_SP_FS_PREFETCH_CNTL_COUNT(fs->num_sampler_prefetch) |
COND(!VALIDREG(ij_regid[IJ_PERSP_PIXEL]),
- A6XX_SP_FS_PREFETCH_CNTL_IJ_WRITE_DISABLE));
+ A6XX_SP_FS_PREFETCH_CNTL_IJ_WRITE_DISABLE) |
+ COND(fs->prefetch_end_of_quad,
+ A6XX_SP_FS_PREFETCH_CNTL_ENDOFQUAD));
for (int i = 0; i < fs->num_sampler_prefetch; i++) {
const struct ir3_sampler_prefetch *prefetch = &fs->sampler_prefetch[i];
tu_cs_emit(cs, A6XX_SP_FS_PREFETCH_CMD_SRC(prefetch->src) |
OUT_PKT4(ring, REG_A6XX_SP_FS_PREFETCH_CNTL, 1 + fs->num_sampler_prefetch);
OUT_RING(ring, A6XX_SP_FS_PREFETCH_CNTL_COUNT(fs->num_sampler_prefetch) |
COND(!VALIDREG(ij_regid[IJ_PERSP_PIXEL]),
- A6XX_SP_FS_PREFETCH_CNTL_IJ_WRITE_DISABLE));
+ A6XX_SP_FS_PREFETCH_CNTL_IJ_WRITE_DISABLE) |
+ COND(fs->prefetch_end_of_quad,
+ A6XX_SP_FS_PREFETCH_CNTL_ENDOFQUAD));
for (int i = 0; i < fs->num_sampler_prefetch; i++) {
const struct ir3_sampler_prefetch *prefetch = &fs->sampler_prefetch[i];
OUT_RING(ring, SP_FS_PREFETCH_CMD(