Commit Graph

11 Commits

Author SHA1 Message Date
Iago Toral Quiroga df8611e816 v3dv: be more careful when restoring dirty state after meta operations
So far we have been only restoring dirty dynamic states used by meta
pipelines however, static state from meta pipelines will also clear
dirty flags, preventing follow-up draw calls in the command buffer
to honor these if they are flagged as dynamic states in their
pipelines. Fix this by always resetting all dirty state flags after
a meta operation so we re-emit all the state we need with the next draw
call.

Fixes:
dEQP-VK.dynamic_state.monolithic.image.clear

cc: mesa-stable

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20356>
2022-12-16 12:18:36 +00:00
Rebecca Mckeever 6b1e2e9eb6 v3dv: Delete VK_KHR_device_group provided entrypoints
Delete v3dv_CmdDispatch, v3dv_CmdSetDeviceMask, and
v3dv_GetDeviceGroupPeerMemoryFeatures so that the vk_common_*
versions will be used instead. This will avoid repeated code.

Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20218>
2022-12-09 14:07:17 -06:00
Iago Toral Quiroga 71e86a4655 v3dv: pre-allocate actual events instead of event descriptors
Instead of keeping a free list of "event descriptors" which are
just the offsets in the BO state that are available, pre-allocate
the events. This is simpler as it doesn't require to allocate these
event descriptors at all.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20053>
2022-11-30 17:10:45 +00:00
Iago Toral Quiroga 4050086439 v3dv: add a helper to create compute pipelines from nir
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19770>
2022-11-24 12:21:59 +00:00
Iago Toral Quiroga 22789d34be v3dv: use vk_alloc instead of malloc
Fixes: e6884df088 ('v3dv: fix event synchronization')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19518>
2022-11-04 09:22:05 +00:00
Iago Toral Quiroga 36ef75b6eb v3dv: vkCmdWaitEvents2 takes an array of VkDependencyInfo
We have been incorrectly assuming there was just one for all the
events, apparently CTS never uses more than one event.

Fixes: e6884df088 ('v3dv: fix event synchronization')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19518>
2022-11-04 09:22:05 +00:00
Iago Toral Quiroga e6884df088 v3dv: fix event synchronization
Since we now implement events in the GPU we need to be more careful
and insert barriers to honor the dependencies provided by the API
as well as ensuring we are synchronizing these with the compute
queue, since that is how we implement GPU event functionality.

Fixes: ecb01d53fd ("v3dv: refactor events")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
2022-11-03 14:16:12 +01:00
Iago Toral Quiroga 4c861cf22a v3dv: increase limit for active event objects
Fixes: ecb01d53fd ("v3dv: refactor events")
Fixes: dEQP-VK.api.command_buffers.execute_large_primary

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
2022-11-03 14:16:12 +01:00
Iago Toral Quiroga 7f905a8117 v3dv: fix incorrect return type
Fixes: ecb01d53fd ("v3dv: refactor events")

Partially fixes:
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.basic
dEQP-VK.api.object_management.alloc_callback_fail.device
dEQP-VK.api.object_management.alloc_callback_fail.device_group

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
2022-11-03 14:16:11 +01:00
Eric Engestrom aff368fe83 v3dv: avoid freeing already-freed memory
Fixes: ecb01d53fd ("v3dv: refactor events")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19458>
2022-11-03 14:16:11 +01:00
Iago Toral Quiroga 004f431b7f v3dv: split event implementation to a separate file
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19366>
2022-10-28 10:55:37 +00:00