diff options
author | Chad Versace <[email protected]> | 2011-11-13 17:36:30 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-11-15 06:42:09 -0800 |
commit | cc502aa9419a6fb127b264dbb131c786281cb8c7 (patch) | |
tree | f90d4800c8d22aaf7a335db8f8bcb907b5d1d0c1 /src/mesa/tnl/t_vb_vertex.c | |
parent | 5365ba19db8e9d714604bb63f037800ba2ff2f4d (diff) |
intel: Fix intel_map_renderbuffer() for depthstencil buffers with separate stencil
For a depthstencil buffer with separate stencil,
intel_renderbuffer::region is null. (The regions are kept in hidden depth
and stencil buffers). Since the region is null, intel_map_renderbuffer()
assumed there was no data and returned a null map pointer, which in turn
was dereferenced (!) by MapRenderbuffer's caller.
This patch fixes intel_map_renderbuffer() to map the hidden depth buffer
through the GTT and return that as the mapped pointer. Also, the stencil
bits are scattered and gathered when needed.
Fixes the following Piglit tests on gen7:
fbo/fbo-readpixels-depth-formats
hiz/hiz-depth-read-fbo-d24s8
hiz/hiz-stencil-read-fbo-d24s8
EXT_packed_depth_stencil/fbo-clear-formats
EXT_packed_depth_stencil/fbo-depth-GL_DEPTH24_STENCIL8-blit
EXT_packed_depth_stencil/fbo-depth-GL_DEPTH24_STENCIL8-drawpixels
EXT_packed_depth_stencil/fbo-depth-GL_DEPTH24_STENCIL8-readpixels
EXT_packed_depth_stencil/fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-24_8
EXT_packed_depth_stencil/fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-FLOAT-and-USHORT
EXT_packed_depth_stencil/fbo-stencil-GL_DEPTH24_STENCIL8-readpixels
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/tnl/t_vb_vertex.c')
0 files changed, 0 insertions, 0 deletions