diff options
author | Marek Olšák <[email protected]> | 2011-08-19 21:48:12 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-08-19 23:12:11 +0200 |
commit | 751a6ed893d393eaea266d892402d132f7d15a7d (patch) | |
tree | 83855d3246b7cdd0587c5755a390d61702ae45f4 /src/gallium | |
parent | 98a87a594b6983d2a05d9412e3fa074894c334ff (diff) |
r600g: hack around a problem with texture alignment
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 74219e8005f..5681dd88e50 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -198,6 +198,16 @@ static unsigned r600_texture_get_nblocksy(struct pipe_screen *screen, height = util_format_get_nblocksy(rtex->real_format, height); tile_height = r600_get_height_alignment(screen, rtex->array_mode[level]); + + /* XXX Hack around an alignment issue. Less tests fail with this. + * + * The thing is depth-stencil buffers should be tiled, i.e. + * the alignment should be >=8. If I make them tiled, stencil starts + * working because it no longer overlaps with the depth buffer + * in memory, but texturing like drawpix-stencil breaks. */ + if (util_format_is_depth_or_stencil(rtex->real_format) && tile_height < 8) + tile_height = 8; + height = align(height, tile_height); return height; } |