mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-20 17:30:24 +01:00
nvfx: reset nvfx->hw_zeta
If nvfx_framebuffer prepare and validate were called successively with fb->zsbuf not NULL and then NULL, nvfx->hw_zeta would contain garbage and this would cause failures in nvfx_framebuffer_relocate/OUT_RELOC(hw_zeta). This was triggered by piglit/texwrap 2D GL_DEPTH_COMPONENT24 and caused first a 'write to user buffer!!' error in libdrm and then worse things. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
049065cdfa
commit
c14a261eb9
1 changed files with 3 additions and 1 deletions
|
|
@ -113,7 +113,9 @@ nvfx_framebuffer_validate(struct nvfx_context *nvfx, unsigned prepare_result)
|
|||
nvfx->state.render_temps |= nvfx_surface_get_render_target(fb->cbufs[i], prepare_result, &nvfx->hw_rt[i]) << i;
|
||||
|
||||
for(; i < 4; ++i)
|
||||
nvfx->hw_rt[i].bo = 0;
|
||||
nvfx->hw_rt[i].bo = NULL;
|
||||
|
||||
nvfx->hw_zeta.bo = NULL;
|
||||
|
||||
if (fb->zsbuf) {
|
||||
nvfx->state.render_temps |= nvfx_surface_get_render_target(fb->zsbuf, prepare_result, &nvfx->hw_zeta) << 7;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue