Chia-I Wu
3163e637f4
util/perf: fix multiple tracepoints in a scope
...
Fixes
"../src/util/perf/cpu_trace.h:32:8: error: redefinition of ‘_mesa_trace_scope___LINE__’"
This should work until someone wants multiple MESA_TRACE_SCOPE on the
same line :)
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260 >
2022-08-26 21:47:44 +00:00
Chia-I Wu
022cd156d4
util/perf: add cpu_trace.h
...
Move MESA_TRACE_* to the new file.
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260 >
2022-08-26 21:47:44 +00:00
Chia-I Wu
19b7d5284b
util/perf: move u_perfetto to here
...
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260 >
2022-08-26 21:47:44 +00:00
David Heidelberg
fc410b024d
ci: use shellcheck for .gitlab-ci/container/ directory
...
It checks our CI shell code in `debian-build-testing` job.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574 >
2022-08-26 21:20:14 +00:00
David Heidelberg
c90b433f18
ci: make shellcheck happy about .gitlab-ci/container/ directory
...
Makes easier do changes, when shellcheck is warning-free.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574 >
2022-08-26 21:20:14 +00:00
David Heidelberg
9563cd7d7c
ci: move lava-test into debian-build-testing
...
Should speed up the debian-testing job by a few seconds.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574 >
2022-08-26 21:20:14 +00:00
David Heidelberg
26bfea1a7d
ci: rename debian-gallium to debian-build-testing
...
This should provide a more accurate description of the task
and allow us to offload some minor checks into it.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574 >
2022-08-26 21:20:14 +00:00
Rob Clark
9da5b2c1f5
freedreno: Add support for upload transfers
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18258 >
2022-08-26 20:48:36 +00:00
Rob Clark
4703efd23f
freedreno/drm: Add offset param for fd_bo_upload()
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18258 >
2022-08-26 20:48:36 +00:00
Rob Clark
a9e79dd88a
freedreno/drm: Let backend hint about upload vs map
...
For the virtgpu backend, immediately mmap'ing a buffer can be expensive
(ie. require a sync with host), so for small transfers we'd prefer to go
the upload path.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18258 >
2022-08-26 20:48:36 +00:00
Rob Clark
808ad6621e
freedreno/a6xx: Random indent fixes
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18258 >
2022-08-26 20:48:36 +00:00
Karol Herbst
e291e05794
nv50: fix code heap after pipe_shader_enum change
...
Instead of keying the shader heaps with the TGSI enum, do it with our nv50
one, so we won't run into issues like this in the future.
Fixes: 27f46465c7
("gallium/tgsi: reorder pipe shader type defines.")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18236 >
2022-08-26 18:45:09 +00:00
Chia-I Wu
b1cb764316
ir3: fix predicate splitting in scheduler
...
Fix up src->def->instr, not src->instr.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7014
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18096 >
2022-08-26 17:36:18 +00:00
Mike Blumenkrantz
e9e81bf5f3
lavapipe: delete some code
...
now that the descriptor structs are flattened, more code can be deleted
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
6a01053bb2
lavapipe: create gallium descriptor image/sampler view types for views
...
this simplifies handling pipe_sampler_view and pipe_image_view by creating
them at the time the view is created, thus enabling the lifetime of samplerview
objects to be managed by the object that owns them instead of everywhere
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
be2185aa49
lavapipe: apply VK_WHOLE_SIZE to bufferviews at creation
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
6212cff00a
lavapipe: use gallium buffer descriptor types directly
...
this cleans up a bit of code
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
b7b7da9769
lavapipe: delete lvp_buffer::offset
...
this was always 0
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
4e797b1346
lavapipe: use pipe_sampler_state directly in descriptor info
...
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
832af7776b
lavapipe: replace lvp_sampler internals with pipe_sampler_state
...
less indirection, less code
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
78495ffaf9
lavapipe: remove lvp_sampler::state
...
I don't know what this was for but it's not doing anything now
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
cb48612355
lavapipe: use cso for compute samplers too
...
somehow I missed this?
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Mike Blumenkrantz
7dd32b449d
lavapipe: stop tracking descriptor image layout
...
this is unused
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740 >
2022-08-26 16:02:03 +00:00
Rhys Perry
636450c274
aco: allow direct_fetch=true for vec4 VS input loads
...
This seems to be a (mostly harmless) mistake from 369b8cffea
.
fossil-db (navi21):
Totals from 15 (0.01% of 135636) affected shaders:
Instrs: 1992 -> 1999 (+0.35%)
Latency: 13557 -> 13567 (+0.07%); split: -0.24%, +0.31%
InvThroughput: 4059 -> 4065 (+0.15%); split: -0.20%, +0.34%
Copies: 186 -> 193 (+3.76%)
fossil-db (polaris10):
Totals from 5 (0.00% of 135610) affected shaders:
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rhys Perry
030d6f873e
aco: don't expand vec3 VS input load to vec4 on GFX6
...
Removes the (small) possibility of invalid memory access.
fossil-db (pitcairn):
Totals from 35456 (26.15% of 135610) affected shaders:
MaxWaves: 259508 -> 260642 (+0.44%); split: +0.44%, -0.01%
Instrs: 7915383 -> 7965774 (+0.64%); split: -0.09%, +0.72%
CodeSize: 37163748 -> 37524804 (+0.97%); split: -0.04%, +1.01%
SGPRs: 1515128 -> 1513576 (-0.10%); split: -0.27%, +0.17%
VGPRs: 1218376 -> 1211160 (-0.59%); split: -0.71%, +0.12%
SpillSGPRs: 1152 -> 1144 (-0.69%)
Latency: 83777626 -> 83867137 (+0.11%); split: -0.61%, +0.72%
InvThroughput: 25722445 -> 25727745 (+0.02%); split: -0.23%, +0.25%
VClause: 232058 -> 230464 (-0.69%); split: -2.53%, +1.84%
SClause: 322579 -> 322108 (-0.15%); split: -0.76%, +0.61%
Copies: 547032 -> 547954 (+0.17%); split: -1.83%, +2.00%
Branches: 72538 -> 72542 (+0.01%)
PreVGPRs: 898453 -> 897584 (-0.10%); split: -0.13%, +0.03%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rhys Perry
3c63ef0c98
radv/llvm: fix packed VS inputs on GFX6/GFX10+
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rhys Perry
3260844448
aco: fix 16-bit VS inputs
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 3fba5bb9cc
("aco: implement 16-bit vertex fetches with tbuffer_load_format_d16_*")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rhys Perry
9ae13a9bd3
radv: fix 16-bit support in radv_lower_vs_input
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: b366fef091
("radv: optimize the number of loaded components for VS inputs in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rhys Perry
82f9e40851
radv: remove claimed support for sRGB vertex buffer formats
...
These probably don't work.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225 >
2022-08-26 15:28:55 +00:00
Rob Clark
83f983ccda
Revert "ci: disable the freedreno farm."
...
Should be back now
This reverts commit bc2e1a3ed6
.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18277 >
2022-08-26 15:04:22 +00:00
Brian Paul
1d915cd702
st_pbo/compute: fix memset() warning
...
Using memset() to zero a few sequential fields in gl_pixelstore_attrib
is a bit dodgy (what if someone were to add/reorder fields?). And gcc
emits a warning in optimized builds:
In function ‘memset’,
inlined from ‘copy_converted_buffer’ at ../src/mesa/state_tracker/st_pbo_compute.c:1038:7,
inlined from ‘st_GetTexSubImage_shader’ at ../src/mesa/state_tracker/st_pbo_compute.c:1146:7:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: warning: ‘__builtin_memset’ offset [9, 24] from the object at ‘packing’ is out of the bounds of referenced subobject ‘RowLength’ with type ‘int’ at offset 4 [-Warray-bounds]
71 | return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Just replace the memset with ordinary assignments.
Signed-off-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18261 >
2022-08-26 14:37:44 +00:00
Samuel Pitoiset
cbd59647a8
radv: move determining NGG shader info to radv_fill_shader_info()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
45f04dae75
radv: move more MS info to gather_shader_info_ms()
...
Only the workgroup size computation remains at the same place, but I
think it should be computed in a separate helper later.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
cae4eb2904
radv: move more CS info to gather_shader_info_cs()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
ac47d149c6
radv: add gather_shader_info_task() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
2ed573efeb
radv: add gather_shader_info_cs() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
6554cee7b7
radv: add gather_shader_info_vs() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
ba11aeca6b
radv: add gather_shader_info_tcs() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
4cec1f130b
radv: add gather_shader_info_tes() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
f70a0d12da
radv: add gather_shader_info_gs() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
f52b0dec3b
radv: add gather_shader_info_mesh() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
4a2ebd6076
radv: add gather_shader_info_fs() helper
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
4571126d26
radv: move filling cs.block_size
...
This is used for compute and task shaders and will help for adding
new helpers.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
6f244ae9ad
radv: stop gathering info for FS before other stages
...
This is no longer needed.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
31dc03e21e
radv: link primitive ID/clip distance shader info from the new helper
...
No functional changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
96b9d9f081
radv: add a helper that links shader info between stages
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
8c6a252c74
radv: remove redundant VS output parameter assignments
...
assign_outinfo_params() should already assign them.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
2d0500d24a
radv: fill radv_vs_output_info unconditionally for vertex related stages
...
That shouldn't change anything for VS as LS (or as ES) and for
TES as ES because radv_vs_output_info is only used by the last
vertex stage. So, if we have TES+GS, radv_vs_output_info for TES
will be overwritten by GS. This allows to decouple the shader info
pass from other stages.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
ee5b9bcc57
radv: stop duplicating radv_vs_output_info
...
Only the last vertex stage needs to access this.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00
Samuel Pitoiset
45a0276cd1
radv/llvm: remove unused parameter in handle_vs_outputs_post()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18210 >
2022-08-26 14:07:09 +00:00