831 Commits

Author SHA1 Message Date
Rhys Perry
a6ddf095aa nir/opt_dead_cf: remove nodes after a jump earlier
In the case of:
   halt
   // succs: b9
   if %618 {
       block b3:// preds:
       break
       // succs: b6
   } else {
       block b4:  // preds: , succs: b5
   }
   block b5:    // preds: b4
   32    %556 = iadd %617, %2 (0x1)
opt_constant_if() doesn't work because stitch_blocks() can't join blocks if the
before ends in a jump and the after isn't empty.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24235>
(cherry picked from commit 21f0aca948)
2023-07-28 18:48:24 +01:00
Danylo Piliaiev
2808bafac3 tu,freedreno: Forbid blit event for R8G8_SRGB due to gpu faults
Same cause as for other R8G8 formats - msaa resolve via
blit event causes gpu fault.

Fixes:
 dEQP-VK.api.image_clearing.*.clear_color_attachment.*.r8g8_srgb_*

Fixes: 029919f3c8
("tu: allow using resolve engine for SRGB MSAA resolves")

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24277>
(cherry picked from commit eeb1fd90fc)
2023-07-28 18:48:24 +01:00
Bas Nieuwenhuizen
7fed88af50 aco: Fix some constant patterns in 16-bit vec4 construction with s_pack.
Fixes: 04e3d7ad93 ("aco: improve nir_op_vec with constant operands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24286>
(cherry picked from commit e536d31a46)
2023-07-28 18:48:24 +01:00
Bas Nieuwenhuizen
5b10c4e4b4 aco: fix nir_op_vec8/16 with 16-bit elements.
Fixes: 5718347c2b ("aco: implement vec2/3/4 with subdword operands")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24286>
(cherry picked from commit 2fcf7c7014)
2023-07-28 18:48:24 +01:00
Yiwei Zhang
0b771cc271 venus: fix cmd state leak across implicit reset
Reset cmd states during vkBeginCommandBuffer regardless of the
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT for simplicity.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103>
(cherry picked from commit d13bf8f6b1)
2023-07-28 18:48:24 +01:00
Yiwei Zhang
39057708f0 venus: fix a cmd builder render_pass state leak across reset
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24103>
(cherry picked from commit a9f058d614)
2023-07-28 18:48:24 +01:00
Rhys Perry
2505b47e5e radv: fix radv_get_ballot_bit_size with CS
For wave64-as-wave32, this would return 32.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
(cherry picked from commit 7a199a051e)
2023-07-28 18:48:24 +01:00
Dave Airlie
67a4143e01 gallivm: fix atomic global temporary storage.
Fixes regression on llvm15 with
piglit tests/cl/program/execute/builtin/atomic/atomic_xchg-global.cl

Fixes: f281290005 ("gallivm: Fix atomic_global types")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24267>
(cherry picked from commit 2b03938f27)
2023-07-28 18:48:24 +01:00
Konstantin Seurer
1d8d9a0f79 gallivm: Fix atomic_global types
Passes LLVM validation on the test_mesh_shader_rendering vkd3d-proton
test.

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23996>
(cherry picked from commit f281290005)
2023-07-28 18:48:24 +01:00
Eric Engestrom
9e6b835b3c .pick_status.json: Update to 2b7599dc49 2023-07-28 18:38:03 +01:00
Connor Abbott
b84dc33bc8 tu: Fix vk2tu_*_stage flag type
New flags were silently getting dropped.

Fixes: 59259a0167 ("tu: Convert to sync2 entrypoints")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24162>
(cherry picked from commit ed02094235)
2023-07-21 18:08:21 +01:00
Mike Blumenkrantz
1dc1a1b551 zink: emit SpvCapabilitySampleMaskPostDepthCoverage with SpvExecutionModePostDepthCoverage
can't have one without the other

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24183>
(cherry picked from commit 88bf4b61af)
2023-07-21 18:08:14 +01:00
Mike Blumenkrantz
d55b6ae40d zink: be even dumber about buffer refs when replacing storage
these extra checks can cause issues when multiple contexts and transfer
ops are involved

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24141>
(cherry picked from commit d744bb5bfc)
2023-07-21 18:08:13 +01:00
Nanley Chery
186da6f7db anv: Don't support ASTC images with modifiers
Before this change, anv_get_image_format_features2 reported support for
ASTC formats with any modifier (even those not supported by anv). But,
we didn't intend to support that compressed image format with modifiers.

With this change, the format feature function reports no support for
modifiers on ASTC-formatted images.

This prevents the next patch from causing assertion failures due to
unsupported modifiers.

Fixes: 355f318843 ("anv: Allow transfer-only linear ASTC images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24120>
(cherry picked from commit e50af52e3d)
2023-07-21 18:08:11 +01:00
Yiwei Zhang
3ed532d994 turnip: flush cache for dstBuffer in vkCmdCopyQueryPoolResults
There can be other writes to the dstBuffer gated by proper barriers
beforehand.

TEST=dEQP-VK.pipeline.*.timestamp.* with Venus on Turnip

Fixes: 487aa807bd ("tu: Rewrite flushing to use barriers")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24245>
(cherry picked from commit a89752d630)
2023-07-21 18:08:10 +01:00
Alyssa Rosenzweig
c1ac43503e panfrost: Fix transform feedback on v9 harder
We might need more push uniforms (FAU) than the currently bound program. Update
that too for correct results on v9.

Fixes: c282f80c98 ("panfrost: Fix transform feedback on v9")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24198>
(cherry picked from commit ac51cc12b1)
2023-07-21 18:08:09 +01:00
Alyssa Rosenzweig
bf41854812 panfrost: Lower vertex_id for XFB
Even on Valhall, vertex_id is zero-based in a transform feedback program. Lower
that for transform feedback programs properly since it wouldn't happen
automatically on Valhall. Fixes assertion fails.

Fixes: 91ffd10351 ("pan/bi: Lower gl_VertexID in NIR")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24198>
(cherry picked from commit 64ff2b3ed6)
2023-07-21 18:08:08 +01:00
Lionel Landwerlin
e649aaa746 intel/fs: fix missing predicate on SEL instruction
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d8dfd153c5 ("intel/fs: Make per-sample and coarse dispatch tri-state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9381
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24236>
(cherry picked from commit 46958bcb74)
2023-07-21 18:08:07 +01:00
Danylo Piliaiev
ec05c0918a ir3: Fix FS quad ops returning wrong values from helper invocations
Without SP_FS_CTRL_REG0.LODPIXMASK quad ops don't get values from
helper invocations, but from the current one.

Fixes:
 dEQP-VK.glsl.derivate.dfdxsubgroup.*
 dEQP-VK.glsl.derivate.dfdysubgroup.*

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24211>
(cherry picked from commit a0d426370d)
2023-07-21 18:08:06 +01:00
Danylo Piliaiev
71737d9a0e freedreno/regs: Rename SP_FS_CTRL_REG0.DIFF_FINE into LODPIXMASK
That's the "real" name of the field.

It enables ALL helper invocations in a quad, which is necessary for
fine derivatives and quad subgroup ops.

While PIXLODENABLE by itself enables only 3 out 4 fragments in a quad.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24211>
(cherry picked from commit 696f37f5c3)
2023-07-21 18:07:53 +01:00
Robert Mader
40e9ad07ec egl/wayland: wait for compositor to release shm buffers
Some Wayland compositors, notably Exo, do not always release buffers
fast enough, and not in sync with their frame callbacks, to guarantee
that a free buffer is available the next time a client calls
`eglSwapBuffers()`.

This currently leads to a crash in `dri2_wl_swrast_get_backbuffer_data()`
with the swrast backend. To avoid this, simply block until the
compositor releases a buffer eventually.

While arguably compositors should release buffers they don't need any
more for the next frame, this can be quite complex depending on
the architecture - notably multi-process/IPC in case of Exo.

cc: mesa-stable

Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24091>
(cherry picked from commit 74451ed3f0)
2023-07-21 18:07:43 +01:00
Eric Engestrom
87ad5f4013 .pick_status.json: Update to c75bf084d0 2023-07-21 18:01:51 +01:00
Marek Olšák
e240620550 util/u_queue: fix util_queue_finish deadlock by merging lock and finish_lock
and by disabling the on-demand thread creation, which breaks the finish logic.

Fixes: 3713dc6b2a - util/u_queue: add UTIL_QUEUE_INIT_SCALE_THREADS flag
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8363

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24173>
(cherry picked from commit bfdfe5aa82)
2023-07-18 22:48:05 +01:00
Alyssa Rosenzweig
6d67864d29 panfrost: Fix transform feedback on v9
We were using a stale FAU buffer which meant we wrote to garbage addresses. I'm
guessing this was fallout from the big sysval rework but not 100% sure.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24199>
(cherry picked from commit c282f80c98)
2023-07-18 22:48:03 +01:00
Iván Briano
8104b4a92b anv: ensure CFE_STATE is emitted for ray tracing pipelines
Fixes sporadic failures in dEQP-VK.robustness.robustness2.*.rgen

Fixes: ecb709c853 ("anv: only emit CFE_STATE when scratch space increases")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9382

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24206>
(cherry picked from commit 75990e5564)
2023-07-18 22:48:01 +01:00
Eric Engestrom
cc0bd5d8ab .pick_status.json: Mark 79f7882fc6 as denominated 2023-07-18 22:47:59 +01:00
Marek Olšák
dcf22d75c4 mesa: fix 38% decrease in display list performance of Viewperf2020/NX8_StudioAA
It happened because glCallList was restoring varying_vp_inputs, which
caused every glCallList to process the state change again.

This loosely reverts commit 3a294ff01f
"mesa: move the _mesa_set_varying_vp_inputs call to where the state changes".

Fixes: 3a294ff01f - "mesa: move the _mesa_set_varying_vp_inputs call to where the state changes"

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24165>
(cherry picked from commit c97961a855)
2023-07-18 22:44:13 +01:00
Rhys Perry
bb78bfed46 nir/unsigned_upper_bound: fix phi(bcsel)
This was looking at the wrong sources. src0 is the condition.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Fixes: 72ac3f6026 ("nir: add nir_unsigned_upper_bound and nir_addition_might_overflow")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23990>
(cherry picked from commit 1139d870f3)
2023-07-18 22:44:11 +01:00
Rohan Garg
7910039e51 intel/perf: add perf query support for Intel Raptorlake
Fixes: 4e0eca7dc3 ("intel/dev: Add device info for RPL")
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24180>
(cherry picked from commit 36d4e83299)
2023-07-18 22:44:09 +01:00
Marek Olšák
1a5f10a118 glthread: determine global locking once every 64 batches to fix get_time perf
This mitigates a large perf degradation when the clock source is HPET instead of TSC.
Just call get_time less frequently.

Fixes: 3ed141e9 - glthread: add a heuristic to stop locking global mutexes with multiple contexts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8910

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24168>
(cherry picked from commit 6cda08416b)
2023-07-18 22:44:07 +01:00
Rhys Perry
39eeb3ac8e radv: add conformant_trunc_coord to cache UUID
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24137>
(cherry picked from commit 436df35c17)
2023-07-18 22:44:04 +01:00
Rhys Perry
997ed8fc66 ac/llvm: skip ballot zext for 32-bit dest with wave32-as-wave64
NGG lowering can ballots with a 32-bit destination even if the ballot bit
size is 64.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
(cherry picked from commit 0cb26f31fe)
2023-07-18 22:44:01 +01:00
Rhys Perry
655803301e ac/llvm: fix wave32 ac_build_mbcnt_add with 64-bit mask
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24140>
(cherry picked from commit 47c9dea6ac)
2023-07-18 22:43:59 +01:00
Eric Engestrom
3030db987b .pick_status.json: Update to cfd24047a1 2023-07-18 22:43:24 +01:00
Faith Ekstrand
bc0179d1d9 nv50/ir: Support vector movs
nir_opt_mov and nir_op_vecN are only the same if the mov is only a
single component.  Otherwise the vec loop will try to access src[c]
where c > 0 which breaks for nir_op_mov.  It's uncommon but scalar
back-ends can see vector movs so we need to handle this correctly.

Fixes: 6513c675ad ("nv50/ir/nir: implement nir_alu_instr handling")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24167>
(cherry picked from commit 259ba104f7)
2023-07-18 22:38:07 +01:00
Semjon Kravtsenko
747564ab09 glx: Assign unique serial number to GLXBadFBConfig error
Fixes: e89e1f5049 ("glx: Fix error handling yet again in CreateContextAttribs")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9171
Tested-by: yan12125
Co-authored-by: XRevan86
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23762>
(cherry picked from commit 3982445728)
2023-07-18 22:38:07 +01:00
Timur Kristóf
506a84dc94 aco: Fix subgroup_id intrinsic on GFX10.3+.
Change this to match how it works in the LLVM backend.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24005>
(cherry picked from commit dc3bbd351a)
2023-07-18 22:38:07 +01:00
Frank Binns
671deb11e4 pvr: skip setting up SPM consts buffer when no const shared regs are used
This is a temporary measure until the zeroed shaders are replaced with the real
ones. This avoids a VK_ERROR_OUT_OF_DEVICE_MEMORY error due to a zero sized
allocation.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Fixes: 1dfd535124 ("pvr: Setup SPM background object")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24139>
(cherry picked from commit b470d931dc)
2023-07-18 22:38:07 +01:00
Filip Gawin
e6cb8b413f crocus: Avoid fast-clear with incompatible view
Port of code from iris.
Original author: Nanley Chery

Helps with fast_color_clear@fcc-write-after-clear

Cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24135>
(cherry picked from commit 6e87b277bd)
2023-07-18 22:38:07 +01:00
Karol Herbst
642308dc18 nvc0: backport fp helper invocation fix to 2nd gen Maxwell+
Ben prefers that we use the firmware method where possible.

Cc: mesa-stable
Signed-off-by: Karol Herbst <git@karolherbst.de>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23802>
(cherry picked from commit 2c3b624300)
2023-07-18 22:38:07 +01:00
Dave Airlie
59a2836117 llvmpipe/linear: don't allow linear path for shader output with location frac
This has been broken for a while, but we weren't hitting the linear paths in CI

This fixes:
tests/spec/arb_enhanced_layouts/execution/component-layout/fs-output.shader_test.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24083>
(cherry picked from commit f9c1948a21)
2023-07-18 22:38:07 +01:00
Lionel Landwerlin
7880ada0df anv: fix utrace signaling with Xe
utrace submits can either have a batch or not.

When there is a batch, the utrace vk_sync is signaled by the utrace
batch (because utrace does a timestamp buffer copy using its own
batch). When there is no batch, the utrace vk_sync should be signaled
by the application batch (no timestamp copy required, utrace can read
the timestamps when the application batch has completed).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: fdea48df5e ("anv: Implement Xe version of anv_queue_exec_locked() and queue_exec_trace()")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24085>
(cherry picked from commit a85b84ba1e)
2023-07-18 22:38:07 +01:00
Feng Jiang
70e19345a5 virgl/video: Fix out-of-bounds access in fill_mpeg4_picture_desc()
An out-of-bounds access has occurred to array ref[2] and it needs
to be fixed.

Fixes: 6b5aecb195 ("virgl: add support for hardware video acceleration")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23160>
(cherry picked from commit 5c2f6d3f8e)
2023-07-18 22:38:07 +01:00
Mike Blumenkrantz
7286bc0d4b zink: fix batch disambiguation on first submit
submit_count is used to disambiguate a batch_id based on the generation
id of a given batch: this value is incremented once on submit and once on
reset such that the diff of the values is > 1 any time the batch does not
represent the fence it was last submitted with

in the case of a batch's first use, however, this value was being incorrectly
incremented such that the first submit would cause disambiguation checks
to erroneously determine that the batch had already completed, breaking synchronization

fixes #9313

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24016>
(cherry picked from commit 3c520892b1)
2023-07-18 22:38:07 +01:00
Feng Jiang
a58e2753f6 frontends/va: Fix memory leak of decrypt_key
pipe_picture_desc.decrypt_key was alloced in function
handleVAProtectedSliceDataBufferType(), but nowhere to
free it. Now, it will be freed as the vlVaContext is
destroyed.

Fixes: deb7dc82f6 ("frontends/va: handle protected slice data buffer")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23202>
(cherry picked from commit 9790350e9d)
2023-07-18 22:38:07 +01:00
Friedrich Vock
b517255ec8 radv/rt: Miss rays that hit the triangle's v edge
The hardware seems to do this as well. Avoids invoking hit shaders twice
at shared edges.
Fixes the fails in watertightness tests on emulated RT.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24063>
(cherry picked from commit e034ba1c44)
2023-07-18 22:38:07 +01:00
Friedrich Vock
ef42db3631 radv/rt: Enable exact on software intersection functions
These functions need exact output, otherwise watertightness can't be
guaranteed in some cases.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24063>
(cherry picked from commit a096cf784f)
2023-07-18 22:38:06 +01:00
Patrick Lerda
ca14c2d5bf panfrost: fix refcnt imbalance related to blitter
This issue is mainly a consequence of a call to util_blitter_clear()
with unnecessary blitter states, these states are never freed.

This change is inspired from radeonsi and r600.

Note: PAN_SAVE_FRAGMENT_STATE is added and always enabled
at this stage.

For instance, this issue is triggered on Mali-T720 with
"piglit/bin/fcc-read-after-clear sample tex -auto -fbo", "piglit/bin/cubemap -auto"
and "piglit/bin/fbo-srgb -auto" or on Mali-T820 with "piglit/bin/longprim -auto -fbo"
and "piglit/bin/ext_render_snorm-render -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

cc: mesa-stable

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22522>
(cherry picked from commit 689f38b2b4)
2023-07-18 22:38:06 +01:00
Billy Laws
512e830f8b wgl: Fix depth/stencil image support when using zink kopper
Kopper requires that any depth/stencil images are created through winsys which
was not taken into account by the WGL frontend causing it to hit an assert:
'Assertion failed: ctx->fb_state.zsbuf->texture->bind & PIPE_BIND_DISPLAY_TARGET'

fixes #9256
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24055>
(cherry picked from commit d3662ba461)
2023-07-18 22:38:06 +01:00
Jesse Natalie
9409ec0332 d3d12: Fix indexing of local_reference_state
Instead of manually indexing a single-dimensional array as 2-dimensional
(and using the wrong stride for the outer array) just actually make it
a 2-dimensional array.

Fixes: 7edae456 ("d3d12: Track up to 16 contexts worth of batch references locally in bos")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24041>
(cherry picked from commit a6740ee7a4)
2023-07-18 22:38:06 +01:00