aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_cs.c
Commit message (Collapse)AuthorAgeFilesLines
* turnip: fix ts_cs_memory typoJonathan Marek2020-06-231-1/+1
| | | | | Signed-off-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5606>
* turnip: Promote tu_cs_get_size/is_empty to headerBrian Ho2020-03-031-20/+0
| | | | | | These will be used in tu_cmd_buffer.c. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3988>
* turnip: make cond_exec helper easier to useJonathan Marek2020-02-241-0/+21
| | | | | | 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: automatically reserve cmdstream space in emit_pkt4/emit_pkt7Jonathan Marek2020-02-241-9/+0
| | | | | | 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-22/+21
| | | | | | 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 execution of secondary cmd bufs with nothing in primary.Eric Anholt2020-01-231-6/+2
| | | | | | | | | | | | | We want to finish off cmd emission in the primary CS and add its entry to the IB, but regardless of whether there had been anything in the primary CS to emit, we still need a reserved CS entry for the loop below. Fixes crashes in dEQP-VK.binding_model.shader_access.secondary_cmd_buf.* and many more in dEQP-VK.renderpass* Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3524> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3524>
* turnip: implement secondary command buffersJonathan Marek2019-12-191-2/+30
| | | | | | | | | | Uses a new "tu_cs_add_entries" function because tu_cs_emit_call doesn't work inside draw_cs (which is already called by tu_cs_emit_call). Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3075>
* turnip: add function to allocate aligned memory in a substream csJonathan Marek2019-12-051-0/+35
| | | | | | | To use with texture states that need alignment (texconst, sampler, border) Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* turnip: simplify tu_cs sub-streams usageChia-I Wu2019-03-111-3/+12
| | | | | | Let tu_cs_begin_sub_stream imply tu_cs_reserve_space, and tu_cs_end_sub_stream imply tu_cs_sanity_check. Callers are no longer required to call them (but can still do if they choose to).
* turnip: fix tu_cs sub-streamsChia-I Wu2019-03-111-1/+5
| | | | | Update cs->start in tu_cs_end_sub_stream. Otherwise, the entry would include commands from all prior sub-streams.
* turnip: use 32-bit offset in tu_cs_entryChia-I Wu2019-03-111-1/+5
| | | | We don't support nor expect BOs to be that big in tu_cs.
* turnip: add TU_CS_MODE_SUB_STREAMChia-I Wu2019-03-111-4/+60
| | | | | | | When in TU_CS_MODE_SUB_STREAM, tu_cs_begin_sub_stream (or tu_cs_end_sub_stream) should be called instead of tu_cs_begin (or tu_cs_end). It gives the caller a TU_CS_MODE_EXTERNAL cs to emit commands to.
* turnip: add tu_cs_modeChia-I Wu2019-03-111-3/+42
| | | | | | | | | Add tu_cs_mode and TU_CS_MODE_EXTERNAL. When in TU_CS_MODE_EXTERNAL, tu_cs wraps an external buffer and can not grow. This also moves tu_cs* up in tu_private.h, such that other structs can embed tu_cs_entry.
* turnip: add tu_cs_sanity_checkChia-I Wu2019-03-111-2/+2
| | | | | It replaces tu_cs_reserve_space_assert and can be called at any time to sanity check tu_cs.
* turnip: never fail tu_cs_begin/tu_cs_endChia-I Wu2019-03-111-29/+36
| | | | | | Error checking tu_cs_begin/tu_cs_end is too tedious for the callers. Move tu_cs_add_bo and tu_cs_reserve_entry to tu_cs_reserve_space such that tu_cs_begin/tu_cs_end never fails.
* turnip: specify initial size in tu_cs_initChia-I Wu2019-03-111-13/+8
| | | | | We will drop size parameter from tu_cs_begin shortly, such that tu_cs_begin never fails.
* turnip: add tu_cs_{reserve,add}_entryChia-I Wu2019-03-111-24/+55
| | | | | We will stop calling tu_cs_reserve_entry in tu_cs_end shortly, such that tu_cs_end never fails.
* turnip: add internal helpers for tu_csChia-I Wu2019-03-111-8/+47
| | | | | Add tu_cs_get_offset, tu_cs_get_size, tu_cs_get_space, and tu_cs_is_empty.
* turnip: add tu_cs_reserve_space(_assert)Chia-I Wu2019-03-111-0/+2
| | | | | | | | | | | They are used like tu_cs_reserve_space(...); tu_cs_emit(...); ...; tu_cs_reserve_space_assert(); to make sure we reserved enough space at the beginning.
* turnip: inline tu_cs_check_spaceChia-I Wu2019-03-111-16/+0
| | | | This allows the fast path (size check) to be inlined.
* turnip: update cs->start in tu_cs_endChia-I Wu2019-03-111-2/+4
| | | | | This allows us to assert that there is no dangling command in tu_cs_begin, rather than discarding them silently.
* turnip: minor cleanup to tu_cs_endChia-I Wu2019-03-111-9/+11
| | | | Add comments and error checking.
* turnip: add tu_cs_add_boChia-I Wu2019-03-111-32/+46
| | | | Refactor BO allocation code out of tu_cs_begin. Add error checking.
* turnip: document tu_csChia-I Wu2019-03-111-0/+21
|
* turnip: run sed and clang-format on tu_csChia-I Wu2019-03-111-61/+55
|
* turnip: Move stream functions to tu_cs.cBas Nieuwenhuizen2019-03-111-0/+165