summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-11 15:49:51 +0100
committerMarek Olšák <[email protected]>2016-02-11 16:48:30 +0100
commit1c8a1a8fed7a2ef61104040956b20613dc8b274d (patch)
treed5c89967dafd177e9f544c12eed69d3cc1a438da /src/gallium/drivers/radeonsi
parent0f3cea95ab6128359d63264057612ec119bf80cb (diff)
radeonsi: fix a crash when binding a sampler buffer
Buffers don't contain r600_texture. Broken by 7aedbbacae6d3ec3d06735fff2eb66: "radeonsi: put image, fmask, and sampler descriptors into one array" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94091
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 34cc06fc078..345f2bbc381 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -203,7 +203,8 @@ static void si_set_sampler_view(struct si_context *sctx,
pipe_sampler_view_reference(&views->views[slot], view);
memcpy(views->desc.list + slot * 16, rview->state, 8*4);
- if (rtex && rtex->fmask.size) {
+ if (view->texture && view->texture->target != PIPE_BUFFER &&
+ rtex->fmask.size) {
memcpy(views->desc.list + slot*16 + 8,
rview->fmask_state, 8*4);
} else {