diff options
author | Nicolai Hähnle <[email protected]> | 2016-06-30 11:26:13 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-07-06 10:43:48 +0200 |
commit | f2eb34f82f074284b691d568d26426a1f633d5f0 (patch) | |
tree | 10db2d6f4975ebfc08191826ff3fd42a8a5a5869 /src/gallium/drivers/radeonsi/si_state.c | |
parent | dd651261530e2d885d150755c9521e8f6e97c851 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 26831faa107..ad63dab2d59 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: |