Module: Mesa Branch: staging/22.2 Commit: fc8ba10f735098868e7212b138cc8f45f3d61288 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc8ba10f735098868e7212b138cc8f45f3d61288
Author: Karol Herbst <[email protected]> Date: Fri Sep 2 00:10:05 2022 +0200 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 <[email protected]> Reviewed-by: M Henning <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18382> (cherry picked from commit 54709efd5e34a06ef8d518fe7635f6ae345bef40) --- .pick_status.json | 2 +- src/gallium/drivers/nouveau/nv50/nv50_tex.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1f8b8fc285a..7407ca428a5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3190,7 +3190,7 @@ "description": "nv50: properly flush the TSC cache on 3D", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ba6ba8c9900eb1f8db14da3ebd77369b07e60857" }, 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); }
