Vinson Lee
edc63ad44c
nv50/ir: Initialize GCRA members in constructor.
...
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member nodes is not initialized in this
constructor nor in any functions that it calls.
uninit_member: Non-static class member nodeCount is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7522 >
2020-11-18 03:15:35 +00:00
Marek Olšák
602d4a78bc
radeonsi: handle pipe_draw_info::increment_draw_id
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
c4310f70aa
radeonsi: swap DrawId and StartInstance SGPR locations
...
We need to change both values at the same time, so they need to be next
to each other.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
f14a05d618
radeonsi: don't load DrawID for indirect draws if it's unused
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
cbb8090bea
mesa: don't FLUSH_VERTICES from primitive restart changes
...
It's now a draw state with no interactions with glBegin/End.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
51c7c64f0a
mesa: add primitive restart state to Driver.Draw parameters
...
so that display lists don't have to disable it and drivers are simpler.
This will also enable unification with Gallium.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
e8c0c80ecd
mesa: index _RestartIndex with index_size_shift
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
52c20a6eea
mesa: move primitive restart enablement determination from st/mesa to main
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
6dd8b6518e
mesa: remove constant drawID parameter from _mesa_draw_arrays
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
7a8880f871
mesa: clean up GLboolean types in draw.c
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
4656df5a65
mesa: clean up Driver.Draw parameter types
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
d6df35b304
gallium/u_threaded: add support for multi draws
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
52ad436740
gallium/u_threaded: store start/count in min/max_index for better packing
...
This increases the maximum number of draws per batch from 192 to 256.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
1cd455b17b
gallium: extend draw_vbo to support multi draws
...
Essentially rename multi_draw to draw_vbo and remove start and count
from pipe_draw_info.
This is only an interface change. It doesn't add multi draw support
anywhere.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:25 +00:00
Marek Olšák
80b391077f
gallium: add missing bits of the direct multi draw interface
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
f038fb60b4
gallium/u_threaded: improve draw merging by clearing pipe_draw_info fields
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
72ff53098c
gallium: add pipe_draw_info::index_bounds_valid
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
920bbfb3a0
gallium/u_threaded: clean up direct vs indirect draws
...
It's called draw_single because multi draws will use a different structure.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
d5b37dd3c2
gallium/u_threaded: lift DIV_ROUND_UP to eliminate it for constant expressions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
abe8ef862f
gallium: make pipe_draw_indirect_info * a draw_vbo parameter
...
This removes 8 bytes from pipe_draw_info (think u_threaded_context)
and a lot of info->indirect pointer indirections.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
1a717dca04
gallium: move count_from_stream_output into pipe_draw_indirect_info
...
This removes some overhead from tc_draw_vbo and increases the maximum number
of draws per batch from 153 to 192 in u_threaded_context.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Marek Olšák
238ee7b801
mesa: add Driver.DrawTransformFeedback
...
to remove some overhead from Driver.Draw.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441 >
2020-11-18 01:41:24 +00:00
Alejandro Piñeiro
c77409a87e
turnip: minor tu_queue fixes related to vk_base_object
...
Include:
* Missing call to tu_queue_finish
* Use the proper free method for device->queues
Fixes 5d3fdbc52b
Tested-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7663 >
2020-11-18 00:58:29 +00:00
Eric Anholt
008872aa30
turnip: Assert about the storage buffer offset alignment.
...
Giving us an unaligned pointer is invalid, and this helps switch a CTS bug
from being a flake to a consistent crash.
https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/2661
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7662 >
2020-11-18 00:38:02 +00:00
Michel Zou
fdfe4a4d30
libgl-gdi: add zink support
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Closes #3802
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7643 >
2020-11-18 00:03:12 +00:00
Michel Zou
eebcd6a502
zink: fix unused variable warning
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7643 >
2020-11-18 00:03:12 +00:00
Alejandro Piñeiro
3d1260aa91
v3dv: implement VK_EXT_private_data
...
Which is using base class's implementation.
Based on Hyunjun's commit d941c6b74f
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7627 >
2020-11-17 23:55:14 +00:00
Alejandro Piñeiro
30b6fbc496
v3dv: use the common base object type and struct
...
Used as reference Hyujun's commit
5d3fdbc52b
, that does the same for
turnip.
This commit also replaces in several cases alloc for zalloc, and adds
checks on more Destroy methods if the object to be free is NULL or
not. Most of them were needed to avoid crashes/weird behaviour due
trying to use un-initialized data. Note that now that vk_object_free
iterates over a array, making it more against un-initialized or just
NULL data.
Additionally, using zalloc we can also remove some memset to 0. In
fact we needed to remove them, as if not, they would override the
vk_object_base object to 0 (the alternative would me doing a memset
computing a pointer offset, but that's is not needed as we can just
use zalloc).
v2:
* Call memset(0) on reused descriptor sets when calling
ResetDescriptorPool, not when reallocating them (Iago)
* Add null check when calling DestroyImageView (detected by a full CTS run)
v3: Fixed rebase conflicts after last meta copy/clear changes
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7627 >
2020-11-17 23:55:14 +00:00
Marek Olšák
c3432ad852
radeonsi: add an option to enable 2x2 coarse shading for non-GUI elements
...
This is for experiments with VRS.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7646 >
2020-11-17 22:16:19 +00:00
Marek Olšák
c13370e816
amd: add register enums for VRS
...
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7646 >
2020-11-17 22:16:19 +00:00
Andres Gomez
f054a261a8
ci: update some radv trace checksums
...
After 16c756e55d
("spirv: reverse order in matrix multiplication")
some checksums for the radv driver remained to be updated.
v2:
- Correct typo (Mihai).
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7645 >
2020-11-17 21:54:18 +00:00
Andres Gomez
9b9d1db90e
ci: update some radv trace checksums
...
After 24a18b1a4b
("nir: scalarize fdot in reverse") some checksums
for the radv driver remained to be updated.
v2:
- Correct typo (Mihai).
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7645 >
2020-11-17 21:54:18 +00:00
Michel Zou
5195a30d27
util: fix -Wshift-count-overflow warning
...
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7392 >
2020-11-17 21:23:20 +00:00
Tony Wasserka
526405dfec
meson: Treat LLVM headers as a system dependency
...
This will suppress warnings from LLVM includes.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7632 >
2020-11-17 20:40:23 +00:00
Leo Liu
381824d14f
frontends/omx/av1: enable AV1 OMX Bellagio support
...
By adding name, role and profile to OMX decoder
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
f1b23d8299
frontends/omx/av1: add AV1 tasks management
...
This handles different task queues based on OMX bellagio
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
2874f87348
frontends/omx/av1: add AV1 OBU header parsers
...
Based on AV1 spec: https://aomediacodec.github.io/av1-spec
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
6ab3030f92
frontends/omx/bellagio: add AV1 initial support to omx dec
...
Also add bitstream base parser based on AV1 spec
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
7ed3028194
radeonsi: cap AV1 support to SIENNA CICHLID
...
since AV1 is avaiable from VCN3
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
33690167a4
radeonsi: cap AV1 codec configuration
...
This defines the support size to 8K and no interlaced buffer
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
d78821b3ba
radeon/vcn: fill up the probs buffer
...
with the segmetation data and mask
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
07a8d4634d
radeon/vcn: get AV1 message buffer
...
This passes parameters to firmware based on interface by frames.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
e08f6a1846
radeon/vcn: fill up the context buffer
...
with the mode tables, mv probs tables, and coef probs tables
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
057293a508
radeon/vcn: add AV1 context buffer
...
The context buffer will be filled up with the tables, and used
by firmware for decode
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
7e7e753d27
radeon/vcn: add AV1 default tables for the context
...
These tables will be used by firmware
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
9a46b1086f
radeon/vcn: add AV1 dpb buffer size
...
Just use the default size for now
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
6230407e82
radeon/vcn: add AV1 support to the decoder
...
This adds AV1 stream type to the AV1 decoder
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
80f145a0a7
radeon/vcn: add AV1 codec driver firmware interfaces
...
This collects parameters that firmware and hardware require for
the AV1 codec.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Leo Liu
0267a567f6
vl: add AV1 codec picture support
...
This adds AV1 video profile, format and picture description to vl.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596 >
2020-11-17 19:04:44 +00:00
Chad Versace
87dc3106b0
anv/image: Define anv_image_get_aux_addr (v3)
...
Simple refactor. No intended change in behavior.
Replace each derivation of aux address with anv_image_get_aux_addr().
The function will soon do more in support of
VK_EXT_image_drm_format_modifier, where the image bo and aux bo may be
disjoint.
v2:
- Replace param 'aspect' with 'plane'.
v3:
- Workaround for stencil ccs. If no aux surface, then return
ANV_NULL_ADDRESS.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v2)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v3)
2020-11-17 10:36:45 -08:00