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
This commit is contained in:
Marek Olšák 2016-02-11 15:49:51 +01:00
parent 0f3cea95ab
commit 1c8a1a8fed
1 changed files with 2 additions and 1 deletions

View File

@ -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 {