[Mesa-dev] [PATCH] nv50,nvc0: mark textures dirty on fb update

Karol Herbst kherbst at redhat.com
Tue Jan 22 11:03:45 UTC 2019


Reviewed-by: Karol Herbst <kherbst at redhat.com>

On Mon, Jan 21, 2019 at 4:27 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
> We may have to flush the cache if there are any textures presently bound
> that refer to the outgoing framebuffer. This is only checked at
> validation time.
>
> Fixes a number of dEQP-GLES3.functional.fbo.color.repeated_clear.sample.*
> tests, which would bind a texture, then clear it while the binding was
> in effect, and then render to a different texture. This seems legal
> under the "no feedback loops" rule.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/drivers/nouveau/nv50/nv50_state.c | 2 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_state.c | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_state.c b/src/gallium/drivers/nouveau/nv50/nv50_state.c
> index 629613bded8..292eab80b4f 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_state.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_state.c
> @@ -962,7 +962,7 @@ nv50_set_framebuffer_state(struct pipe_context *pipe,
>
>     util_copy_framebuffer_state(&nv50->framebuffer, fb);
>
> -   nv50->dirty_3d |= NV50_NEW_3D_FRAMEBUFFER;
> +   nv50->dirty_3d |= NV50_NEW_3D_FRAMEBUFFER | NV50_NEW_3D_TEXTURES;
>  }
>
>  static void
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> index 9653de86fe9..53ad47c6ed4 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state.c
> @@ -852,7 +852,9 @@ nvc0_set_framebuffer_state(struct pipe_context *pipe,
>
>      util_copy_framebuffer_state(&nvc0->framebuffer, fb);
>
> -    nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER | NVC0_NEW_3D_SAMPLE_LOCATIONS;
> +    nvc0->dirty_3d |= NVC0_NEW_3D_FRAMEBUFFER | NVC0_NEW_3D_SAMPLE_LOCATIONS |
> +       NVC0_NEW_3D_TEXTURES;
> +    nvc0->dirty_cp |= NVC0_NEW_CP_TEXTURES;
>  }
>
>  static void
> --
> 2.19.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list