Commit graph

5368 commits

Author SHA1 Message Date
Eric R. Smith
9e04c0a818 panfrost: add support for image2DMSArray on bifrost
On bifrost we only can use 3 coordinates for images, but
image2DMSArray needs 4 (x, y, sample#, and array index).
We work around this by making the image nr_samples times
higher than the original image, using the Y coordinate to
address the sample plane. This limits the maximum image
height (to 4K pixels instead of 64K pixels in the 16 sample
case) but at least allows us to use the images.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
3173b2c9b7 panfrost: implement image2dms support for valhall
On valhall, the sample index should go in the R component
of the image load/store/lea instruction. This provides a
straightforward way to implement image2DMS and
image2DMSArray image load and store for valhall.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
657591728a panfrost: move lower_image_ms to after lower_atomics
The nir_lower_image_atomics_to_global pass can create some image
load/stores, so we need to do the multisample image load/store
lowering after this.

Also, the pass only actually works on bifrost and below, so skip it
for valhall.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
346ec90fdd panfrost: move pan_arch definition out of genxml to pan_props.h
The pan_arch function is useful elsewhere, and doesn't rely on
anything else within genxml/gen_macros.h.

It's useful, for example, to find the architecture from the
GPU id in bifrost_compile.c, where before we were using ad-hoc
shifting.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Eric R. Smith
1fd00e4270 panfrost: Add b2i16 conversion to table
This is needed by the newer image2dMS code.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30521>
2024-08-23 16:57:58 +00:00
Boris Brezillon
fba1c3c721 panvk: Prepare cmd_meta for Valhall
We don't have an RSD descriptor on Valhall, and the vertex
attributes are part of the driver descriptor set, which we
re-emit anyway.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
713f5c3600 panvk: Prepare the cmd_desc_state logic for Valhall
Quite a few things are common to Valhall/Bifrost. Specialize what's
different, and move the move to the root driver directory.

We don't compile it on v10 as this requires the cmd_buffer bits
that are not yet defined.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
c257bf5142 panvk: Conditionally register an host address when tracking user memory
When PANVK_DEBUG=dump, all internal buffers get dumped, but not the user
ones, because they don't have a host address attached to them. Let's
register one when mappings dump is enabled.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
b7e0f14959 panvk: Move panvk_debug_adjust_bo_flags() to panvk_device.h
We will need it for the CSF backend.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
b1db49d078 panvk: Allow more descriptor sets on Valhall
The hardware limit on Valhall is 16 descriptor tables, but we reserve
one for our internal descriptors (dummy sampler, vertex attributes and
dynamic buffers), which leaves us with 15 user descriptor sets.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:39:00 +00:00
Boris Brezillon
5571a4cdaa panvk: Make panvk_queue_finish() a per-arch function
The JM implementation of queue_finish() is simple enough to be inlined,
but that won't be the case of the CSF implementation. So let's make
this function per-arch so we can move it to panvk_vX_queue.c.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
09682bc5b0 panvk: Prepare panvk_cmd_pool for CSF
We will have a new BO pool for CS buffers in the CSF backend.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
598a8d9d11 panvk: Collect allocated push sets at the command level
It makes the reset of command buffers a tad simpler, and it allows
re-cycling push sets.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Boris Brezillon
5b1cddf35f panvk: Prepare the blend logic for Valhall
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Rebecca Mckeever
c1b3db966a panvk: Move the VkEvent logic to the jm folder and make it per-arch
The CSF implementation will be completely different.

Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Mary Guillemard
27beadcbdb panvk: Extend the shader logic to support Valhall
Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Mary Guillemard
e350c334b6 panvk: Extend the descriptor lowering pass to support Valhall
Co-developed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30736>
2024-08-23 14:38:59 +00:00
Mary Guillemard
a63277cc17 panvk: Remove unused vk_vertex_input_state in graphics_save_ctx
This is unused and duplicated in dyn_state::vi

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
1710925282 panvk: Save and restore vertex buffer in gfx_meta
This was missing from the vk_meta switch.

This fixes
"dEQP-VK.draw.renderpass.multiple_clears_within_render_pass.*"

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f74dd596d5 ("panvk: Add helpers to save/restore the compute/graphics state for meta operations")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
a659cd3b03 panvk: Simplify meta ctx save/restore
As dynamic state is marked as dirty, there is no point to save the state
of related resources.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
ff24a8384c panvk: Manually copy dynamic state in meta_gfx
This fixes assertion for "dEQP-VK.dynamic_state.monolithic.image.*" when
the viewport state would have some dynamic state set before binding any
pipelines.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: f74dd596d5 ("panvk: Add helpers to save/restore the compute/graphics state for meta operations")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Mary Guillemard
1d33aee197 panvk: Close batch in CmdBeginRendering if already open
Because of the current event implementation, we can end up with an open
batch when entering CmdBeginRendering. As a result, we now reopen a
batch in that situation for now.

This fix crashes various crash in
"dEQP-VK.synchronization.op.single_queue.event.*".

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30782>
2024-08-23 06:11:39 +00:00
Louis-Francis Ratté-Boulianne
ce76caf3ee pan/bi: implement nir_intrinsic_load_draw_id
Only valid on >= 9

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
antonino
7c1fe4bdbe pan/cs: add helpers to generate csf loop
Add support for loops where we continually check whether a
condition is met. Also add a `cs_while` pseudo-instruction to more
easily use that feature.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:22 +00:00
antonino
50d2396b7e pan/cs: add helpers to emit contiguous csf code blocks
Add support for block, a monolithic sequence of instruction that
must live in a virtually contiguous portion of code, and label, a
reference to a specific position in a block.

Signed-off-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30583>
2024-08-22 21:13:21 +00:00
Daniel Stone
4e56472da2 ci/panfrost: Move manual/nightly jobs to postmerge stage
Create a new stage called arm-postmerge and move the full and manual
jobs over there, to avoid entanglement with the pre-merge jobs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
2024-08-22 15:35:18 +00:00
Mary Guillemard
a869237d50 panvk: Fix viewport calculation
This fix
"dEQP-VK.dynamic_state.*.general_state.{bind_order, state_persistence, state_switch}"

Fixes: 1f57aae4e4 ("panvk: Move vkCmdDraw* functions to their own file")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30754>
2024-08-21 18:47:03 +00:00
Mary Guillemard
5b129e6eb9 panvk: Expose trivial google extensions
Those three extensions are handled in common code.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30754>
2024-08-21 18:47:03 +00:00
Mary Guillemard
a6496e3a16 panvk: Properly propagate helper invocations requirement
Previous changes of the helper invocation pass fixed missing conditional
control flow tracking but this is not enough.

Propagation of the dependency chain also need to handle value outside of
direct predecessors.

This fix "dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners"
for real this time.

Fixes: 33fef27356 ("bi: Do not mark tex ops as skip when dest is used by control flow")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30754>
2024-08-21 18:47:02 +00:00
Boris Brezillon
3b2de16fa5 panvk/ci: Enable clearing tests
After the transition to vk_meta, all clear tests seem to pass.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:36 +00:00
Boris Brezillon
a31a55d348 panvk: Lower var copies before lowering IOs
Variable copy lowering might generate new IOs, so let's make sure
those are lowered before the IOs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:36 +00:00
Boris Brezillon
4ecfc45cd0 panvk: Allow ZS formats on 1D/3D images
There's no real blocker here, so let's just allow it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
213e895da0 panvk: Allow compressed formats
Compressed formats were disabled because of the different layout for
u_interleaved(compressed), where the 16x16 texel tile model for
non-compressed is replaced by a 4x4 block tile. This prevents us from
creating RGBA views of compressed images, which break copies.

The simple option is to keep compressed images linear. The more complex
one would be to patch coordinates/frag-coords on the shader side when
we're dealing with a compressed texture/color-attachment, but given
we're using vk_meta for copies, it's not something we can easily do,
so let's go for the first option and see if we want to revisit it
later.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
4a30a28653 panvk: Fix depth-stencil AFBC support
When both the depth and stencil attachments are enabled, and the
underlying image is AFBC, it must be an combined Z24S8 format.

Make sure this is the case when initializing the fbinfo object.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
baf8570b28 panvk: Add support for render-pass resolve operations
Use vk_meta_resolve_rendering() to handle render-pass resolves.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
0b08826f7d panvk: Lower load_multisampled_pan
Needed if the fragment shader writes gl_SampleMask.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
5067921349 panvk: Switch to vk_meta
Replace our custom panvk_meta stuff by something based on vk_meta.
That's less gen-specific code to maintain which will help with v10
support.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
38258138ad panvk: Rework the modifier selection
We move the modifier selection after the panvk_image initialization
so we have less VkXxx objects to retrieve, and split the 3 cases
(explicit modifier, explicit modifier list ordered by preference and
driver auto-selection based on the image attributes) to make things
clearer.

We also check formats against the pan_best_modifiers array which is
sorted by GPU order of preference and serve as an is_valid_modifier()
too.

Finally, we add the following new constraints on u-tiled/AFBC:
- don't allow u-tiled on images with compressed formats that might have
  non-compressed views
- don't allow u-tiled or AFBC on 1D images

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
f74dd596d5 panvk: Add helpers to save/restore the compute/graphics state for meta operations
Those helpers will be used to save/restore the command buffer
state when calling vk_meta helpers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
c912f80a08 panvk: Constify the shader pointers in the graphics state
The command buffer logic is not supposed to modify these objects.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
495b718b3f panvk: Rework the NULL test in panvk_buffer_{gpu_ptr,range}()
We are about to allow buffer memory allocation from the cmd_buffer
memory pool. In order to allow that, we need to tweak the NULL checks
done in panvk_buffer_{gpu_ptr,range}() to use the device address
instead of the bo field.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
1b16f9ec05 pan/texture: Allow uncompressed view of compressed image
Needed image copies in Vulkan, where we create RGBA views of
compressed images to do the copy.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
8eec3284e1 panvk: Add missing vk_device_finish() calls
We do free the device object, but never call vk_device_finish() on
it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
fd8700b793 panvk: Rename the error labels in create_device()
It's usually clearer to describe what the error unwinding entrypoint
does than which type of error it's supposed to handle, because some
entrypoints can be called from different error paths.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29451>
2024-08-21 16:14:35 +00:00
Boris Brezillon
b3a2233f88 panvk: Don't spam the error output if the device is not for us
The Vulkan loader tries each driver until it finds one that's accepting
the device. Don't complain about panvk being non-conformant until we're
sure the device is for us.

Reported-by: Rob Clark <robclark@freedesktop.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30756>
2024-08-21 15:18:49 +00:00
Boris Brezillon
62a63b69ec pan/tex: Allow format reinterpretation on v9+
Creating views of images using a different format should be possible
as long as the internal layout match. Pick the format of the view
rather than the original image format when creating texture planes
on v9.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
6b49b1708e pan/bi: Support native layer_id store/load on Valhall
On Valhall, we can store the layer index in PositionFIFO attributes and
have the primitives dispatched to the appropriate list in the tiler
context, which means we no longer have to issue N IDVS jobs when doing
layered rendering.

On the fragment shader side, we can pass the layer index through the
frame_argument field, which can be preloaded in r62-r63, so do that to
save a push uniform slot.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
fa24b3f4d0 pan/shader: Fix FS varyings.input_count initialization on v9+
There's no varying outputs on a fragment shader, but we need to
initialize the varying inputs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
65d86cc5df pan/cs: Provide cs_root_chunk_{gpu_addr,size}() and cs_is_empty() helpers
It's nicer/shorter than accessing cs_builder internals.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30695>
2024-08-20 13:20:51 +00:00
Boris Brezillon
43dca3640d pan/cs: Allow lazy root chunk allocation
We don't necessarily want to allocate the root CS chunk upfront if we
don't know if there will be instructions emitted on the CS.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30695>
2024-08-20 13:20:51 +00:00