diff options
author | Marek Olšák <[email protected]> | 2016-02-11 15:49:51 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-02-11 16:48:30 +0100 |
commit | 1c8a1a8fed7a2ef61104040956b20613dc8b274d (patch) | |
tree | d5c89967dafd177e9f544c12eed69d3cc1a438da /src/gallium/drivers | |
parent | 0f3cea95ab6128359d63264057612ec119bf80cb (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')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 3 |
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 { |