summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-06-30 11:26:13 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-07-06 10:43:48 +0200
commitf2eb34f82f074284b691d568d26426a1f633d5f0 (patch)
tree10db2d6f4975ebfc08191826ff3fd42a8a5a5869 /src/gallium/drivers/radeonsi
parentdd651261530e2d885d150755c9521e8f6e97c851 (diff)
downloadexternal_mesa3d-f2eb34f82f074284b691d568d26426a1f633d5f0.zip
external_mesa3d-f2eb34f82f074284b691d568d26426a1f633d5f0.tar.gz
external_mesa3d-f2eb34f82f074284b691d568d26426a1f633d5f0.tar.bz2
gallium/radeon: replace is_flushing_texture with db_compatible
This is a left-over of when I considered generalizing the separate stencil support. I do prefer the new name since it emphasizes what flushing vs. non-flushing means from a functional point-of-view, namely special handling of the texture format. v2: adjust r600_init_color_surface as well Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_blit.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
index 1148787..26ce820 100644
--- a/src/gallium/drivers/radeonsi/si_blit.c
+++ b/src/gallium/drivers/radeonsi/si_blit.c
@@ -293,7 +293,7 @@ si_flush_depth_textures(struct si_context *sctx,
sview = (struct si_sampler_view*)view;
tex = (struct r600_texture *)view->texture;
- assert(tex->is_depth && !tex->is_flushing_texture);
+ assert(tex->db_compatible);
si_blit_decompress_zs_in_place(sctx, tex,
sview->is_stencil_sampler ? PIPE_MASK_S
@@ -696,7 +696,7 @@ static void si_decompress_subresource(struct pipe_context *ctx,
struct si_context *sctx = (struct si_context *)ctx;
struct r600_texture *rtex = (struct r600_texture*)tex;
- if (rtex->is_depth && !rtex->is_flushing_texture) {
+ if (rtex->db_compatible) {
planes &= PIPE_MASK_Z | PIPE_MASK_S;
if (!(rtex->surface.flags & RADEON_SURF_SBUFFER))
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index d1cd3c4..3def237 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -391,7 +391,7 @@ static void si_set_sampler_view(struct si_context *sctx,
if (view->texture && view->texture->target != PIPE_BUFFER) {
bool is_separate_stencil =
- rtex->is_depth && !rtex->is_flushing_texture &&
+ rtex->db_compatible &&
rview->is_stencil_sampler;
si_set_mutable_tex_desc_fields(rtex,
@@ -464,7 +464,7 @@ static void si_set_sampler_views(struct pipe_context *ctx,
struct r600_texture *rtex =
(struct r600_texture*)views[i]->texture;
- if (rtex->is_depth && !rtex->is_flushing_texture) {
+ if (rtex->db_compatible) {
samplers->depth_texture_mask |= 1u << slot;
} else {
samplers->depth_texture_mask &= ~(1u << slot);
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 26831fa..ad63dab 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2980,14 +2980,16 @@ si_create_sampler_view_custom(struct pipe_context *ctx,
pipe_format = state->format;
surflevel = tmp->surface.level;
- if (tmp->is_depth && !tmp->is_flushing_texture) {
+ if (tmp->db_compatible) {
switch (pipe_format) {
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
pipe_format = PIPE_FORMAT_Z32_FLOAT;
break;
case PIPE_FORMAT_X8Z24_UNORM:
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- /* Z24 is always stored like this. */
+ /* Z24 is always stored like this for DB
+ * compatibility.
+ */
pipe_format = PIPE_FORMAT_Z24X8_UNORM;
break;
case PIPE_FORMAT_X24S8_UINT: