mesa/src/gallium/drivers/crocus
Patrick Lerda 6ee0bba3ae crocus: fix scratch_bos memory leak
This change is inspired from iris_destroy_context().

For instance, this issue is triggered with
"piglit/bin/glsl-1.50-gs-max-output -scan 1 20 -auto -fbo":
Direct leak of 320 byte(s) in 2 object(s) allocated from:
    #0 0x7f34fc769987 in calloc (/usr/lib64/libasan.so.6+0xb1987)
    #1 0x7f34f4fa168a in bo_calloc ../src/gallium/drivers/crocus/crocus_bufmgr.c:288
    #2 0x7f34f4fa168a in alloc_fresh_bo ../src/gallium/drivers/crocus/crocus_bufmgr.c:350
    #3 0x7f34f4fa168a in bo_alloc_internal ../src/gallium/drivers/crocus/crocus_bufmgr.c:419
    #4 0x7f34f4fe50a9 in crocus_get_scratch_space ../src/gallium/drivers/crocus/crocus_program.c:2678
    #5 0x7f34f55e8954 in crocus_upload_dirty_render_state ../src/gallium/drivers/crocus/crocus_state.c:6871
    #6 0x7f34f55e8954 in crocus_upload_render_state ../src/gallium/drivers/crocus/crocus_state.c:7812
    #7 0x7f34f5d9f680 in crocus_simple_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:332
    #8 0x7f34f5d9f680 in crocus_draw_vbo ../src/gallium/drivers/crocus/crocus_draw.c:438
    #9 0x7f34f1d2eeba in tc_call_draw_single ../src/gallium/auxiliary/util/u_threaded_context.c:3735
    #10 0x7f34f1d12e03 in batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:394
    #11 0x7f34f1d12e03 in tc_batch_execute ../src/gallium/auxiliary/util/u_threaded_context.c:445
    #12 0x7f34f1d22c9a in _tc_sync ../src/gallium/auxiliary/util/u_threaded_context.c:680
    #13 0x7f34f1d238f8 in tc_texture_map ../src/gallium/auxiliary/util/u_threaded_context.c:2754
    #14 0x7f34f120b9d9 in pipe_texture_map_3d ../src/gallium/auxiliary/util/u_inlines.h:579
    #15 0x7f34f120b9d9 in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:530
    #16 0x7f34f10d7355 in read_pixels ../src/mesa/main/readpix.c:1178
    #17 0x7f34f10d7355 in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1195
    #18 0x7f34f10d7e10 in _mesa_ReadPixels ../src/mesa/main/readpix.c:1210

Fixes: f3630548f1 ("f3630548f1da crocus: initial gallium driver for Intel gfx 4-7")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23019>
2023-05-16 13:44:13 +00:00
..
ci ci/crocus: Note a recent regression. 2023-04-25 22:36:15 +00:00
crocus_batch.c intel/compiler: Introduce a new brw_isa_info structure 2022-06-30 23:46:35 +00:00
crocus_batch.h util: Rename pipe_debug_callback to util_debug_callback 2022-04-01 01:52:43 +00:00
crocus_blit.c crocus: fix leak on gen4/5 stencil fallback blit path. 2022-02-21 10:21:56 +10:00
crocus_blorp.c blorp: Add a binding_table_offset_to_pointer helper 2022-03-09 09:18:59 +00:00
crocus_blt.c intel/genxml: Collapse leading underscores on prefixed value defines 2021-11-16 11:38:30 +00:00
crocus_bufmgr.c intel/crocus: do not redefine PAGE_SIZE 2022-11-14 20:13:20 +00:00
crocus_bufmgr.h intel: Share code to read render timestamp 2022-10-03 06:26:50 -07:00
crocus_clear.c crocus: don't quantize the clear value 2023-03-27 23:15:41 +00:00
crocus_context.c crocus: fix scratch_bos memory leak 2023-05-16 13:44:13 +00:00
crocus_context.h crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_defines.h
crocus_disk_cache.c intel/fs,vec4: Drop uniform compaction and pull constant support 2021-12-10 21:20:47 +00:00
crocus_draw.c intel/compiler: drop shader_info.h from compiler header 2021-12-07 23:59:58 +00:00
crocus_fence.c crocus: fix off-by-one error when clearing stale syncobjs 2022-10-25 00:47:39 +00:00
crocus_fence.h
crocus_fine_fence.c
crocus_fine_fence.h
crocus_formats.c crocus: disable Z16 unorm textures on pre-gen8 as well. 2021-06-30 00:53:55 +00:00
crocus_genx_macros.h
crocus_genx_protos.h crocus/gen8: add PMA fix from iris 2021-06-22 18:56:21 +00:00
crocus_monitor.c crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_monitor.h crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_perf.c crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_perf.h crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_performance_query.c crocus: sync performance monitor code with iris. 2022-08-19 05:21:52 +00:00
crocus_pipe.h gallium/iris/crocus: collapse a bunch of conversion functions. 2022-08-04 08:17:39 +00:00
crocus_pipe_control.c intel: move away from booleans to identify platforms 2021-11-08 16:48:06 +00:00
crocus_program.c intel: switch over to unified atomics 2023-05-15 16:32:21 +00:00
crocus_program_cache.c intel/compiler: Introduce a new brw_isa_info structure 2022-06-30 23:46:35 +00:00
crocus_query.c crocus: fix leak in query code. 2022-07-25 01:34:11 +00:00
crocus_resolve.c iris,crocus: Add proper way of assigning num_levels value 2023-04-19 10:25:55 +00:00
crocus_resource.c crocus: switch gen4/5 tiling flags to follow suggestions. 2023-02-14 01:31:46 +00:00
crocus_resource.h util: Rename pipe_debug_callback to util_debug_callback 2022-04-01 01:52:43 +00:00
crocus_screen.c glsl: Drop PIPE_SHADER_CAP_DFRACEXP_DLDEXP_SUPPORTED. 2023-04-06 02:32:01 +00:00
crocus_screen.h driconf/Intel: Add lower_depth_range_rate option workaround for Homerun Clash misrendering issue 2022-09-19 10:08:48 +00:00
crocus_state.c Revert "intel/compiler: make uses_pos_offset a tri-state" 2023-05-11 08:01:46 +00:00
crocus_todo.txt
driinfo_crocus.h driconf/Intel: Add lower_depth_range_rate option workaround for Homerun Clash misrendering issue 2022-09-19 10:08:48 +00:00
gen4_blorp_exec.h
meson.build crocus/meson: add dependency on libintel_dev also for versioned static libraries 2023-03-05 18:44:54 +00:00