Matt Coster
3068f046bc
pvr: Check depth/stencil attachment is tile-aligned
...
The hardware requires depth/stencil attachments to be size-aligned to
the zls tile size (as defined by rogue_get_zls_tile_size_xy()).
In practice however, this is a tiny edge case. The restriction only
applies during some operations, and any attachment larger than the tile
size will be twiddled and over-allocated into alignment beforehand.
This commit also adds the mentioned rogue_get_zls_tile_size_xy()
function. These values differ from the regular tile_size_{x,y} feature
values in some cases. Instead of including them as features as well, we
compute them directly.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20160 >
2022-12-08 14:53:13 +00:00
Matt Coster
2112a7d9ed
pvr: Account for other depth formats in pvr_frag_state_stream_init()
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20160 >
2022-12-08 14:53:13 +00:00
Matt Coster
6404eee627
pvr: Add stencil support in render job setup
...
The implementation here assumes separate depth and stencil attachments
are not possible, as they are in Vulkan without VK_KHR_dynamic_rendering
and before core 1.3.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20160 >
2022-12-08 14:53:13 +00:00
Matt Coster
724e662948
pvr: Extract common code from pvr_CmdDispatch{,Indirect}
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20159 >
2022-12-08 13:10:35 +00:00
Matt Coster
46213744c7
pvr: Track max_shared_regs for compute jobs
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20159 >
2022-12-08 13:10:35 +00:00
Matt Coster
293230faf1
pvr: Refactor pvr_compute_pipeline and pvr_compute_pipeline_shader
...
This brings the two structs more into line with their graphics
counterparts, and removes the extra member access previously required
to access almost all members of pvr_compute_pipeline.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20159 >
2022-12-08 13:10:35 +00:00
Matt Coster
40f09f4e1c
pvr: Add empty PDS program
...
This is a trivial program to accomplish allocation of local/common
store shared registers, used when no actual program is available or
required.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20130 >
2022-12-05 14:46:07 +00:00
Matt Coster
46c2492a5d
pvr: Add pvr_pds_compute_shader_program_init()
...
Some fields are to be initialized to a specific non-zero value if
unused; this inline function takes care of that.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20130 >
2022-12-05 14:46:07 +00:00
Matt Coster
8c506c4b03
pvr: Use util_dynarray_append_dynarray()
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18904 >
2022-12-05 13:29:43 +00:00
Matt Coster
d5740d85c4
pvr: debug: Print hexdump at the end of all sub buffers
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Matt Coster
b530a6b055
pvr: debug: Add option to zero-alloc all buffer objects
...
This is designed for use by the control stream dump debug option, but
can also be used any time deterministic buffer state is desired.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Matt Coster
eb44597c2c
pvr: debug: Print hexdump for referenced buffers with unknown encoding
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Matt Coster
49bdc7f7f7
pvr: debug: Add offset address field type for dumps
...
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Matt Coster
e05b32d00c
pvr: debug: Include hexdump after each block in control stream dump
...
This makes it easier to quickly identify the raw words associated with
decoded values.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Matt Coster
14c0f3de4c
pvr: debug: Enhancements to hex dumps
...
Contains the following enhancements & fixes:
- Increase (decrease?) the granularity to single bytes rather than
using an arbitrary word size,
- Remove some spurious semicolons at the end of macros, and
- Do not collapse sections of zero bytes that consist of only a single
line.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20040 >
2022-12-01 15:05:59 +00:00
Karmjit Mahil
0009b37bf1
pvr: Remove a todo in vkCmdEndRenderPass2().
...
The first end_sub_cmd() is to make sure that we end the last sub_cmd.
The end_sub_cmd() in pvr_resolve_unemitted_resolve_attachments() makes
sure that we end any transfer sub_cmds created in there.
Suggested-by: Frank Binns <frank.binns@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957 >
2022-12-01 14:55:55 +00:00
Karmjit Mahil
e89be067b3
pvr: Replace sub_cmd flags with bools within each sub_cmd type.
...
This commit remove:
- PVR_SUB_COMMAND_FLAG_TRANSFER_SERIALIZE_WITH_FRAG.
- PVR_SUB_COMMAND_FLAG_OCCLUSION_QUERY.
The first flag was specific to transfer sub commands and the last
one, for graphics ones. Now we just have a bool in the transfer
sub_cmd, and one in the graphics sub_cmd.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957 >
2022-12-01 14:55:55 +00:00
Karmjit Mahil
8c9217e4d8
pvr: Handle PVR_SUB_COMMAND_FLAG_OCCLUSION_QUERY.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957 >
2022-12-01 14:55:55 +00:00
Karmjit Mahil
904a3c4dd7
pvr: Handle PVR_SUB_COMMAND_FLAG_TRANSFER_SERIALIZE_WITH_FRAG.
...
The flag was previously named PVR_SUB_COMMAND_FLAG_WAIT_ON_PREVIOUS_FRAG.
Since the next fragment job is also made to wait for the transfer
job to complete, the previous name might have been a bit misleading.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19957 >
2022-12-01 14:55:55 +00:00
Rajnesh Kanwal
24b1e3946c
pvr: Add support to submit occlusion query sub cmds.
...
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
1b87ba7c9c
pvr: Create a separate compute context for queries.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
3ea2f82169
pvr: Set isp userpass to dirty for secondary command buffers.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
224cfd772c
pvr: Process queries and emit write program when ending sub_cmd.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
952c1a55c8
pvr: Kick job and end sub_cmd if barrier_store is set in vkCmdExecuteCommands.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
5c34be4340
pvr: Process secondary buffer queries in vkCmdExecuteCommands.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
9df4be8cc4
pvr: Save error result in cmd_buffer state.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
b6e8e1cf37
pvr: Implement vkCmdCopyQueryPoolResults API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
0aa9f32b95
pvr: Implement vkCmdResetQueryPool API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
d69362ae84
pvr: Add support to generate query programs.
...
This commit adds support to generate three types of query related
programs. PVR_QUERY_TYPE_AVAILABILITY_WRITE allows to submit the
queries, PVR_QUERY_TYPE_RESET_QUERY_POOL allows to reset the pool
and PVR_QUERY_TYPE_COPY_QUERY_RESULTS is to copy the results.
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
963b696511
pvr: Add PVR_SUB_CMD_TYPE_OCCLUSION_QUERY type sub cmd.
...
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
b85ee36051
pvr: Create device specific compute query programs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
68b8f80fb2
pvr: Implement vkCmdEndQuery API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
2b1992a000
pvr: Implement vkCmdBeginQuery API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
5055c182eb
pvr: Sequential dependency should be NONE for 0 constant shared regs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
279c7c6d5a
pvr: Implement vkGetQueryPoolResults API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
4fc2586efd
pvr: Add support to generate update compute kernel.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
9ac269fc7d
pvr: Add support to generate compute kernel to update shared regs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
e38273013b
pvr: Change CDM to compute, TA to geometry and 3D to fragment.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Karmjit Mahil
09eb2a4023
pvr: Add missing valgrind includes and fix unused return value.
...
On including the header the compiler started throwing warnings
about the return value not being used when setting and getting the
vbits.
This commit adds the missing valgrind related headers and fixes the
warnings caused by including them.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Matt Coster <matt.coster@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20035 >
2022-11-29 14:19:41 +00:00
Sarah Walker
2673d0f8b2
pvr: Query kernel for free list max size
...
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19976 >
2022-11-29 10:10:16 +00:00
Karmjit Mahil
e30b6563ca
pvr: Setup tile buffers.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20007 >
2022-11-28 11:38:38 +00:00
Karmjit Mahil
42e9cc010d
pvr: Don't print out secondaries if they aren't used.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
ebf639f4ff
pvr: Add '+' before desc offsets in debug output.
...
Having the '+' makes it more obvious that it's the offset of the
primary/secondary.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
8a69019277
pvr: Use glsl syntax to show set and binding number.
...
This makes the descriptor set debug output's descriptor set number
and binding number more obvious. The previous format wasn't as
obvious unless you knew how to read it.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
260db8112a
pvr: Change how desc set debug output section dividers are printed.
...
Instead of hard coding in the exact string to print out for the
divider, now we're printing the same char n times so we only need
to specify the character and how many times to retreat it.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
02626072e2
pvr: Don't print inactive bindings.
...
Previously all bindings were printed out and an "X" was used to
indicate if a binding was not active for a particular stage.
This commit just skips those bindings entirely reducing possible
confusion.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
6d9a7d1597
pvr: Print out empty row if dynamic primaries or secondaries are missing.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:36 +00:00
Karmjit Mahil
567ae39738
pvr: Explain why dynamic descriptors are allocated separately.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20008 >
2022-11-28 09:12:35 +00:00
Matt Coster
20747fabba
pvr: debug: Add PPP sub-buffer support to CSB dumps.
...
This patch also includes the infrastructure for dumping sub-buffers in
print_sub_buffer() and new field types for floating and fixed point
decimals.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18948 >
2022-11-25 16:42:55 +00:00
Matt Coster
97e54d69a9
pvr: csbgen: Remove TEXTURE_WRAP_VARYING-dependent fields
...
This patch removes all fields dependent on the TEXTURE_WRAP_VARYING,
feature which is not currently supported.
It also removes STATE_PPP_CTRL.trp which is conditional on another
unused feature.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18948 >
2022-11-25 16:42:55 +00:00