From 54709efd5e34a06ef8d518fe7635f6ae345bef40 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Fri, 2 Sep 2022 00:10:05 +0200 Subject: [PATCH] nv50: properly flush the TSC cache on 3D The change didn't make any sense. `s` will always be `NV50_SHADER_STAGE_COMPUTE`, because it's used to loop over all shader stages. And the TSC cache on the compute side is already flushed in `nv50_compute_validate_samplers`. Fixes spurious `CACHE_ERROR` dmesg messages. Fixes: ba6ba8c9900 ("nv50: adapt texture and constbuf paths for compute shaders") Signed-off-by: Karol Herbst Reviewed-by: M Henning Part-of: --- src/gallium/drivers/nouveau/nv50/nv50_tex.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_tex.c b/src/gallium/drivers/nouveau/nv50/nv50_tex.c index 67c47502adc..7a7eb776f0a 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_tex.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_tex.c @@ -441,11 +441,7 @@ void nv50_validate_samplers(struct nv50_context *nv50) need_flush |= nv50_validate_tsc(nv50, s); if (need_flush) { - if (unlikely(s == NV50_SHADER_STAGE_COMPUTE)) - // TODO(pmoreau): Is this needed? Not done on nvc0 - BEGIN_NV04(nv50->base.pushbuf, NV50_CP(TSC_FLUSH), 1); - else - BEGIN_NV04(nv50->base.pushbuf, NV50_3D(TSC_FLUSH), 1); + BEGIN_NV04(nv50->base.pushbuf, NV50_3D(TSC_FLUSH), 1); PUSH_DATA (nv50->base.pushbuf, 0); }