Chia-I Wu
ba6bcb387c
turnip: preliminary support for tu_CmdBeginRenderPass
2019-03-11 10:01:41 -07:00
Chia-I Wu
1085df8176
turnip: preliminary support for tu_image_view_init
2019-03-11 10:01:41 -07:00
Chia-I Wu
992ecdd40e
turnip: preliminary support for tu_BindImageMemory2
2019-03-11 10:01:41 -07:00
Chia-I Wu
ef49b07b83
turnip: add cmdbuf->bo_list to bo_list in queue submit
2019-03-11 10:01:41 -07:00
Chia-I Wu
6c4df43db5
turnip: add tu_bo_list_merge
...
tu_bo_list_merge adds an entire list to the current list.
2019-03-11 10:01:41 -07:00
Chia-I Wu
7ad01913bd
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.
2019-03-11 10:01:41 -07:00
Chia-I Wu
c969d8b975
turnip: add more tu_cs helpers
2019-03-11 10:01:41 -07:00
Chia-I Wu
39ba2b20d1
turnip: inline tu_cs_check_space
...
This allows the fast path (size check) to be inlined.
2019-03-11 10:01:41 -07:00
Chia-I Wu
2bcaa78236
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.
2019-03-11 10:01:41 -07:00
Chia-I Wu
b01d1618a4
turnip: minor cleanup to tu_cs_end
...
Add comments and error checking.
2019-03-11 10:01:41 -07:00
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