Chia-I Wu
af4eb20891
turnip: add tu_cs_add_bo
...
Refactor BO allocation code out of tu_cs_begin. Add error checking.
2019-03-11 10:01:41 -07:00
Chia-I Wu
ae9a72b48b
turnip: document tu_cs
2019-03-11 10:01:41 -07:00
Chia-I Wu
45120127ea
turnip: run sed and clang-format on tu_cs
2019-03-11 10:01:41 -07:00
Kristian H. Kristensen
0801019d33
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.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
23d6f0f970
turnip: Move stream functions to tu_cs.c
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
ac2a845abf
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.
2019-03-11 10:01:41 -07:00
Chia-I Wu
2e684cb800
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.
2019-03-11 10:01:41 -07:00
Chia-I Wu
b7a6a80e6c
turnip: constify tu_device in tu_gem_*
2019-03-11 10:01:41 -07:00
Chia-I Wu
3809e6cf63
turnip: add wrappers around DRM_MSM_SUBMITQUEUE_*
...
Add tu_drm_submitqueue_new and tu_drm_submitqueue_close.
2019-03-11 10:01:41 -07:00
Chia-I Wu
fcf24f47aa
turnip: add wrappers around DRM_MSM_GET_PARAM
...
Add tu_drm_get_gpu_id and tu_drm_get_gmem_size.
2019-03-11 10:01:41 -07:00
Chia-I Wu
a25a803127
turnip: remove unnecessary libfreedreno_drm dep
...
Remove libfreedreno_drm dep and unused fd_device.
2019-03-11 10:01:41 -07:00
Chia-I Wu
91232c52fe
turnip: use msm_drm.h from inc_freedreno
...
The recent change to msm_drm.h changed the APIs in an incompatible
way.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
4f32869e3d
turnip: Shorten primary_cmd_stream name.
...
It really is too long.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
26261847cf
turnip: Fill command buffer
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
abe352525d
turnip: Implement submission.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
abf0792bbe
turnip: Make bo_list functions not static
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
65e0e79054
turnip: Add msm queue support.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
8713499657
turnip: Add a command stream.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
e3a9b07923
turnip: Implement a slow bo list
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
48b65201a6
turnip: Implement some UUIDs.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
7ae005f037
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%)
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
06602bf77f
turnip: Remove some radv leftovers.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
c72e6085e7
turnip: Implement some format properties for RGBA8.
...
Just to get some tests to not skip. This is neither complete
nor completely correct.
2019-03-11 10:01:41 -07:00
Chia-I Wu
d30baaaba6
turnip: add .clang-format
...
Add and apply .clang-format.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
6401ad389e
turnip: Implement pipe-less param query.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
b0562e272f
turnip: move tu_gem.c to tu_drm.c
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
3d99dd55a0
turnip: Stop hardcoding the msm version check.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
d9c3dc8ec8
turnip: Add image layout calculations.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
603354cffa
turnip: Fix memory mapping.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
426f6e46a8
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.
2019-03-11 10:01:41 -07:00
Bas Nieuwenhuizen
f0a24e123f
turnip: Add 630 to the list.
2019-03-11 10:01:41 -07:00
Chad Versace
c3b5eea2cc
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.
2019-03-11 10:01:41 -07:00
Chad Versace
bf709dfe3f
turnip: Fix 'unused' warnings
...
Now turnip builds without warnings on my machine.
2019-03-11 10:01:41 -07:00
Chad Versace
471f2d8409
turnip: Add TODO file
2019-03-11 10:01:41 -07:00
Chad Versace
359e9016c5
turnip: Replace fd_bo with tu_bo
...
(olv, after rebase) remove inc_drm_uapi
2019-03-11 10:01:33 -07:00
Chad Versace
eb16ec715f
turnip: Use vk_errorf() for initialization error messages
...
This small cleanup better prepares turnip for VK_EXT_debug_report.
2019-03-11 10:01:33 -07:00
Chad Versace
1372c95ad2
turnip: Add TODO for Android logging
2019-03-11 10:01:33 -07:00
Chad Versace
cca208a033
turnip: Require DRM device version >= 1.3
...
Because the driver will require support for iova.
2019-03-11 10:01:33 -07:00
Chad Versace
5486943ed9
turnip: Fix indentation
2019-03-11 10:01:33 -07:00
Chad Versace
99a5de14cb
turnip: Fix a real -Wmaybe-uninitialized
2019-03-11 10:01:33 -07:00
Chad Versace
75f2c8458b
turnip: Use vk_outarray in all relevant public functions
2019-03-11 10:01:33 -07:00
Chad Versace
3ec87d56bd
turnip: Fix result of vkEnumerate*ExtensionProperties
...
Given an unsupported layer name, the functions must return
VK_ERROR_LAYER_NOT_PRESENT.
2019-03-11 10:01:33 -07:00
Chad Versace
ee835c7790
turnip: Fix result of vkEnumerate*LayerProperties
...
The functions must not return VK_ERROR_LAYER_NOT_PRESENT. The spec
reserves that error for vkEnumerate*ExtensionProperties.
2019-03-11 10:01:33 -07:00
Chad Versace
daffb01704
turnip: Fix indentation in function signatures
...
Due to s/anv/tu/, in many function signatures the indentation of
parameters was off-by-one.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
b4f3e0d549
turnip: Disable more features.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
a01edd9c86
turnip: Initialize memory type in requirements.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
7be2e1fc37
turnip: Cargo cult the Intel heap size functionality.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
462b693d94
turnip: Report a memory type and heap.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
8e52e8183c
turnip: Add buffer allocation & mapping support.
2019-03-11 10:01:33 -07:00
Bas Nieuwenhuizen
a0d62e4337
turnip: Fix newly introduced warning.
2019-03-11 10:01:33 -07:00