mesa merge requestshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests2021-06-02T19:26:45Zhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11025i915: delete use_staging_texture assignment operation2021-06-02T19:26:45Zhexin.opi915: delete use_staging_texture assignment operationFixes: 1a69b50b3b4 ("i915g: Fix point sprites.")
Signed-off-by: Xin He <hexin.op@bytedance.com>Fixes: 1a69b50b3b4 ("i915g: Fix point sprites.")
Signed-off-by: Xin He <hexin.op@bytedance.com>https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13439ci: split out gallium/auxiliary to jobs that actually use the components2024-03-26T13:09:22ZMike Blumenkrantzci: split out gallium/auxiliary to jobs that actually use the componentsmost of these components aren't tested in ci, and some of them are only tested
by specific drivers, so try to be better about matching things up to avoid
needlessly running hardware jobs that do nothing but increase the failure rate
fix...most of these components aren't tested in ci, and some of them are only tested
by specific drivers, so try to be better about matching things up to avoid
needlessly running hardware jobs that do nothing but increase the failure rate
fixes #5511https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14277WIP: mesa/st: Turn on OptimizeForAOS on non-scalar NIR backends.2023-05-18T23:28:46ZEmma Anholtemma@anholt.netWIP: mesa/st: Turn on OptimizeForAOS on non-scalar NIR backends.Based on !14200, alternative to !14247. I think we should land this instead.
```
On i965 vec4 hardware (most of crocus), this lets the VS matrix multiplies
happen in parallel as independent DP4s to each dest channel, rather tha...Based on !14200, alternative to !14247. I think we should land this instead.
```
On i965 vec4 hardware (most of crocus), this lets the VS matrix multiplies
happen in parallel as independent DP4s to each dest channel, rather than a
serialized set of MADs with approximately the same instruction count.
Should be a perf regression fix from the crocus transition (from the
original commit, "Improves performance in Lightsmark by 1.01131% +/-
0.162069% (n = 10) on a Haswell GT2 system.").
i915g:
total instructions in shared programs: 396828 -> 396831 (<.01%)
instructions in affected programs: 159 -> 162 (1.89%)
r300:
total instructions in shared programs: 1226783 -> 1228308 (0.12%)
instructions in affected programs: 61920 -> 63445 (2.46%)
total temps in shared programs: 195902 -> 195850 (-0.03%)
temps in affected programs: 2393 -> 2341 (-2.17%)
hsw:
total instructions in shared programs: 8163635 -> 8154150 (-0.12%)
instructions in affected programs: 174076 -> 164591 (-5.45%)
```https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14396i915g: do not force staging texture off2022-01-29T20:43:34ZThomas Anderseni915g: do not force staging texture offThis code was introduced 10 years ago in
1a69b50b3b441ce8f7a00af3a7f02c37df50f6c3
It contains a check if staging texture should
be used, but then immediately after hard codes
it to off.
My guess is that this line was a leftover from
deb...This code was introduced 10 years ago in
1a69b50b3b441ce8f7a00af3a7f02c37df50f6c3
It contains a check if staging texture should
be used, but then immediately after hard codes
it to off.
My guess is that this line was a leftover from
debugging.
Fixes a dead assignment warninghttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26769i915g: Screen corruption with ENOBUFS caused by fence register shortage2024-03-26T12:35:17ZGKraatsi915g: Screen corruption with ENOBUFS caused by fence register shortageThe routines i915_fill_blit and i915_copy_blit at src/gallium/drivers/i915/i915_blit.c
checks, if executing of the command would cause shortage of fence
register, by calling i915_winsys_validate_buffers.
The first problem is that this ro...The routines i915_fill_blit and i915_copy_blit at src/gallium/drivers/i915/i915_blit.c
checks, if executing of the command would cause shortage of fence
register, by calling i915_winsys_validate_buffers.
The first problem is that this routine is not checking the last buffer.
The second problem is that the usage of the fence register at a buffer
is later set at OUT_RELOC_FENCED.
This causes exceeding of the limit of 14 available fence registers, if
all buffers at the batch are different.
At dual monitor this always causes loosing the current batchbuffer with error
ENOBUFS. If only 1 monitor is used the effective limit is 15 and it is
only aborting if the buffer needs 16 fence registers, which is only
possible if i915_copy_blit is the last command.
Loosing a batchbuffer causes screen corruption.
If mesa is compiled for debug, the running program will crash at an assert;
gnome-shell will logout.
The best solution would be the call to a libdrm-routine, which updates
the needed fence registers for each buffer before the validation, but
I didnot see such routine, so it should be added to libdrm, causing a
troublesome dependency.
This MR contains the fix with num_of_buffers at validation as described above.
It solves the problem at the blit-functions by checking the number of
fence-registers after updating the batch.
If too many registers are used,
the batch-entries and relocs for the current blit function are removed by
setting batch->ptr and reloc_count to value before the blit call and
calling drm_intel_gem_bo_clear_relocs.
This truncated batch is flushed,
and the batch is updated again for the current blit function.
This solution is simple and clear and hardly costs performance.
Another simple solution is maintaining a shadow-administration at the
blit-routines. For every call of a blit-routine it increments the
shadow-fence-count. If the shadow-fence-count > limit it flushes the
batch-buffer. The flush-routine has to reset shadow-fence-count to 0.
This solution supposes, that only the blit-routines are using
fence-registers.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6963
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6587https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27561i915g: Disable mipmaps for 2048×2048 textures2024-03-15T18:45:55ZBalló Györgyi915g: Disable mipmaps for 2048×2048 texturesTextures with size 2048×2048 are not supported.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10410Textures with size 2048×2048 are not supported.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10410https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27570i915: fix memory leaks x32024-02-12T12:20:24ZPatrick Lerdai915: fix memory leaks x3### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix slab_create() related memory leaks
For instance, this issue is triggered with "piglit/bin/fcc-blit-between-clears -auto -...### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix slab_create() related memory leaks
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)
#1 0xaefadc78 in slab_add_new_page ../src/util/slab.c:179
#2 0xaefadc78 in slab_alloc ../src/util/slab.c:221
#3 0xaef7d461 in i915_texture_transfer_map ../src/gallium/drivers/i915/i915_resource_texture.c:789
#4 0xac9e931e in pipe_texture_map ../src/gallium/auxiliary/util/u_inlines.h:555
#5 0xac9e931e in _mesa_map_renderbuffer ../src/mesa/main/renderbuffer.c:494
#6 0xad49c5e4 in readpixels_memcpy ../src/mesa/main/readpix.c:260
#7 0xad49c5e4 in _mesa_readpixels ../src/mesa/main/readpix.c:898
#8 0xad5d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
#9 0xad4a0caf in read_pixels ../src/mesa/main/readpix.c:1199
#10 0xad4a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
#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)
#1 0xaf0adc88 in slab_add_new_page ../src/util/slab.c:179
#2 0xaf0adc88 in slab_alloc ../src/util/slab.c:221
#3 0xaf07aad7 in i915_buffer_transfer_map ../src/gallium/drivers/i915/i915_resource_buffer.c:75
#4 0xad10de74 in pipe_buffer_map_range ../src/gallium/auxiliary/util/u_inlines.h:398
#5 0xad10de74 in _mesa_bufferobj_map_range ../src/mesa/main/bufferobj.c:499
#6 0xad5677ce in _mesa_map_pbo_dest ../src/mesa/main/pbo.c:308
#7 0xad59be3b in _mesa_readpixels ../src/mesa/main/readpix.c:894
#8 0xad6d8cfe in st_ReadPixels ../src/mesa/state_tracker/st_cb_readpixels.c:568
#9 0xad5a0caf in read_pixels ../src/mesa/main/readpix.c:1199
#10 0xad5a0caf in _mesa_ReadnPixelsARB ../src/mesa/main/readpix.c:1216
#11 0xad5a155b in _mesa_ReadPixels ../src/mesa/main/readpix.c:1231
Fixes: e7a73b75a0db ("gallium: switch drivers to the slab allocator in src/util")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
```
i915: fix nir_to_tgsi() related memory leak
i915: fix draw_create_fragment_shader() related memory leakhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27571i915: fix emit_hw_vertex() unbounded memory access2024-02-12T12:27:51ZPatrick Lerdai915: fix emit_hw_vertex() unbounded memory access### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix emit_hw_vertex() unbounded memory access
This change adds the DRAW_ATTR_NONEXIST functionality
which fixes the memory acc...### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix emit_hw_vertex() unbounded memory access
This change adds the DRAW_ATTR_NONEXIST functionality
which fixes the memory access issue.
For instance, this issue is triggered with "piglit/bin/glsl-routing -auto -fbo":
==8384==ERROR: AddressSanitizer: heap-use-after-free on address 0xa11dfd84 at pc 0xae573fbd bp 0xbf87f688 sp 0xbf87f67c
READ of size 4 at 0xa11dfd84 thread T0
#0 0xae573fbc in emit_hw_vertex ../src/gallium/drivers/i915/i915_prim_emit.c:92
#1 0xae574ab0 in emit_prim ../src/gallium/drivers/i915/i915_prim_emit.c:154
#2 0xae574ab0 in setup_tri ../src/gallium/drivers/i915/i915_prim_emit.c:160
#3 0xad65d322 in do_triangle ../src/gallium/auxiliary/draw/draw_pipe.c:173
#4 0xad65d322 in pipe_run_linear ../src/gallium/auxiliary/draw/draw_decompose_tmp.h:181
#5 0xad663375 in draw_pipeline_run_linear ../src/gallium/auxiliary/draw/draw_pipe.c:337
#6 0xad86d9ac in pipeline ../src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:476
#7 0xad86d9ac in llvm_pipeline_generic ../src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:701
#8 0xad86ed75 in llvm_middle_end_linear_run ../src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c:784
#9 0xad6aaaee in vsplit_segment_simple_linear ../src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h:223
#10 0xad6aaaee in vsplit_run_linear ../src/gallium/auxiliary/draw/draw_split_tmp.h:64
#11 0xad68a74b in draw_pt_arrays ../src/gallium/auxiliary/draw/draw_pt.c:161
#12 0xad68b7ca in draw_pt_arrays_restart ../src/gallium/auxiliary/draw/draw_pt.c:430
#13 0xad68b7ca in draw_instances ../src/gallium/auxiliary/draw/draw_pt.c:491
#14 0xad68ce0a in draw_vbo ../src/gallium/auxiliary/draw/draw_pt.c:628
#15 0xae5651d4 in i915_draw_vbo ../src/gallium/drivers/i915/i915_context.c:115
#16 0xae5651d4 in i915_draw_vbo ../src/gallium/drivers/i915/i915_context.c:51
#17 0xac7f50d3 in _mesa_draw_arrays ../src/mesa/main/draw.c:1204
Fixes: 247cee92df0e ("i915g: replace "uint" with normal uint32_t.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
```https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27572i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redun...2024-02-12T12:33:16ZPatrick Lerdai915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies
Indeed, this resource was assigned twice and w...### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix i915_set_vertex_buffers() related refcnt imbalance and remove redundancies
Indeed, this resource was assigned twice and was not properly freed.
For instance, this issue is triggered with:
"piglit/bin/glsl-fs-pointcoord -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Fixes: 0278d1fa323c ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
```https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27677i915: fix i915_texture_layout_2d() calculation2024-03-15T23:04:28ZPatrick Lerdai915: fix i915_texture_layout_2d() calculation### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix i915_texture_layout_2d() calculation
Indeed, nblocksy was calculated with width instead of height. This was
an issue on n...### What does this MR do and why?
<!-- Describe in detail what your merge request does and why. -->
```
i915: fix i915_texture_layout_2d() calculation
Indeed, nblocksy was calculated with width instead of height. This was
an issue on non-square textures. This change fixes around 16 piglit gpu
tests on my configuration.
Fixes: b1ed72ebe259 ("Move the remaining format pf_get_* functions to u_format.h.")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
```