Daniel Schürmann
13c55a8e86
radv: remove unnecessary copy of binary->config
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
fe716c2428
radv: separate radv_postprocess_binary_config() from radv_shader_create()
...
The goal is to make radv_shader_create() a function that creates a shader
from a binary without any additional information.
Postprocessing the config is only needed after compilation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Daniel Schürmann
0fec7819f4
radv: remove unused parameter from radv_open_rtld_binary()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22029 >
2023-03-24 19:03:29 +00:00
Patrick Lerda
68babdd227
r600: fix refcnt imbalance related to shader
...
Indeed, gs_copy_shader was not freed.
Fixes: commit 1371d65a7f
r600g: initial support for geometry shaders on evergreen (v2)
For instance, with "piglit/bin/shader_runner generated_tests/spec/arb_gpu_shader_int64/execution/built-in-functions/gs-abs-i64vec2.shader_test -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22087 >
2023-03-24 17:21:06 +00:00
José Roberto de Souza
8ec0cb120c
iris: Ajust gem buffer allocation size in Xe kmd
...
gem buffer size must also be aligned to mem_alignment otherwise
vm binds can fail when Xe kmd checks if vm bind range is bigger than
gem buffer size.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22059 >
2023-03-24 16:47:18 +00:00
José Roberto de Souza
a25ef68f68
iris: Implement gem_vm_bind() and gem_vm_unbind() in Xe kmd backend
...
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22059 >
2023-03-24 16:47:18 +00:00
José Roberto de Souza
c83a76339f
iris: Add vm bind and unbind to kmd backend
...
At this time this is a nop for i915 but in future we will have a
Xe implementation.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22059 >
2023-03-24 16:47:18 +00:00
José Roberto de Souza
db781f01d4
iris: Prepare iris_bufmgr functions for vm bind error paths
...
vm bind and unbind can fail, so error paths will be needed.
Here I'm just preparing the code paths for that.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22059 >
2023-03-24 16:47:18 +00:00
Samuel Pitoiset
879ddf9720
radv: rework binding shaders to cmdbuf by introducing new helpers
...
For future work.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22101 >
2023-03-24 16:21:49 +00:00
Danylo Piliaiev
b30f2bf790
tu: Generate entrypoints for each gen
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:26 +00:00
Danylo Piliaiev
3db70be04b
freedreno/regs: Include assert.h in generated headers
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:26 +00:00
Danylo Piliaiev
7e833713d8
vk/entry_points: Add option to generate template entrypoints
...
As a C++ alternative to genX 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:26 +00:00
Danylo Piliaiev
c82ddf4f98
tu: compile as 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:26 +00:00
Danylo Piliaiev
8baa7acd82
freedreno/msm: Rename drm_msm_gem_submit_reloc::or in C++ code
...
Clashes with C++ `or` keyword
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
ae47b4e937
tu: C++-proofing: misc 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
903072ea03
tu: C++-proofing: cast result when extracting field from reg value
...
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
28a703ea43
tu: C++-proofing: prevent taking address from rvalue
...
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
aec1e9ecf7
tu: C++-proofing: ease access to global bo struct
...
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
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