aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_query.c
Commit message (Collapse)AuthorAgeFilesLines
* tu: Don't actually track seqno's for eventsConnor Abbott2020-06-091-4/+4
| | | | | | | | | | | | We just dropped the last user which actually cared about the seqno. This never worked anyway, since the seqno was never reset between multiple executions of the same command buffer. Turn the part of the control buffer which used to track the seqno into a dummy dword, and figure out automatically whether we need to include it. We will implement seqnos again eventually, with timline semaphores, but that will likely be totally different. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>
* turnip: Implement and enable VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTHyunjun Ko2020-04-231-0/+132
| | | | | | | | | Tested by dEQP-VK.transform_feedback.simple.query* Signed-off-by: Hyunjun Ko <[email protected]> Reviewed-by: Brian Ho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4604>
* turnip: make the struct slot_value of queries get 2 valuesHyunjun Ko2020-04-231-57/+86
| | | | | | | | | | | | | | | | | | | | | | In case of transform feedback query, it writes two integer values, which one is for primitives written and another is for primitives generated. To handle this, the second member of the struct slot_value is worth to be presented not as a padding. In addition, we also need to modify get/copy_result to access both values. This patch is the prep work for the transform feedback query support. Tested with dEQP-VK.pipeline.timestamp.* dEQP-VK.query_pool.occlusion_query.* Signed-off-by: Hyunjun Ko <[email protected]> Reviewed-by: Brian Ho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4604>
* turnip: implement timestamp queryJonathan Marek2020-04-071-52/+83
| | | | | | | | | Passes tests in: dEQP-VK.pipeline.timestamp.* Signed-off-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4027> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4027>
* turnip: automatically reserve cmdstream space in emit_pkt4/emit_pkt7Jonathan Marek2020-02-241-8/+1
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3925>
* turnip: add tu_device pointer to tu_csJonathan Marek2020-02-241-8/+8
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3925>
* turnip: fix COND_EXEC reserved size in tu_queryJonathan Marek2020-02-241-1/+1
| | | | | | | | Conditionally executed dwords must be in the same bo. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3925>
* turnip: Fix vkCmdCopyQueryPoolResults with available flag20.0-branchpointBrian Ho2020-01-301-46/+52
| | | | | | | | | | | | Previously, calling vkCmdCopyQueryPoolResults with the VK_QUERY_RESULT_WITH_AVAILABILITY_BIT flag set the query result field in the buffer to 0 if unavailable and the query result if available. This was a misunderstanding of the Vulkan spec, and this commit corrects the behavior to emitting a separate available result in addition to the query result. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>
* turnip: Fix vkGetQueryPoolResults with available flagBrian Ho2020-01-301-22/+30
| | | | | | | | | | | Previously, calling vkGetQueryPoolResults with the VK_QUERY_RESULT_WITH_AVAILABILITY_BIT flag set the query result field in *pData to 0 if unavailable and the query result if available. This was a misunderstanding of the Vulkan spec, and this commit corrects the behavior to eriting a separate available result in addition to the query result. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>
* turnip: Implement vkCmdCopyQueryPoolResults for occlusion queriesBrian Ho2020-01-241-0/+111
| | | | | | | | | Use CP_COND_EXEC and CP_COND_WRITE to conditionally copy the results of a query to a buffer based off the query's availability. Fixes: #2238 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Implement vkCmdResetQueryPoolBrian Ho2020-01-241-0/+38
| | | | | | Clears the available bit for each requested query on the GPU. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Implement vkGetQueryPoolResults for occlusion queriesBrian Ho2020-01-241-0/+125
| | | | | | | | Implements fetching the results of a query pool with the VK_QUERY_RESULT_WAIT_BIT, VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, and VK_QUERY_RESULT_PARTIAL_BIT flags. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Update query availability on render pass endBrian Ho2020-01-241-7/+16
| | | | | | | | | | | | | | Unlike on an immidiate-mode renderer, Turnip only renders tiles on vkCmdEndRenderPass. As such, we need to track all queries that were active in a given render pass and defer setting the available bit on those queries until after all tiles have rendered. This commit adds a draw_epilogue_cs to tu_cmd_buffer that is executed as an IB at the end of tu_CmdEndRenderPass. We then emit packets to this command stream that update the availability bit of a given query in tu_CmdEndQuery. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Implement vkCmdEndQuery for occlusion queriesBrian Ho2020-01-241-0/+82
| | | | | | | | | Mostly a translation of freedreno's implementation of glEndQuery for GL_SAMPLES_PASSED query objects with a slight modification to set the availability bit of the query bo (slot->available) if the query was not ended inside a render pass. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Implement vkCmdBeginQuery for occlusion queriesBrian Ho2020-01-241-0/+68
| | | | | | | | Mostly a translation of freedreno's implementation of glBeginQuery for GL_SAMPLES_PASSED query objects with special logic for handling tiled render passes. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: Implement vkCreateQueryPool for occlusion queriesBrian Ho2020-01-241-0/+52
| | | | | | | | | General structure is inspired by anv's implementation in genX_query.c. We define a packed struct that tracks sample count at the beginning of the query and at the end; the result of the occlusion query is then slot->end - slot->begin. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279>
* turnip: add .clang-formatChia-I Wu2019-03-111-8/+7
| | | | Add and apply .clang-format.
* turnip: Fix indentation in function signaturesChad Versace2019-03-111-30/+30
| | | | | Due to s/anv/tu/, in many function signatures the indentation of parameters was off-by-one.
* turnip: Add driver skeleton (v2)Bas Nieuwenhuizen2019-03-111-0/+123
meson files have been updated, autotools and android still need updating. Only build tested. v2 (chadv): - Rebase onto master. - Fix build breakage in Python scripts. - Drop the WSI code. The internal WSI apis have changed recently, and will likely change again before the driver goes upstream. To avoid unnecessary rebase work, let's drop the WSI code and re-add it when we're ready to really use WSI. (olv, after rebase) do not enable freedreno by default on ARM