aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* turnip: add tu_cs_discard_entriesChia-I Wu2019-03-111-0/+11
| | | | | | We will start a draw IB at the beginning of a subpass and consume it at the end of the subpass. With tu_cs_discard_entries, we can reuse the same tu_cs for all subpasses.
* turnip: more/better asserts for tu_csChia-I Wu2019-03-111-2/+4
| | | | | | | | Asserting (cur < end) in tu_cs_emit catches much less programming errors comparing to asserting (cur < reserved_end). We should never write more commands than what we have reserved. Assert IB is non-empty and sane in tu_cs_emit_ib.
* turnip: use 32-bit offset in tu_cs_entryChia-I Wu2019-03-112-2/+6
| | | | We don't support nor expect BOs to be that big in tu_cs.
* turnip: mark IBs for dumpingChia-I Wu2019-03-112-3/+4
| | | | Includes IBs in kernel cmdbuf dumps.
* turnip: use the platform defines in vk.xml instead of hard-coding themEric Engestrom2019-03-111-4/+7
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* turnip: Add todo for copies.Bas Nieuwenhuizen2019-03-111-0/+7
|
* turnip: Add buffer->image DMA copies.Bas Nieuwenhuizen2019-03-111-12/+195
| | | | Passes dEQP-VK.api.copy_and_blit.core.buffer_to_image.*
* turnip: Add image->buffer DMA copies.Bas Nieuwenhuizen2019-03-111-12/+218
| | | | Passes dEQP-VK.api.copy_and_blit.core.image_to_buffer.*
* turnip: Implement buffer->buffer DMA copies.Bas Nieuwenhuizen2019-03-112-9/+190
| | | | Passes dEQP-VK.api.copy_and_blit.core.buffer_to_buffer.*
* turnip: Add tu6_rb_fmt_to_ifmt.Bas Nieuwenhuizen2019-03-112-0/+75
|
* turnip: Make tu6_emit_event_write shared.Bas Nieuwenhuizen2019-03-112-1/+7
|
* turnip: Add buffer memory binding.Bas Nieuwenhuizen2019-03-112-0/+14
|
* turnip: respect color attachment formatsChia-I Wu2019-03-113-22/+33
| | | | | Make tu6_get_native_format available to tu_cmd_buffer and start using of it.
* turnip: preliminary support for fencesChia-I Wu2019-03-114-79/+412
| | | | | | This should be quite complete feature-wise. External fences are still missing. We probably also want to add a simpler path to tu_WaitForFences for when fenceCount == 1.
* turnip: fix VkClearValue packingChia-I Wu2019-03-113-46/+224
| | | | | | Add tu_pack_clear_value to correctly pack VkClearValue according to VkFormat. It ignores the component order defined by VkFormat, and always packs to WZYX order.
* turnip: add support for VK_KHR_external_memory_{fd,dma_buf}Chia-I Wu2019-03-112-1/+64
|
* turnip: advertise VK_KHR_external_memoryChia-I Wu2019-03-111-0/+1
| | | | | AFAICT, it is supported. We don't need to handle any of the new structs because our BOs can always be exported.
* turnip: advertise VK_KHR_external_memory_capabilitiesChia-I Wu2019-03-111-0/+1
| | | | AFAICT, it is supported.
* turnip: add functions to import/export prime fdChia-I Wu2019-03-113-14/+91
| | | | | Add tu_bo_init_dmabuf, tu_bo_export_dmabuf, tu_gem_import_dmabuf, and tu_gem_export_dmabuf.
* turnip: Fix error behavior for VkPhysicalDeviceExternalImageFormatInfoChad Versace2019-03-111-26/+24
| | | | | | | | If the handle type is unsupported, then the spec requires us to return VK_ERROR_FORMAT_NOT_SUPPORTED. Reviewed-by: Chia-I Wu <[email protected]> Closes: https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/merge_requests/17
* turnip: add a more complete format tableChia-I Wu2019-03-111-47/+301
| | | | | | | | | | | | A format table is an array of tu_native_format. Table lookup is done through array indexing. This commit defines a single format table for core VkFormat. It is derived from the table in the gallium driver. There might be errors introduced in the process of the conversion. When an extension that defines new VkFormat is supported, we need to add a new table for the extension.
* turnip: preliminary support for loadOp and storeOpChia-I Wu2019-03-112-19/+645
| | | | | | | | | | | | | | | - create tile_load_ib and tile_store_ib at the beginning of each subpass - execute the IBs at the end of each subpass - no DONT_CARE support - no subpass dependency analysis and subpass merging - no zs support - no true VkImageView support - assume VK_FORMAT_B8G8R8A8_UNORM - no tiling - no MSAA This also removes cur_cs from tu_cmd_buffer.
* turnip: add TU_CS_MODE_SUB_STREAMChia-I Wu2019-03-114-6/+81
| | | | | | | 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-113-30/+98
| | | | | | | | | 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: provide both emit_ib and emit_callChia-I Wu2019-03-111-7/+30
| | | | | tu_cs_emit_ib emits a CP_INDIRECT_BUFFER for a BO. tu_cs_emit_call emits a CP_INDIRECT_BUFFER for each entry of a target cs.
* turnip: add tu_cs_sanity_checkChia-I Wu2019-03-114-7/+7
| | | | | 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-113-62/+49
| | | | | | 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-114-15/+12
| | | | | 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_tiling_configChia-I Wu2019-03-112-0/+302
| | | | | | | | | | | | | We need the current color/depth/stencil attachments and the current render area to compute the tiling config. We compute the tiling config at the beginning of each subpass for the moment. We should change that when the driver can reorder/merge subpasses. It is very common that the render area is the entire framebuffer. We might want to optimize for the case and compute the tiling config in tu_framebuffer ctor.
* turnip: preliminary support for tu_GetRenderAreaGranularityChia-I Wu2019-03-113-4/+9
| | | | Set it to tile alignments, 32x32 on 6xx.
* turnip: emit HW init in tu_BeginCommandBufferChia-I Wu2019-03-112-14/+239
| | | | | | | | | | | | | | | | | | Being the first commit that emits meaningful command packets, there are many things included in this commit - tu6_emit_xxx are low-level helpers that emit command packets without boundary checks - tu6_xxx are high-level helpers that emit command packets with boundary checks - cmdbuf->cs is a pointer to the current CS, so that we can use the helpers above to emit to other CS - use cmd as the variable name of tu_cmd_buffer - there is a per-cmdbuf scratch bo for CP_EVENT_WRITE writeback - there is a per-cmdbuf debug marker, using scratch reg 7 or 6 depending on whether the cmdbuf is primary or secondary (olv, after rebase) REG_A6XX_SP_UNKNOWN_AB20 is renamed
* turnip: add tu_cs_reserve_space(_assert)Chia-I Wu2019-03-113-3/+26
| | | | | | | | | | | 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: Annotate vkGetImageSubresourceLayout with tu_stubChad Versace2019-03-111-0/+6
| | | | | Reviewed-by: Chia-I Wu <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* turnip: preliminary support for tu_CmdBeginRenderPassChia-I Wu2019-03-112-0/+87
|
* turnip: preliminary support for tu_image_view_initChia-I Wu2019-03-112-2/+45
|
* turnip: preliminary support for tu_BindImageMemory2Chia-I Wu2019-03-112-3/+20
|
* turnip: add cmdbuf->bo_list to bo_list in queue submitChia-I Wu2019-03-111-0/+2
|
* turnip: add tu_bo_list_mergeChia-I Wu2019-03-112-16/+35
| | | | tu_bo_list_merge adds an entire list to the current list.
* turnip: build drm_msm_gem_submit_bo array directlyChia-I Wu2019-03-113-24/+35
| | | | | | | | | Build drm_msm_gem_submit_bo array directly in tu_bo_list. We might change this again, but this is good enough for now. There are other issues as well, such as not using VkAllocationCallbacks and sloppy error checking. We should revisit this in the near future. Same to tu_cs.
* turnip: add more tu_cs helpersChia-I Wu2019-03-111-2/+28
|
* turnip: inline tu_cs_check_spaceChia-I Wu2019-03-112-18/+16
| | | | 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-113-11/+16
| | | | Add comments and error checking.
* turnip: add tu_cs_add_boChia-I Wu2019-03-112-35/+51
| | | | Refactor BO allocation code out of tu_cs_begin. Add error checking.
* turnip: document tu_csChia-I Wu2019-03-112-0/+30
|
* turnip: run sed and clang-format on tu_csChia-I Wu2019-03-115-104/+93
|
* turnip: Only get bo offset when we need to mmapKristian H. Kristensen2019-03-112-17/+5
| | | | | The offset we get from MSM_INFO_GET_OFFSET is an offset into the drm fd for the purpose of mmaping the buffer.
* turnip: Move stream functions to tu_cs.cBas Nieuwenhuizen2019-03-113-141/+166
|