summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-09-12 15:53:51 +0200
committerMichel Dänzer <[email protected]>2012-09-12 15:53:51 +0200
commit7443e4e697c0517f505d83436dcbe1fd01c1c39e (patch)
treebe7bb9af86586185b5f8e146c99b89b1a7704219 /src/gallium/drivers/radeonsi/si_state.c
parentd67d8e24718a7ab991caa6798563e53ae343cede (diff)
radeonsi: Properly handle NULL sampler views.
Fixes piglit shaders/glsl-fs-uniform-sampler-array and many other similar tests. In fact, I just completed a piglit quick-driver.tests run without any GPU lockups or even VM protection faults. Yay! Signed-off-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 80da068729d..1a5ed2fa3d9 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2268,10 +2268,10 @@ static void si_set_ps_sampler_view(struct pipe_context *ctx, unsigned count,
struct r600_resource_texture *tex = (void *)resource[i]->base.texture;
si_pm4_add_bo(pm4, &tex->resource, RADEON_USAGE_READ);
+ }
- for (j = 0; j < Elements(resource[i]->state); ++j) {
- si_pm4_sh_data_add(pm4, resource[i]->state[j]);
- }
+ for (j = 0; j < Elements(resource[i]->state); ++j) {
+ si_pm4_sh_data_add(pm4, resource[i] ? resource[i]->state[j] : 0);
}
}