summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-03-19 11:43:37 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2016-03-19 13:09:49 -0400
commitd1b85dbffa0eec2b44bb2a9f339a2617a39730da (patch)
treec28234809506f7dbac3452a7922ce78ffa409e2d /src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
parent902bbda81b31bacb2a8c60ca6a8ba8ca34ae73d3 (diff)
downloadexternal_mesa3d-d1b85dbffa0eec2b44bb2a9f339a2617a39730da.zip
external_mesa3d-d1b85dbffa0eec2b44bb2a9f339a2617a39730da.tar.gz
external_mesa3d-d1b85dbffa0eec2b44bb2a9f339a2617a39730da.tar.bz2
nv50: reset TFB bufctx when we no longer hold a reference to the buffers
This fix is analogous to commit ff085d014. This fixes some use-after-free situations in dEQP when an xfb state is removed, and then a clear is triggered, which only does a partial validation. It would attempt to read the no-longer-valid buffers, resulting in crashes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_shader_state.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_shader_state.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
index 56a3df9..3d2ebfb 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
@@ -648,8 +648,6 @@ nv50_stream_output_validate(struct nv50_context *nv50)
BEGIN_NV04(push, NV50_3D(STRMOUT_BUFFERS_CTRL), 1);
PUSH_DATA (push, ctrl);
- nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_SO);
-
for (i = 0; i < nv50->num_so_targets; ++i) {
struct nv50_so_target *targ = nv50_so_target(nv50->so_target[i]);
struct nv04_resource *buf = nv04_resource(targ->pipe.buffer);