<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello users,</p>
<p>Since updating to the latest mesa (currently 21.3.3) I get a leak
when calling <span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">eglSwapBuffers.</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">My project is a wayland egl window which renders textures using a simple shader.
</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Below is the valgrind output.
</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">RefreshWindow() basically contains eglSwapBuffers and wl_display_dispatch_pending</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">I've tried to create a small example to show this behaviour buts its trickier to weed out the code than I thought and so I hoped someone may have a suggestion of something I might be doing wrong from the call stack.
</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">28,448 bytes in 889 blocks are definitely lost in loss record 22,700 of 22,725
==26865== at 0x55FC7B5: malloc (vg_replace_malloc.c:380)
==26865== by 0x27E29066: update_bo_syncobjs (iris_batch.c:677)
==26865== by 0x27E29066: update_batch_syncobjs (iris_batch.c:755)
==26865== by 0x27E29066: _iris_batch_flush (iris_batch.c:888)
==26865== by 0x27E24C5B: iris_flush_resource (iris_resource.c:1393)
==26865== by 0x27D80432: tc_call_flush_resource (u_threaded_context.c:3680)
==26865== by 0x27D7EEE1: tc_batch_execute (u_threaded_context.c:213)
==26865== by 0x27D7FB8A: _tc_sync.constprop.0 (u_threaded_context.c:364)
==26865== by 0x27D85747: tc_flush (u_threaded_context.c:2916)
==26865== by 0x2787CC24: st_context_flush (st_manager.c:676)
==26865== by 0x27825F20: dri_flush (dri_drawable.c:522)
==26865== by 0x27612196: ???
==26865== by 0x27607A7D: ???
==26865== by 0x275FB005: ???
==26865== by 0xA77060: RefreshWindow() (WaylandEGL.cpp:165)</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">
</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Thanks,</span></p>
<p><span style="color: rgb(220, 221, 222); font-family: Whitney, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: break-spaces; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgba(4, 4, 5, 0.07); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">Richard
</span></p>
</body>
</html>