Commit Graph

168150 Commits

Author SHA1 Message Date
Samuel Pitoiset bca4ebc3c4 radv: export MRTZ via PS epilogs when alpha to coverage is dynamic on GFX11
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26250>
2023-12-06 16:36:16 +00:00
Rhys Perry 0cbe0d2968 nir/loop_analyze: support loops with min/max and non-add incrementation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Rhys Perry fc1ebc67b1 nir/loop_analyze: support umin and {u,i,f}max
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Rhys Perry 9591c36666 nir/loop_analyze: check min compatibility with comparison
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Rhys Perry b6c2a5d48d nir/loop_analyze: fix vector basis/limit/comparison
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Rhys Perry 2f46773819 nir/loop_analyze: scalarize try_eval_const_alu
This is simpler, and users of this function expected scalar anyway.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Rhys Perry 7960588413 nir/loop_analyze: skip if basis/limit/comparison is vector
Replacement in try_eval_const_alu() doesn't work because the replacements
are always scalar. The callers also always give a scalar dest.

This is encountered when compiling a Redout shader under ASan.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Fixes: bc170e895f ("nir/loop_analyze: Use try_eval_const_alu and induction variable basis info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
2023-12-06 15:58:36 +00:00
Samuel Pitoiset 13e9e73974 zink/ci: remove skipped tests from the list of expected failures for NAVI31
These are skipped.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26539>
2023-12-06 12:28:17 +00:00
Samuel Pitoiset 79cf2b6824 radv: determine and emit SPI_SHADER_Z_FORMAT for PS epilogs
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Samuel Pitoiset 4248d0b03a radv,aco: declare PS epilog VGPR arguments for depth/stencil/samplemask
Depth/stencil/samplemask inputs are first to match
create_fs_jump_to_epilog().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Samuel Pitoiset 8b87c985b0 radv: prepare the PS epilog key for exporting MRTZ on RDNA3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Samuel Pitoiset 5b01285cfb radv: determine if MRTZ needs to be exported via PS epilogs
For GFX11 only.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Samuel Pitoiset b2a37b4304 ac/nir: add an option to skip MRTZ exports in ac_nir_lower_ps()
On RDNA3, alpha to coverage needs to be exported through MRTZ when
depth, stencil or samplemask are also exported. This option will allow
us to export MRTZ from PS epilogs instead of the main FS.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Samuel Pitoiset 81eeb157f8 aco: export depth/stencil/samplemask in create_fs_jump_to_epilog()
This currently has no effects because the store_output instructions
are removed earlier (in ac_nir_lower_ps). Though, this will be needed
for exporting MRTZ from PS epilogs for alpha to coverage on RDNA3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26413>
2023-12-06 11:49:31 +00:00
Eric Engestrom 90a77f55de ci: drop containers, builds, and tests from post-merge pipeline
All these jobs are redundant and a waste of resources:
- the containers have already been built & pushed in the merge pipeline
- the mesa build variants have already all passed
- the driver tests have already all passed

None of these jobs are doing anything useful in this pipeline, but it
costs a factor of 2x to our infrastructure, so let's remove them.

In other words, the only job left in the post-merge pipeline is the
`pages` job that deploys the update to the website.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26451>
2023-12-06 08:26:04 +00:00
Samuel Pitoiset a3b3a7d36a radv: remove unused code for compiling PS epilogs as part of pipelines
Since we switched to the "on-demand" path for GPL, this is dead code.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26398>
2023-12-06 08:01:46 +00:00
Samuel Pitoiset 725fc0ec03 radv: switch to on-demand PS epilogs for GPL
RADV currently has two paths for PS epilogs:
- the first one is mostly used by GPL to compile fragment shader epilogs
  as part of the graphics pipeline. It's supposed to be optimal because
  fragment shader epilogs are compiled in the pipeline and eventually
  cached.
- the second one (the "on-demand" path) is required when some dynamic
  states are used because otherwise it's just impossible to compile the
  fragment shader. These epilogs are compiled during cmdbuf recording
  when all needed info are known, they are also cached in memory. This
  is the main path for Zink.

Having two different paths isn't ideal for maintenance but there is
another problem. On RDNA3, alpha to coverage needs to be exported as
part of MRTZ when either depth/stencil/samplemask are exported. The
problem being that with GPL, the PSO multisample state can be NULL when
the frag shader lib is created, which means that we can't know if atc
needs to be exported or not, even if it's static. The solution seems to
to always use on-demand fragment shader epilogs for GPL on RDNA3.

So far, I think that switching to on-demand PS epilogs unconditionally
for GPL shouldn't hurt performance and that will simplify a lot of
things.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26398>
2023-12-06 08:01:45 +00:00
Eric Engestrom 267f86a8a3 util/blob: fix trivial typo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26499>
2023-12-06 07:22:02 +00:00
Faith Ekstrand 2c427d7c20 nak: Implement usub_sat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Faith Ekstrand 99bbfbf7b2 nak: Implement uadd_sat
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Faith Ekstrand 85462f7455 nak: Legalize immediates with source modifiers
We can just apply the source modifier to the immediate.  Also, make
IAdd3X have I32 sources.  They do get a bit odd in the high form but

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Faith Ekstrand 5335a59bff nak/legalize: Handle the src0/1 source mod condition for OpIAdd3X
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Faith Ekstrand b736cdcb83 nak: Rework the OpIAdd3/OpIAdd3X split
This lets us use the correct source types on OpIAdd3X

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Faith Ekstrand 48917600fb nak: Add a B32 source type
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
2023-12-06 06:10:30 +00:00
Dave Airlie fab508da38 nvk/xfb: set correct counter buffer for writing stream out counters.
nvc0 does nvc0_hw_query_get(push, q, 0x00, 0x0d005002 | (q->index << 5));
which corresponds to sub report.

Just noticed in code review, don't know of any tests that will notice yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26513>
2023-12-06 05:55:54 +00:00
Qiang Yu 7656251294 aco: fix set_wqm segfault when ps prolog
ps prolog does not have nir shader.

Fixes: 3b10547e67 ("aco: enable helper lanes if shader->info.fs.require_full_quads")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26512>
2023-12-06 05:34:30 +00:00
Faith Ekstrand 3bbd5357e9 nak: Advertise subgroupBroadcastDynamicId
This doesn't do anything yet because it's a Vulkan 1.2 core feature and
not in any extension but it will apply when we enable Vulkan 1.2 in the
future or if someone uses MESA_VK_VERSION_OVERRIDE=1.2/1.3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26530>
2023-12-06 05:18:30 +00:00
Faith Ekstrand a3159bab98 nvk: Advertise VK_EXT_scalar_block_layout
https://gitlab.freedesktop.org/mesa/mesa/-/issues/9653

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26530>
2023-12-06 05:18:30 +00:00
Sagar Ghuge b223d33141 blorp: Handle stencil buffer compression on blitter engine
XY_BLOCK_COPY_BLT and XY_FAST_COLOR_BLT instruction supports AUX_CCS
surface mode. Stencil buffer compression is stencil data with CCS so we
can easily support that on blitter engine.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26167>
2023-12-06 04:39:09 +00:00
Sil Vilerino 28ad562a16 d3d12: Video Encoder: Support reporting non contiguous NALU, offsets for frontend extraction
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino bed54fc9b0 d3d12: Video Encoder - When setting rate control dirty flags take into account rolled back optional configs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 960d86ef9a d3d12: Fix max reference frames reporting when HW does not support B frame
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino d010364841 d3d12: d3d12_create_fence_win32 - Fix double refcount bump
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 81c8e89ff8 d3d12: Fix screen->winsys leak in d3d12_screen
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 7bd6a42d1f d3d12: Fix d3d12_tcs_variant_cache_destroy leak in d3d12_context
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino ba85ca3721 d3d12: Improve error detection and reporting for video encoder
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 0233cdd00d d3d12: Detect imported resource buffer unknown format
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino bf73d5551a d3d12: Implement PIPE_VIDEO_CAP_ENC_H264_SUPPORTS_CABAC_ENCODE
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino bee68059cb d3d12: Autodetect d3d12_video_buffer imported handle/resource format and dimensions when not passed
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 3f43b2eae5 d3d12: Implement PIPE_VIDEO_FEEDBACK_METADATA_TYPE_AVERAGE_FRAME_QP
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 364cc5d51d d3d12: Fix max slice size and max frame size metadata reporting
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 25e2a7544b d3d12: max_frame_poc workaround for infinite GOPs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino c89766f416 d3d12: Use new pipe h264 encode ip_period param
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 8af080cec4 d3d12: Implement d3d12_video_encoder_get_encode_headers for out of band VPS, SPS, PPS
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 829e821aab d3d12: Only pass texture dimensions to d3d12_video_encoder_update_current_encoder_config_state
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 05fe740374 d3d12: Implement fence_get_win32_handle to get HANDLE from d3d12_fence
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 942791b937 d3d12: Implement get_feedback_fence for encode async waiting on pipe_feedback_fence
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 0cc0220cce d3d12: H264 encode - Allow CONSTRAINED_BASELINE profile to be written in headers
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino c80b35274f d3d12: Do not increase active_seq_parameter_set_id on new SPS. Force PPS on new SPS
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00
Sil Vilerino 1032fc07b5 d3d12: Implement inserting optional new headers on each H264/HEVC IDR frame
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26456>
2023-12-06 03:58:53 +00:00