Mike Blumenkrantz
28386d0db5
zink: unconditionally support conditional rendering
...
this lets drivers that don't support the vk ext provide support
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12801 >
2021-09-14 03:30:49 +00:00
Mike Blumenkrantz
f54cde75d7
zink: fix dmabuf cap export
...
this requires a lot more than just one extension
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
9ec9289385
zink: add dmabuf fd handling
...
just gotta get it out of the underlying graphics layer
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
651def5896
zink: use foreign queue import for dmabufs
...
this is required to get image data
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
7d2de96847
zink: fix import pNext attachment during image creation
...
there's better checks for this now, so the weird pNext handling here
can be simplified
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
5b827b0a39
zink: handle image creation for dmabufs
...
these use PREINIT layout
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
2a63f38cb1
zink: set a flag for dmabuf init
...
this will be useful for barrier handling
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
3bd98d4bf6
zink: split import and export fd handle types
...
these can maybe be different
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
6f7fe12fd4
zink: hook up VK_EXT_queue_family_foreign
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
2b98fba806
zink: add dmabuf modifier query hooks for screen
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
b359950b0f
zink: hook up dmabuf ext
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
727e10d290
zink: use smallest int type possible for decompose shader key
...
this reduces the component key size for decomposition by up to 75%, down
to as low as 2 bytes, which is more optimal for both hashing and memcmp of
the key
it will become more useful as further changes are added to improve vertex format
support, enabling the keysize to remain relatively small
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz
1542f3eb47
zink: decompose vertex attribs into single components when not supported
...
this avoids vbuf in a lot more cases on radv where 3component attribs aren't supported
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Mike Blumenkrantz
c106c45a99
zink: add function for decomposing vertex format to single component
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12771 >
2021-09-14 01:55:56 +00:00
Marek Olšák
9df5ebe5bf
radeonsi: fix DCC image stores with image descriptors in user SGPRs
...
The bug workaround was not applied there.
Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
921c770d49
driconf: remove leftover code for allow_incorrect_primitive_id
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
a5ea2ef93e
radeonsi: copy a few nir_shader_compiler_options from RADV
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Marek Olšák
3d1ca01e41
radeonsi: fix DCC image stores with display DCC
...
Fixes: 34a2c75310 - radeonsi: enable DCC stores on gfx10.3 APUs for better performance
Tested-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12809 >
2021-09-13 22:23:27 +00:00
Kai Wasserbäch
d4f7337d14
fix(clover/llvm): update code to build with recent versions of LLVM 14 (Git)
...
`hasAttribute()` in `llvm::AttributeList` is gone, use `hasParamAttr()` instead.
This fixes an FTBFS.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12826 >
2021-09-13 22:10:49 +00:00
Jordan Justen
c7d8a69249
intel/devinfo: Add devinfo->max_scratch_ids
...
This consolidates several duplicated pieces of code into devinfo.
max_scratch_ids is an array that provides the max number of threads
for the rendering and compute stages.
This fixes some exceptions missed by crocus for scratch ids on haswell
and cherryview.
It also fills out devinfo->max_scratch_ids properly for stages VS
through CS on Gfx12.5. But, functionally this should not make a
difference as Gfx12.5 already uses COMPUTE for all stages.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799 >
2021-09-13 13:26:51 -07:00
Jordan Justen
32e848aeaa
intel: Move subslice_total into devinfo
...
Reworks:
* Move asserts for subslice_total into intel_device_info.c (s-b Ken)
* Drop now unused intel_device_info_subslice_total (s-b Ken)
* Add comment for subslice_total (Ken)
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12799 >
2021-09-13 13:26:23 -07:00
Emma Anholt
91dc863921
mesa: Move the advanced blend bitmask to shader_info.
...
For drivers that don't lower advanced blend to FBFETCH, we need the
bitmask to be in the NIR shader so that it gets carried over to TGSI
successfully.
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12813 >
2021-09-13 18:36:58 +00:00
Mike Blumenkrantz
a45c84f226
zink: fix ZINK_MAX_DESCRIPTORS_PER_TYPE to stop exploding the stack
...
this isn't the max per type, it's the max that can be used for a type,
which is the max used by a shader stage * the number of shader stages
Cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12829 >
2021-09-13 17:46:11 +00:00
Rob Clark
a601cae51c
freedreno: Move a6xx specific screen init
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Rob Clark
0ee0972a0d
freedreno: Cleanup primtypes/primtypes_mask
...
Move primtypes/primtypes_mask to screen to remove duplicated introduced
by 744ef862b8 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5299
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Rob Clark
1e5730102a
freedreno: Remove unused function
...
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12820 >
2021-09-13 17:21:14 +00:00
Juan A. Suarez Romero
9c158fcc70
broadcom: add cl_nobin debug option
...
Dumps the command list, excluding the binary resources.
v2 (Juan):
- Make this option independent from `cl`
v3 (Iago):
- Rename option name
- Fix style issues
- Do not print BO ranges
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12803 >
2021-09-13 08:51:54 +00:00
Mike Blumenkrantz
718e9dd133
zink: use descriptor info for ubo hashing
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824 >
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz
41c3363e07
zink: remove zink_get_resource_for_descriptor()
...
this is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12824 >
2021-09-13 04:04:58 +00:00
Mike Blumenkrantz
3db5c1bfc5
zink: remove bind_stages and bind_history from zink_resource
...
these are no longer used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
c5a090aa3a
zink: use more accurate generation for buffer barrier pipeline stages
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
793e5dba98
zink: don't generate more pipeline stages if vertex bit is already set
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
a810e58051
zink: use bind_stages for pipeline barrier generation
...
Fixes: be40886521 ("zink: emit descriptor barriers and references during bind")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
18866dc733
zink: remove ZINK_RESOURCE_USAGE_STREAMOUT
...
we can use a bool flag for this instead to be more sensible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
13114ff712
zink: use better check for determining bufferview rebinds
...
we have the bvci here so the actual buffer is still available
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
60bc0fbffa
zink: make a local screen var for buffer replace
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
b5e460cec2
zink: move batch ref when possible during buffer replacement
...
avoid atomics when possible
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
d772419dab
zink: add a batch ref when replacing a buffer that has binds and usage
...
any resource with active binds will have exactly 1 ref for the bind, so
if it also has usage, it needs to be destroyed on the batch to avoid
early deletion while it's in use
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
566771ee31
zink: add some asserts for buffer replacement
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
f44d8d8b74
zink: replace a couple checks for bind counts with new inline
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
107866cf7a
zink: add inline for checking whether a resource has any binds
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
468a0fb2b1
zink: set vbo resource usage on bind
...
this is more accurate and avoids setting usage on a batch that could be
flushed before draw
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822 >
2021-09-13 03:40:54 +00:00
Mike Blumenkrantz
891b4497b4
Revert "zink: ci updates"
...
This reverts commit 03489cf519 .
maybe not...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821 >
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz
eb7d2ef070
zink: initialize zink_descriptor_layout_key::use_count on create
...
Fixes: 95fe2f7b82 ("zink: track active use counts for descriptor layouts")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12821 >
2021-09-13 02:38:28 +00:00
Mike Blumenkrantz
14e9d01aa6
zink: export PIPE_SHADER_CAP_FP16_CONST_BUFFERS
...
this is now functional
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823 >
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz
a955d89f20
zink: add 8/16bit ubo handling
...
left this out of the original 8/16bit storage implementation somehow,
but it didn't matter since nothing was doing 8/16bit ubo reads
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12823 >
2021-09-13 02:13:06 +00:00
Mike Blumenkrantz
3a3c968de8
zink: clamp instance divisors to max value
...
better than exploding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12756 >
2021-09-13 01:09:54 +00:00
Mike Blumenkrantz
b483faccb6
zink: remove batch params from barrier functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
5e17510d51
zink: remove unused barrier function
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00
Mike Blumenkrantz
ec2cce6d60
zink: remove batch params from resource copy functions
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12770 >
2021-09-13 00:53:02 +00:00