Chia-I Wu
2dc10165a1
turnip: base pipeline draw costs on colorWriteMask
...
drawcall_base_cost estimates the memory bandwidth per sample.
colorWriteMask should be more accurate than fs outputs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16733 >
2022-06-08 12:48:08 +00:00
Chia-I Wu
6fe7b92114
turnip: if-checks autotune debug macros
...
This avoids bitrot while the compiler can easily optimize away those
checks.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16733 >
2022-06-08 12:48:08 +00:00
Marek Olšák
b7cb4d4f6f
radeonsi: set the max UBO size same as the max SSBO size
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:20 +00:00
Marek Olšák
b750844319
radeonsi: compute PIPE_CAP_MAX_TEXEL_BUFFER_ELEMENTS_UINT correctly
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:20 +00:00
Marek Olšák
aee8ee17a5
radeonsi: change max TBO/SSBO sizes again and rework max alloc size
...
Allow 1/4 of the max heap size, but maximum of 512 MB on 32-bit
architectures.
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:20 +00:00
Marek Olšák
c1adb33a93
radeonsi: clamp against MAX_TEXEL_BUFFER_ELEMENTS correctly
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:20 +00:00
Marek Olšák
91e533c6aa
radeonsi: report correct maximum compute grid sizes
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:20 +00:00
Marek Olšák
ecda7be628
radeonsi: increase the max compute LDS size to 64KB for gfx7+
...
Reviewed-by: Mihai Preda <mhpreda@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16901 >
2022-06-08 10:23:19 +00:00
Matt Coster
0fbcaa4b3a
pvr: debug: Implement PVR_DEBUG variable
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16907 >
2022-06-08 10:51:37 +01:00
Matt Coster
7c615b4103
pvr: csbgen: Add *_unpack() functions for all generated struct types
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
4c0941f0d4
pvr: csbgen: Fix "local variable may be undefined" lints
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
9f8556a44a
pvr: csbgen: Replace map() and filter() with list comprehension
...
Guido originally wanted to drop these (along with reduce()) in 3.0, but
compromised to just recommending list comprehension instead [1].
[1]: https://www.artima.com/weblogs/viewpost.jsp?thread=98196
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
2285ddc720
pvr: csbgen: Isolate "main" function with __name__ check
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
a8b80c610b
pvr: csbgen: Add typing information
...
This is generally PEP-484 stuff, but there is one functional change.
The base class Node needed to have an add() method to allow typed
dynamic dispatch. This could have been decorated @abstractmethod, but
that would require an error-raising implementation on all leaf-type
nodes. Instead, I added a base implementation that just errors out with
information from the subclass instance.
As a simple optimization, subclass implementations of add() (instead of
raising the same (or similar) error) now call super().add() in the
case of invalid child nodes.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
f2de3716d8
pvr: csbgen: Remove unused function parameters
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
14ca712362
pvr: csbgen: Remove "dim" functionality from Group
...
This allowed for nested groups rendered as arrays. Support for this had
mostly been removed already; this removes the additional value to make
typing easier.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
6961c31938
pvr: csbgen: Cleanup imports
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
34a76ec4e6
pvr: csbgen: Make some loops more pythonic
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
b813ca5d3b
pvr: csbgen: Add a missing @staticmethod decorator
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Matt Coster
89d6a1cfe4
pvr: csbgen: Formatting pass (PEP-8 plus other minor changes)
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16884 >
2022-06-08 09:13:22 +00:00
Timur Kristóf
0280b526d5
radv: Implement mesh shader scratch ring.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
6056583ae1
ac/nir/ngg: Use variables for outputs without cross-invocation access.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
b664279755
ac/nir/ngg: Use mesh shader scratch ring when outputs don't fit LDS.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
304a0e948b
ac/nir/ngg: Clean up mesh shader output LDS layout.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
02c87e66e9
nir: Introduce new intrinsics for AMD specific mesh shader task ring.
...
The mesh shader task ring is a buffer in VRAM which we will use to
store some mesh shader outputs that don't fit into LDS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
b730f91247
radv: Implement task shader draw and payload rings.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
ac5ab8d227
ac: Add task shader ring information.
...
Similarly to tessellation rings information, move the task
rings info to ac_gpu_info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Timur Kristóf
086e499b47
ac: Add RDNA2 task+mesh shader draw packet opcodes.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16737 >
2022-06-08 08:43:51 +00:00
Karmjit Mahil
721fb18a38
pvr: Fix incorrect samples to cr_isp_aa_mode conversion.
...
This commit fixes the use of 'case 3' where 'case 4' should have
been.
Reported-by: Matt Coster <matt.coster@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16883 >
2022-06-08 08:35:44 +00:00
Karmjit Mahil
61db3154b4
pvr: Write immutable descriptor words in vkAllocateDescriptorSets().
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16883 >
2022-06-08 08:35:44 +00:00
Karmjit Mahil
81077a4c7d
pvr: Add csb enum helper funciton header.
...
A new header is introduced which groups all vk, uint, rogue types
to csb enum type conversions.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16883 >
2022-06-08 08:35:44 +00:00
Georg Lehmann
d8493e5310
radv, aco: Lower txf offset in NIR.
...
Foz-DB Navi21:
Totals from 384 (0.28% of 134913) affected shaders:
VGPRs: 29736 -> 29536 (-0.67%)
CodeSize: 2455796 -> 2452652 (-0.13%); split: -0.13%, +0.01%
MaxWaves: 6350 -> 6358 (+0.13%)
Instrs: 457743 -> 456273 (-0.32%); split: -0.33%, +0.01%
Latency: 6680266 -> 6730612 (+0.75%); split: -0.03%, +0.78%
InvThroughput: 1562936 -> 1599375 (+2.33%); split: -0.05%, +2.38%
VClause: 9258 -> 9291 (+0.36%); split: -0.14%, +0.50%
SClause: 15713 -> 15707 (-0.04%); split: -0.08%, +0.04%
Copies: 26878 -> 27021 (+0.53%); split: -0.03%, +0.56%
PreVGPRs: 27259 -> 27230 (-0.11%); split: -0.11%, +0.01%
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16869 >
2022-06-08 08:13:01 +00:00
Pierre-Eric Pelloux-Prayer
b81f05e94d
radeonsi: set size in si_texture_get_handle
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6507
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6491
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:47 +02:00
Pierre-Eric Pelloux-Prayer
bce227611d
va/surface: set the correct size in vaExportSurfaceHandle
...
The size must be the size of the total object, not the size
of the resource.
For instance, when using a single object for a multi-plane
format, the size of each plane should be equal to the size
of the underlying object to match libva's documentation:
/** Total size of this object (may include regions which are
* not part of the surface). */
uint32_t size;
Fixes: 13b79266e4
("frontend/va: Setting the size of VADRMPRIMESurfaceDescriptor")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:44 +02:00
Pierre-Eric Pelloux-Prayer
8c07d7cbdd
gallium: add size attribute to winsys_handle
...
This is needed at least for the VA-API frontend where the exporter
needs to know the total size of the object.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:42 +02:00
Pierre-Eric Pelloux-Prayer
baf0e66dae
gallium: update winsys_handle documentation
...
The function names are resource_***_handle, not textures_***_handles.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16813 >
2022-06-08 09:42:26 +02:00
Mike Blumenkrantz
cb5973a3dd
zink: only update layout when doing mixed zs attachment renderpass check
...
avoid doing any sort of extra work here and avoid multi-context weirdness
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900 >
2022-06-08 02:55:05 +00:00
Mike Blumenkrantz
8f9c21b15e
zink: break out of zs mixed layout update loop when work is done
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900 >
2022-06-08 02:55:05 +00:00
Jordan Justen
ffb0c97caf
intel: Build mi_builder_test whenever build-tests is set
...
Previously `install-intel-gpu-tests` controlled this, but now
`install-intel-gpu-tests` will only be used to decide if it should be
installed.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16902 >
2022-06-07 18:26:02 +00:00
Jason Ekstrand
04fae05f7d
lavapipe: Use vk_image_buffer_copy_layout
...
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
420717b2ce
panvk: Use vk_image_buffer_copy_layout
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
8d6b7eb5ce
radv: Use vk_image_buffer_copy_layout
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
c144030f7e
vulkan,radv: Steal some image offset/extent helpers from radv
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
81603e7dc2
anv: Use the common image<->buffer copy helper
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
80547e5379
vulkan: Add a helper for image<->buffer copies
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
ed0cd6f654
vulkan/format: Add a vk_format_get_aspect_format helper
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
69e4d39d18
vulkan,radv: Move vk_format_get_plane_format to common code
...
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:42 +00:00
Jason Ekstrand
1436fa55a6
radv: Use the common image offset/extent sanitize helpers
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:41 +00:00
Jason Ekstrand
2c2b3e68e1
vulkan,anv: Move the image offset/extent sanitize helpers to common code
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16873 >
2022-06-07 17:57:41 +00:00
Jason Ekstrand
4923458577
ttn: Populate the images/textures/samplers_used fields in shader_info
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6630
Fixes: 625b352f14
("nir: Set image_buffers and msaa_images in lower_samplers_as_deref")
Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16910 >
2022-06-07 17:18:39 +00:00