radeonsi: Bump number of allowed global buffers to 48 (again, for clover Blender assertion)

Submitted by Dieter Nützel on Aug. 7, 2019, 2:50 a.m.

Details

Message ID b97491e8ef1bdbfef92c59872cbf4f3b@nuetzel-hh.de
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Dieter Nützel Aug. 7, 2019, 2:50 a.m.
Am 20.06.2019 20:44, schrieb Jan Vesely:
> On Sat, 2019-06-15 at 07:38 +0200, Dieter Nützel wrote:
>> Am 14.06.2019 08:13, schrieb Jan Vesely:
>> > On Thu, 2019-06-13 at 21:20 +0200, Dieter Nützel wrote:

>> > > Blender crash as expected ;-)
>> > >
>> > > /home/dieter> trying to save userpref at
>> > > /home/dieter/.config/blender/2.79/config/userpref.blend ok
>> > > Read blend: /data/Blender/barbershop_interior_gpu.blend
>> > > scripts disabled for "/data/Blender/barbershop_interior_gpu.blend",
>> > > skipping 'generate_customprops.py'
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > skipping driver 'var', automatic scripts are disabled
>> > > Device init success
>> > > Compiling OpenCL program split
>> > > Kernel compilation of split finished in 8.41s.
>> > >
>> > > Compiling OpenCL program base
>> > > Kernel compilation of base finished in 4.55s.
>> > >
>> > > Compiling OpenCL program denoising
>> > > Kernel compilation of denoising finished in 2.08s.
>> > >
>> > > blender: ../src/gallium/drivers/radeonsi/si_compute.c:319:
>> > > si_set_global_binding: Assertion `first + n <= MAX_GLOBAL_BUFFERS'
>> > > failed.
>> > >
>> > > [1]    Abbruch                       blender (core dumped)
>> >
>> > The number of max global buffers was bumped in 06bf56725d to fix
>> > similar crash in luxmark. I guess it needs another bump.
>> 
>> Hello Jan,
>> 
>> I'm so blind...
>> ...bumping it 48 and 64 (first try) works. 33 not ;-)
>> We shouldn't waste to much memory.
> 
> Feel free to post a patch. I'm not sure at which point Marek wants to
> switch to dynamic allocation (or if at all), but there's no limit in
> OCL so we might end up bumping this every time a new app pushes
> against the limit.

Hello Jan,

comming 'happily' from vacation and think we should've this in 19.2.

Marek,

do we need dynamic allocation, yet?

Sorry, please see attachment.
Would be nice, if someone of you could add these lines during commit:

     Fixes assertion failure/crash when running Blender (2.79b) on 
clover.
     CC: mesa-stable@lists.freedesktop.org    <= ???

Greetings,
Dieter

Patch hide | download patch | download mbox

From 9c3bd0c4c51452a8b1fd278006ef51feed055864 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dieter=20N=C3=BCtzel?= <Dieter@nuetzel-hh.de>
Date: Wed, 7 Aug 2019 04:33:57 +0200
Subject: [PATCH] radeonsi: Bump number of allowed global buffers to 48
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Dieter Nützel <Dieter@nuetzel-hh.de>
---
 src/gallium/drivers/radeonsi/si_compute.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_compute.h b/src/gallium/drivers/radeonsi/si_compute.h
index 86021178533..5a9be612104 100644
--- a/src/gallium/drivers/radeonsi/si_compute.h
+++ b/src/gallium/drivers/radeonsi/si_compute.h
@@ -29,7 +29,7 @@ 
 
 #include "si_shader.h"
 
-#define MAX_GLOBAL_BUFFERS 32
+#define MAX_GLOBAL_BUFFERS 48
 
 struct si_compute {
 	struct si_shader_selector sel;
-- 
2.22.0


Comments



Thank you Marek and Pierre-Eric,

with

'radeonsi: allocate and resize global_buffers as needed'

Clover OpenCL works with Blender, now.

My patch is obsolete with it.

Great.

Dieter

Am 08.08.2019 18:36, schrieb Jan Vesely:
> On Tue, 2019-08-06 at 23:20 -0400, Marek Olšák wrote:
>> Do you know why global buffers are in the compute state and not in the
>> context?
> 
> Not really. I mostly follow the existing design when it comes to mesa.
> I'd assume it's a leftover from r600 which has limited number of cbufs
> (and uses shared pool to accommodate global buffers).
> 
> cl global buffers are created in cl context so I think there shouldn't
> be too much trouble moving it to the driver equivalent of that.
> 
> Jan
> 
>> 
>> Marek
>> 
>> On Tue, Aug 6, 2019 at 10:50 PM Dieter Nützel <Dieter@nuetzel-hh.de> 
>> wrote:
>> 
>> > Am 20.06.2019 20:44, schrieb Jan Vesely:
>> > > On Sat, 2019-06-15 at 07:38 +0200, Dieter Nützel wrote:
>> > > > Am 14.06.2019 08:13, schrieb Jan Vesely:
>> > > > > On Thu, 2019-06-13 at 21:20 +0200, Dieter Nützel wrote:
>> > > > > > Blender crash as expected ;-)
>> > > > > >
>> > > > > > /home/dieter> trying to save userpref at
>> > > > > > /home/dieter/.config/blender/2.79/config/userpref.blend ok
>> > > > > > Read blend: /data/Blender/barbershop_interior_gpu.blend
>> > > > > > scripts disabled for "/data/Blender/barbershop_interior_gpu.blend",
>> > > > > > skipping 'generate_customprops.py'
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > skipping driver 'var', automatic scripts are disabled
>> > > > > > Device init success
>> > > > > > Compiling OpenCL program split
>> > > > > > Kernel compilation of split finished in 8.41s.
>> > > > > >
>> > > > > > Compiling OpenCL program base
>> > > > > > Kernel compilation of base finished in 4.55s.
>> > > > > >
>> > > > > > Compiling OpenCL program denoising
>> > > > > > Kernel compilation of denoising finished in 2.08s.
>> > > > > >
>> > > > > > blender: ../src/gallium/drivers/radeonsi/si_compute.c:319:
>> > > > > > si_set_global_binding: Assertion `first + n <= MAX_GLOBAL_BUFFERS'
>> > > > > > failed.
>> > > > > >
>> > > > > > [1]    Abbruch                       blender (core dumped)
>> > > > >
>> > > > > The number of max global buffers was bumped in 06bf56725d to fix
>> > > > > similar crash in luxmark. I guess it needs another bump.
>> > > >
>> > > > Hello Jan,
>> > > >
>> > > > I'm so blind...
>> > > > ...bumping it 48 and 64 (first try) works. 33 not ;-)
>> > > > We shouldn't waste to much memory.
>> > >
>> > > Feel free to post a patch. I'm not sure at which point Marek wants to
>> > > switch to dynamic allocation (or if at all), but there's no limit in
>> > > OCL so we might end up bumping this every time a new app pushes
>> > > against the limit.
>> >
>> > Hello Jan,
>> >
>> > comming 'happily' from vacation and think we should've this in 19.2.
>> >
>> > Marek,
>> >
>> > do we need dynamic allocation, yet?
>> >
>> > Sorry, please see attachment.
>> > Would be nice, if someone of you could add these lines during commit:
>> >
>> >      Fixes assertion failure/crash when running Blender (2.79b) on
>> > clover.
>> >      CC: mesa-stable@lists.freedesktop.org    <= ???
>> >
>> > Greetings,
>> > Dieter