diff options
author | Marek Olšák <[email protected]> | 2013-07-30 22:29:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-08-17 01:48:25 +0200 |
commit | 07955d4f2b969efb59b9c35c1fba5a0cae2cdc55 (patch) | |
tree | 8cc8ba025ba79593b2866204ea9880b0bf50b9eb /src/gallium/drivers/radeonsi/r600_texture.c | |
parent | c8e70e64accc914c58533b8336873e0995e901e7 (diff) |
radeonsi: implement uncompressed MSAA rendering and color resolving
This is basic MSAA support which should work with most apps.
Some features are missing, those will be implemented by other commits.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_texture.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c index 9c0b75b6656..185d987587d 100644 --- a/src/gallium/drivers/radeonsi/r600_texture.c +++ b/src/gallium/drivers/radeonsi/r600_texture.c @@ -102,8 +102,9 @@ static int r600_init_surface(struct r600_screen *rscreen, } } - surface->nsamples = 1; + surface->nsamples = ptex->nr_samples ? ptex->nr_samples : 1; surface->flags = 0; + switch (array_mode) { case V_009910_ARRAY_1D_TILED_THIN1: surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); @@ -529,7 +530,9 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen, if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) && !(templ->bind & PIPE_BIND_SCANOUT)) { - if (util_format_is_compressed(templ->format)) { + if (templ->flags & R600_RESOURCE_FLAG_FORCE_TILING) { + array_mode = V_009910_ARRAY_2D_TILED_THIN1; + } else if (util_format_is_compressed(templ->format)) { array_mode = V_009910_ARRAY_1D_TILED_THIN1; } else { if (rscreen->chip_class >= CIK) |