-
Notifications
You must be signed in to change notification settings - Fork 23
Merge mesa-24.2.5 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is based on format features cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467> (cherry picked from commit f3c206d)
these are already a set format cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467> (cherry picked from commit f7b5faa)
These extensions were experimental and only exposed with radv_dgc=true for vkd3d-proton. Only two games require DGC (Starfield and Halo Infinite) and both also require sparse support which GFX6-7 can't support. GFX6-7 support is also mostly broken because IB2 can't be used when indirect draw packets are used and RADV uses that to preprocess IBO. Also with the EXT, indirect draws are more common and can't be supported. Everything could work with a bunch of time and workarounds but I don't think it's worth the effort given there is no real use. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31491> (cherry picked from commit e4f67f2)
The shader uniforms used for emulating TXS depend on the current sampler view state and thus need to be re-emitted when this states changes. Fixes: 88f399b ("etnaviv: nir: support intrinsic used for txs lowering") Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31495> (cherry picked from commit c12697a)
What we really want to pass is DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM vs DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM Fixes: a9f1151 ("intel/hang_replay: use hw image param") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11959 Signed-off-by: Carlos Santa <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31494> (cherry picked from commit 700141d)
This flag causes the following failure: total_vma: 0x0000000071c9d000 fail to set context hw img: Invalid argument Fixes: bab5276 ("intel/hang_replay: fix batch address") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11959 Signed-off-by: Carlos Santa <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31494> (cherry picked from commit 39e3015)
This reverts commit b36d9d9a31f475e375db228c74fb4e317edd72fa. This commit is causing issues [1] and is not worth backporting, so let's just revert it. [1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31485#note_2599128
Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit 8cb0883)
Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit 03f762f)
Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit e3814de)
Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit 1177407)
These should be included according to table in Bspec 43904. Patch removes PIPE_CONTROL_STATE_CACHE_INVALIDATE based on HSDES. Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit 3e29ea6)
These should be included according to table in Bspec 43904. Patch removes PIPE_CONTROL_STATE_CACHE_INVALIDATE based on HSDES. Cc: mesa-stable Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29764> (cherry picked from commit 78b614b)
Preprocess now must use the same conditional rendering state as the execute, so the DGC prepare shader must reset the number of sequences to generate an empty cmdbuf for compute. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31563> (cherry picked from commit 336f801)
Check if the block size is bigger then 64. We want to block e.g. one of the following formats: - R32G32B32A32_FLOAT - R32G32B32A32_SINT - R32G32B32A32_ZINT Unbreaks e.g. dEQP-GLES3.functional.fbo.completeness.renderable.texture.color0.rgb16i Fixes: e481c12 ("etnaviv: disable 64bpp render/sampler formats") Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27111> (cherry picked from commit 04521c1)
Starting with Linux v6.11+, performance counter information is no longer duplicated in both the kernel and userspace. Instead, an IOCTL retrieves this information, allowing userspace to maintain a local array for reuse, thus avoiding redundant kernel queries. However, support for older kernels without these new IOCTLs remains. To distinguish between versions, we check `devinfo->max_perfcnt` - which is non-zero on Linux v6.11+ and zero on older kernels. Currently, applications using performance queries on platforms with older kernels encounter a SEGFAULT, as we don't validate `devinfo->max_perfcnt` before accessing the userspace array for performance counter information. This commit makes sure that, if `devinfo->max_perfcnt` is zero, `screen->perfcnt_names` will be NULL. This way, we can check if `screen->perfcnt_names` is different than NULL before attempting to use the userspace array. Fixes: 017dde0 ("v3d: Use DRM_IOCTL_V3D_GET_COUNTER to get perfcnt information") Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31552> (cherry picked from commit 47a7861)
Signed-off-by: Lionel Landwerlin <[email protected]> Cc: mesa-stable Reviewed-by: Nanley Chery <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31579> (cherry picked from commit 5226341)
Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11992 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31573> (cherry picked from commit f77ffd6)
Fixes coverity issue 1559460 Out-of-bounds write Fixes: 9c07a2e ("radeonsi/vcn: ROI feature implementation") Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558> (cherry picked from commit 10a7356)
When all 16 references are used, this would read pic->ref[16]. Same for HEVC, but HEVC only uses 15 reference frames so it would never happen there yet is still reported by coverity. Fixes coverity issues 1497283 and 1465569 Out-of-bounds read Cc: mesa-stable Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31558> (cherry picked from commit 20d5020)
Fixes: 9e90d95 ("v3d,v3dv: support up to 8 render targets in v7.1+") Reviewed-by: Iago Toral Quiroga <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31582> (cherry picked from commit 687ed3f)
Fixes #11896. cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31533> (cherry picked from commit fa9cd89)
Spec allows calling VkBufferGetDeviceAddressInfo without binding to memory: VUID-VkBufferDeviceAddressInfo-buffer-02600 If buffer is non-sparse and was not created with the VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT flag, then it must be bound completely and contiguously to a single VkDeviceMemory object Which we can only do by making it sparse unconditionally, which feels very wrong to me for a capture & replay extension as that significantly impacts execution. Current theory is that this was only intended for the EXT and not the core functionality. As such, let's disable capture using the EXT. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31140> (cherry picked from commit c8c354d)
…ce == NULL Fixes: 3df9d8e - gallium/u_threaded: implement pipelined partial buffer uploads using CPU storage Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12020 Reviewed-by: Mike Blumenkrantz <[email protected]> Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651> (cherry picked from commit 88f057e)
This was missing. Cc: mesa-stable Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31651> (cherry picked from commit 2272db2)
More cast fixes this time for UBO and SSBO. Which were missing testing previously. Fixes: d681cf9 ("nir/glsl: set deref cast mode during function inlining") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11587 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31668> (cherry picked from commit aa7c59e)
Texel buffer could be arbitrary large, so the assumption being made in the following comment is wrong: "Zero-extension (u16) and sign-extension (i16) have the same behavior here - txf returns 0 if bit 15 is set because it's out of bounds and the higher bits don't matter." Sign extension should matter for GLSL_SAMPLER_DIM_BUF. This fixes the case of doing texelFetch with u16 offset: uniform itextureBuffer s1; uint16_t offset = some_ssbo.offset; value = texelFetch(s1, offset).x; If the offset is higher than s16 optimization incorrectly left it as 16b. In spirv the above glsl is translated into: %22 = OpLoad %ushort %21 %23 = OpUConvert %uint %22 %24 = OpBitcast %int %23 %26 = OpImageFetch %v4int %16 %24 Cc: mesa-stable Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Georg Lehmann <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31664> (cherry picked from commit 7b09fc9)
Those are supported by elk, not brw. Backport-to: 24.2 Reviewed-by: Caio Oliveira <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499> (cherry picked from commit a9d9488)
Saves typing .exec_all() in a lot of places. Backport-to: 24.2 Reviewed-by: Caio Oliveira <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499> (cherry picked from commit 7c9eb8b)
We were manually allocating 1 REG_SIZE for the barrier payload, which is only half a register on Xe2. This should eventually get allocated to a whole register anyway, but it's awkward in the meantime. Also, we were zero-initializing the header using group(8, 0) which only initialized half the register. The rest of the fields are Reserved MBZ, so they're likely unused and unread anyway - but it's better to zero-initialize them so we don't get random undefined, miserable-to-debug behavior. Backport-to: 24.2 Reviewed-by: Caio Oliveira <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499> (cherry picked from commit dea61b7)
These platforms are supported by elk, not brw. Backport-to: 24.2 Reviewed-by: Caio Oliveira <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499> (cherry picked from commit d9e5022)
Xe2 increased the register size from 256-bits to 512-bits. So we can store 32 16-bit values in a register, rather than 16 values. Prior to this patch, we hadn't updated the pass, so the second half of each of our registers was unused. Backport-to: 24.2 Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31499> (cherry picked from commit 4cb67cb)
When we create sparse resources the first thing we do is a NULL bind
on them, as the Vulkan spec mandates certain behavior even for unbound
sparse resources. We do this with the minimal effort possible: if we
can get away with marking an L2 pointer as NULL in the L3 table, we
just do it and return, instead of going all the way to creating L1
tables and marking all the final entries as NULL.
The strategy we were using had a bug that could lead to previously
created NULL entries not being marked as NULL anymore. Let's give an
example:
(before proceeding, keep in mind that a NULL entry in the L3 and L2
tables has bit 1 set, it does *not* have the value 0)
- Create a 64mb buffer that uses an entire L1 table (needs to be
properly aligned), which triggers a NULL bind.
- Our algorithm will just set the L3 entry (pointing to the L2
table) as NULL.
- Create a 64kb buffer that uses the same L2 table (but a different
L1 table).
- The NULL bind triggered won't do anything as the L2 table is
already NULL.
- Bind the first buffer to actual memory. This will end up creating
the L2 table and the L1 table. The only entry we will set in the L2
table will be the one pointing to the L1 table. All the other
values will be 0 (so they won't have neither the NULL or Invalid
bits set: access to them will lead to page faults).
- Try to use the second buffer, which is still unbound. It was
relying on the fact that its L2 table pointer was NULL, but now
it's not anymore, so the page walker will fetch the L1 entries in
the L2 table and they will all be zero instead of having the NULL
bit set.
The fix is pretty simple: whenever we create a new L2 table, set every
entry to NULL (except the one we're about to set to non-NULL). This
preserves behavior for every other NULL resource relying on the L3
entry being set to NULL.
We don't need to do this for the L1 table because its entries are
different and instead of having bits to signal NULL entries we have
a special TR-TT register that we can set that gets compared to check
if an entry is NULL, and we conveniently program it to 0: see
ANV_TRTT_L1_NULL_TILE_VAL.
I am not aware of any real workloads that are triggering this
behavior, I found this issue while investigating something else,
running a custom sparse program in our pre-silicon environment, and it
told us about the page faults.
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30953>
(cherry picked from commit 4c366ef)
We're missing a check for 'result' in the middle of a loop and we have an unnecessary check for 'result' after the loop. Fixes: 7da5b1c ("anv: move trtt submissions over to the anv_async_submit") Reviewed-by: Lionel Landwerlin <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30953> (cherry picked from commit aea9ac4)
mesa-24.2.5
Kaz205
pushed a commit
to Kaz205/android_external_mesa3d
that referenced
this pull request
Nov 26, 2024
This change ensures that all these allocations are using
the same memory context.
For instance, this issue is triggered with:
"piglit/bin/arb_shader_image_load_store-host-mem-barrier -auto -fbo":
Indirect leak of 32816 byte(s) in 1 object(s) allocated from:
#0 0x7f49a35447ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
waydroid#1 0x7f49998e4b4f in ralloc_size ../src/util/ralloc.c:118
waydroid#2 0x7f49998e7521 in create_slab ../src/util/ralloc.c:801
waydroid#3 0x7f49998e7521 in gc_alloc_size ../src/util/ralloc.c:840
waydroid#4 0x7f49998e7d11 in gc_zalloc_size ../src/util/ralloc.c:868
waydroid#5 0x7f49999a6126 in nir_alu_instr_create ../src/compiler/nir/nir.c:682
waydroid#6 0x7f49999cba48 in clone_alu ../src/compiler/nir/nir_clone.c:217
waydroid#7 0x7f49999cc85a in clone_instr ../src/compiler/nir/nir_clone.c:456
waydroid#8 0x7f49999cee3a in clone_block ../src/compiler/nir/nir_clone.c:529
waydroid#9 0x7f49999cee3a in clone_cf_list ../src/compiler/nir/nir_clone.c:583
waydroid#10 0x7f49999d03be in clone_function_impl ../src/compiler/nir/nir_clone.c:660
waydroid#11 0x7f49999d13f7 in nir_function_impl_clone ../src/compiler/nir/nir_clone.c:678
#12 0x7f4999a0e2c5 in lower_call_function_impl ../src/compiler/nir/nir_functions.c:397
#13 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:430
#14 0x7f4999a0e2c5 in function_link_pass ../src/compiler/nir/nir_functions.c:408
#15 0x7f4999a0e2c5 in nir_function_instructions_pass ../src/compiler/nir/nir_builder.h:108
#16 0x7f4999a0e2c5 in nir_link_shader_functions ../src/compiler/nir/nir_functions.c:452
#17 0x7f499ca30b8f in link_libintel_shaders ../src/gallium/drivers/iris/iris_program_cache.c:329
#18 0x7f499ca30b8f in iris_ensure_indirect_generation_shader ../src/gallium/drivers/iris/iris_program_cache.c:374
#19 0x7f499d185267 in gfx9_emit_indirect_generate ../src/gallium/drivers/iris/iris_indirect_gen.c:593
#20 0x7f499d119c79 in iris_upload_indirect_shader_render_state ../src/gallium/drivers/iris/iris_state.c:8744
#21 0x7f499fe86b01 in iris_indirect_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:233
#22 0x7f499fe86b01 in iris_draw_vbo ../src/gallium/drivers/iris/iris_draw.c:343
#23 0x7f499a174e43 in tc_call_draw_indirect ../src/gallium/auxiliary/util/u_threaded_context.c:3828
#24 0x7f499a1557fe in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:453
#25 0x7f499a1557fe in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:504
#26 0x7f499a167f26 in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:761
#27 0x7f499a168888 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2783
#28 0x7f49986f2631 in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:556
#29 0x7f49986f2631 in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
#30 0x7f49991af7ca in readpixels_memcpy ../src/mesa/main/readpix.c:260
#31 0x7f49991af7ca in _mesa_readpixels ../src/mesa/main/readpix.c:898
#32 0x7f499931ee23 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:575
#33 0x7f49991b40b5 in read_pixels ../src/mesa/main/readpix.c:1199
#34 0x7f49991b40b5 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
#35 0x7f49991b4a20 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
...
SUMMARY: AddressSanitizer: 323648 byte(s) leaked in 201 allocation(s).
Fixes: 5438b19 ("iris: enable generated indirect draws")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31313>
(cherry picked from commit b6b363c)
Kaz205
pushed a commit
to Kaz205/android_external_mesa3d
that referenced
this pull request
Nov 26, 2024
For instance, this issue is triggered with "piglit/bin/glsl-fs-loop -auto -fbo":
Indirect leak of 120 byte(s) in 5 object(s) allocated from:
#0 0x7f8e7930ef57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
waydroid#1 0x7f8e6dc8c68a in __gnu_cxx::new_allocator<std::_List_node<nir_intrinsic_instr*> >::allocate(unsigned long, void const*) /usr/include/c++/11.4.0/ext/new_allocator.h:127
waydroid#2 0x7f8e6dc8c68a in std::allocator_traits<std::allocator<std::_List_node<nir_intrinsic_instr*> > >::allocate(std::allocator<std::_List_node<nir_intrinsic_instr*> >&, unsigned long) /usr/include/c++/11.4.0/bits/alloc_traits.h:464
waydroid#3 0x7f8e6dc8c68a in std::__cxx11::_List_base<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_get_node() /usr/include/c++/11.4.0/bits/stl_list.h:443
waydroid#4 0x7f8e6dc8c68a in std::_List_node<nir_intrinsic_instr*>* std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_create_node<nir_intrinsic_instr* const&>(nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:635
waydroid#5 0x7f8e6dc8c68a in void std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::_M_insert<nir_intrinsic_instr* const&>(std::_List_iterator<nir_intrinsic_instr*>, nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:1912
waydroid#6 0x7f8e6dc8c68a in std::__cxx11::list<nir_intrinsic_instr*, std::allocator<nir_intrinsic_instr*> >::push_back(nir_intrinsic_instr* const&) /usr/include/c++/11.4.0/bits/stl_list.h:1213
waydroid#7 0x7f8e6dc8c68a in r600::Shader::scan_instruction(nir_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:655
waydroid#8 0x7f8e6dc8cc2a in r600::Shader::scan_shader(nir_function const*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:554
waydroid#9 0x7f8e6dcab5bc in r600::Shader::process(nir_shader*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:526
waydroid#10 0x7f8e6dcabae1 in r600::Shader::translate_from_nir(nir_shader*, pipe_stream_output_info const*, r600_shader*, r600_shader_key const&, r600_chip_class, radeon_family) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:494
waydroid#11 0x7f8e6da5bf15 in r600_shader_from_nir ../src/gallium/drivers/r600/r600_sfn.cpp:111
#12 0x7f8e6da5db2c in r600_pipe_shader_create ../src/gallium/drivers/r600/r600_shader.c:198
#13 0x7f8e6da95c62 in r600_shader_select ../src/gallium/drivers/r600/r600_state_common.c:961
#14 0x7f8e6da9c09f in r600_update_derived_state ../src/gallium/drivers/r600/r600_state_common.c:1888
#15 0x7f8e6da9c09f in r600_draw_vbo ../src/gallium/drivers/r600/r600_state_common.c:2219
#16 0x7f8e6d55229d in u_vbuf_draw_vbo ../src/gallium/auxiliary/util/u_vbuf.c:1782
#17 0x7f8e6c5d6322 in _mesa_draw_arrays ../src/mesa/main/draw.c:1204
Fixes: 5de8141 ("r600/sfn: Allow skipping backend shader optimization for a subset of shaders")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Gert Wollny <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27334>
(cherry picked from commit b660c73)
Kaz205
pushed a commit
to Kaz205/android_external_mesa3d
that referenced
this pull request
Nov 26, 2024
For instance, this issue is triggered with "piglit/bin/glsl-vs-arrays -auto -fbo":
Direct leak of 104 byte(s) in 1 object(s) allocated from:
#0 0x7f2fab415f57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57)
waydroid#1 0x7f2f9fd9d541 in __gnu_cxx::new_allocator<std::__detail::_Hash_node_base*>::allocate(unsigned long, void const*) /usr/include/c++/11.4.0/ext/new_allocator.h:127
waydroid#2 0x7f2f9fd9d541 in std::allocator_traits<std::allocator<std::__detail::_Hash_node_base*> >::allocate(std::allocator<std::__detail::_Hash_node_base*>&, unsigned long) /usr/include/c++/11.4.0/bits/alloc_traits.h:464
waydroid#3 0x7f2f9fd9d541 in std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<int const, r600::Instr*>, false> > >::_M_allocate_buckets(unsigned long) /usr/include/c++/11.4.0/bits/hashtable_policy.h:1927
waydroid#4 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_allocate_buckets(unsigned long) /usr/include/c++/11.4.0/bits/hashtable.h:440
waydroid#5 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>) /usr/include/c++/11.4.0/bits/hashtable.h:2382
waydroid#6 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_rehash(unsigned long, unsigned long const&) /usr/include/c++/11.4.0/bits/hashtable.h:2361
waydroid#7 0x7f2f9fd9d541 in std::_Hashtable<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_insert_unique_node(unsigned long, unsigned long, std::__detail::_Hash_node<std::pair<int const, r600::Instr*>, false>*, unsigned long) /usr/include/c++/11.4.0/bits/hashtable.h:2021
waydroid#8 0x7f2f9fd9e7f8 in std::__detail::_Map_base<int, std::pair<int const, r600::Instr*>, std::allocator<std::pair<int const, r600::Instr*> >, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>, true>::operator[](int&&) /usr/include/c++/11.4.0/bits/hashtable_policy.h:741
waydroid#9 0x7f2f9fd9f6fe in std::unordered_map<int, r600::Instr*, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, r600::Instr*> > >::operator[](int&&) /usr/include/c++/11.4.0/bits/unordered_map.h:984
waydroid#10 0x7f2f9fd9f6fe in r600::Shader::InstructionChain::visit(r600::AluInstr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1358
waydroid#11 0x7f2f9fd8f309 in r600::Shader::emit_instruction(r600::Instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1419
#12 0x7f2f9fd8f822 in r600::RegisterReadHandler::visit(r600::LocalArray&) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:1040
#13 0x7f2f9fd8e726 in r600::Shader::emit_load_reg_indirect(nir_intrinsic_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:993
#14 0x7f2f9fd8de5c in r600::Shader::process_instr(nir_instr*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:848
#15 0x7f2f9fd8de5c in r600::Shader::process_block(nir_block*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:836
#16 0x7f2f9fd962f2 in r600::Shader::process_cf_node(nir_cf_node*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:669
#17 0x7f2f9fdac01a in r600::Shader::process(nir_shader*) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:537
#18 0x7f2f9fdac3d1 in r600::Shader::translate_from_nir(nir_shader*, pipe_stream_output_info const*, r600_shader*, r600_shader_key const&, r600_chip_class, radeon_family) ../src/gallium/drivers/r600/sfn/sfn_shader.cpp:494
#19 0x7f2f9fb5c8f5 in r600_shader_from_nir ../src/gallium/drivers/r600/r600_sfn.cpp:111
#20 0x7f2f9fb5e50c in r600_pipe_shader_create ../src/gallium/drivers/r600/r600_shader.c:198
#21 0x7f2f9fb96642 in r600_shader_select ../src/gallium/drivers/r600/r600_state_common.c:961
#22 0x7f2f9fb97340 in r600_create_shader_state ../src/gallium/drivers/r600/r600_state_common.c:1056
#23 0x7f2f9e060f82 in st_create_common_variant ../src/mesa/state_tracker/st_program.c:720
#24 0x7f2f9e06e779 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:773
#25 0x7f2f9e06f78d in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1259
#26 0x7f2f9e06f78d in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
#27 0x7f2f9ead0f20 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:723
#28 0x7f2f9ead0f20 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:951
#29 0x7f2f9e9b0d15 in link_program ../src/mesa/main/shaderapi.c:1336
#30 0x7f2f9e9b0d15 in link_program_error ../src/mesa/main/shaderapi.c:1447
Fixes: ddb167e ("r600/sfn: Handle indirect array load/store dependencies better")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Gert Wollny <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27334>
(cherry picked from commit 242da61)
Kaz205
pushed a commit
to Kaz205/android_external_mesa3d
that referenced
this pull request
Nov 26, 2024
Addresses:
```
Indirect leak of 256 byte(s) in 2 object(s) allocated from:
#0 0x7faaf53ee0 in __interceptor_malloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
waydroid#1 0x7fa8cfe900 in ralloc_size ../src/util/ralloc.c:118
waydroid#2 0x7fa8cfeb20 in rzalloc_size ../src/util/ralloc.c:152
waydroid#3 0x7fa8cff004 in rzalloc_array_size ../src/util/ralloc.c:232
waydroid#4 0x7fa8d06a84 in _mesa_set_init ../src/util/set.c:133
waydroid#5 0x7fa8d06bcc in _mesa_set_create ../src/util/set.c:152
waydroid#6 0x7fa8d0939c in _mesa_pointer_set_create ../src/util/set.c:613
waydroid#7 0x7fa95e5790 in nir_lower_mediump_vars
../src/compiler/nir/nir_lower_mediump.c:574
waydroid#8 0x7fa862c1c8 in tu_spirv_to_nir(tu_device*, void*, unsigned long,
VkPipelineShaderStageCreateInfo const*, tu_shader_key const*,
pipe_shader_type) ../src/freedreno/vulkan/tu_shader.cc:116
waydroid#9 0x7fa8646f24 in tu_compile_shaders(tu_device*, unsigned long,
VkPipelineShaderStageCreateInfo const**, nir_shader**,
tu_shader_key const*, tu_pipeline_layout*, unsigned char const*,
tu_shader**, char**, void*, nir_shader**, VkPipelineCreationFeedback*)
../src/freedreno/vulkan/tu_shader.cc:2741
waydroid#10 0x7fa85a16a4 in tu_pipeline_builder_compile_shaders
../src/freedreno/vulkan/tu_pipeline.cc:1887
waydroid#11 0x7fa85eb844 in tu_pipeline_builder_build<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:3923
#12 0x7fa85e6bd8 in tu_graphics_pipeline_create<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:4203
#13 0x7fa85c2588 in VkResult
tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.binding_model.mutable_descriptor.single.switches.uniform_texel_buffer_storage_image.update_write.no_source.no_source.pool_expand_types.pre_update.no_array.vert
Fixes: 7e986e5 ("nir/lower_mediump_vars: Don't lower mediump shared vars with atomic access.")
Signed-off-by: Karmjit Mahil <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
(cherry picked from commit 2a7df33)
supechicken
pushed a commit
to WayDroid-ATV/android_external_mesa3d
that referenced
this pull request
Nov 29, 2024
Addresses:
```
Indirect leak of 256 byte(s) in 2 object(s) allocated from:
#0 0x7faaf53ee0 in __interceptor_malloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
waydroid#1 0x7fa8cfe900 in ralloc_size ../src/util/ralloc.c:118
waydroid#2 0x7fa8cfeb20 in rzalloc_size ../src/util/ralloc.c:152
waydroid#3 0x7fa8cff004 in rzalloc_array_size ../src/util/ralloc.c:232
waydroid#4 0x7fa8d06a84 in _mesa_set_init ../src/util/set.c:133
waydroid#5 0x7fa8d06bcc in _mesa_set_create ../src/util/set.c:152
waydroid#6 0x7fa8d0939c in _mesa_pointer_set_create ../src/util/set.c:613
waydroid#7 0x7fa95e5790 in nir_lower_mediump_vars
../src/compiler/nir/nir_lower_mediump.c:574
waydroid#8 0x7fa862c1c8 in tu_spirv_to_nir(tu_device*, void*, unsigned long,
VkPipelineShaderStageCreateInfo const*, tu_shader_key const*,
pipe_shader_type) ../src/freedreno/vulkan/tu_shader.cc:116
waydroid#9 0x7fa8646f24 in tu_compile_shaders(tu_device*, unsigned long,
VkPipelineShaderStageCreateInfo const**, nir_shader**,
tu_shader_key const*, tu_pipeline_layout*, unsigned char const*,
tu_shader**, char**, void*, nir_shader**, VkPipelineCreationFeedback*)
../src/freedreno/vulkan/tu_shader.cc:2741
waydroid#10 0x7fa85a16a4 in tu_pipeline_builder_compile_shaders
../src/freedreno/vulkan/tu_pipeline.cc:1887
waydroid#11 0x7fa85eb844 in tu_pipeline_builder_build<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:3923
#12 0x7fa85e6bd8 in tu_graphics_pipeline_create<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:4203
#13 0x7fa85c2588 in VkResult
tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.binding_model.mutable_descriptor.single.switches.uniform_texel_buffer_storage_image.update_write.no_source.no_source.pool_expand_types.pre_update.no_array.vert
Fixes: 7e986e5 ("nir/lower_mediump_vars: Don't lower mediump shared vars with atomic access.")
Signed-off-by: Karmjit Mahil <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32057>
(cherry picked from commit 2a7df33)
Member
That doesn't really make sense. There's no difference in build system stuff between 24.2.4 and 24.2.5 Anyways I've pushed 24.2.8 now |
atmouse-
pushed a commit
to atmouse-/android_external_mesa3d
that referenced
this pull request
Mar 27, 2025
Addresses:
```
Indirect leak of 256 byte(s) in 2 object(s) allocated from:
#0 0x7faaf53ee0 in __interceptor_malloc
../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
waydroid#1 0x7fa8cfe900 in ralloc_size ../src/util/ralloc.c:118
waydroid#2 0x7fa8cfeb20 in rzalloc_size ../src/util/ralloc.c:152
waydroid#3 0x7fa8cff004 in rzalloc_array_size ../src/util/ralloc.c:232
waydroid#4 0x7fa8d06a84 in _mesa_set_init ../src/util/set.c:133
waydroid#5 0x7fa8d06bcc in _mesa_set_create ../src/util/set.c:152
waydroid#6 0x7fa8d0939c in _mesa_pointer_set_create ../src/util/set.c:613
waydroid#7 0x7fa95e5790 in nir_lower_mediump_vars
../src/compiler/nir/nir_lower_mediump.c:574
waydroid#8 0x7fa862c1c8 in tu_spirv_to_nir(tu_device*, void*, unsigned long,
VkPipelineShaderStageCreateInfo const*, tu_shader_key const*,
pipe_shader_type) ../src/freedreno/vulkan/tu_shader.cc:116
waydroid#9 0x7fa8646f24 in tu_compile_shaders(tu_device*, unsigned long,
VkPipelineShaderStageCreateInfo const**, nir_shader**,
tu_shader_key const*, tu_pipeline_layout*, unsigned char const*,
tu_shader**, char**, void*, nir_shader**, VkPipelineCreationFeedback*)
../src/freedreno/vulkan/tu_shader.cc:2741
waydroid#10 0x7fa85a16a4 in tu_pipeline_builder_compile_shaders
../src/freedreno/vulkan/tu_pipeline.cc:1887
waydroid#11 0x7fa85eb844 in tu_pipeline_builder_build<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:3923
#12 0x7fa85e6bd8 in tu_graphics_pipeline_create<(chip)7>
../src/freedreno/vulkan/tu_pipeline.cc:4203
#13 0x7fa85c2588 in VkResult
tu_CreateGraphicsPipelines<(chip)7>(VkDevice_T*,
VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*,
VkAllocationCallbacks const*, VkPipeline_T**)
../src/freedreno/vulkan/tu_pipeline.cc:4234
```
seen in:
dEQP-VK.binding_model.mutable_descriptor.single.switches.uniform_texel_buffer_storage_image.update_write.no_source.no_source.pool_expand_types.pre_update.no_array.vert
Fixes: 7e986e5 ("nir/lower_mediump_vars: Don't lower mediump shared vars with atomic access.")
Signed-off-by: Karmjit Mahil <[email protected]>
(cherry picked from commit 2a7df33)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32119>
atmouse-
pushed a commit
to atmouse-/android_external_mesa3d
that referenced
this pull request
Mar 27, 2025
This change prevents the reuse of the bo when the counter is already zero. At zero, the bo is in a state where the deletion is pending, and this implementation relying on an atomic counter can't be safely stopped. In other words, the previous fix ccd3bb4 lower the probability of this race condition, but doesn't fix it. This change prevents a race condition which has a high probability on r600 with the test below. This change was tested with the thread sanitizer. For instance, this issue is triggered on r600 with "piglit/bin/ext_image_dma_buf_import-refcount-multithread -auto": ==9876==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000021a20 at pc 0x7f2c9f59f748 bp 0x7f2c8f3aa600 sp 0x7f2c8f3aa5f8 READ of size 4 at 0x60d000021a20 thread T6 #0 0x7f2c9f59f747 in pipe_is_referenced ../src/gallium/auxiliary/util/u_inlines.h:65 waydroid#1 0x7f2c9f59f747 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:342 waydroid#2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794 waydroid#3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571 waydroid#4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146 waydroid#5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163 waydroid#6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459 waydroid#7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226 waydroid#8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532 waydroid#9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639 waydroid#10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92 waydroid#11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578 0x60d000021a20 is located 0 bytes inside of 144-byte region [0x60d000021a20,0x60d000021ab0) freed by thread T5 here: #0 0x7f2ca8b2b4f7 in free (/usr/lib64/libasan.so.6+0xb14f7) waydroid#1 0x7f2c9f59efb3 in radeon_bo_destroy ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:401 waydroid#2 0x7f2c9f63b541 in radeon_bo_reference ../src/gallium/include/winsys/radeon_winsys.h:794 waydroid#3 0x7f2c9f63b541 in r600_texture_destroy ../src/gallium/drivers/r600/r600_texture.c:571 waydroid#4 0x7f2c9d65662d in pipe_resource_destroy ../src/gallium/auxiliary/util/u_inlines.h:146 waydroid#5 0x7f2c9d65662d in pipe_resource_reference ../src/gallium/auxiliary/util/u_inlines.h:163 waydroid#6 0x7f2c9d65662d in st_FreeTextureImageBuffer ../src/mesa/state_tracker/st_cb_texture.c:459 waydroid#7 0x7f2c9d5b6991 in _mesa_delete_texture_image ../src/mesa/main/teximage.c:226 waydroid#8 0x7f2c9d5f2593 in _mesa_delete_texture_object ../src/mesa/main/texobj.c:532 waydroid#9 0x7f2c9d5f2be7 in _mesa_reference_texobj_ ../src/mesa/main/texobj.c:639 waydroid#10 0x7f2c9d5f3773 in _mesa_reference_texobj ../src/mesa/main/texobj.h:92 waydroid#11 0x7f2c9d5f3773 in delete_textures ../src/mesa/main/texobj.c:1578 previously allocated by thread T6 here: #0 0x7f2ca8b2b9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7) waydroid#1 0x7f2c9f5a36d5 in radeon_winsys_bo_from_handle ../src/gallium/winsys/radeon/drm/radeon_drm_bo.c:1198 waydroid#2 0x7f2c9f641b2a in r600_texture_from_handle ../src/gallium/drivers/r600/r600_texture.c:1105 waydroid#3 0x7f2c9d47550a in dri_create_image_from_winsys ../src/gallium/frontends/dri/dri2.c:1007 waydroid#4 0x7f2c9d47eeb9 in dri2_from_dma_bufs ../src/gallium/frontends/dri/dri2.c:1629 waydroid#5 0x7f2ca8854360 in dri2_create_image_dma_buf ../src/egl/drivers/dri2/egl_dri2.c:2564 waydroid#6 0x7f2ca8854f45 in dri2_create_image_khr ../src/egl/drivers/dri2/egl_dri2.c:2817 waydroid#7 0x7f2ca8846f2c in dri2_create_image ../src/egl/drivers/dri2/egl_dri2.c:1864 waydroid#8 0x7f2ca87f9dd8 in _eglCreateImageCommon ../src/egl/main/eglapi.c:1850 Fixes: ccd3bb4 ("winsys/radeon: fix a race between bo import and destroy") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit c6bcf88) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
atmouse-
pushed a commit
to atmouse-/android_external_mesa3d
that referenced
this pull request
Apr 17, 2025
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 836 byte(s) in 1 object(s) allocated from:
#0 0xb71eb6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
waydroid#1 0xaefadc78 in slab_add_new_page ../src/util/slab.c:179
waydroid#2 0xaefadc78 in slab_alloc ../src/util/slab.c:221
waydroid#3 0xaef7d461 in i915_texture_transfer_map ../src/gallium/drivers/i915/i915_resource_texture.c:789
waydroid#4 0xac9e931e in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:555
waydroid#5 0xac9e931e in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
waydroid#6 0xad49c5e4 in readpixels_memcpy ../src/mesa/main/readpix.c:260
waydroid#7 0xad49c5e4 in _mesa_readpixels ../src/mesa/main/readpix.c:898
waydroid#8 0xad5d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
waydroid#9 0xad4a0caf in read_pixels ../src/mesa/main/readpix.c:1199
waydroid#10 0xad4a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
waydroid#11 0xad4a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
or "piglit/bin/fcc-read-to-pbo-after-clear -auto":
Direct leak of 772 byte(s) in 1 object(s) allocated from:
#0 0xb726b6f2 in malloc (/usr/lib/libasan.so.6+0xb26f2)
waydroid#1 0xaf0adc88 in slab_add_new_page ../src/util/slab.c:179
waydroid#2 0xaf0adc88 in slab_alloc ../src/util/slab.c:221
waydroid#3 0xaf07aad7 in i915_buffer_transfer_map ../src/gallium/drivers/i915/i915_resource_buffer.c:75
waydroid#4 0xad10de74 in pipe_buffer_map_range ../src/gallium/auxiliary/util/u_inlines.h:398
waydroid#5 0xad10de74 in _mesa_bufferobj_map_range ../src/mesa/main/bufferobj.c:499
waydroid#6 0xad5677ce in _mesa_map_pbo_dest ../src/mesa/main/pbo.c:308
waydroid#7 0xad59be3b in _mesa_readpixels ../src/mesa/main/readpix.c:894
waydroid#8 0xad6d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
waydroid#9 0xad5a0caf in read_pixels ../src/mesa/main/readpix.c:1199
waydroid#10 0xad5a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
waydroid#11 0xad5a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
Fixes: e7a73b7 ("gallium: switch drivers to the slab allocator in src/util")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
atmouse-
pushed a commit
to atmouse-/android_external_mesa3d
that referenced
this pull request
Apr 17, 2025
For instance, this issue is triggered with "piglit/bin/glx-multithread-texture -auto -fbo":
Direct leak of 256 byte(s) in 1 object(s) allocated from:
#0 0xb71eda62 in __interceptor_realloc (/usr/lib/libasan.so.6+0xb2a62)
waydroid#1 0xadd5a32f in tokens_expand ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:239
waydroid#2 0xadd5a32f in get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:262
waydroid#3 0xadd62519 in copy_instructions ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2079
waydroid#4 0xadd62519 in ureg_finalize ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2129
waydroid#5 0xadd64bde in ureg_get_tokens ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2206
waydroid#6 0xade377d0 in nir_to_tgsi_options ../src/gallium/auxiliary/nir/nir_to_tgsi.c:4043
waydroid#7 0xade3da63 in nir_to_tgsi ../src/gallium/auxiliary/nir/nir_to_tgsi.c:3831
waydroid#8 0xaeb606c9 in i915_create_vs_state ../src/gallium/drivers/i915/i915_state.c:662
waydroid#9 0xac781a2c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:720
waydroid#10 0xac78e8a4 in st_get_common_variant ../src/mesa/state_tracker/st_program.c:773
waydroid#11 0xac78fc10 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1259
#12 0xac78fc10 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345
#13 0xac790b1a in st_program_string_notify ../src/mesa/state_tracker/st_program.c:1378
#14 0xace457a9 in _mesa_get_fixed_func_vertex_program ../src/mesa/main/ffvertex_prog.c:1397
#15 0xac5ef8db in update_program ../src/mesa/main/state.c:281
#16 0xac5f0ece in _mesa_update_state_locked ../src/mesa/main/state.c:560
#17 0xac5f1653 in _mesa_update_state ../src/mesa/main/state.c:593
#18 0xacdf9fe2 in _mesa_DrawArrays ../src/mesa/main/draw.c:1403
Fixes: 487a493 ("i915g: Add support for per-vertex point size.")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
atmouse-
pushed a commit
to atmouse-/android_external_mesa3d
that referenced
this pull request
Apr 17, 2025
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -fbo":
Direct leak of 16400 byte(s) in 5 object(s) allocated from:
#0 0xb720689a in __interceptor_calloc (/usr/lib/libasan.so.6+0xb289a)
waydroid#1 0xaf10f896 in draw_create_fragment_shader ../src/gallium/auxiliary/draw/draw_fs.c:47
waydroid#2 0xaef64619 in i915_create_fs_state ../src/gallium/drivers/i915/i915_state.c:550
waydroid#3 0xae16a955 in ureg_create_shader ../src/gallium/auxiliary/tgsi/tgsi_ureg.c:2194
waydroid#4 0xae17f45f in ureg_create_shader_with_so_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:150
waydroid#5 0xae17f45f in ureg_create_shader_and_destroy ../src/gallium/auxiliary/tgsi/tgsi_ureg.h:159
waydroid#6 0xae17f45f in util_make_fs_blit_zs ../src/gallium/auxiliary/util/u_simple_shaders.c:365
waydroid#7 0xaf13300e in blitter_get_fs_texfetch_depth ../src/gallium/auxiliary/util/u_blitter.c:1157
waydroid#8 0xaf13300e in util_blitter_cache_all_shaders ../src/gallium/auxiliary/util/u_blitter.c:1322
waydroid#9 0xaef6b738 in i915_create_context ../src/gallium/drivers/i915/i915_context.c:233
waydroid#10 0xacb33c49 in st_api_create_context ../src/mesa/state_tracker/st_manager.c:986
waydroid#11 0xac845740 in dri_create_context ../src/gallium/frontends/dri/dri_context.c:178
#12 0xac854d97 in driCreateContextAttribs ../src/gallium/frontends/dri/dri_util.c:631
#13 0xb6ce79a3 in dri2_create_context_attribs ../src/glx/dri2_glx.c:240
#14 0xb6c9606f in dri_common_create_context ../src/glx/dri_common.c:665
#15 0xb6ca4f00 in CreateContext ../src/glx/glxcmds.c:322
#16 0xb6ca5c0b in glXCreateNewContext ../src/glx/glxcmds.c:1449
Fixes: 1a69b50 ("i915g: Fix point sprites.")
Signed-off-by: Patrick Lerda <[email protected]>
Reviewed-by: Emma Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570>
warlice
pushed a commit
to openfde/waydroid_android_external_mesa3d
that referenced
this pull request
May 19, 2025
…er path
A last memory leak related to constants_remap_table is happening.
This memory leak is triggered by two deqp-gles2 tests.
For instance, this issue is triggered with
"deqp-gles2 --deqp-case=dEQP-GLES2.functional.uniform_api.random.13":
Direct leak of 336 byte(s) in 1 object(s) allocated from:
#0 0x7f1b4a5de7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef)
waydroid#1 0x7f1b401a2cdf in rc_remove_unused_constants ../src/gallium/drivers/r300/compiler/radeon_remove_constants.c:101
waydroid#2 0x7f1b40185386 in rc_run_compiler_passes ../src/gallium/drivers/r300/compiler/radeon_compiler.c:476
waydroid#3 0x7f1b40185625 in rc_run_compiler ../src/gallium/drivers/r300/compiler/radeon_compiler.c:498
waydroid#4 0x7f1b401c14d2 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:172
waydroid#5 0x7f1b401b669a in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516
waydroid#6 0x7f1b401baf73 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:592
waydroid#7 0x7f1b40128db7 in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1071
waydroid#8 0x7f1b3e67799d in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1073
waydroid#9 0x7f1b3e680285 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1119
waydroid#10 0x7f1b3e6812fa in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1284
waydroid#11 0x7f1b3e6812fa in st_finalize_program ../src/mesa/state_tracker/st_program.c:1363
#12 0x7f1b3f13d501 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:754
#13 0x7f1b3f13d501 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:990
#14 0x7f1b3efeef75 in link_program ../src/mesa/main/shaderapi.c:1336
#15 0x7f1b3efeef75 in link_program_error ../src/mesa/main/shaderapi.c:1445
Fixes: 29df857 ("r300: fix constants_remap_table memory leak")
Signed-off-by: Patrick Lerda <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28522>
(cherry picked from commit 24a5165)
warlice
pushed a commit
to openfde/waydroid_android_external_mesa3d
that referenced
this pull request
May 19, 2025
The pointer "xfb" is allocated with a clone of "so->nir" and lost without further processing. The function panfrost_shader_compile() was the one processing "xfb". The call of this function was removed with the commit 40372bd. This makes "xfb" not required anymore. For instance, this issue is triggered on a Mali-T820 with "piglit/bin/arb_transform_feedback2-change-objects-while-paused -auto": Indirect leak of 32776 byte(s) in 1 object(s) allocated from: #0 0xf78f30a6 in malloc (/usr/lib/libasan.so.6+0x840a6) waydroid#1 0xee9cd4ee in ralloc_size ../src/util/ralloc.c:118 waydroid#2 0xee9cf7ae in create_slab ../src/util/ralloc.c:801 waydroid#3 0xee9cf7ae in gc_alloc_size ../src/util/ralloc.c:840 waydroid#4 0xef74ab82 in nir_undef_instr_create ../src/compiler/nir/nir.c:888 waydroid#5 0xef76212c in clone_ssa_undef ../src/compiler/nir/nir_clone.c:328 waydroid#6 0xef76212c in clone_instr ../src/compiler/nir/nir_clone.c:438 waydroid#7 0xef7642d8 in clone_block ../src/compiler/nir/nir_clone.c:501 waydroid#8 0xef7642d8 in clone_cf_list ../src/compiler/nir/nir_clone.c:555 waydroid#9 0xef7657dc in clone_function_impl ../src/compiler/nir/nir_clone.c:632 waydroid#10 0xef766cb8 in nir_shader_clone ../src/compiler/nir/nir_clone.c:743 waydroid#11 0xf007673e in panfrost_create_shader_state ../src/gallium/drivers/panfrost/pan_shader.c:434 #12 0xeeb6766c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:781 #13 0xeeb71d1c in st_get_common_variant ../src/mesa/state_tracker/st_program.c:834 #14 0xeeb72ea2 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1320 #15 0xeeb72ea2 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1421 #16 0xef3806ec in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:748 #17 0xef3806ec in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:984 #18 0xef2992f6 in link_program ../src/mesa/main/shaderapi.c:1336 #19 0xef2992f6 in link_program_error ../src/mesa/main/shaderapi.c:1445 Fixes: 40372bd ("panfrost: Implement a disk cache") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28743> (cherry picked from commit 4f5e9a2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrading to mesa-24.2.5 required during compiling LineageOS 20 image for Waydroid. I haven't tested it on LineageOS 18.1 yet. But, i think it would be help for someone else to build LineageOS 20/Android images.