Commit Graph

6231 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen a97a6d0f0e radv: reserve space for the scissor in vkCmdBeginRendering.
Fixes: c7d0d328d5 ("radv: Set the window scissor to the render area, not framebuffer")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20014>
2022-11-26 14:35:54 +00:00
Tatsuyuki Ishi 2a3ed9521d radv: Enable rayTracingPipelineShaderGroupHandleCaptureReplay[Mixed].
Tested that a q2rtx gfxr capture replays correctly and without the
capture/replay feature warning.

I ran the CTS too, but it seems to be just giving out a pass without
testing the code path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19949>
2022-11-26 13:57:56 +00:00
Bas Nieuwenhuizen eab61863c0 radv: Fix sampler types in ETC2 decode.
Otherwise we'd have a type mismatch vs texture fetches, which
is asserted upon these days.

Fixes: 1153db23f5 ("radv: Add ETC2 decode shader.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19914>
2022-11-25 17:16:14 +00:00
Bas Nieuwenhuizen c6ec4925c0 radv: Use correct init order for ETC2 image views
Fixes: d9048e31a0 ("radv: Use vk_image_view as the base for radv_image_view")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19914>
2022-11-25 17:16:14 +00:00
Samuel Pitoiset ccac91db7b radv: make sure to mark DCC as compressed on GFX11
The bit has moved to FDCC_ENABLE on GFX11.
Found by inspection.

Cc: 22.3 mesa-stable
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/20005>
2022-11-25 15:22:18 +00:00
Samuel Pitoiset 762e5cccb5 radv: remove useless parenthesis in radv_cmd_buffer_flush_dynamic_state()
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/19843>
2022-11-25 10:51:06 +00:00
Samuel Pitoiset e9b3a6b81f radv: simplify handling logic op when it's not dynamic
The command buffer already emits ROP3_COPY if the logic op is disabled.

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/19843>
2022-11-25 10:51:06 +00:00
Samuel Pitoiset 470fbb35ef radv: fix and rework DISABLE_DUAL_QUAD setting
This bit can be enabled with various combinations and it looks better
to only emit it from the cmdbuf.

Fixes: 17b9aa92b7 ("radv: add support for dynamic logic op enable")
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/19843>
2022-11-25 10:51:06 +00:00
Samuel Pitoiset 0a327f9c7a radv: re-emit dynamic provoking vertex mode if primitive topology changed
The vertex shader depends on the primitive topology.

Fixes: 2cce8500de ("radv: add support for dynamic provoking vertex mode with NGG")
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/19843>
2022-11-25 10:51:06 +00:00
Samuel Pitoiset de4de09a56 radv: re-emit dynamic depth clamp enable if depth clip enable changed
The depth clamp mode depends on depth clip enable/disable.

Fixes: e48c0fbd8f ("radv: add support for dynamic depth clamp enable")
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/19843>
2022-11-25 10:51:06 +00:00
Samuel Pitoiset edc830be34 radv: fix memleak with link time optimizations and GPL
Do not clone the NIR when the driver retains NIR shaders because it
exits early, otherwise stage->nir will never be freed.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7768
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19973>
2022-11-25 08:46:38 +00:00
Hans-Kristian Arntzen f1f78fa297 radv: Conditionally expose VK_KHR_present_wait on RADV.
Gate it behind driconf query for now.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
2022-11-23 19:06:12 +00:00
Samuel Pitoiset 4301f1d892 radv: fix number of PS samples with VK_AMD_mixed_attachment_samples
From the Vulkan spec:
    "If the VK_AMD_mixed_attachment_samples extension is enabled and
     the subpass uses color attachments, the samples value used to
     create each color attachment is used instead of
     rasterizationSamples."

Found by inspection, though I don't think this extension is widely
used.

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/19907>
2022-11-23 07:52:13 +00:00
Samuel Pitoiset c9f0b7b042 radv: fix possible hangs with NGG streamout and secondary cmdbuf
This was missing but it might hang if streamout is used only in
secondary command buffers.
Found by inspection.

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:52 +00:00
Samuel Pitoiset 3189be249d radv: fix NGG streamout when it's never enabled in runtime
If a shader has XFB outputs but the application never enables
streamout in runtime (no buffers bound and no begin/end pair), we
have to disable it in the shader by emitting buffer size as 0. It's
also still needed to remember that the cmdbuf needs GDS/GDS OA BOs,
so move this at pipeline bind time instead.

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:52 +00:00
Samuel Pitoiset 6a2bcce882 radv: re-mit streamout buffers to unbind them when NGG streamout is disabled
A buffer size as 0 acts like if streamout is disabled with NGG.

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:51 +00:00
Samuel Pitoiset 5b60949155 radv: enable NGG XFB queries only if streamout is enabled
Otherwise, it's possible to increase counters if a shader has XFB but
the application paused it.

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:51 +00:00
Samuel Pitoiset ba81dcf971 radv: fix computing the pervertex LDS size with NGG streamout
The NGG streamout lowering pass allocates space for all outputs which
means we have to align our computation. Otherwise, the maximum number
of vertices is incorrect and we end up by reaching the maximum allowed
LDS size. This code could be shared instead of being duplicated but
that's for later.

Fixes some transform feedback tests with Zink and
RADV_PERFTEST=ngg_streamout on GFX10.3.

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:51 +00:00
Samuel Pitoiset 499abeba60 radv: stop overallocating LDS for VS/TES when NGG streamout is enabled
The number of shader outputs should only be considered when the
shader has XFB, otherwise we are overallocating LDS.

fossils-db (GFX1100):
Totals from 16602 (12.31% of 134913) affected shaders:
LDS: 17000448 -> 8500224 (-50.00%)

Cc: 22.3 mesa-stable
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/19801>
2022-11-22 19:25:51 +00:00
Danylo Piliaiev 703d85485f meson: do not use source_root() when possible
source_root() function is deprecated in Meson version 0.56.0 because
it returns the source root of the parent project if called from a
subproject.

Why would anyone need Mesa as a meson subproject?
It would be used as subproject in a project generated by command buffer
"decompiler" for Freedreno.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19901>
2022-11-22 06:11:07 +00:00
Qiang Yu d18a28ae87 ac/nir/ngg,radv: use intrinsic base for instance_rate_inputs check
radeonsi use packed location base while radv use un-packed location.
So we adjust instance_rate_inputs in each driver to hide the difference.
Note the attribute slot number is less than 16, so we can shift
instance_rate_inputs in radv by VERT_ATTRIB_GENERIC0 which is 16.

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/19868>
2022-11-22 05:46:06 +00:00
Konstantin Seurer 8133d5551d radv/rt: Return the correct result for requested deferral
We do not implement deferred host operations so we will return
VK_OPERATION_NOT_DEFERRED_KHR for now.

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19882>
2022-11-21 16:59:41 +00:00
Rhys Perry ea0ae17fc4 radv: disable MRT compaction with dual-source blending
Fixes crucible tests func.shader.dualsrc_mrt0_undef on navi21 and
func.shader.dualsrc_mrt1_undef on polaris10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: 22.3 mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19806>
2022-11-21 15:01:56 +00:00
Bas Nieuwenhuizen 8d37ab6bfa radv: Fix custom build id with C90 compilation.
Seems some build configurations have problems with VLAs still.

Fixes: 97641e5c94 ("radv: Add ability to override the build id for the cache.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19869>
2022-11-21 12:57:41 +00:00
Tatsuyuki Ishi 390c4b337a radv: Support accelerationStructureCaptureReplay.
The address itself was already stable assuming that the memory itself was
allocated with capture/replay. Enable the feature flag and add an equality
check to return VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR on mismatch.

Tested with:
- dEQP-VK.ray_tracing_pipeline.capture_replay.*
- q2rtx gfxrecon replays correctly without major errors.
  * There are debug logs about VkBuffers missing opaque address
  for unknown reason, however the AS part is confirmed to be correctly
  captured.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19841>
2022-11-21 08:22:03 +00:00
Samuel Pitoiset 5c5735fd68 radv: advertise VK_EXT_descriptor_buffer
Pass dEQP-VK.*descriptor_buffer*.

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/19808>
2022-11-21 07:55:24 +01:00
Samuel Pitoiset 46e0c77582 radv: implement VK_EXT_descriptor_buffer
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/19808>
2022-11-21 07:55:24 +01:00
Samuel Pitoiset e3fae40e96 radv: always restore NULL descriptor sets for meta operations
A valid but NULL descriptor set indicates a descriptor buffer.

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/19808>
2022-11-21 07:55:23 +01:00
Samuel Pitoiset a59be04ea5 radv: rework writing image/buffer/accel_struct descriptors slightly
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/19808>
2022-11-21 07:55:23 +01:00
Samuel Pitoiset e8cff91bd5 radv: avoid RMW operations in radv_make_texel_buffer_descriptor()
This would hurt performance depending on the memory type.

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/19808>
2022-11-21 07:55:23 +01:00
Samuel Pitoiset fcd53eda0e radv: force 32-bit address-space for descriptor buffers usage
Descriptor pointers are passed through shaders with 32-bit.

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/19808>
2022-11-21 07:55:23 +01:00
Samuel Pitoiset 94bea63936 radv: add 32-bit memory types for visible VRAM and cached GTT
These would be only exposed for descriptor buffers which need to be
CPU accessible and because descriptor pointers are 32-bit.

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/19808>
2022-11-21 07:55:23 +01:00
Daniel Schürmann f1f33582e7 radv/rt: use explicitly named sbt entries in radv_pipeline_group_handle
This improves readability, makes it less error-prone and
allows for easier changes in future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19850>
2022-11-20 11:30:16 +00:00
Bas Nieuwenhuizen 1b5dc33caa radv: Convert instance bvh address to node in bvh build.
So we don't have to do it in the traversal loop. Should 2 and
instructions and a 64-bit shift, so 4/8 cycles per instance node
visit.

Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 208460 -> 208292 (-0.08%)
Instrs: 38276 -> 38248 (-0.07%)
Latency: 803181 -> 803142 (-0.00%)
InvThroughput: 165384 -> 165376 (-0.00%)
Copies: 4912 -> 4905 (-0.14%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19706>
2022-11-19 14:24:36 +00:00
Bas Nieuwenhuizen d09ed23b9a radv: Fiddle with opaque flag positions to reduce instructions.
Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 209076 -> 208460 (-0.29%)
Instrs: 38374 -> 38276 (-0.26%)
Latency: 803899 -> 803181 (-0.09%)
InvThroughput: 165530 -> 165384 (-0.09%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19706>
2022-11-19 14:24:36 +00:00
Bas Nieuwenhuizen 3884210902 radv: Skip and for node_to_addr with bvh_base.
Cause the bvh base is always 64 byte aligned.

Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 209216 -> 209076 (-0.07%)
Instrs: 38402 -> 38374 (-0.07%)
Latency: 804537 -> 803899 (-0.08%)
InvThroughput: 165663 -> 165530 (-0.08%)
Copies: 4919 -> 4912 (-0.14%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19706>
2022-11-19 14:24:36 +00:00
Bas Nieuwenhuizen 0a26975840 radv: Move ray flag compares out of the loop.
To save on and+cmp combos with VALU instructions.

Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 208476 -> 209216 (+0.35%)
Instrs: 38384 -> 38402 (+0.05%)
Latency: 805725 -> 804537 (-0.15%)
InvThroughput: 165906 -> 165663 (-0.15%)
Copies: 4936 -> 4919 (-0.34%)
PreSGPRs: 393 -> 430 (+9.41%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19706>
2022-11-19 14:24:36 +00:00
Konstantin Seurer 6f45c98b58 radv/bvh: Adjust sah cost based on depth
Adds a cost field to radv_ir_node and uses it to model the cost of tree
depth. This improves framerates by 2% if my benchmarking is correct.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19756>
2022-11-19 10:18:50 +00:00
Rhys Perry 6fc4a76057 radv: lower 8/16-bit uadd_carry/usub_borrow
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7615
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19473>
2022-11-18 18:31:32 +00:00
Samuel Pitoiset 5a5bc3dd52 radv: advertise extendedDynamicState3ColorBlendEnable
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/19579>
2022-11-18 15:29:33 +00:00
Samuel Pitoiset 40b76ca08a radv: add support for dynamic color blend enable
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/19579>
2022-11-18 15:29:33 +00:00
Yonggang Luo af082cb69c radv: fixes -Werror,-Wunused-but-set-variable for clang-15 in radv_shader_args.c
error message:
../../src/amd/vulkan/radv_shader_args.c:457:16: error: variable 'arg_count' set but not used [-Werror,-Wunused-but-set-variable]
      unsigned arg_count = 0;
               ^

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19527>
2022-11-17 23:17:40 +00:00
Konstantin Seurer f24bb8194b radv/rra: Fix copying accel structs that were not built yet
In the case that radv_GetEventStatus always returns true, the loop will
never exit.

Fixes: 5749806 ("radv: Add Radeon Raytracing Analyzer trace dumping utilities")
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19772>
2022-11-17 17:24:54 +00:00
Samuel Pitoiset 62356e71f4 radv: suspend/resume XFB queries with NGG for meta operations
XFB queries enable primitives generated queries with NGG and meta
operations shouldn't be counted.

Reproduced on GFX10.3 by forcing NGG streamout.

Cc: 22.3 mesa-stable
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/19785>
2022-11-17 07:21:23 +00:00
Daniel Schürmann fda262fe64 radv/rt: move Ray Tracing shader creation into separate file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19525>
2022-11-16 22:43:49 +01:00
Samuel Pitoiset fb781bfb0a aco: fix dual source blending on GFX11
Assembly looks similar to LLVM.

Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19643>
2022-11-16 18:35:10 +00:00
Joshua Ashton 5637a1b91e radv: Enable EXT_swapchain_colorspace
This extension is basically a no-op exposing some new enums.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19726>
2022-11-16 14:07:45 +00:00
Samuel Pitoiset cd2e2021a0 radv: emit PA_SU_PRIM_FILTER_CNTL in the graphics preamble
This register doesn't change.

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/19654>
2022-11-16 13:02:14 +00:00
Samuel Pitoiset d4ce63a87a radv: determine if sample positions are needed at pipeline bind time
Like other ring stuff that depends on pipelines.

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/19654>
2022-11-16 13:02:14 +00:00
Samuel Pitoiset 5c9ade2464 radv: simplify load_sample_mask_in lowering
From the Vulkan spec:
    "Sample shading is enabled if at least one of the following
     conditions is true:

     - VkPipelineMultisampleStateCreateInfo::sampleShadingEnable is
       set to VK_TRUE, or
     - the fragment shader’s entry point interface includes input
       variables decorated with a BuiltIn of SampleId or SamplePosition
       built-ins."

We don't need to pass the number of rasterization samples, checking
for sample shading is enough. This will help for dynamic rasterization
samples.

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/19654>
2022-11-16 13:02:14 +00:00