From: Marek Olšák Date: Wed, 18 Jan 2017 21:15:35 +0000 (+0100) Subject: radeonsi: don't forget to add HTILE to the buffer list for texturing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e490b7812cae778c61004971d86dc8299b6cd240;p=mesa.git radeonsi: don't forget to add HTILE to the buffer list for texturing This fixes VM faults. Discovered by Samuel Pitoiset. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98975 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99450 Cc: 17.0 13.0 Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Edward O'Callaghan --- diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index df0905d8977..4a9fcd0dff2 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -320,14 +320,21 @@ static void si_sampler_view_add_buffer(struct si_context *sctx, if (resource->target == PIPE_BUFFER) return; - /* Now add separate DCC if it's present. */ + /* Now add separate DCC or HTILE. */ rtex = (struct r600_texture*)resource; - if (!rtex->dcc_separate_buffer) - return; + if (rtex->dcc_separate_buffer) { + radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx, + rtex->dcc_separate_buffer, usage, + RADEON_PRIO_DCC, check_mem); + } - radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx, - rtex->dcc_separate_buffer, usage, - RADEON_PRIO_DCC, check_mem); + if (rtex->htile_buffer && + rtex->tc_compatible_htile && + !is_stencil_sampler) { + radeon_add_to_buffer_list_check_mem(&sctx->b, &sctx->b.gfx, + rtex->htile_buffer, usage, + RADEON_PRIO_HTILE, check_mem); + } } static void si_sampler_views_begin_new_cs(struct si_context *sctx,