From: Marek Olšák Date: Thu, 9 Feb 2017 01:18:40 +0000 (+0100) Subject: radeonsi: align shader binaries to CP DMA alignment for optimal prefetch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a534c5c7d84f2b16bde3057f785cb061e347342;p=mesa.git radeonsi: align shader binaries to CP DMA alignment for optimal prefetch Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index eb2efbb72c4..7b89014d5ba 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5748,7 +5748,8 @@ int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader) r600_resource_reference(&shader->bo, NULL); shader->bo = (struct r600_resource*) pipe_buffer_create(&sscreen->b.b, 0, - PIPE_USAGE_IMMUTABLE, bo_size); + PIPE_USAGE_IMMUTABLE, + align(bo_size, SI_CPDMA_ALIGNMENT)); if (!shader->bo) return -ENOMEM;