Chia-I Wu [Thu, 14 Feb 2019 18:53:20 +0000 (10:53 -0800)]
turnip: respect color attachment formats
Make tu6_get_native_format available to tu_cmd_buffer and start
using of it.
Chia-I Wu [Thu, 14 Feb 2019 22:36:52 +0000 (14:36 -0800)]
turnip: preliminary support for fences
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.
Chia-I Wu [Wed, 13 Feb 2019 18:23:32 +0000 (10:23 -0800)]
turnip: fix VkClearValue packing
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.
Chia-I Wu [Fri, 1 Feb 2019 18:36:19 +0000 (10:36 -0800)]
turnip: add support for VK_KHR_external_memory_{fd,dma_buf}
Chia-I Wu [Fri, 1 Feb 2019 18:27:28 +0000 (10:27 -0800)]
turnip: advertise VK_KHR_external_memory
AFAICT, it is supported. We don't need to handle any of the new
structs because our BOs can always be exported.
Chia-I Wu [Fri, 1 Feb 2019 18:12:38 +0000 (10:12 -0800)]
turnip: advertise VK_KHR_external_memory_capabilities
AFAICT, it is supported.
Chia-I Wu [Thu, 31 Jan 2019 23:03:03 +0000 (15:03 -0800)]
turnip: add functions to import/export prime fd
Add tu_bo_init_dmabuf, tu_bo_export_dmabuf, tu_gem_import_dmabuf,
and tu_gem_export_dmabuf.
Chad Versace [Sat, 2 Feb 2019 00:48:44 +0000 (16:48 -0800)]
turnip: Fix error behavior for VkPhysicalDeviceExternalImageFormatInfo
If the handle type is unsupported, then the spec requires us to return
VK_ERROR_FORMAT_NOT_SUPPORTED.
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Closes: https://gitlab.freedesktop.org/bnieuwenhuizen/mesa/merge_requests/17
Chia-I Wu [Fri, 25 Jan 2019 19:13:54 +0000 (11:13 -0800)]
turnip: add a more complete format table
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.
Chia-I Wu [Fri, 11 Jan 2019 23:01:26 +0000 (15:01 -0800)]
turnip: preliminary support for loadOp and storeOp
- 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.
Chia-I Wu [Tue, 29 Jan 2019 23:00:34 +0000 (15:00 -0800)]
turnip: add TU_CS_MODE_SUB_STREAM
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.
Chia-I Wu [Mon, 28 Jan 2019 22:33:20 +0000 (14:33 -0800)]
turnip: add tu_cs_mode
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.
Chia-I Wu [Tue, 29 Jan 2019 18:43:48 +0000 (10:43 -0800)]
turnip: provide both emit_ib and emit_call
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.
Chia-I Wu [Tue, 29 Jan 2019 00:31:54 +0000 (16:31 -0800)]
turnip: add tu_cs_sanity_check
It replaces tu_cs_reserve_space_assert and can be called at any
time to sanity check tu_cs.
Chia-I Wu [Mon, 28 Jan 2019 23:55:40 +0000 (15:55 -0800)]
turnip: never fail tu_cs_begin/tu_cs_end
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.
Chia-I Wu [Tue, 29 Jan 2019 00:24:48 +0000 (16:24 -0800)]
turnip: specify initial size in tu_cs_init
We will drop size parameter from tu_cs_begin shortly, such that
tu_cs_begin never fails.
Chia-I Wu [Mon, 28 Jan 2019 23:52:36 +0000 (15:52 -0800)]
turnip: add tu_cs_{reserve,add}_entry
We will stop calling tu_cs_reserve_entry in tu_cs_end shortly, such
that tu_cs_end never fails.
Chia-I Wu [Tue, 29 Jan 2019 22:09:17 +0000 (14:09 -0800)]
turnip: add internal helpers for tu_cs
Add tu_cs_get_offset, tu_cs_get_size, tu_cs_get_space, and
tu_cs_is_empty.
Chia-I Wu [Tue, 22 Jan 2019 18:27:22 +0000 (10:27 -0800)]
turnip: add tu_tiling_config
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.
Chia-I Wu [Tue, 22 Jan 2019 18:27:18 +0000 (10:27 -0800)]
turnip: preliminary support for tu_GetRenderAreaGranularity
Set it to tile alignments, 32x32 on 6xx.
Chia-I Wu [Fri, 18 Jan 2019 16:54:04 +0000 (08:54 -0800)]
turnip: emit HW init in tu_BeginCommandBuffer
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
Chia-I Wu [Fri, 18 Jan 2019 22:24:45 +0000 (14:24 -0800)]
turnip: add tu_cs_reserve_space(_assert)
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.
Chad Versace [Wed, 16 Jan 2019 23:01:35 +0000 (15:01 -0800)]
turnip: Annotate vkGetImageSubresourceLayout with tu_stub
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Chia-I Wu [Fri, 11 Jan 2019 22:27:01 +0000 (14:27 -0800)]
turnip: preliminary support for tu_CmdBeginRenderPass
Chia-I Wu [Thu, 10 Jan 2019 19:58:07 +0000 (11:58 -0800)]
turnip: preliminary support for tu_image_view_init
Chia-I Wu [Thu, 10 Jan 2019 19:51:39 +0000 (11:51 -0800)]
turnip: preliminary support for tu_BindImageMemory2
Chia-I Wu [Thu, 17 Jan 2019 19:15:39 +0000 (11:15 -0800)]
turnip: add cmdbuf->bo_list to bo_list in queue submit
Chia-I Wu [Thu, 17 Jan 2019 19:15:21 +0000 (11:15 -0800)]
turnip: add tu_bo_list_merge
tu_bo_list_merge adds an entire list to the current list.
Chia-I Wu [Thu, 17 Jan 2019 18:23:19 +0000 (10:23 -0800)]
turnip: build drm_msm_gem_submit_bo array directly
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.
Chia-I Wu [Wed, 16 Jan 2019 22:40:37 +0000 (14:40 -0800)]
turnip: add more tu_cs helpers
Chia-I Wu [Wed, 16 Jan 2019 22:12:53 +0000 (14:12 -0800)]
turnip: inline tu_cs_check_space
This allows the fast path (size check) to be inlined.
Chia-I Wu [Wed, 16 Jan 2019 22:05:55 +0000 (14:05 -0800)]
turnip: update cs->start in tu_cs_end
This allows us to assert that there is no dangling command in
tu_cs_begin, rather than discarding them silently.
Chia-I Wu [Wed, 16 Jan 2019 22:00:43 +0000 (14:00 -0800)]
turnip: minor cleanup to tu_cs_end
Add comments and error checking.
Chia-I Wu [Wed, 16 Jan 2019 19:17:26 +0000 (11:17 -0800)]
turnip: add tu_cs_add_bo
Refactor BO allocation code out of tu_cs_begin. Add error checking.
Chia-I Wu [Wed, 16 Jan 2019 18:20:33 +0000 (10:20 -0800)]
turnip: document tu_cs
Chia-I Wu [Wed, 16 Jan 2019 18:03:02 +0000 (10:03 -0800)]
turnip: run sed and clang-format on tu_cs
Kristian H. Kristensen [Wed, 16 Jan 2019 19:02:38 +0000 (11:02 -0800)]
turnip: Only get bo offset when we need to mmap
The offset we get from MSM_INFO_GET_OFFSET is an offset into the drm fd
for the purpose of mmaping the buffer.
Bas Nieuwenhuizen [Wed, 16 Jan 2019 17:27:04 +0000 (18:27 +0100)]
turnip: Move stream functions to tu_cs.c
Bas Nieuwenhuizen [Tue, 15 Jan 2019 21:18:15 +0000 (22:18 +0100)]
turnip: Add emit functions in a header.
This adds a radv-style check_space functions + emit functions.
Also puts them in a header as a bunch of inlines, so
(1) we can use them from meta code.
(2) they are inline for performance as these are common and small.
Did not put them in tu_private.h as a bunch of inlines only
clutters up that huge headerfile.
Precise error propagation for memory allocation failures is still
todo.
Chia-I Wu [Thu, 10 Jan 2019 22:07:50 +0000 (14:07 -0800)]
turnip: preliminary support for tu_QueueWaitIdle
This creates a new fd on each queue submit. I do not go with
DRM_IOCTL_MSM_WAIT_FENCE solely because the path is marked legacy.
Otherwise, we can use the fence id rather than requesting a fence
fd until external fences are supported and enabled.
Chia-I Wu [Fri, 11 Jan 2019 18:55:15 +0000 (10:55 -0800)]
turnip: constify tu_device in tu_gem_*
Chia-I Wu [Thu, 10 Jan 2019 23:34:44 +0000 (15:34 -0800)]
turnip: add wrappers around DRM_MSM_SUBMITQUEUE_*
Add tu_drm_submitqueue_new and tu_drm_submitqueue_close.
Chia-I Wu [Thu, 10 Jan 2019 23:27:28 +0000 (15:27 -0800)]
turnip: add wrappers around DRM_MSM_GET_PARAM
Add tu_drm_get_gpu_id and tu_drm_get_gmem_size.
Chia-I Wu [Fri, 11 Jan 2019 18:09:53 +0000 (10:09 -0800)]
turnip: remove unnecessary libfreedreno_drm dep
Remove libfreedreno_drm dep and unused fd_device.
Chia-I Wu [Fri, 11 Jan 2019 18:03:51 +0000 (10:03 -0800)]
turnip: use msm_drm.h from inc_freedreno
The recent change to msm_drm.h changed the APIs in an incompatible
way.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 21:07:04 +0000 (22:07 +0100)]
turnip: Shorten primary_cmd_stream name.
It really is too long.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:39:14 +0000 (21:39 +0100)]
turnip: Fill command buffer
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:25:20 +0000 (21:25 +0100)]
turnip: Implement submission.
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:20:35 +0000 (21:20 +0100)]
turnip: Make bo_list functions not static
Bas Nieuwenhuizen [Thu, 10 Jan 2019 20:12:38 +0000 (21:12 +0100)]
turnip: Add msm queue support.
Bas Nieuwenhuizen [Mon, 31 Dec 2018 13:15:30 +0000 (14:15 +0100)]
turnip: Add a command stream.
Bas Nieuwenhuizen [Mon, 31 Dec 2018 10:34:32 +0000 (11:34 +0100)]
turnip: Implement a slow bo list
Bas Nieuwenhuizen [Mon, 31 Dec 2018 10:08:45 +0000 (11:08 +0100)]
turnip: Implement some UUIDs.
Bas Nieuwenhuizen [Fri, 28 Dec 2018 16:27:12 +0000 (17:27 +0100)]
turnip: clean up TODO.
./deqp-vk -n dEQP-VK.info.*
Writing test log into TestResults.qpa
dEQP Core unknown (0xcafebabe) starting..
target implementation = 'Surfaceless'
WARNING: tu is not a conformant vulkan implementation, testing use only.
WARNING: tu is not a conformant vulkan implementation, testing use only.
Test case 'dEQP-VK.info.build'..
Pass (Not validated)
Test case 'dEQP-VK.info.device'..
Pass (Not validated)
Test case 'dEQP-VK.info.platform'..
Pass (Not validated)
Test case 'dEQP-VK.info.memory_limits'..
Pass (Pass)
DONE!
Test run totals:
Passed: 4/4 (100.0%)
Failed: 0/4 (0.0%)
Not supported: 0/4 (0.0%)
Warnings: 0/4 (0.0%)
Bas Nieuwenhuizen [Fri, 28 Dec 2018 16:25:17 +0000 (17:25 +0100)]
turnip: Remove some radv leftovers.
Bas Nieuwenhuizen [Fri, 28 Dec 2018 15:27:24 +0000 (16:27 +0100)]
turnip: Implement some format properties for RGBA8.
Just to get some tests to not skip. This is neither complete
nor completely correct.
Chia-I Wu [Wed, 9 Jan 2019 22:16:01 +0000 (14:16 -0800)]
turnip: add .clang-format
Add and apply .clang-format.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 13:49:30 +0000 (14:49 +0100)]
turnip: Implement pipe-less param query.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 13:12:17 +0000 (14:12 +0100)]
turnip: move tu_gem.c to tu_drm.c
Bas Nieuwenhuizen [Fri, 21 Dec 2018 12:46:06 +0000 (13:46 +0100)]
turnip: Stop hardcoding the msm version check.
Bas Nieuwenhuizen [Fri, 21 Dec 2018 11:50:55 +0000 (12:50 +0100)]
turnip: Add image layout calculations.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 23:54:15 +0000 (00:54 +0100)]
turnip: Fix memory mapping.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 21:57:07 +0000 (22:57 +0100)]
turnip: Fix bo allocation after we stopped using libdrm_freedreno ...
Al this figuring out new errors is why I don't like reinventing the
wheel.
Bas Nieuwenhuizen [Thu, 20 Dec 2018 17:08:49 +0000 (18:08 +0100)]
turnip: Add 630 to the list.
Chad Versace [Mon, 12 Nov 2018 22:45:47 +0000 (14:45 -0800)]
turnip: Don't return from tu_stub funcs
Since the macros are lowercase and look like normal functions, that they
change control flow with a hidden return is surprising.
Chad Versace [Mon, 12 Nov 2018 22:42:36 +0000 (14:42 -0800)]
turnip: Fix 'unused' warnings
Now turnip builds without warnings on my machine.
Chad Versace [Mon, 12 Nov 2018 22:28:58 +0000 (14:28 -0800)]
turnip: Add TODO file
Chad Versace [Wed, 7 Nov 2018 04:26:45 +0000 (21:26 -0700)]
turnip: Replace fd_bo with tu_bo
(olv, after rebase) remove inc_drm_uapi
Chad Versace [Mon, 12 Nov 2018 22:21:45 +0000 (14:21 -0800)]
turnip: Use vk_errorf() for initialization error messages
This small cleanup better prepares turnip for VK_EXT_debug_report.
Chad Versace [Mon, 12 Nov 2018 22:23:42 +0000 (14:23 -0800)]
turnip: Add TODO for Android logging
Chad Versace [Mon, 12 Nov 2018 22:13:13 +0000 (14:13 -0800)]
turnip: Require DRM device version >= 1.3
Because the driver will require support for iova.
Chad Versace [Wed, 7 Nov 2018 05:14:04 +0000 (22:14 -0700)]
turnip: Fix indentation
Chad Versace [Wed, 7 Nov 2018 07:17:30 +0000 (00:17 -0700)]
turnip: Fix a real -Wmaybe-uninitialized
Chad Versace [Wed, 7 Nov 2018 06:51:05 +0000 (23:51 -0700)]
turnip: Use vk_outarray in all relevant public functions
Chad Versace [Wed, 7 Nov 2018 07:01:03 +0000 (00:01 -0700)]
turnip: Fix result of vkEnumerate*ExtensionProperties
Given an unsupported layer name, the functions must return
VK_ERROR_LAYER_NOT_PRESENT.
Chad Versace [Wed, 7 Nov 2018 06:52:57 +0000 (23:52 -0700)]
turnip: Fix result of vkEnumerate*LayerProperties
The functions must not return VK_ERROR_LAYER_NOT_PRESENT. The spec
reserves that error for vkEnumerate*ExtensionProperties.
Chad Versace [Mon, 5 Nov 2018 06:42:55 +0000 (23:42 -0700)]
turnip: Fix indentation in function signatures
Due to s/anv/tu/, in many function signatures the indentation of
parameters was off-by-one.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:48:46 +0000 (14:48 +0200)]
turnip: Disable more features.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:43:01 +0000 (14:43 +0200)]
turnip: Initialize memory type in requirements.
Bas Nieuwenhuizen [Fri, 17 Aug 2018 12:35:59 +0000 (14:35 +0200)]
turnip: Cargo cult the Intel heap size functionality.
Bas Nieuwenhuizen [Fri, 10 Aug 2018 11:30:08 +0000 (13:30 +0200)]
turnip: Report a memory type and heap.
Bas Nieuwenhuizen [Fri, 10 Aug 2018 11:19:22 +0000 (13:19 +0200)]
turnip: Add buffer allocation & mapping support.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 18:45:49 +0000 (20:45 +0200)]
turnip: Fix newly introduced warning.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 09:14:33 +0000 (11:14 +0200)]
turnip: Remove abort.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 09:09:01 +0000 (11:09 +0200)]
turnip: Gather some device info.
Bas Nieuwenhuizen [Thu, 9 Aug 2018 08:36:06 +0000 (10:36 +0200)]
turnip: Fix up detection of device.
Chad Versace [Mon, 5 Nov 2018 06:27:54 +0000 (22:27 -0800)]
turnip: Drop Makefile.am and Android.mk
The Makefile.am doesn't work. I tried fixing it but gave up because
I don't understand Autotools. I strongly suspect the Android.mk also
doesn't work.
Rather than maintain the broken build files, let's delete them and
re-add working build files if-and-when we need them. (Maybe we'll be
lucky and turnip will never need to support Autotools!).
Bas Nieuwenhuizen [Wed, 8 Aug 2018 22:23:57 +0000 (22:23 +0000)]
turnip: Add driver skeleton (v2)
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
Connor Abbott [Fri, 8 Mar 2019 12:05:53 +0000 (13:05 +0100)]
nir/serialize: Prevent writing uninitialized state_slot data
The nir_state_slot struct had some padding that was never initialized.
Serializing the individual parts of the struct is more robust and avoids
the overhead of zeroing it at creation, so just do that.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tapani Pälli [Mon, 11 Mar 2019 09:30:01 +0000 (11:30 +0200)]
anv: release memory allocated by glsl types during spirv_to_nir
Fixes leaks for each glsl_type generated:
==32470== 384 bytes in 3 blocks are possibly lost in loss record 18 of 18
==32470== at 0x483880B: malloc (vg_replace_malloc.c:309)
==32470== by 0x4C43F4A: ralloc_size (ralloc.c:119)
==32470== by 0x4C44014: rzalloc_size (ralloc.c:151)
==32470== by 0x4C44258: rzalloc_array_size (ralloc.c:215)
==32470== by 0x4D38957: glsl_type::glsl_type(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:114)
==32470== by 0x4D3BEED: glsl_type::get_struct_instance(glsl_struct_field const*, unsigned int, char const*) (glsl_types.cpp:1146)
==32470== by 0x4D42ECC: glsl_struct_type (nir_types.cpp:501)
==32470== by 0x4CDB5A1: vtn_handle_type (spirv_to_nir.c:1269)
==32470== by 0x4CE53DD: vtn_handle_variable_or_type_instruction (spirv_to_nir.c:4018)
==32470== by 0x4CD8CFF: vtn_foreach_instruction (spirv_to_nir.c:365)
==32470== by 0x4CE5E6B: spirv_to_nir (spirv_to_nir.c:4490)
==32470== by 0x497AF10: anv_shader_compile_to_nir (anv_pipeline.c:173)
v2: move release call to vkDestroyInstance
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Eric Engestrom [Sun, 25 Nov 2018 15:15:09 +0000 (15:15 +0000)]
wsi/x11: use WSI_FROM_HANDLE() instead of pointer casts
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:40:12 +0000 (13:40 +0000)]
wsi/wayland: fix pointer casting warning on 32bit
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:39:30 +0000 (13:39 +0000)]
wsi/display: s/#if/#ifdef/ to fix -Wundef
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Eric Engestrom [Sun, 28 Oct 2018 13:37:26 +0000 (13:37 +0000)]
wsi: deduplicate get_current_time() functions between display and x11
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tapani Pälli [Fri, 8 Mar 2019 08:29:26 +0000 (10:29 +0200)]
anv: release memory allocated by bo_heap when descriptor pool is destroyed
Fixes following leak:
==21853== 32 bytes in 1 blocks are definitely lost in loss record 2 of 20
==21853== at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==21853== by 0x4C4DD7F: util_vma_heap_free (vma.c:221)
==21853== by 0x4C4D647: util_vma_heap_init (vma.c:46)
==21853== by 0x4957B9F: anv_CreateDescriptorPool (anv_descriptor_set.c:578)
Fixes: c520f4dec9cb ("anv: Add a concept of a descriptor buffer")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tapani Pälli [Mon, 4 Mar 2019 12:22:36 +0000 (14:22 +0200)]
anv: destroy descriptor sets when pool gets destroyed
Patch maintains a list of sets in the pool and destroys possible
remaining sets when pool is destroyed.
As stated in Vulkan spec:
"When a pool is destroyed, all descriptor sets allocated from
the pool are implicitly freed and become invalid."
This fixes memory leaks spotted with valgrind:
==19622== 96 bytes in 1 blocks are definitely lost in loss record 2 of 3
==19622== at 0x483880B: malloc (vg_replace_malloc.c:309)
==19622== by 0x495B67E: default_alloc_func (anv_device.c:547)
==19622== by 0x4955E05: vk_alloc (vk_alloc.h:36)
==19622== by 0x4956A8F: anv_multialloc_alloc (anv_private.h:538)
==19622== by 0x4956A8F: anv_CreateDescriptorSetLayout (anv_descriptor_set.c:217)
Fixes: 14f6275c92f1 ("anv/descriptor_set: add reference counting for descriptor set layouts")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Timothy Arceri [Mon, 18 Feb 2019 04:40:49 +0000 (15:40 +1100)]
anv: add support for dumping shader info via VK_EXT_debug_report
This information will be used by the vkpipeline-db tool.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Sat, 9 Mar 2019 08:25:30 +0000 (00:25 -0800)]
iris: Fix backface stencil write condition
A bit too much search and replace here.
Alyssa Rosenzweig [Sun, 10 Mar 2019 19:16:56 +0000 (19:16 +0000)]
panfrost/drm: Cast pointer to u64 to fix warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Tomeu Vizoso [Fri, 8 Mar 2019 09:27:07 +0000 (10:27 +0100)]
panfrost: Add backend targeting the DRM driver
This backend interacts with the new DRM driver for Midgard GPUs which is
currently in development.
When using this backend, Panfrost has roughly on-par functionality as
when using the non-DRM driver from Arm.
Alyssa Rosenzweig: To do so, we implement additional routines for
runtime GPU version detection and fencing. We cleanup some duplicate
code interfering with the new driver. We fix a long-standing memory leak
which is aggravated on the new driver. Finally, we implement BO
import/export in a way compatible with the new driver. These changes are
squashed to preserve bisectability given the hard-to-track ABI shifts in
the nondrm module
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>