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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)