From: Marek Olšák Date: Thu, 11 Feb 2016 14:49:51 +0000 (+0100) Subject: radeonsi: fix a crash when binding a sampler buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c8a1a8fed7a2ef61104040956b20613dc8b274d;p=mesa.git 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 --- 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 {