ir3, freedreno, tu: Plumb through SP_FS_PREFETCH_CNTL::ENDOFQUAD

Add a flag but don't use it yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
This commit is contained in:
Connor Abbott 2023-08-04 18:41:40 +02:00 committed by Marge Bot
parent 86440685f3
commit 662db8e894
3 changed files with 12 additions and 2 deletions

View file

@ -732,6 +732,12 @@ struct ir3_shader_variant {
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;

View file

@ -1477,7 +1477,9 @@ tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs)
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) |

View file

@ -553,7 +553,9 @@ setup_stateobj(struct fd_screen *screen, struct fd_ringbuffer *ring,
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(