Danylo Piliaiev
40b7e5c48a
tu: C++-proofing: fix casting from void * fpermissive warnings
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
c618e2a2d4
tu: C++-proofing: Initialize tu_reg_value in-order by pack funcs
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
685dbce850
tu: C++-proofing: fix extension table initialization
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
e02e51df5b
tu: C++-proofing: fix designator initializer order
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
a8dc6fbf83
tu: C++-proof: do not goto over variables initialization
...
That is not permitted by C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
af3e075f05
tu: C++-proofing: various enum fixes
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
5430d10d06
tu: C++-proofing: fix struct initializers
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
8a0f1a6d70
tu: C++-proofing: fix offsetof with dynamic array index
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
1510b97c70
ir3: C++-proofing
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
485bdae420
freedreno/common: C++-proof freedreno_uuid.h
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
1600b310bc
vk/util: Generate defines to help casting structs with vk_find_struct
...
C++ doesn't like implicit casts from void *.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
de5c3900ca
vk/util: remove (void *) casts from vk_foreach_multi_draw macros
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
4d79703b91
vk/wsi: C++-proof wsi_common_drm.h
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
815960d88f
vk/vk_extension_gen: Make table struct initializable in C++ on older gcc
...
Before GCC 11.2 initializing anonymous struct with extensions gave:
error: too many initializers for 'vk_device_extension_table'
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
330b64d1d1
spirv: sort spirv_supported_capabilities
...
Makes easier for c++ driver to keep initializer in order.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
d60b551b90
util/format: Make format_table compatible with C++
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
24fca432ab
util/perf: C++-proof util/perf
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Konstantin Seurer
200e551cbb
nir/lower_shader_calls: Remat derefs before lowering resumes
...
Closes : #7923
cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20399 >
2023-03-24 14:55:37 +00:00
Samuel Pitoiset
af1bc7f4ce
radv: remove radv_pipeline::device completely
...
This is unecessary and this prevents using a ton of functions without
a radv_pipeline object.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22090 >
2023-03-24 13:48:40 +00:00
antonino
8e9262fefd
gallium: decompose quad strips into quads if supported
...
This changes gallium to decompose quad strips into quads instead of triangles
when the driver advertises support for them.
This should result in a more correct result when those are drawn
with the line raster primitve (avoids showing the diagonal line).
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21987 >
2023-03-24 13:11:12 +00:00
antonino
d4a6c97779
mesa: correctly allocate space for converted primtives
...
Previosuly it was assumed that primitives where always converted to
triangles if the driver did not support all primitives, however that's
not true for a driver that supports quads but not quad strips.
Fixes piglit spec@!opengl 1.1@dlist-fdo3129-01 on Panfrost
Fixes: dcbf2423d2 ("vbo/dlist: add vertices to incomplete primitives")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21987 >
2023-03-24 13:11:12 +00:00
Samuel Pitoiset
d9e68f4e40
radv: pass a radv_shader to radv_emit_dispatch_packets()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22102 >
2023-03-24 12:43:51 +00:00
Samuel Pitoiset
d07c81d87e
radv: move cs_regalloc_hang_bug to radv_shader_info
...
This is more like a shader property.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22102 >
2023-03-24 12:43:51 +00:00
Georg Lehmann
48ba17b823
amd: remove duplicate from .clang-format
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22077 >
2023-03-24 10:56:31 +00:00
Georg Lehmann
687b756073
aco: remove duplicates from .clang-format
...
The latest clang-format doesn't support this anymore.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22077 >
2023-03-24 10:56:31 +00:00
Lionel Landwerlin
9448c2628e
anv: add utrace support for queue debug utils
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:20 +02:00
Lionel Landwerlin
b868f22b46
anv: rename anv_utrace_flush_copy in anv_utrace_submit
...
We want to use this for submission of traces outside command buffers,
so it won't just execute copies of timestamp buffers.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:17 +02:00
Lionel Landwerlin
becfbb2a19
anv: fixup locking for utrace submission increments
...
This is supposed to happen under the device lock.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: e760c5b37b ("anv: add perfetto source")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:13 +02:00
Lionel Landwerlin
87a1d6423c
anv: fix incorrect utrace bo release
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: c67c9688c3 ("anv/utrace: use a bo pool for utrace buffers")
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:10 +02:00
Lionel Landwerlin
68bc4c56ff
intel/ds: rename frame timeline row to queue
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:08 +02:00
Lionel Landwerlin
1c64952e65
vulkan/runtime: also copy strings on queue debug utils
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:38:06 +02:00
Lionel Landwerlin
d55d74bb72
util/u_trace: move needs_cs_param option to tracepoints
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22006 >
2023-03-24 09:37:57 +02:00
Teng, Jin Chung
de8b14f8ea
d3d12: AV1 Dec - Set anchor_frame_idx only when large_scale_tile equals 1
...
Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com >
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22048 >
2023-03-24 01:51:07 +00:00
Teng, Jin Chung
2e4f2472cc
frontend/va: Add large_scale_tile from VADecPictureParameterBufferAV1
...
Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com >
Reviewed-by: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22048 >
2023-03-24 01:51:07 +00:00
Mike Blumenkrantz
14507927a6
zink: flag rp layout change if zsbuf usedness changes on dsa/fs state bind
...
this should (correctly) trigger the expected zsbuf elimination and
avoid hitting asserts
fixes #8679
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22086 >
2023-03-24 00:32:56 +00:00
Alyssa Rosenzweig
822090e802
panfrost: Remove Midgard RSD fields from Bifrost
...
These were removed and replaced by new Bifrost RSD fields, don't print the wrong
values. Harmless but noises up the decoding.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
c358c6cd43
panvk: Lower blending late
...
Since 50b82ca818 ("nir/lower_blend,agx,panfrost: Use lowered I/O"),
nir_lower_blend needs to be called after lowering I/O rather than before.
Furthermore, after lowering blend, we need (in general) to lower the resulting
load_output intrinsics. Now that we have a proper preprocess_nir hook, there is
a natural place in panvk_vX_shader to do this.
Fixes dEQP-VK.pipeline.blend.*
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
ecd29fdf38
pan/bi: Call pan_nir_lower_zs_store late
...
This will give the driver [notably, PanVK] a chance to lower dual source
blending without having the dual stores turned into store_combined_output_pan.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
24693d8a7c
pan/bi: Export bifrost_nir_lower_load_output
...
If new load_output are created after preprocessing NIR (namely, from blend
lowering in panvk), this lowering needs to be called to lower load_output to the
vendor intrinsic with conversion descriptor.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
f888994679
panfrost: Move panfrost_sysvals to GL driver
...
This shouldn't be used by anything else at this point.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
56288a7cfb
panvk: Remove unused function
...
Erroneously referencing sysvals.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
3e64b13193
panfrost: Move sysvals to GL driver struct
...
Only the GL driver produces/consumes these, they shouldn't be in the common
shader_info.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
ffb9919c2f
panfrost: Lower sysvals in GL
...
Drop the backend compiler sysval handling in favour of the pass in the GL
driver, bringing us into compliance with Ekstrand's rule.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
455a76f10a
panfrost: Add NIR-based sysval lowering pass
...
Add a NIR pass to lower all the sysvals seen in the GL driver to load_ubo
intrinsics. These load_ubo intrinsics will be pushed to uniforms by the backend
compiler as usual. This will let us remove all sysval handling from the backend
compilers.
This is a direct NIR port of the existing pan_sysvals.c infrastructure and the
consumers in the Midgard/Bifrost compilers. It aims to be bug-for-bug compatible
to ease bisection.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
3ec9b18332
panvk: Inline blend constants as syvals
...
Blend constants are sysvals, it's just that they can sometimes be inlined
depending on the pipeline state. The old "inline blend constant" pass is a
special case of the new "lower all sysvals" pass in panvk.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
819313ff99
panvk: Don't use vec4 for vertex_instance_offsets
...
Not needed with the new lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
5b3870d858
panvk: Lower sysvals in NIR
...
Per Ekstrand's Rule. This avoids the "fixed sysval" hack that Faith introduced
to get this behaviour with the GL sysval handling.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
f79697123e
panfrost: Remove stale TODO
...
While the text here is still nominally accurate, we should be seeing so few
shader variants at this point that the locking contention isn't a big deal.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
c65a9be421
panfrost: Preprocess shaders at CSO create time
...
Now the only passes that depend on the shader key can run late, so we can
preprocess ahead-of-time once and throw away the original shader. This reduces
the cost of shader variants, as well as deduplicates some lowering for
transform feedback shaders.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00
Alyssa Rosenzweig
683d1b6078
panfrost: Effectively lower gl_FragColor late
...
nir_lower_fragcolor takes the number of colour buffers as input, but it's an
early pass, so we don't want to use the key for it. Instead, we can overestimate
and then optimize out late with an easy pass.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20906 >
2023-03-23 23:53:46 +00:00