nv50,nvc0: mark textures dirty on fb update

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@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
Ilia Mirkin 2019-01-20 22:19:26 -05:00
parent 678ef2a4a5
commit 8e26d534be
2 changed files with 4 additions and 2 deletions

View File

@ -967,7 +967,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

View File

@ -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