Alejandro Piñeiro
7bfe1db93c
v3dv/cmd_buffer: emit Scissor packets
...
As this is done as part of CmdDraw, we also add the initial stub of
such function here
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:26 +00:00
Alejandro Piñeiro
d479f86284
v3dv/cmd_buffer: init command buffer dynamic state during pipeline bind
...
So copying it from the pipeline to the cmd_buffer if defined.
Starting with Viewport/Scissor dynamic state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:26 +00:00
Alejandro Piñeiro
f752cdbab1
v3dv/pipeline: start to track dynamic state
...
Starting with Viewport/Scissor data from VkGraphicsPipelineCreateInfo.
Note that initially this can be somewhat counter-intuitive. What we
are really doing it is filling up the structs with the dynamic stuff
from the pipeline, when such is not defined as dynamic. This is what
anv/radv does, and basically means that we treat both in the same way,
so easier after that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:26 +00:00
Alejandro Piñeiro
5285d83974
v3dv: CmdSetViewport and CmdSetScissor implementation
...
This commit also introduces adding dynamic state definitions, dirty
flags, and setting them on such methods, although this commit still
doesn't use all that info yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:26 +00:00
Alejandro Piñeiro
fca4dcee9f
v3dv: initial stub for CmdBindPipeline
...
Right now it only sets the pipeline to the command buffer state.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:26 +00:00
Iago Toral Quiroga
3f00638cff
v3dv: setup color clear values at subpass setup time
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
9e6bf4eebc
v3dv: be more conservative resetting command buffer state
...
We don't want to reset everything, but setting some pointer fields
to NULL should help debug issues better.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
570ff24d3f
v3dv: clear set of BOs in the command buffer on reset
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
bd3c28bf69
v3dv: keep track of the numbre of BOs in a command buffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
bb727684e8
v3dv: create the command buffer BO set before we init CLs
...
The init of the CLs doesn't create any BOs for now, but this looks
like a sensible decision to future-proof things.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
6e4471c14c
v3dv: implement vkEndCommandBuffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
e6e80d3f9b
v3dv: emit the render command list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
61399b21c0
v3dv: emit scissor to render area and precompute hw color clear values
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
4075f8e221
v3dv: revert the decision that the command buffer takes ownership of BOs
...
The CLs in the command buffer will reference BOs allocated by the application
such as images and buffers, that will be destroyed by the application, so
destroying them with the command buffer won't be correct.
For now, let's just assume that the comman buffer only owns the BOs
it explicitly allocates and that other abstractions own their own
BOs and are responsible from freeing them.
In the future, we might consider a ref/unref system similar to v3d's, but
for now this should work.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
ec1d7e453e
v3dv: add the tile state and alloc BOs to the command buffer BO list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
52d9b8c05b
v3dv: add a few more API stubs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
bab28ab1e8
v3dv: make the command buffer own the command list BOs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
0020eb4f90
v3dv: implement vkCmdBeginRenderPass
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
3cf527ab7a
v3dv: start handling command buffer status
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
9bb6d6f1ba
v3dv: implement vkBeginCommandBuffer
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
d9a7ba317c
v3dv: implement vk{Allocate,Free}CommandBuffers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00
Iago Toral Quiroga
1d8d8c06b8
v3dv: implement vkCreateCommandPool
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766 >
2020-10-13 21:21:25 +00:00