Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-04 Thread Michel Dänzer
On 2019-07-03 8:49 p.m., Marek Olšák wrote:
> NDEBUG is set = release
> NDEBUG is not set = debugoptimized
> NDEBUG is not set and DEBUG is set = debug
> 
> NDEBUG is not set ---> enable assertions and cheap debug code, NIR enables
> expensive validations
> DEBUG is set ---> enable possibly very expensive debug code, may be
> replaced by !NDEBUG in the future

There is no such connection between DEBUG and NDEBUG.

DEBUG is controlled by the meson buildtype configuration item, release
and debugoptimized being two out of more possible values.

NDEBUG is controlled by meson's b_ndebug configuration item. While its
default value depends on the build type, it can be freely enabled or
disabled with any build type.


-- 
Earthling Michel Dänzer   |  https://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-03 Thread Marek Olšák
NDEBUG is set = release
NDEBUG is not set = debugoptimized
NDEBUG is not set and DEBUG is set = debug

NDEBUG is not set ---> enable assertions and cheap debug code, NIR enables
expensive validations
DEBUG is set ---> enable possibly very expensive debug code, may be
replaced by !NDEBUG in the future

Marek

On Wed, Jul 3, 2019 at 4:00 AM Michel Dänzer  wrote:

> On 2019-07-02 7:29 p.m., Marek Olšák wrote:
> > If you don't wanna see the messages, don't use debugoptimized.
>
> Makes sense, but means it needs to be guarded by DEBUG, not NDEBUG.
>
>
> --
> Earthling Michel Dänzer   |  https://www.amd.com
> Libre software enthusiast | Mesa and X developer
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-03 Thread Michel Dänzer
On 2019-07-02 7:29 p.m., Marek Olšák wrote:
> If you don't wanna see the messages, don't use debugoptimized.

Makes sense, but means it needs to be guarded by DEBUG, not NDEBUG.


-- 
Earthling Michel Dänzer   |  https://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-02 Thread Marek Olšák
If you don't wanna see the messages, don't use debugoptimized.

Marek

On Tue., Jul. 2, 2019, 10:15 Michel Dänzer,  wrote:

> On 2019-07-02 2:09 p.m., Mathias Fröhlich wrote:
> > On Tuesday, 2 July 2019 10:25:41 CEST Michel Dänzer wrote:
> >> On 2019-07-02 3:44 a.m., Dieter Nützel wrote:
> >>>
> >>> /opt/mesa> git bisect good
> >>> b5697c311b6f29dee40b96c48bad3279e3667c1e is the first bad commit
> >>> commit b5697c311b6f29dee40b96c48bad3279e3667c1e
> >>> Author: Marek Olšák 
> >>> Date:   Thu May 9 21:04:23 2019 -0400
> >>>
> >>> Change a few frequented uses of DEBUG to !NDEBUG
> >>>
> >>> debugoptimized builds don't define NDEBUG, but they also don't
> define
> >>> DEBUG. We want to enable cheap debug code for these builds.
> >>> I only chose those occurences that I care about.
> >>>
> >>> Reviewed-by: Mathias Fröhlich 
> >>>
> >>>  src/gallium/auxiliary/tgsi/tgsi_ureg.c  | 2 +-
> >>>  src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
> >>>  src/gallium/drivers/radeonsi/si_pipe.h  | 2 +-
> >>>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +++---
> >>>  src/gallium/drivers/radeonsi/si_state.c | 4 ++--
> >>>  src/mesa/main/context.c | 2 +-
> >>>  src/mesa/main/debug.c   | 4 ++--
> >>>  src/mesa/main/errors.c  | 6 +++---
> >>>  src/mesa/main/feedback.c| 2 +-
> >>>  src/mesa/main/formats.c | 2 --
> >>>  src/mesa/main/imports.c | 4 ++--
> >>>  src/mesa/main/mtypes.h  | 2 +-
> >>>  src/mesa/main/shaderapi.c   | 2 +-
> >>>  src/mesa/state_tracker/st_atom_framebuffer.c| 2 +-
> >>>  src/mesa/state_tracker/st_format.c  | 2 +-
> >>>  src/mesa/vbo/vbo_exec.h | 2 +-
> >>>  src/mesa/vbo/vbo_exec_api.c | 6 +++---
> >>>  src/util/slab.c | 4 ++--
> >>>  18 files changed, 27 insertions(+), 29 deletions(-)
> >>
> >> The changes to src/mesa/main/errors.c mean that Mesa now prints messages
> >> on GL API usage errors by default when assertions are enabled, whereas
> >> previously it only did so for debugging builds. This should probably be
> >> reverted, since these messages can be pretty noisy with some apps.
> >
> > My rationale was that it used to print before meson so it should print
> now again.
>
> Before this change, these messages were only printed by default with a
> debug build, both with meson and autotools. (With autotools, a debug
> build was required for assertions to be enabled)
>
> Now they're printed by default if assertions are enabled, even if debug
> is disabled.
>
>
> > But I have no strong opinion regarding debug builds being noisy.
>
> That's not the issue at hand.
>
>
> --
> Earthling Michel Dänzer   |  https://www.amd.com
> Libre software enthusiast | Mesa and X developer
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-02 Thread Michel Dänzer
On 2019-07-02 2:09 p.m., Mathias Fröhlich wrote:
> On Tuesday, 2 July 2019 10:25:41 CEST Michel Dänzer wrote:
>> On 2019-07-02 3:44 a.m., Dieter Nützel wrote:
>>>
>>> /opt/mesa> git bisect good
>>> b5697c311b6f29dee40b96c48bad3279e3667c1e is the first bad commit
>>> commit b5697c311b6f29dee40b96c48bad3279e3667c1e
>>> Author: Marek Olšák 
>>> Date:   Thu May 9 21:04:23 2019 -0400
>>>
>>> Change a few frequented uses of DEBUG to !NDEBUG
>>>
>>> debugoptimized builds don't define NDEBUG, but they also don't define
>>> DEBUG. We want to enable cheap debug code for these builds.
>>> I only chose those occurences that I care about.
>>>
>>> Reviewed-by: Mathias Fröhlich 
>>>
>>>  src/gallium/auxiliary/tgsi/tgsi_ureg.c  | 2 +-
>>>  src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
>>>  src/gallium/drivers/radeonsi/si_pipe.h  | 2 +-
>>>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +++---
>>>  src/gallium/drivers/radeonsi/si_state.c | 4 ++--
>>>  src/mesa/main/context.c | 2 +-
>>>  src/mesa/main/debug.c   | 4 ++--
>>>  src/mesa/main/errors.c  | 6 +++---
>>>  src/mesa/main/feedback.c| 2 +-
>>>  src/mesa/main/formats.c | 2 --
>>>  src/mesa/main/imports.c | 4 ++--
>>>  src/mesa/main/mtypes.h  | 2 +-
>>>  src/mesa/main/shaderapi.c   | 2 +-
>>>  src/mesa/state_tracker/st_atom_framebuffer.c| 2 +-
>>>  src/mesa/state_tracker/st_format.c  | 2 +-
>>>  src/mesa/vbo/vbo_exec.h | 2 +-
>>>  src/mesa/vbo/vbo_exec_api.c | 6 +++---
>>>  src/util/slab.c | 4 ++--
>>>  18 files changed, 27 insertions(+), 29 deletions(-)
>>
>> The changes to src/mesa/main/errors.c mean that Mesa now prints messages
>> on GL API usage errors by default when assertions are enabled, whereas
>> previously it only did so for debugging builds. This should probably be
>> reverted, since these messages can be pretty noisy with some apps.
> 
> My rationale was that it used to print before meson so it should print now 
> again.

Before this change, these messages were only printed by default with a
debug build, both with meson and autotools. (With autotools, a debug
build was required for assertions to be enabled)

Now they're printed by default if assertions are enabled, even if debug
is disabled.


> But I have no strong opinion regarding debug builds being noisy.

That's not the issue at hand.


-- 
Earthling Michel Dänzer   |  https://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-02 Thread Mathias Fröhlich
Hi,

On Tuesday, 2 July 2019 10:25:41 CEST Michel Dänzer wrote:
> On 2019-07-02 3:44 a.m., Dieter Nützel wrote:
> > 
> > /opt/mesa> git bisect good
> > b5697c311b6f29dee40b96c48bad3279e3667c1e is the first bad commit
> > commit b5697c311b6f29dee40b96c48bad3279e3667c1e
> > Author: Marek Olšák 
> > Date:   Thu May 9 21:04:23 2019 -0400
> > 
> > Change a few frequented uses of DEBUG to !NDEBUG
> > 
> > debugoptimized builds don't define NDEBUG, but they also don't define
> > DEBUG. We want to enable cheap debug code for these builds.
> > I only chose those occurences that I care about.
> > 
> > Reviewed-by: Mathias Fröhlich 
> > 
> >  src/gallium/auxiliary/tgsi/tgsi_ureg.c  | 2 +-
> >  src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
> >  src/gallium/drivers/radeonsi/si_pipe.h  | 2 +-
> >  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +++---
> >  src/gallium/drivers/radeonsi/si_state.c | 4 ++--
> >  src/mesa/main/context.c | 2 +-
> >  src/mesa/main/debug.c   | 4 ++--
> >  src/mesa/main/errors.c  | 6 +++---
> >  src/mesa/main/feedback.c| 2 +-
> >  src/mesa/main/formats.c | 2 --
> >  src/mesa/main/imports.c | 4 ++--
> >  src/mesa/main/mtypes.h  | 2 +-
> >  src/mesa/main/shaderapi.c   | 2 +-
> >  src/mesa/state_tracker/st_atom_framebuffer.c| 2 +-
> >  src/mesa/state_tracker/st_format.c  | 2 +-
> >  src/mesa/vbo/vbo_exec.h | 2 +-
> >  src/mesa/vbo/vbo_exec_api.c | 6 +++---
> >  src/util/slab.c | 4 ++--
> >  18 files changed, 27 insertions(+), 29 deletions(-)
> 
> The changes to src/mesa/main/errors.c mean that Mesa now prints messages
> on GL API usage errors by default when assertions are enabled, whereas
> previously it only did so for debugging builds. This should probably be
> reverted, since these messages can be pretty noisy with some apps.

My rationale was that it used to print before meson so it should print now 
again.

But I have no strong opinion regarding debug builds being noisy.
For production code compiled in release mode this would be a no go - for sure!

We have way more code snippets guarded by DEBUG.
Lots of them probably useful.

best

Mathias


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-02 Thread Michel Dänzer
On 2019-07-02 3:44 a.m., Dieter Nützel wrote:
> 
> /opt/mesa> git bisect good
> b5697c311b6f29dee40b96c48bad3279e3667c1e is the first bad commit
> commit b5697c311b6f29dee40b96c48bad3279e3667c1e
> Author: Marek Olšák 
> Date:   Thu May 9 21:04:23 2019 -0400
> 
>     Change a few frequented uses of DEBUG to !NDEBUG
> 
>     debugoptimized builds don't define NDEBUG, but they also don't define
>     DEBUG. We want to enable cheap debug code for these builds.
>     I only chose those occurences that I care about.
> 
>     Reviewed-by: Mathias Fröhlich 
> 
>  src/gallium/auxiliary/tgsi/tgsi_ureg.c  | 2 +-
>  src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
>  src/gallium/drivers/radeonsi/si_pipe.h  | 2 +-
>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +++---
>  src/gallium/drivers/radeonsi/si_state.c | 4 ++--
>  src/mesa/main/context.c | 2 +-
>  src/mesa/main/debug.c   | 4 ++--
>  src/mesa/main/errors.c  | 6 +++---
>  src/mesa/main/feedback.c    | 2 +-
>  src/mesa/main/formats.c | 2 --
>  src/mesa/main/imports.c | 4 ++--
>  src/mesa/main/mtypes.h  | 2 +-
>  src/mesa/main/shaderapi.c   | 2 +-
>  src/mesa/state_tracker/st_atom_framebuffer.c    | 2 +-
>  src/mesa/state_tracker/st_format.c  | 2 +-
>  src/mesa/vbo/vbo_exec.h | 2 +-
>  src/mesa/vbo/vbo_exec_api.c | 6 +++---
>  src/util/slab.c | 4 ++--
>  18 files changed, 27 insertions(+), 29 deletions(-)

The changes to src/mesa/main/errors.c mean that Mesa now prints messages
on GL API usage errors by default when assertions are enabled, whereas
previously it only did so for debugging builds. This should probably be
reverted, since these messages can be pretty noisy with some apps.


-- 
Earthling Michel Dänzer   |  https://www.amd.com
Libre software enthusiast | Mesa and X developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] radeonsi: glmark2 - regression (GL_INVALID_OPERATION in glFramebufferTexture2D) - bisected

2019-07-01 Thread Dieter Nützel

Hello Emil et al.,

sorry Emil you were NOT the right person to blame for this - see below.

Am 22.06.2019 04:55, schrieb Dieter Nützel:

Hello Emil,

I see glmark2 - [desktop] blur-radius=5

libpng warning: iCCP: known incorrect sRGB profile
Mesa: User error: GL_INVALID_OPERATION in
glFramebufferTexture2D(window-system framebuffer)
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4:
FPS: 4879 FrameTime: 0.205 ms

after your commits around beginning of June (2019-06-05) or your
'mapi'-work commited around 2019-06-10.


I had to go much further back...


Have to bisect.


Did it, now. Hello Marek and Mathias ;-)

/opt/mesa> git bisect good
b5697c311b6f29dee40b96c48bad3279e3667c1e is the first bad commit
commit b5697c311b6f29dee40b96c48bad3279e3667c1e
Author: Marek Olšák 
Date:   Thu May 9 21:04:23 2019 -0400

Change a few frequented uses of DEBUG to !NDEBUG

debugoptimized builds don't define NDEBUG, but they also don't 
define

DEBUG. We want to enable cheap debug code for these builds.
I only chose those occurences that I care about.

Reviewed-by: Mathias Fröhlich 

 src/gallium/auxiliary/tgsi/tgsi_ureg.c  | 2 +-
 src/gallium/drivers/radeonsi/si_descriptors.c   | 2 +-
 src/gallium/drivers/radeonsi/si_pipe.h  | 2 +-
 src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 6 +++---
 src/gallium/drivers/radeonsi/si_state.c | 4 ++--
 src/mesa/main/context.c | 2 +-
 src/mesa/main/debug.c   | 4 ++--
 src/mesa/main/errors.c  | 6 +++---
 src/mesa/main/feedback.c| 2 +-
 src/mesa/main/formats.c | 2 --
 src/mesa/main/imports.c | 4 ++--
 src/mesa/main/mtypes.h  | 2 +-
 src/mesa/main/shaderapi.c   | 2 +-
 src/mesa/state_tracker/st_atom_framebuffer.c| 2 +-
 src/mesa/state_tracker/st_format.c  | 2 +-
 src/mesa/vbo/vbo_exec.h | 2 +-
 src/mesa/vbo/vbo_exec_api.c | 6 +++---
 src/util/slab.c | 4 ++--
 18 files changed, 27 insertions(+), 29 deletions(-)

After reverting this all is fine, again.

My meson config for Mesa git:
meson ../ --strip --buildtype debugoptimized -Ddri-drivers= 
-Dplatforms=drm,x11 -Dgallium-drivers=r600,radeonsi,swrast 
-Dvulkan-drivers=amd -Dgallium-nine=true -Dgallium-opencl=standalone 
-Dglvnd=true -Dgallium-va=false -Dgallium-xvmc=false 
-Dgallium-omx=disabled -Dgallium-xa=false


Greetings,
Dieter
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev