diff options
author | Nicolai Hähnle <[email protected]> | 2016-06-29 21:56:42 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-07-06 10:43:43 +0200 |
commit | dd651261530e2d885d150755c9521e8f6e97c851 (patch) | |
tree | 10c9bdf1058c5229b08b57f26510b56d9c246f93 /src/gallium/drivers/radeon/r600_texture.c | |
parent | 065eeb79f706d10340044447cc5821e64063ea9e (diff) |
gallium/radeon: add can_sample_z/s flags for textures
v2: adjust r600_init_color_surface as well
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 614dd0e87f0..6b88fc14396 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -1027,11 +1027,22 @@ r600_texture_create_object(struct pipe_screen *screen, rtex->ps_draw_ratio = 0; if (rtex->is_depth) { - if (!(base->flags & (R600_RESOURCE_FLAG_TRANSFER | - R600_RESOURCE_FLAG_FLUSHED_DEPTH)) && - !(rscreen->debug_flags & DBG_NO_HYPERZ)) { + if (base->flags & (R600_RESOURCE_FLAG_TRANSFER | + R600_RESOURCE_FLAG_FLUSHED_DEPTH) || + rscreen->chip_class >= EVERGREEN) { + rtex->can_sample_z = true; + rtex->can_sample_s = true; + } else { + if (rtex->resource.b.b.nr_samples <= 1 && + (rtex->resource.b.b.format == PIPE_FORMAT_Z16_UNORM || + rtex->resource.b.b.format == PIPE_FORMAT_Z32_FLOAT)) + rtex->can_sample_z = true; + } - r600_texture_allocate_htile(rscreen, rtex); + if (!(base->flags & (R600_RESOURCE_FLAG_TRANSFER | + R600_RESOURCE_FLAG_FLUSHED_DEPTH))) { + if (!(rscreen->debug_flags & DBG_NO_HYPERZ)) + r600_texture_allocate_htile(rscreen, rtex); } } else { if (base->nr_samples > 1) { |