Commit Graph

157887 Commits

Author SHA1 Message Date
Mike Blumenkrantz
1ab6d664c3 mesa: set normalized_coords for bindless texture buffer samplers
this isn't "used", but it's the default

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18845>
(cherry picked from commit 7829fb9adf9b21c6f35c1932ee86f8f64dfda7cf)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
d537057606 zink: don't flatten 64bit arrays during rewrite
dunno what I was thinking here

Fixes: 5b2f850425 ("zink: rewrite 64bit shader i/o as 32bit")

SoroushIMG <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18728>
(cherry picked from commit 17e3df4cd2757e79a4fd77f52a2d23ff9084578b)
2022-09-28 10:14:58 -07:00
Mike Blumenkrantz
70e2817f65 zink: always run optimize_nir after lower_64bit_vars
it's otherwise possible (and likely) that optimizations won't
happen since there's no shader key data active

Fixes: 5b2f850425 ("zink: rewrite 64bit shader i/o as 32bit")

SoroushIMG <soroush.kashani@imgtec.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18728>
(cherry picked from commit 0f053f0f07cb28a50faa6732430f08e8ba368900)
2022-09-28 10:14:58 -07:00
Dylan Baker
358e054bfd .pick_status.json: Update to 3ed712f7483791aa0a256472d276ff5a83c643bc 2022-09-28 10:14:58 -07:00
Yonggang Luo
24af5a7f82 util: Disable usage of __attribute__((__const__)) when the compiler is clang
Clang didn't implement __attribute__((__const__)) properly for release build.
The issue tracker is: https://github.com/llvm/llvm-project/issues/56993

Closes #6781
Closes #6782
Closes #7170

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18798>
2022-09-27 18:08:15 +00:00
Dylan Baker
5e73858b9e .pick_status.json: Mark 40a235c9a82027bcb92d34b7386ea6b1a2e1d587 as denominated 2022-09-27 10:49:05 -07:00
Dylan Baker
bc71af26d6 .pick_status.json: Mark cbad4adc133b16c803ec9445c8dd144bc5023a62 as denominated 2022-09-27 10:48:22 -07:00
Dylan Baker
bef8fe631e .pick_status.json: Mark 1aacd9492de42412c6c9ca79d48a40c4ffebcd79 as backported 2022-09-27 10:47:52 -07:00
Dylan Baker
b0a45e65a7 .pick_status.json: Mark 5b7c2dffc43eb7ada61807a6e679cc2c1b3b2682 as denominated 2022-09-27 10:45:36 -07:00
Dylan Baker
5cba513470 .pick_status.json: Mark 49efa73ba11c4cacaed0052b984e1fb884cf7600 as denominated 2022-09-27 10:45:35 -07:00
Erik Faye-Lund
a53554f388 docs: fixup broken rst syntax
Seems I messed this up when converting things, and nobody noticed until
now!

Fixes: d4397c0048 ("docs: use envvar role for envvars")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18641>
(cherry picked from commit c816081eea2865d04bc67950e79ec7e8b143b88d)
2022-09-27 10:03:34 -07:00
Yonggang Luo
8a40852756 ci/docs: Stick to specific version of python packages
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18833>
(cherry picked from commit 9cbfe9a8baedb100b6fa7eba1ae9fe33363838c1)
2022-09-27 10:03:32 -07:00
Mike Blumenkrantz
883c0f7b2f zink: avoid overflow when clamping bufferviews
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 084f3b6664116c2da4dc458d8a13e957a9331b4a)
2022-09-27 10:03:32 -07:00
Mike Blumenkrantz
01edc6f174 zink: always unset var->data.explicit_xfb_buffer
ensure that this isn't accidentally triggering for non-xfb shaders

Fixes: 6d40db84c9 ("zink: handle direct xfb output from output variables")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 53004e57d68af9673cab6195ce67213245ec149f)
2022-09-27 10:03:31 -07:00
Mike Blumenkrantz
cf2be66218 zink: free vertex_state_cache on shutdown
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 903aba413d833005de37bdd8d67608cff8dba598)
2022-09-27 10:03:31 -07:00
Mike Blumenkrantz
380ffeb205 lavapipe: propagate shader access info across libraries
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827>
(cherry picked from commit 6db172436a71a0e70a94c39d8eddb691e95c5cfb)
2022-09-27 10:03:30 -07:00
Mike Blumenkrantz
23cab32e26 lavapipe: set writemask for compute shader buffers
I don't know how this wasn't being set?

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18827>
(cherry picked from commit 6c935f3f3da5935a12ec1ace0f7541f047b3b526)
2022-09-27 10:03:29 -07:00
Dylan Baker
3c44bd1166 .pick_status.json: Update to c268ae9efe602129b848c800dca83411d55c3aab 2022-09-27 10:03:17 -07:00
Dave Airlie
73e50fdb0f llvmpipe: bind sampler views/images properly.
There is some code that relies on TGSI here, and it has limits.
For now always just bind resources > 31.

Fixes
dEQP-VK.pipeline.pipeline_library.descriptor_limits*

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
(cherry picked from commit 16fd0c11c66b8b48c3835202fab77a0c50828c0b)
2022-09-26 15:10:24 -07:00
Dave Airlie
1cfa6ef606 llvmpipe: memset empty images in the key
This fixes a bunch of valgrind warnings in
dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18812>
(cherry picked from commit b144d3e6a7e9a31c8b62e43035f15dab34932273)
2022-09-26 15:10:24 -07:00
Dave Airlie
6635957f5d lavapipe: handle view mask layer count properly for begin rendering.
If the view mask is set the layer count should be taken from it,
not from the layerCount.

Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>
(cherry picked from commit fe5636af6e0501305e020e8ac7d383931ed68543)
2022-09-26 15:10:23 -07:00
Dave Airlie
8f9fc8e186 lavapipe: take layers into account around render surface creation.
This makes the code more consistent with handling layers, but also
makes sure a new surface is created when the w/h/layers changes.

Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>
(cherry picked from commit 21d39dd1deb03366f54c4d7bfa09835cab0f1ca9)
2022-09-26 15:10:23 -07:00
Timur Kristóf
4295192f35 radv: Use a fallback for marketing name when libdrm doesn't know it.
Currently for GPUs which don't have a marketing name in libdrm,
RADV just prints "(null) (RADV ...)", which looks bad.

This commit replaces the "(null)" with "AMD Unknown".

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18775>
(cherry picked from commit 25e1c3d5b3ab4e066dd36c0a964ce7d413dac02e)
2022-09-26 15:10:22 -07:00
Yiwei Zhang
34aa290747 mesa/st: emit string marker based on PIPE_CAP_STRING_MARKER
Fixes: 10ac88b72f ("mesa/st: drop emit string marker device table entry.")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18803>
(cherry picked from commit 37900ee2dd13b735a6e46ddd272f45df4c8ad8a9)
2022-09-26 15:10:21 -07:00
Pierre-Eric Pelloux-Prayer
35ebfa8a63 radeonsi/gfx11: don't set VERTS_PER_SUBGRP to 0
It seems slower.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: 25a66477d0 ("radeonsi/gfx11: register changes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18758>
(cherry picked from commit 4fdf10fdafe5ef4333afeb478e742c0a24ce3898)
2022-09-26 15:10:18 -07:00
Lionel Landwerlin
a7750abce3 intel/fs: fixup a64 messages
And run algebraic when either int64 for float64 are not supported so
those don't end up in the generated code.

Cc: mesa-stable
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 139e8f46358475520fdf2fe80cbe116adfe8084d)
2022-09-26 15:10:17 -07:00
Lionel Landwerlin
8a3a0210ae intel/nir/rt: store ray query state in scratch
Initially I tried to store ray query state in the RT scratch space but
got the offset wrong. In the end putting this in the scratch surface
makes more sense, especially for non RT stages.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 838bbdcf2ef954830061218fcdb1800baa8855b6)
2022-09-26 15:10:17 -07:00
Lionel Landwerlin
87f6095557 intel/nir/rt: change scratch check validation
It's very unfortunate that we have the RT scratch being conflated with
the usual scratch. In our implementation those are 2 different buffers.

The usual scratch access are done through the scratch surface state
(delivered through thread payload), while RT scratch (which outlives
thread dispatch with shader calls) is its own buffer.

So checking the NIR scratch size makes no sense as we can have normal
scratch accesses completely unrelated to RT scratch accesses.

This change switches the validation by looking at whether the scratch
base pointer intrinsic is being used (which is what we use/abuse to
implement RT scratch).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit f7fab09a07b4196eb68c31ff42057f10b3e55cb1)
2022-09-26 15:10:16 -07:00
Lionel Landwerlin
318020df2b intel/nir/rt: fix ray query proceed level
Initially the level is world (top level), then it's whatever level the
potential hit is.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit 259b1647e63ae8c25730feb4e0190211938fa296)
2022-09-26 15:10:16 -07:00
Lionel Landwerlin
a13dc0cd0e intel/nir/rt: spill/fill the entire ray query data
We need the traversal stack to saved/restored along with mem hits.
Total spill/fill is 256bytes.

We can potentially optimize this but we have to be very careful about
what state the query is in.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c78be5da30 ("intel/fs: lower ray query intrinsics")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit f843bec7de903752734c8cb8e66c57e91f5a10fb)
2022-09-26 15:10:15 -07:00
Lionel Landwerlin
6094dba1da intel/nir/rt: fixup generate hit
This function copies the potential hit from its memory location to the
committed hit location. A couple of fields got their bit offset wrong.

Fixes some CTS tests in dEQP-VK.ray_query.*

v2: Copy primitive/instance leaf pointers

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0465714790 ("intel/nir/rt: add more helpers for ray queries")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17396>
(cherry picked from commit a88f725eeaa0ae65c57927e74fcc369bd926e1a8)
2022-09-26 15:10:15 -07:00
Mike Blumenkrantz
7cb53bcf6f zink: handle culldistance xfb outputs like clipdistance
fixes:
spec@ext_transform_feedback@builtin-varyings gl_culldistance

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18724>
(cherry picked from commit 21ba47c821454dc53be60fb4da2ec58cdb28b53c)
2022-09-26 15:10:14 -07:00
Caio Oliveira
d600acf6d9 nir/lower_task_shader: Don't fail adding a launch when last instruction is a jump
Fixes: 8aff8d3dd4 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18442>
(cherry picked from commit 3f4343c7cd247cd089ad8f63a72541da39346259)
2022-09-26 15:10:14 -07:00
Lionel Landwerlin
6cf16955f7 anv: add missing wokraround for texture cache invalidate
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18743>
(cherry picked from commit f9dbb65e7feac3e5d8558e21b2a6a2928f3682b9)
2022-09-26 15:10:13 -07:00
Connor Abbott
90001a78d1 ir3/analyze_ubo_ranges: Account for reserved consts
We weren't accounting for the reserved consts when calculating how much
we can upload. This led to assertion failures later if we pushed too
much.

Fixes: d3b7681df2 ("tu: ir3: Emit push constants directly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
(cherry picked from commit 8cb1deded60e4b8d101e4a3055078f9434aa7d8f)
2022-09-26 15:10:13 -07:00
Connor Abbott
7b1f40a3db tu: Fix maxPerStageDescriptorUpdateAfterBindInputAttachments
We need this to be the same as maxPerStageDescriptorInputAttachments.

Fixes: d9fcf5de55 ("turnip: Enable nonuniform descriptor indexing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18757>
(cherry picked from commit f483419c23782f0634845c031b4f783c80ccdadd)
2022-09-26 13:11:27 -07:00
Emma Anholt
c08e78aba9 turnip: Fix busy-waiting on syncobjs with OS_TIMEOUT_INFINITE.
I noticed that glmark2's glFinish()es in its offscreen rendering tests
under zink were spinning.  When we passed -1 as the timeout for
drmSyncobjWait(), the kernel would immediately return ETIME.

Fixes: 0a82a26a18 ("turnip: Porting to common implementation for timeline semaphore")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18739>
(cherry picked from commit 5e39b52e6a42a67bb681ec146af9a8866ea7a3c4)
2022-09-26 13:11:25 -07:00
Tapani Pälli
dba8e3f3f5 mesa/st: fix a set_sampler_views call parameter order
Fixes: e7b9561959 ("gallium: implement compute pbo download")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18745>
(cherry picked from commit d68e74955c819dd272c4751da191f4670ea4a037)
2022-09-26 13:11:22 -07:00
Erik Faye-Lund
f94eeaeb93 mesa/st: always use normalized coords for samplers
Normalized samplers is the norm, and non-normalized samplers might cause
some drivers and hardware to have to bend over backwards a bit.

We're using TXF here anyway, so it doesn't really matter what we set
this state to. So let's always use normalized samplers instead of
always using non-normalized samplers. That makes things easier for
everyone.

Fixes: e7b9561959 ("gallium: implement compute pbo download")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>
(cherry picked from commit 37733c100d61cd47ba6ba30bb6fa1e402dd88901)
2022-09-26 13:11:22 -07:00
Erik Faye-Lund
33ccf9ff92 mesa/st: always use normalized coords for samplers
Normalized samplers is the norm, and non-normalized samplers might cause
some drivers and hardware to have to bend over backwards a bit.

We're using TXF here anyway, so it doesn't really matter what we set
this state to. So let's always use normalized samplers instead of
always using non-normalized samplers. That makes things easier for
everyone.

Fixes: 41e093fc98 ("st/pbo: add a fast pbo download code-path")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>
(cherry picked from commit 1a135bdd6ce39f155e92b881829d642664a5fcfd)
2022-09-26 13:11:21 -07:00
Erik Faye-Lund
eaf643f247 mesa/st: always use normalized coords for samplers
Normalized samplers is the norm, and non-normalized samplers might cause
some drivers and hardware to have to bend over backwards a bit.

We're using TXF here anyway, so it doesn't really matter what we set
this state to. So let's always use normalized samplers instead of
always using non-normalized samplers. That makes things easier for
everyone.

Fixes: ed0e9862c5 ("st/mesa: implement PBO downloads for ReadPixels")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>
(cherry picked from commit 484205b7ebfc937821b7196d779d9c51fcb7d612)
2022-09-26 13:11:21 -07:00
Jason Ekstrand
c0e6fe20f9 iris: Handle resource offsets in buffer copies
Fixes: c5b22441f1 ("iris: Fix buffer -> buffer copy_region")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15811>
(cherry picked from commit ea185aef032f99da21a1797f38d8f34b1816bba7)
2022-09-26 13:11:20 -07:00
Jason Ekstrand
0320c2b137 iris: Fix more BO alignments
Fixes: 32c5d6d1dc ("iris: Add an alignment parameter to iris_bo_alloc()")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15811>
(cherry picked from commit f4c05f319e356d9aaa042958c5db5893dcf693b0)
2022-09-26 13:11:19 -07:00
Jason Ekstrand
2baf3ce62c iris: Use a larger alignment for buffer allocations
This is likely required for OpenGL buffer texture allocations.  It'll
also make buffer copies faster if things are generally nicely aligned.
It's definitely required for OpenCL.

Fixes: 32c5d6d1dc ("iris: Add an alignment parameter to iris_bo_alloc()")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15811>
(cherry picked from commit 29841343951a21242d454fc163e7d4163f769173)
2022-09-26 13:11:19 -07:00
Jonathan Gray
a52f662a1c iris: check i915 features after hw gen
when running recent Mesa on i855 (gen 2) without amber drivers:
  error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

  libGL error: glx: failed to create dri3 screen
  libGL error: failed to load driver: iris
  error: Kernel is too old for Iris. Consider upgrading to kernel v4.16.

  libGL error: glx: failed to create dri2 screen
  libGL error: failed to load driver: iris

move the i915 feature check to after the hardware generation check
which results in:
  MESA: warning: Driver does not support the 0x3582 PCI ID.
  libGL error: glx: failed to create dri3 screen
  libGL error: failed to load driver: iris
  MESA: warning: Driver does not support the 0x3582 PCI ID.
  libGL error: glx: failed to create dri2 screen
  libGL error: failed to load driver: iris

Cc: mesa-stable
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18563>
(cherry picked from commit ed5d16cec197d163a2de686d5dad44ef7518a716)
2022-09-26 13:11:16 -07:00
Samuel Pitoiset
fd2c55b4bd radv: make sure to initialize wd_switch_on_eop before checking its value
This is technically not a bug because it might just trigger
SWITCH_ON_EOI when streamout is used and I think it was fine.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7303
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18700>
(cherry picked from commit 578e30f3e61f9fc58b738b61b91b23c94973f59e)
2022-09-26 13:11:15 -07:00
Emma Anholt
ee4b192b19 turnip: Fix the "written stencil is unmodified" check.
We want to know if anything writes stencil, not if all of them do.

Fixes: b2a60c157e ("turnip: add LRZ early-z support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18691>
(cherry picked from commit b9f9bfa5560a0d5e8a8bf71a146ffd11f1196173)
2022-09-26 13:11:15 -07:00
Timur Kristóf
ae4bc6fe1e aco/optimizer_postRA: Fix logical control flow handling.
Change reset_block() so it only considers the logical
predecessors for VGPRs. Relevant for some optimizations
across loops.

This commit fixes an assertion failure which was triggered
by Zink in a piglit test.

Fossil DB stats unaffected on Navi 21.

Fixes: 2e56e23420
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18488>
(cherry picked from commit a8dd07518c59af0087ed311cee232c31c3e8268c)
2022-09-26 13:11:12 -07:00
Timur Kristóf
fd910a096c aco/optimizer_postRA: Don't assume all operand registers were written by same instr.
This assumption is no longer true since the post-RA optimizer
can work across blocks. It is now possible that some control
flow paths overwrite some but not all registers of an operand.

This commit may prevent invalid optimizations and/or assertion
failures (on debug builds).

Fossil DB stats unaffected on Navi 21.

Fixes: 0e4747d3fb
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18488>
(cherry picked from commit 2eab413cf7964bea3026f43f3c3a12323c281a9c)
2022-09-26 13:11:11 -07:00
Timur Kristóf
7c4dd3194a aco/optimizer_postRA: Mark a register overwritten when predecessors disagree.
Affects blocks whose some (but not all) predecessors overwrite a register.
This commit fixes glitches in some games which regressed because of the
improved SCC no-compare optimization.

Fossil DB stats on Navi 21:

Totals from 2816 (2.09% of 134906) affected shaders:
CodeSize: 24224276 -> 24241580 (+0.07%)
Instrs: 4570595 -> 4574921 (+0.09%)
Latency: 53680256 -> 53693655 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 9829289 -> 9830573 (+0.01%)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7257
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7305
Fixes: 2e56e23420
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18488>
(cherry picked from commit 63063dd5ce4ef4a7a4c305c0905900aa25c5abe2)
2022-09-26 13:11:10 -07:00