From 1595cfdf47c1426b7a1bb2e49c7696890f367a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 19 Dec 2014 12:12:10 +0100 Subject: [PATCH] radeonsi: attempt to fix VM faults with clip state constant buffer --- src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- src/gallium/drivers/radeonsi/si_pipe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index b349912..ca4d049 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -686,7 +686,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint s /* CIK cannot unbind a constant buffer (S_BUFFER_LOAD is buggy * with a NULL buffer). We need to use a dummy buffer instead. */ - if (sctx->b.chip_class == CIK && + if (sctx->b.chip_class <= CIK && (!input || (!input->buffer && !input->user_buffer))) input = &sctx->null_const_buf; diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 3b47110..b38250b 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -138,7 +138,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void * /* CIK cannot unbind a constant buffer (S_BUFFER_LOAD is buggy * with a NULL buffer). We need to use a dummy buffer instead. */ - if (sctx->b.chip_class == CIK) { + if (sctx->b.chip_class <= CIK) { sctx->null_const_buf.buffer = pipe_buffer_create(screen, PIPE_BIND_CONSTANT_BUFFER, PIPE_USAGE_DEFAULT, 16); sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0; -- 2.1.0