aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
Commit message (Collapse)AuthorAgeFilesLines
* spirv: Allow block-decorated struct types for constantsJason Ekstrand2020-07-121-1/+2
| | | | | | | | | | | Whenever a struct type is decorated Block or BufferBlock we turn that into a GLSL_TYPE_INTERFACE. Since these decorations can end up random places, we should allow them for constants. Closes: #3252 Fixes: 9d0ae777dd6 "spirv: Use interface type for block and buffer..." Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
* spirv: Skip phis in unreachable blocks in the second phi passJason Ekstrand2020-07-121-1/+8
| | | | | | | Closes: #3253 Fixes: 22fdb2f8551 "nir/spirv: Update to the latest revision" Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5855>
* Revert "nir: Support sysval tess levels in SPIR-V to NIR"Jonathan Marek2020-07-062-19/+2
| | | | | | | | This reverts commit d2d4677b56efa0003065b61e39c1ef977c83f7da. The option is not used by any driver. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
* Revert "nir: Add an option for lowering TessLevelInner/Outer to vecs"Jonathan Marek2020-07-062-30/+0
| | | | | | | | This reverts commit d2df0761200ba9680f0d22defaa02c33fb051fcf. The option is not used by any driver. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5744>
* spirv: add missing fallthrough commentsTimothy Arceri2020-07-021-3/+3
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>
* spirv: set variables to restrict by defaultRhys Perry2020-06-243-1/+13
| | | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5207>
* nir: Add an option for lowering TessLevelInner/Outer to vecsBrian Ho2020-06-222-0/+30
| | | | | | | | | | | | The GLSL to NIR compiler supports the LowerTessLevel flag to convert gl_TessLevelInner/Outer from their GLSL declarations as arrays of floats to vec4/vec2s to better match how they are represented in hardware. This commit adds the similar support to the SPIR-V to NIR compiler so turnip can use the same IR3/NIR tess lowering passes as freedreno. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5059>
* nir: Support sysval tess levels in SPIR-V to NIRBrian Ho2020-06-222-2/+19
| | | | | | | | | | This commit adds a tess_levels_are_sysvals flag to spirv_to_nir_options similar to GLSLTessLevelsAsInputs in the GLSL to NIR compiler options. This will be used by turnip as the tess IR3 lowering pass (ir3_nir_lower_tess) operates on TessLevelInner and TessLevelOuter in the DS as sysvals. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5059>
* spirv: drop some dead codeRob Clark2020-06-181-6/+0
| | | | | | | | | | This case is never hit, we don't have a nir intrinsic for this spirv opcode. And when we do, I'm not sure if it would be vectorized or not. So best just to drop this case. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>
* spirv: atomic_counter_read_deref is not vectorizedRob Clark2020-06-181-4/+1
| | | | | | | Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3141 Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>
* spirv: do not set num_components for non-vectorized mbcnt_amd intrinsicSamuel Pitoiset2020-06-171-1/+2
| | | | | | | Fixes: 167fa2887f0 ("nir/validate: validate intr->num_components") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5493>
* spriv: don't set num_components for non-vectorised intrinsicsRob Clark2020-06-162-5/+5
| | | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371>
* spirv: fix using OpSampledImage with OpUndef instead of OpType{Image,Sampler}Samuel Pitoiset2020-06-151-4/+22
| | | | | | | | | | | | | | This seems valid per the SPIR-V spec to use OpSampledImage with OpUndef instead of OpTypeImage or OpTypeSampler. When the image operand is undefined, SPIRV->NIR emits an undef instruction that can be removed later by the compiler. This fixes shader compilation crashes with Red Dead Redemption II. Cc: [email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5230>
* spirv: Memory semantics is optional for OpControlBarrierCaio Marcelo de Oliveira Filho2020-06-081-9/+9
| | | | | | | | Fixes: 3ed2123d77d ("spirv: Use scoped barriers for SpvOpControlBarrier") Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>
* nir/spirv/glsl450: increase asin(x) precisionArcady Goldmints-Orlov2020-06-081-9/+33
| | | | | | | | | | | | | | | | | | asin(x) is now implemented using a piecewise approximation, which improves the precision for |x| < 0.5 Previously, we were using a polynomial approximation for both the asin() and acos() functions. Unfortunately, for asin(), this polynomial does not have enough precision to satisfy the Vulkan CTS requiremenents, which define the asin() precision based on the precision of atan2(x, sqrt(1.0 - x*x)). The piecewise approximation gives the needed precision in the problematic range. v2: Skip the piecewise approximation for acos Closes: #1843 Acked-by: Francisco Jerez <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3809>
* spirv: Use scoped barriers for SpvOpControlBarrierBoris Brezillon2020-06-031-3/+28
| | | | | | | | | If use_scoped_barrier is set to true, we don't have to split the control and memory barriers. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>
* nir: Replace the scoped_memory barrier by a scoped_barrierBoris Brezillon2020-06-031-9/+3
| | | | | | | | | | | | | | SPIRV OpControlBarrier can have both a memory and a control barrier which some hardware can handle with a single instruction. Let's turn the scoped_memory_barrier into a scoped barrier which can embed both barrier types. Note that control-only or memory-only barriers can be supported through this new intrinsic by passing NIR_SCOPE_NONE to the unused barrier type. Signed-off-by: Boris Brezillon <[email protected]> Suggested-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>
* spirv: Split the vtn_emit_scoped_memory_barrier() logicBoris Brezillon2020-06-031-6/+31
| | | | | | | | | | We are about to add support for scoped control+memory barriers. Let's move the convert from SPIRV to NIR enums logic in helpers so we can easily re-use them. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4900>
* nir: add callback to nir_remove_dead_variables()Timothy Arceri2020-06-031-1/+1
| | | | | | | | | | | | This allows us to do API specific checks before removing variable without filling nir_remove_dead_variables() with API specific code. In the following patches we will use this to support the removal of dead uniforms in GLSL. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
* spirv,radv,anv: implement no-op VK_GOOGLE_user_typeSamuel Pitoiset2020-05-282-0/+6
| | | | | | | | | | | | | | This extension only allows HLSL shader compilers to optionally embed unambiguous type information which can be safely ignored by the driver. This fixes a crash with the recent Vulkan backend of Path Of Exile (it uses the extension without checking if it's supported). Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5237>
* spirv: add support for bias/lod with OpImageGatherSamuel Pitoiset2020-05-251-3/+5
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>
* spirv: add SpvCapabilityImageGatherBiasLodAMDSamuel Pitoiset2020-05-251-0/+4
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>
* spirv: add ReadClockKHR support with device scopeSamuel Pitoiset2020-05-242-1/+15
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5117>
* spirv: handle OpCopyObject correctly with any typesSamuel Pitoiset2020-05-153-6/+37
| | | | | | | | | | | | | | | | This implements OpCopyObject as a blind copy and propagates the access mask properly even if the source object type isn't a SSA value. This fixes some recent dEQP-VK.descriptor_indexing.* failures since CTS changed and now apply nonUniformEXT after constructing a combined image/sampler. Original patch is from Jason Ekstrand. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4909>
* compiler/spirv: flag nclamp/nmin/nmax as exactRhys Perry2020-05-071-7/+14
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3716>
* vtn/opencl: native sqrt supportErik Faye-Lund2020-05-041-0/+2
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: native rsqrt supportErik Faye-Lund2020-05-041-0/+2
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: native recip supportErik Faye-Lund2020-05-041-0/+2
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: native powr supportErik Faye-Lund2020-05-041-0/+2
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: native divide supportErik Faye-Lund2020-05-041-0/+2
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: native variants of sin/cosErik Faye-Lund2020-05-041-0/+4
| | | | | | | | These obviously map directly to nir opcodes. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* vtn/opencl: add native_tan-supportErik Faye-Lund2020-05-041-0/+3
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* compiler/nir: move tan-calculation to helperErik Faye-Lund2020-05-041-2/+1
| | | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-By: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
* spirv: Rewrite CFG constructionJason Ekstrand2020-04-242-294/+503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit completely rewrites the way we extract a structured CFG from SPIR-V. The new approach is different in a few ways: 1. It does a breadth-first search instead of depth-first. This means that we've visited the merge node for a construct before we visit any of the nodes inside the construct. This makes it easier to validate things like loop and switch nesting. 2. We record more information in the CFG. Earlier commits added a parent pointer to vtn_cf_node but we now record all of the merge and other special blocks for each CFG node. This lets us validate things more precisely. 3. It makes heavy use of merge blocks for walking the CFG. Previously, we sort of used them as hints for trying to guess the CFG structure but things got dicey whenever a merge was missing. We had some heuristics for how to handle short-circuiting if statements but it was a bunch of special cases. Now, we make them a fundamental part of walking the CFG. When we encounter a control-flow construct, we add the body components of the construct to the BFS work list and then jump to the merge block if one exists to continue scanning the current CFG nesting level. If no merge block exists, we assume that means that control-flow never re-converges in a normal way and that the only way to get back to normality is with a direct jump such as a loop break or continue. This should make things far more robust when trying to deal with the more creative placement (or lack thereof) of merge instructions. Reviewed-by: Alan Baker <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3820> Closes: #2760 Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4446>
* spirv: Fix passing combined image/samplers through function callsJason Ekstrand2020-04-241-3/+7
| | | | | | | | | Fixes dEQP-VK.spirv_assembly.instruction.function_params.sampler_param cc: [email protected] Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4684>
* spirv: Use nir_const_value for spec constantsJason Ekstrand2020-04-242-70/+17
| | | | | | | | | | | When we originally wrote spirv_to_nir we didn't have a good scalar value union to handily use so we rolled our own thing for spec constants. Now that we have nir_const_value, we can use that and simplify a bunch of the spec constant logic. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4675>
* spirv: Allow constants and NULLs in SpvOpConvertUToPtrJason Ekstrand2020-04-241-2/+3
| | | | | | | | | | We were accidentally asserting that the value had to be a vtn_ssa_value which isn't true if it, for instance, comes from a spec constant. Fixes: fb282a68bc46 "spirv: Implement OpConvertPtrToU and OpConvertUToPtr" Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4675>
* spirv: Update the headers from latest Khronos masterCaio Marcelo de Oliveira Filho2020-04-242-69/+1056
| | | | | | | | | This corresponds to 2ad0492fb00919d99500f1da74abf5ad3c870e4e ("Discuss generator magic number reservations.") in https://github.com/KhronosGroup/SPIRV-Headers. Acked-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4682>
* spirv: Handle instruction aliases in vtn_gather_typesCaio Marcelo de Oliveira Filho2020-04-241-0/+6
| | | | | | | Same solution as done in spirv_info generation. Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4682>
* spirv: Expand workaround for OpControlBarrier on old GLSLangDanylo Piliaiev2020-04-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | In SPIRV of compute shader in Aztec Ruins benchmark there is: OpControlBarrier %uint_1 %uint_1 %uint_0 // ControlBarrier(Device, Device, rdcspv::MemorySemantics(0)); which is an incorrect translation of glsl barrier(). GLSLang, prior to c3f1cdfa, emitted the OpControlBarrier with Device instead of Workgroup for execution scope. 2365520c covers similar case but isn't applied when execution_scope is SpvScopeDevice. Cc: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2742 Signed-off-by: Danylo Piliaiev <[email protected]> Tested-by: Rafael Antognolli <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4660>
* spirv: Fix propagation of OpVariable access flagsCaio Marcelo de Oliveira Filho2020-04-202-23/+9
| | | | | | | | | | | | | | | | After the decorations of a variable are evaluated, propagate the access flag to the associated vtn_pointer. This was done when creating the pointer but at that point there was no access flags for the variable. Inline the pointer creation to make this point clearer, in isolation the helper made the impression that the value was being propagated. Issue found by Ken. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4620>
* spirv,nir: Move the SPIR-V vector insert code to NIRJason Ekstrand2020-04-173-53/+6
| | | | | | | | | This also makes spirv_to_nir a bit simpler because the new nir_vector_insert helper automatically handles a constant component selector like nir_vector_extract does. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
* spirv: Call nir_builder directly for vector_extractJason Ekstrand2020-04-176-43/+9
| | | | | | | | The nir_builder helper already handles checking if the component selector is an immediate and returns an undef in the OOB case. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
* spirv: Error if OpCompositeInsert/Extract has OOB indicesJason Ekstrand2020-04-171-0/+17
| | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
* spirv,nir: Add a better vector_insertJason Ekstrand2020-04-171-12/+11
| | | | | | | | | The old one in spirv_to_nir was besel'ing the whole vector for every component. If we think about this as a vector operation, we can do it way more efficiently. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
* spirv: Handle OOB vector extract operationsJason Ekstrand2020-04-171-1/+4
| | | | | | | | | | | | We use vtn_vector_extract to handle vector component level derefs. This makes us gracefully handle the case where your vector component is OOB and give you an undef. The SPIR-V working group is still working out whether or not this is technically legal but it's very little code for us to handle it so we may as well. Cc: [email protected] Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4495>
* Revert "spirv: Rewrite CFG construction"Jason Ekstrand2020-04-042-503/+294
| | | | This reverts commit fa5a36dbd474fb3c755da51553c6ca18dab76a06.
* spirv: Rewrite CFG constructionJason Ekstrand2020-04-032-294/+503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit completely rewrites the way we extract a structured CFG from SPIR-V. The new approach is different in a few ways: 1. It does a breadth-first search instead of depth-first. This means that we've visited the merge node for a construct before we visit any of the nodes inside the construct. This makes it easier to validate things like loop and switch nesting. 2. We record more information in the CFG. Earlier commits added a parent pointer to vtn_cf_node but we now record all of the merge and other special blocks for each CFG node. This lets us validate things more precisely. 3. It makes heavy use of merge blocks for walking the CFG. Previously, we sort of used them as hints for trying to guess the CFG structure but things got dicey whenever a merge was missing. We had some heuristics for how to handle short-circuiting if statements but it was a bunch of special cases. Now, we make them a fundamental part of walking the CFG. When we encounter a control-flow construct, we add the body components of the construct to the BFS work list and then jump to the merge block if one exists to continue scanning the current CFG nesting level. If no merge block exists, we assume that means that control-flow never re-converges in a normal way and that the only way to get back to normality is with a direct jump such as a loop break or continue. This should make things far more robust when trying to deal with the more creative placement (or lack thereof) of merge instructions. Reviewed-by: Alan Baker <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3820> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3820>
* spirv: Add a parent field to vtn_cf_nodeJason Ekstrand2020-04-032-10/+21
| | | | | | | | This makes it easier to crawl up the CF tree when trying to validate the incoming SPIR-V control-flow. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3820>
* spirv: Make vtn_function a vtn_cf_nodeJason Ekstrand2020-04-033-6/+11
| | | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3820>