Rhys Perry
891cb799aa
radv: disable EXT_vertex_input_dynamic_state when using DGC
...
This simplifies the DGC path and removes some untested code. The only user
of the partial DGC implementation (vkd3d-proton) doesn't use
EXT_vertex_input_dynamic_state.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18465 >
2022-09-16 13:19:55 +00:00
Rajnesh Kanwal
04dc963cd6
pvr: Implement vkCmdWaitEvents2 API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18612 >
2022-09-16 13:02:30 +00:00
Rajnesh Kanwal
1c68620782
pvr: Implement vkCmdResetEvent2 API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18612 >
2022-09-16 13:02:30 +00:00
Rajnesh Kanwal
de1da8fa76
pvr: Implement vkCmdSetEvent2 API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18612 >
2022-09-16 13:02:30 +00:00
Rajnesh Kanwal
1b94dfd4b2
pvr: Implement vkCreateEvent and vkDestroyEvent APIs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18612 >
2022-09-16 13:02:30 +00:00
Karmjit Mahil
def3b88da5
pvr: Add basic skeleton for event sub cmd.
...
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Sarah Walker <Sarah.Walker@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18612 >
2022-09-16 13:02:30 +00:00
Samuel Pitoiset
299d294304
Revert "radv: upload the PS epilog in the existing pipeline BO"
...
This is completely broken because the PS epilog has refcount and
radv_upload_shaders() updates its VA.
This reverts commit 7c34b31db2 .
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18632 >
2022-09-16 11:38:28 +00:00
Iago Toral Quiroga
0fc38b358b
v3dv: fix program id for binning shaders
...
We had a comment stating that we were using different program ids for render
and binning but this isn't true. We were only assigning ids to the render
stages and then we would create the binning stages and not assign a program id
to them at all, so they would remain with a program id of 0.
This change removes the comment and makes sure we assign the same program
id to the binning and render stages of the pipeline, which makes it a lot
easier to match render and binning shaders when debugging.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18630 >
2022-09-16 10:11:06 +00:00
Qiang Yu
074f3216f2
ac/nir/ngg: support gs streamout
...
Port from radeonsi.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
3fe8f88124
ac/nir/ngg: support multi stream per output slot for gs
...
radeonsi may pack multi stream output to same slot.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
c25564b552
ac/nir/ngg: ngg_gs_load_out_vtx_primflag support stream
...
Streamout need primflag for any stream.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
5ec79f9899
ac/nir/ngg: nogs support streamout
...
Port from radeonsi.
Works on both GFX11 and GFX10. Although GFX10 can do atomic
GDS add on all threads, now we just disable the NGG streamout
for GFX10, so it's OK.
There's a difference for the GFX11 implementation with radeonsi
that we do all 4 buffer/stream info calc on a single thread.
It's just because this is simple, we need to update GDS on a
single thread anyway, and streamout is not that performance
critical to loss a small amount of instruction. We may change
to a better implementation when using register based streamout.
When streamout enabled, ES threads need to save all vertex
attributes to LDS besides position. This is because we don't
know where in the streamout buffer to export the attributes to
and wheter there are space in the streamout buffer.
Streamout is done in primitives, so we need to check if there
is space and where the current primitive should be written to
by GDS atomic add, then in GS threads do the streamout.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
30c7608516
ac/nir/ngg: cleanup prim id to prepare for streamout
...
Streamout also need barrier after culling, so move the
prim id barrier up to after culling.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
6762bc8bd6
ac/llvm: implement nir_intrinsic_ordered_xfb_counter_add_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
4e06a8f15e
nir: add nir_intrinsic_ordered_xfb_counter_add_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
1119e06a45
nir,ac/llvm: add nir_intrinsic_load_ordered_id_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
5c2d710064
nir: add nir_intrinsic_load_streamout_buffer_amd
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
2ae357aa23
nir: add nir_intrinsic_load_num_vertices_per_primitive_amd
...
This is used in streamout as radeonsi pass this value for VS
by arg.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Qiang Yu
417cf031a0
nir: fix nir_xfb_info buffer_to_stream length
...
Fixes: 19064b8c3a ("nir: Add a pass for gathering transform feedback info")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Signed-off-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17654 >
2022-09-16 08:51:28 +00:00
Samuel Pitoiset
f5ba4e855e
radv: do not remove PSIZ for VS when the topology is unknown
...
When compiling only the pre-rast stages in a library, the input
assembly state might not be present and the topology would be 0.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519 >
2022-09-16 08:22:16 +00:00
Samuel Pitoiset
7f91555d4c
radv: enable the VS prologs cache if graphicsPipelineLibrary is enabled
...
GPL will re-use most of the VS prologs code.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519 >
2022-09-16 08:22:16 +00:00
Samuel Pitoiset
c199a5160a
radv: bind the VS input state for prologs created with GPL
...
If we have a VS that needs a prolog without using the dynamic state,
that means that it comes from a library, so we can overwrite the
cmdbuf VS input state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519 >
2022-09-16 08:22:16 +00:00
Samuel Pitoiset
0feab7b9cf
radv: prepare the VS input state for prologs created with GPL
...
This state will be bound at pipeline bind time.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519 >
2022-09-16 08:22:16 +00:00
Samuel Pitoiset
fdfa59d7bf
radv: rename radv_pipeline_key::vs::dynamic_vs_input to has_prolog
...
With GPL it's possible to create VS prologs without this dynamic state,
so it seems better to rename.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18519 >
2022-09-16 08:22:16 +00:00
Samuel Pitoiset
57b3bff41a
radv: disable VK_EXT_graphics_pipeline_library with LLVM
...
Epilogs/prologs aren't supported at all.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18609 >
2022-09-16 07:12:40 +00:00
Iago Toral Quiroga
591103d04d
v3dv: don't return incompatible driver if GPU is not present
...
Instead, we should just return VK_SUCCESS. The physical device
won't be initialized and vkEnumeratePhysicalDevices will not
list it as available, which is the expected behavior here.
Also, VK_ERROR_INCOMPATIBLE_DRIVER is not a valid return code
from vkEnumeratePhysicalDevices, so never return that, instead
we return VK_ERROR_INITIALIZATION_FAILED if a valid device was
found but we failed to create the physical device for it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Tested-By: Ryan Houdek <Sonicadvance1@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18591 >
2022-09-16 05:42:26 +00:00
Emma Anholt
03294e1dd1
turnip: Keep a host copy of push descriptor sets.
...
Otherwise, the back-copy on same-layout push descriptor updates would read
from WC memory, which is absurdly slow. Improves performance of
vkoverhead's descriptor_template_12ubo_push from 760k/sec to 2876k/sec.
Improves submit-disabled gfxbench gl_driver2 performance on zink from 79.6
fps to 103.6.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18561 >
2022-09-16 02:43:44 +00:00
Emma Anholt
e313098427
turnip: Ignore pDescriptorCounts[] for non-variable-count layouts.
...
The spec says "If VkDescriptorSetAllocateInfo::pSetLayouts[i] does not
include a variable-sized descriptor binding, then pDescriptorCounts[i] is
ignored." So, make sure that we ignore it unless there is a
variable-sized binding. And, we can keep it simple just taking the
variable-sized path for variable-sized bindings with the 0 variable_count
value to handle "If descriptorSetCount is zero or this structure is not
included in the pNext chain, then the variable lengths are considered to
be zero."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18561 >
2022-09-16 02:43:44 +00:00
Yonggang Luo
a9f3e011e5
drm-shim: drop gnu99 override
...
If we override with gnu99 here, we effectively down-grade from C11,
meaning we can no longer assume static_assert support.
Fixes: 45fb815a75 ("util: implement STATIC_ASSERT using c++11 / c11 primitives")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Suggested-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18611 >
2022-09-16 02:06:38 +00:00
Emma Anholt
7b2bdb31f2
turnip: Skip rather than invalidate LRZ on gl_FragDepth writes.
...
As long as the direction is still compatible, if we skip the LRZ use and
updates for this draw, then we can keep using LRZ later in the scene, as
whatever gl_FragDepth will get written by the shader later will still have
to move the depth in the right direction.
Similarly, the no_earlyz flag that contributes to DISABLE_LRZ just wants
to make sure we don't kill fragments before dispatch, not change what Z
eventually lands.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18606 >
2022-09-15 21:45:05 +00:00
Emma Anholt
62d8124522
turnip: Don't look at RB.Z_READ_ENABLE for setting LRZ.Z_TEST_ENABLE.
...
It will always be set in HW when RB.Z_WRITE_ENABLE is set (since that
implies RB.Z_TEST_ENABLE), but in the case of dynamic Z the flag gets
computed at emit time and not stored to cmd->state.rb_depth_cntl. This
bug effectively disabled LRZ for zink.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18606 >
2022-09-15 21:45:05 +00:00
Emma Anholt
52d35cc82a
turnip: Ignore dynamic color write enables past our number of attachments.
...
We were always disabling LRZ writes on zink+turnip because it sets all the
color write enables (translating directly from GL turning them all on).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18606 >
2022-09-15 21:45:05 +00:00
Emma Anholt
f6d15818ca
turnip: Add some missing LRZ disable debug.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18606 >
2022-09-15 21:45:05 +00:00
Alyssa Rosenzweig
6938c9f9cd
u_transfer_helper: Pack Z24S8 to Z24-in-Z32F and S8
...
On Asahi needed to pass
dEQP-GLES3.functional.texture.specification.texsubimage2d_depth.depth24_stencil8
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18136 >
2022-09-15 21:19:39 +00:00
Alyssa Rosenzweig
45a37ace28
u_transfer_helper: Handle Z24X8 for drivers that don't use the
...
interleaved transfer_map
Fixes
dEQP-GLES3.functional.texture.format.sized.2d.depth_component24_pot on
Asahi.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18136 >
2022-09-15 21:19:39 +00:00
Konstantin Seurer
b12cc5c4fe
radv: Cleanup radv_GetInstanceProcAddr
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18600 >
2022-09-15 20:50:17 +00:00
Juston Li
fc1ff335d9
venus: use buffer cache for vkGetDeviceBufferMemoryRequirements
...
Align with vkGetBufferMemoryRequirements2 and utilize the cache for
retrieving memory requirements before trying the host call.
Fixes
dEQP-VK.api.invariance.memory_requirements_matching
dEQP-VK.memory.requirements.create_info.buffer.regular
Signed-off-by: Juston Li <justonli@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18603 >
2022-09-15 20:35:18 +00:00
Chia-I Wu
fe36f763d6
vulkan: update comments to device enumeration callbacks
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18607 >
2022-09-15 20:01:29 +00:00
Hans-Kristian Arntzen
f5b46a643f
radv: Implement VK_EXT_mutable_descriptor_type.
...
Trivial promotion from VALVE, just rename enums and types.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18610 >
2022-09-15 16:55:25 +00:00
Hans-Kristian Arntzen
3bfda5cc0e
vulkan: Update to 1.3.228 headers.
...
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18610 >
2022-09-15 16:55:25 +00:00
Sil Vilerino
3d4c36a3bc
d3d12: d3d12_video_buffer_create_impl make resident after checking for resource creation
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
2003d2d928
d3d12: Add VPBlit processor check for D3D12_FEATURE_VIDEO_PROCESS_MAX_INPUT_STREAMS
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
0325a2a1a3
d3d12: Allow video processing for formats other than NV12
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
07bb5951fc
d3d12: Allow formats other than NV12 in d3d12_video_buffer
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
fd84575809
d3d12: Add support for importing d3d12_video_buffer from handle
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
59c45e1ed7
d3d12: Fix leak in d3d12_resource_from_resource and usage in d3d12 video dec, enc
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
cdd83c6110
d3d12: Fix winsys displaytarget leak in d3d12_resource
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
cd03643309
d3d12: Fix leak in d3d12_video_proc when re-creating ID3D12VideoProcessor
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
c0e1548844
d3d12: Fill feedback in d3d12_video_encoder_encode_bitstream so vaSyncSurface properly populates buf->coded_size
...
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00
Sil Vilerino
d672cc39ba
d3d12: Avoid heap allocations on hot path d3d12_video_decoder_dxva_picparams_from_pipe_picparams_hevc
...
Using pre-allocated storage now.
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328 >
2022-09-15 11:19:39 -04:00