aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_pass.c
Commit message (Collapse)AuthorAgeFilesLines
* turnip: Use the common base object type and struct.Hyunjun Ko2020-07-141-6/+6
| | | | | | | | | v2. Define new helper function to avoid duplicated a pair of function calls. v3. Move new helper functions to vk_object.h and call them. v4. Merge 2 commits to use commomn base object type and struct into one. Signed-off-by: Hyunjun Ko <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5539>
* turnip: move some logic out of create_render_pass_commonJonathan Marek2020-06-241-30/+19
| | | | | | | | | CreateRenderPass2 is the common path now, it doesn't make sense to have a create_render_pass_common. Rename it to tu_render_pass_gmem_config and move logic not related to gmem config out of it. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5451>
* turnip: use RenderPassCreateInfo for render_pass_add_implicit_depsJonathan Marek2020-06-241-78/+66
| | | | | | | | | This gets rid of the some unnecessary values that were stored in tu_render_pass for this. It also makes the render_pass_add_implicit_deps more generic, with very few references to the tu_render_pass. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5451>
* turnip: replace a memset(0) with zalloc in CreateRenderPassJonathan Marek2020-06-241-2/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5451>
* turnip: translate CreateRenderPass to CreateRenderPass2Jonathan Marek2020-06-241-132/+106
| | | | | | | | | | | It doesn't cut down the code size by much, and might not be the ideal for performance (unless the compiler is unexpectedly smart), but makes it easier to maintain (no modifying the same code in two places) and will allow some simplifications since we wont have to worry about trying to share code between the two versions. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5451>
* turnip: fix renderpass gmem configs when there are too many attachmentsJonathan Marek2020-06-181-0/+5
| | | | | | | | | | | | Since a value of at least "align" is used for nblocks, we might end up with nblocks greater than the number of GMEM blocks remaining. Check for this case and bail out, sysmem rendering will be used for such cases. Fixes some of these tests: dEQP-VK.pipeline.render_to_image.core.*.huge.* Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>
* tu: Rewrite flushing to use barriersConnor Abbott2020-06-091-0/+291
| | | | | | | | | | | | | | | | | | | | | | Replace the various ad-hoc flushes that we've inserted, copied from freedreno, etc. with a unified system that uses the user-supplied information via vkCmdPipelineBarrier() and subpass dependencies. There are a few notable differences in behavior: - We now move setting RB_CCU_CNTL up a little in the gmem case, but hopefully that won't matter too much. This matches what the Vulkan blob does. - We properly implement delayed setting of events, completing our implementaton of events. - Finally, of course, we should be a lot less flush-happy. We won't emit useless CCU/cache flushes with multiple copies, renderpasses, etc. that don't depend on each other, and also won't flush/invalidate the cache around renderpasses unless we actually need to. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>
* tu: Move RENDER_COMPONENTS setting to pipeline stateConnor Abbott2020-05-141-3/+0
| | | | | | | This needs to be pipeline state because it can change when dual-source blending is active. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
* turnip: add adreno 650Jonathan Marek2020-04-241-8/+19
| | | | | | | Tile alignment is 96, with gmem alignment of 0x6000 Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4608>
* turnip: improve GMEM load/store logicJonathan Marek2020-04-221-13/+59
| | | | | | | | | Determine load/store at renderpass creation time. This also fixes behavior with S8_UINT. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4588>
* turnip: compute render_components/srgb_cntl at renderpass creation timeJonathan Marek2020-04-161-4/+22
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4581>
* turnip: new clear/blit implementation with shader path fallbackJonathan Marek2020-04-091-5/+8
| | | | | | | | | The shader path is used to implement the following cases: * stencil aspect mask on D24S8 (for image_to_buffer,buffer_to_image) * clear/copy msaa destination (2D engine can't have msaa dest) Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3783>
* turnip: save attachment samples in renderpass stateJonathan Marek2020-04-091-4/+4
| | | | | | | | This is needed to be able to know the number of samples during CmdClearAttachments which can be used while the framebuffer is unknown. Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3783>
* turnip: split up gmem/tile alignmentJonathan Marek2020-04-091-4/+2
| | | | | | | Note: the x1/y1 align in tu6_emit_blit_scissor was broken Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3783>
* turnip: fall back to sysmem when attachments don't fit into gmemJonathan Marek2020-02-281-1/+0
| | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3979>
* turnip: Update query availability on render pass endBrian Ho2020-01-241-0/+1
| | | | | | | | | | | | | | 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: Pretend to support Vulkan 1.2Jason Ekstrand2020-01-151-4/+4
| | | | | | It doesn't really support any Vulkan properly yet so why not claim 1.2? This was an easier way of fixing the build than trying to roll it forward to a later version of ANV's entrypoint generator scripts.
* turnip: minor warning fixesJonathan Marek2019-12-191-1/+1
| | | | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3177> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3177>
* turnip: compute gmem offsets at renderpass creation timeJonathan Marek2019-12-191-8/+60
| | | | | | | | | | This makes it easier to implement secondary command buffers, since we no longer need to know the render area to set the gmem offsets for input attachments and CmdClearAttachments. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075>
* turnip: subpass reworkJonathan Marek2019-12-121-165/+68
| | | | | | | A renderpass is a tile load/store cycle. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: MSAA resolve directly from GMEMJonathan Marek2019-12-041-6/+2
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* turnip: Use Vulkan 1.1 names instead of KHRChad Versace2019-03-111-3/+3
| | | | | | | That is, drop KHR from all tokens that were promoted to Vulkan 1.1. The consistency makes ctags more useful (it now jumps directly to the real definitions in vulkan_core.h instead of the typedefs); and it makes the code slightly less verbose.
* turnip: preliminary support for tu_GetRenderAreaGranularityChia-I Wu2019-03-111-3/+5
| | | | Set it to tile alignments, 32x32 on 6xx.
* turnip: add .clang-formatChia-I Wu2019-03-111-73/+73
| | | | Add and apply .clang-format.
* turnip: Fix indentation in function signaturesChad Versace2019-03-111-10/+10
| | | | | 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/+414
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