summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-12-05 18:35:22 +0100
committerMichel Dänzer <[email protected]>2013-01-17 16:57:21 +0100
commit51efb081f7cc1c777d581c5dad5819a98f7f35cb (patch)
tree81cd917fc4e70a5824082df5a2c60df8b63d2384 /src/gallium
parent3c92bfe2d22942a529c9c21ef74b8237732807af (diff)
radeonsi: Actually keep track if we are using depth textures for samplers.
20-odd more piglits. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index cc9f7ae3e1b..f7fe603f115 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2197,7 +2197,8 @@ static struct si_pm4_state *si_set_sampler_view(struct r600_context *rctx,
struct si_pipe_sampler_view **resource = (struct si_pipe_sampler_view **)views;
struct si_pm4_state *pm4 = CALLOC_STRUCT(si_pm4_state);
int i, j;
- int has_depth = 0;
+
+ rctx->have_depth_texture = FALSE;
if (!count)
goto out;
@@ -2210,8 +2211,12 @@ static struct si_pm4_state *si_set_sampler_view(struct r600_context *rctx,
(struct pipe_sampler_view **)&samplers->views[i],
views[i]);
- if (views[i])
+ if (resource[i]) {
+ struct r600_resource_texture *rtex =
+ (struct r600_resource_texture *)views[i]->texture;
+ rctx->have_depth_texture |= rtex->depth && !rtex->is_flushing_texture;
si_pm4_add_bo(pm4, resource[i]->resource, RADEON_USAGE_READ);
+ }
for (j = 0; j < Elements(resource[i]->state); ++j) {
si_pm4_sh_data_add(pm4, resource[i] ? resource[i]->state[j] : 0);
@@ -2226,7 +2231,6 @@ static struct si_pm4_state *si_set_sampler_view(struct r600_context *rctx,
si_pm4_sh_data_end(pm4, user_data_reg, SI_SGPR_RESOURCE);
out:
- rctx->have_depth_texture = has_depth;
rctx->ps_samplers.n_views = count;
return pm4;
}