[Mesa-dev] [PATCH] radeonsi: fix a crash when binding a sampler buffer
Marek Olšák
maraeo at gmail.com
Thu Feb 11 15:00:57 UTC 2016
From: Marek Olšák <marek.olsak at amd.com>
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
---
src/gallium/drivers/radeonsi/si_descriptors.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 34cc06f..345f2bb 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 {
--
2.5.0
More information about the mesa-dev
mailing list