Yiwei Zhang [Tue, 19 Apr 2022 23:50:13 +0000 (16:50 -0700)]
venus: override aspectMask for internal tiling modifier
WSI images and Android AHBs can have tiling modifier overrides, thus we
must override the aspectMask upon image subresource layout query.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15993>
Mike Blumenkrantz [Fri, 15 Apr 2022 17:25:00 +0000 (13:25 -0400)]
zink: handle device-local unsynchronized maps
this is only possible when tc determines the buffer is not in use
and decides to return a pointer immediately, so just give back a staging
buffer
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15979>
Mike Blumenkrantz [Wed, 20 Apr 2022 16:10:33 +0000 (12:10 -0400)]
zink: remove xfb_barrier flag
this was an attempt to minimize the number of xfb barriers being emitted,
but really xfb barriers need to always be emitted in order for xfb to work
cc: mesa-stable
fixes (nv):
KHR-GL46.texture_view.reference_counting
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-multiple-buffers-per-stream
KHR-GL46.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
Mike Blumenkrantz [Wed, 20 Apr 2022 15:46:36 +0000 (11:46 -0400)]
zink: fix xfb counter buffer barriers
a read barrier is needed for resume, yes, but the counter buffer
is always being written to, so write access must always be set
cc: mesa-stable
fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_test
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
Mike Blumenkrantz [Wed, 20 Apr 2022 15:29:10 +0000 (11:29 -0400)]
zink: fix synchronization when drawing from streamout
this was well-documented, but ultimately wrong: the synchronization
being used was for binding streamout buffers (not counter buffers) as
vertex buffers, which was already handled just fine in the normal
vertex buffer binding
drawing from streamout ONLY uses the counter buffer, which means
the counter buffer needs to be synchronized for reading
cc: mesa-stable
fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_feedbackk_test
KHR-GL46.transform_feedback.draw_xfb_instanced_test
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
Mike Blumenkrantz [Tue, 19 Apr 2022 21:52:55 +0000 (17:52 -0400)]
zink: nv ci update
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
Mike Blumenkrantz [Mon, 18 Apr 2022 20:58:47 +0000 (16:58 -0400)]
zink: NV_linear_color_attachment
this fixes staging blits on nvidia
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16016>
Mike Blumenkrantz [Tue, 19 Apr 2022 20:01:35 +0000 (16:01 -0400)]
zink: set VK_QUERY_RESULT_WAIT_BIT when copying to qbo
according to spec, this ensures that drivers will accurately
return results relative to when the query was ended
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16049>
Emma Anholt [Wed, 13 Apr 2022 19:13:51 +0000 (12:13 -0700)]
nir_to_tgsi: Make vec_to_movs avoid unsupported coalescing for 64-bit.
I had some workarounds in ALU op emits trying to fix up when we were asked
to store to unsupported channels when the ALU op had 64bit srcs (so only
vec2 supported) but a 32-bit dest with a >vec2 writemask.
Those workarounds had some bugs breaking 64-bit uniform initializer tests
on virgl, and also set up too wide of a writemask such that they triggered
assertion failures on nvc0. We can avoid the need for those workarounds
at emit time by just having nir_lower_vec_to_movs not generate unsupported
writemasks in the first place.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15934>
Emma Anholt [Wed, 20 Apr 2022 19:35:36 +0000 (12:35 -0700)]
ci/dzn: Cut the runtime by running 1/3 of the enabled tests.
Marge jobs are failing at their 1 hour timeout regularly because windows
CI lacks capacity. In the job I looked at, this test took 18 minutes,
which is surely contributing to the load. Cut it down to get us some hope
of getting MRs through that run windows jobs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16062>
Boris Brezillon [Mon, 4 Apr 2022 13:13:44 +0000 (06:13 -0700)]
dzn: Report actual device limits
Report actual device limits instead of pseudo-random numbers.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15911>
Boris Brezillon [Mon, 4 Apr 2022 11:39:19 +0000 (13:39 +0200)]
dzn: Use core helpers to fill physical device features/properties
The core provide generic helpers to turn Vulkan minor version
features/properties into their KHR counterparts. Let's declare those
core features/properties structs and use those helpers so we get
ready to support newer spec versions without too much pain.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15911>
Marek Olšák [Mon, 11 Apr 2022 02:38:02 +0000 (22:38 -0400)]
gallium/ddebug: implement pipe_vertex_state callbacks
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15964>
Emma Anholt [Thu, 14 Apr 2022 18:23:34 +0000 (11:23 -0700)]
nouveau/nir: Set the input for vertex/instance ID like TGSI does.
Doesn't seem to help tests, but clears a TODO about differences between
them.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Thu, 14 Apr 2022 19:04:56 +0000 (12:04 -0700)]
nouveau/nir: Fix edgeflag input detection.
VERT_ATTRIB_EDGEFLAG is above GENERIC0, so it was being offset and thus
not recognized by vert_attrib_to_tgsi_semantic().
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Thu, 14 Apr 2022 18:03:00 +0000 (11:03 -0700)]
nouveau/nir: Fix the inverted sense of usesSampleMaskIn.
Fixes:
9f3d5e99ea60 ("compiler: Use util/bitset.h for system_values_read")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Thu, 14 Apr 2022 18:13:14 +0000 (11:13 -0700)]
nouveau/nv50: Set the primid sysval flag if it's in the sysval list, too.
It's declared an input in TGSI, even though it's an SV in the backend. In
NIR, it shows up as an SV, so it's in this list. Fixes NIR regressions in
primitive-id-in and primitive-id-restart.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Thu, 14 Apr 2022 17:55:12 +0000 (10:55 -0700)]
nouveau/nv50: Enable mesa/st alpha test lowering on nv50 with NIR.
With TGSI, the driver allocates space for the alpha ref as a uniform and
adds a conditional discard to the shader. We could either replicate that
with NIR, or just set the flag saying we need the shader lowering and get
the same thing.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Mon, 28 Mar 2022 18:21:26 +0000 (11:21 -0700)]
nouveau/nir: Disable bitfield ops pre-nvc0.
There's no hardware instructions for them until then. These chips don't
expose the extension provinding the GLSL builtins for operations like
bfrev, but NIR can recognize the construct and optimize it to
bitfield_reverse, which pre-nvc0 would then fail to codegen. Prevents a
regression when moving to nir-to-tgsi. Other lower_bitfield flags are set
as well for when someone comes along and adds optimizations for them too.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Tue, 1 Mar 2022 00:22:57 +0000 (16:22 -0800)]
ci/nouveau: Add nv92 xfails.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Tue, 12 Apr 2022 23:05:40 +0000 (16:05 -0700)]
ci/nouveau: Add expectations files for GM206.
I'm using this in place of jetson for regression testing NTT on nvc0+.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
M Henning [Tue, 5 Oct 2021 05:39:33 +0000 (01:39 -0400)]
nouveau/nir: Split fewer 64-bit loads
Also adjust the lowering pass to handle wide SSBO loads that we now emit
for the nir case.
This improves generated code quality since memoryopt can't
merge SSBO loads that end up predicated on a bounds check.
This also happens to fix a few test cases, only because the simpler generated
IR is less likely to trigger other compiler bugs. Eg on kepler with
NV50_PROG_USE_NIR=1, this fixes
arb_gpu_shader_fp64-fs-non-uniform-control-flow-ubo
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Tue, 1 Mar 2022 06:25:52 +0000 (22:25 -0800)]
nouveau/nv50: Print the number of loops in shader-db output.
This is important so you don't go comparing the number of instructions
emitted when you unrolled loops differently.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
Emma Anholt [Fri, 10 Dec 2021 23:17:01 +0000 (15:17 -0800)]
r600: Use nir-to-tgsi instead of TGSI when the NIR debug opt is disabled.
For !8044 I'm working on getting all drivers to accept NIR. The NIR
compiler in the driver is apparently not quite ready, so use NIR-to-TGSI
instead. This is a net win in testcases working on my RV770 and Turks
cards (especially in some important piglit tests involving YUV dma-buf
decode), though it's not regression-free.
shader-db (R600):
total dw in shared programs: 8553412 -> 8358918 (-2.27%)
dw in affected programs: 7476702 -> 7282208 (-2.60%)
total gprs in shared programs: 217286 -> 213217 (-1.87%)
gprs in affected programs: 72747 -> 68678 (-5.59%)
total loops in shared programs: 398 -> 330 (-17.09%)
loops in affected programs: 68 -> 0
total cf in shared programs: 558835 -> 332768 (-40.45%)
cf in affected programs: 420475 -> 194408 (-53.76%)
shader-db (Turks):
total dw in shared programs:
14104598 ->
13556782 (-3.88%)
dw in affected programs:
12161972 ->
11614156 (-4.50%)
total gprs in shared programs: 321068 -> 313690 (-2.30%)
gprs in affected programs: 114899 -> 107521 (-6.42%)
total loops in shared programs: 736 -> 651 (-11.55%)
loops in affected programs: 111 -> 26 (-76.58%)
total cf in shared programs: 925771 -> 581226 (-37.22%)
cf in affected programs: 678600 -> 334055 (-50.77%)
total stack in shared programs: 27853 -> 27855 (<.01%)
stack in affected programs: 5 -> 7 (40.00%)
glmark2 terrain: 0.137649% +/- 0.0511938% (n=6)
glmark2 jellyfish: no change (n=8)
unigine valley (extreme) 5.36 -> 5.45 (n=1 it takes so long to run)
unigine heaven (basic) 16.13 -> 16.15 (n=1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14319>
Emma Anholt [Fri, 11 Feb 2022 21:06:47 +0000 (13:06 -0800)]
r600/sb: Avoid causing an exception when getting the reciprocal of 0u.
I'm not sure what the hardware would return in this circumstance, so just
don't fold it. Avoids regressions on transition to NIR.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14319>
Emma Anholt [Sun, 3 Apr 2022 05:19:59 +0000 (22:19 -0700)]
r600: Fix reading back from a temp array immediately after writing on RV770.
KHR-GL33.shaders.indexing.tmp_array.vertexid regressed with the switch to
NIR-to-TGSI because the shader got optimized enough to emit a read just
after writing to the array (the kind of situation where a non-rel write
would have been followed by a PV/PS read). The R600 and EG docs say you
always need to do this, but apparently some hardware gives you the right
answer anyway so we don't flag it on all of them.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14319>
Emma Anholt [Sat, 2 Apr 2022 20:20:36 +0000 (13:20 -0700)]
ci/r600: Manual run updates.
Various fixes have happened, update status.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14319>
Emma Anholt [Sun, 13 Feb 2022 16:20:19 +0000 (08:20 -0800)]
r600: Fix up some mis-indentation of blocks.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14319>
Rhys Perry [Tue, 19 Apr 2022 10:58:56 +0000 (11:58 +0100)]
nir/copy_prop_vars: fix non-vector shader call payloads
Fixes RADV+Q2RTX.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Fixes:
ff05137c2db ("nir: introduce and use nir_component_mask")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16029>
Daniel Stone [Wed, 20 Apr 2022 20:05:21 +0000 (21:05 +0100)]
CI: Disable Windows jobs
We are underprovisioned for Windows, almost certainly not running wide
enough on the insufficient number of slots we do have, and there are
also indications that the machine itself is having physical issues.
Disable it until it's fixed.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16055>
Boris Brezillon [Wed, 20 Apr 2022 11:21:25 +0000 (04:21 -0700)]
ci/windows: Add a variable to globally disable jobs using windows runners
Suggested-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16055>
Jason Ekstrand [Mon, 28 Mar 2022 23:29:44 +0000 (18:29 -0500)]
util: Remove util_cpu_detect
util_cpu_detect is an anti-pattern: it relies on callers high up in the call
chain initializing a local implementation detail. As a real example, I added:
...a Mali compiler unit test
...that called bi_imm_f16() to construct an FP16 immediate
...that calls _mesa_float_to_half internally
...that calls util_get_cpu_caps internally, but only on x86_64!
...that relies on util_cpu_detect having been called before.
As a consequence, this unit test:
...crashes on x86_64 with USE_X86_64_ASM set
...passes on every other architecture
...works on my local arm64 workstation and on my test board
...failed CI which runs on x86_64
...needed to have a random util_cpu_detect() call sprinkled in.
This is a bad design decision. It pollutes the tree with magic, it causes
mysterious CI failures especially for non-x86_64 developers, and it is not
justified by a micro-optimization.
Instead, let's call util_cpu_detect directly from util_get_cpu_caps, avoiding
the footgun where it fails to be called. This cleans up Mesa's design,
simplifies the tree, and avoids a class of a (possibly platform-specific)
failures. To mitigate the added overhead, wrap it all in a (fast) atomic
load check and declare the whole thing as ATTRIBUTE_CONST so the
compiler will CSE calls to util_cpu_detect.
Co-authored-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15580>
Daniel Schürmann [Wed, 22 Jul 2020 10:23:48 +0000 (12:23 +0200)]
nir/lower_alu_to_scalar: don't set the nir_builder cursor
This ensures recursive lowering in a single pass.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15977>
Daniel Stone [Tue, 19 Apr 2022 12:45:19 +0000 (13:45 +0100)]
dzn/ci: Don't spam conformance warnings
We know it's not conformant and that's OK.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16031>
Emma Anholt [Mon, 28 Mar 2022 22:07:09 +0000 (15:07 -0700)]
nine: Disable optional use of TTN when MUL_ZERO_WINS is available.
NIR doesn't have that knob currently, so we end up throwing errors about
it being ignored.
This should fix cases of "tgsi_to_nir: unhandled TGSI property 23 = 1",
and presumably do better at DX9 muls on nv50 and r600.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14883>
Emma Anholt [Fri, 4 Feb 2022 19:29:27 +0000 (11:29 -0800)]
tgsi_to_nir: Emit load_ubo_vec4 instead of load_ubo on non-integer HW.
Otherwise, we get an ishl that the HW can't support, and a ushr if the NIR
ends up being lowered to ubo_vec4, which may not get constant-folded if
the offset was non-constant.
This matches what mesa/st uses for this arg to uniform lowering.
Fixes: #5971
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14883>
Gert Wollny [Sun, 17 Apr 2022 09:51:35 +0000 (11:51 +0200)]
ntt: Add option to not optimized register allocation
On virglrenderer it is of interest to not re-use temporaries when we
want to handle precise, invariant, and highp/mediump with better
possibility for optimization.
v2: Force optimized RA if the number of registers is too large
(Emma: only 16 bit signed int are reserved for register indices)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16051>
Mike Blumenkrantz [Thu, 10 Mar 2022 14:02:04 +0000 (09:02 -0500)]
lavapipe: run nir_fold_16bit_sampler_conversions
big cleanup for all shaders coming from zink
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15852>
Mike Blumenkrantz [Mon, 11 Apr 2022 12:52:24 +0000 (08:52 -0400)]
nir/fold_16bit_sampler_conversions: add a mask for supported sampler dims
AMD might not support cubes, but that doesn't mean cubes can't be used
on other drivers
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15852>
Konstantin Seurer [Tue, 19 Apr 2022 10:30:32 +0000 (12:30 +0200)]
radv: Enable rt primitive culling for spirv2nir
Fixes:
c8fe408fcc7 ("radv: Advertise ray primitive culling")
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16028>
Konstantin Seurer [Tue, 19 Apr 2022 14:13:28 +0000 (16:13 +0200)]
radv: Do not discard hits with t=tmax
Fixes dEQP-VK.ray_tracing_pipeline.inside_aabbs.chit.ray_end_tmax_zero.*
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16034>
Lionel Landwerlin [Wed, 26 Jan 2022 10:43:51 +0000 (12:43 +0200)]
anv: implement VK_EXT_primitives_generated_query
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15638>
Emma Anholt [Wed, 29 Dec 2021 22:55:24 +0000 (14:55 -0800)]
tgsi: Emit ureg HW_ATOMIC decls in range order.
It turns out r600 has a dependency on it.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Emma Anholt [Mon, 14 Feb 2022 04:33:13 +0000 (20:33 -0800)]
nir_to_tgsi: Allocate the primid sysval to num_inputs, not num_outputs.
r600 would end up looking for it past the end of its array of inputs
(which expected 1:1 ordering from declarations to driver locations).
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Emma Anholt [Tue, 5 Apr 2022 03:32:47 +0000 (20:32 -0700)]
nir_to_tgsi: Avoid swizzling from undefined channels in load_output.
virglrenderer emits GLSL referencing all the swizzles, even if the write
mask doesn't contain them. This is a problem when the output is
TessLevelInner, which has only 2 elements.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Emma Anholt [Wed, 30 Mar 2022 23:08:37 +0000 (16:08 -0700)]
nir_to_tgsi: Don't forget to split 64-bit store_per_vertex_output.
Same splitting method as store_output. Fixes regressions in virgl
with nir-to-tgsi.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Emma Anholt [Wed, 30 Mar 2022 22:57:34 +0000 (15:57 -0700)]
nir_to_tgsi: Fix assertion failures handling 64-bit vec3/vec4 ssa undefs.
Found in virgl, where a glslparsertest accidentally gets its inputs
lowered to undefs, and 64-bit undefs don't get split by the normal
alu/intrinsic splitter (and would be hard to split because other passes
would see reconstruction of the vec4 from undefs and turn it back into
vec3/vec4 undef).
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Emma Anholt [Mon, 14 Feb 2022 19:57:37 +0000 (11:57 -0800)]
nir_to_tgsi: Add a workaround for virglrenderer TG4.
I've tried to keep virglrenderer workarounds out of ntt, but this one
would be bothersome to do with tgsi_translate and TG4 is pretty low-stakes
for NTT consumers.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16043>
Yonggang Luo [Sat, 4 Dec 2021 07:44:51 +0000 (15:44 +0800)]
win32: Do not use BUILD_GL32, we use def file to export win32 dll symbols.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14041>
Yonggang Luo [Fri, 3 Dec 2021 12:51:58 +0000 (20:51 +0800)]
win32: Fixes 32 bits visual studio module definition files by add script gen_vs_module_defs.py
Getting opengl32*.def consistence with Windows SDK.
Getting osmesa.mingw.def's gl* functions consistence with Windows SDK.
stw_* functions are cdecl, not stdcall, so there is no need mangling the symbol.
Fixes egl.def for x86
d3d10sw: Move the place of d3d10_sw.def to d3d10_sw.def.in
Fixes vulkan_lvp.def for x86
Fixes #5552
Remove stdcall-fixup
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14041>
Emma Anholt [Mon, 18 Apr 2022 17:41:01 +0000 (10:41 -0700)]
turnip: Don't disable LRZ in subpasses after the first in the easy case.
If it's the same depth/stencil attachment, then there's no need to turn
off LRZ just because the subpass changed. Doesn't help gfxbench perf yet,
but will with !16014.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Emma Anholt [Mon, 18 Apr 2022 18:16:07 +0000 (11:16 -0700)]
turnip: Ignore TOP/BOTTOM_OF_PIPE bits in subpass src/dst dep flags.
gfxbench sets these between the gbuffer subpass and the following ones.
They should be no-ops as subpass dependencies. gfxbench vk-5-debug perf
12.8 -> 14.6 fps thanks to getting gmem on the gbuffer rendering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Emma Anholt [Fri, 15 Apr 2022 19:08:07 +0000 (12:08 -0700)]
freedreno/ir3: Call nir_opt_find_array_copies().
gfxbench vk-5-normal has a shader that sampels into a texels[] array at
the top, then in a loop calls a GLSL function passing texels[] in by
value. This resulted in a copy to a temp inside the loop, which got
lowered to scratch stores since it was pretty big.
By doing find_array_copies(), we notice that it's equivalent to
copy_deref, then get to copy-propagate from the array at the top. Then we
only have to set up the scratch array outside of the loop and load_scratch
from it in the called function inside the loop. This also causes there to
be less spilling, stps 1144 -> 354 and ldps 826->36.
However, it doesn't seem to change performance on the test. So, while
this seems to be an improvement for the shader, and we could maybe even do
better by rematerializing the txl samples inside the loop instead of
storing the texture fetches to scratch in the first place, it doesn't
currently seem worth pursuing more optimization of this shader.
No change on freedreno shader-db.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Emma Anholt [Fri, 15 Apr 2022 18:17:50 +0000 (11:17 -0700)]
turnip: Add nir_opt_conditional_discard.
We can easily do discard_if in the backend without control flow, but it
wasn't done in ir3 because the GL frontend already did it for us.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Emma Anholt [Mon, 18 Apr 2022 19:37:19 +0000 (12:37 -0700)]
freedreno/ir3: Make sched nodes before adding deps.
The mark_kill_path() during dep setup follows SSA srcs, which when a phi
is involved may include a def from later in the same block, that we hadn't
created yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Emma Anholt [Fri, 15 Apr 2022 18:16:40 +0000 (11:16 -0700)]
turnip: Add TU_DEBUG=layout for dumping image layouts.
This was useful for comparing image allocations between gfxbench
gl_5_normal and vk_5_normal to see if rendering was generally equivalent
(formats, MSAA, UBWC choices, and notably gfxbench vk was choosing DXT5
instead of ASTC on non-android builds!)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15982>
Danylo Piliaiev [Mon, 18 Apr 2022 17:26:48 +0000 (20:26 +0300)]
turnip: Try harder to keep LRZ valid and fix a few edge cases
Refactored tu6_calculate_lrz_state and added comments.
1) If there is no depth write we could keep LRZ valid with any
compare op, we just have to temporary disable LRZ for incompatible
ops in such case.
2) Found that VK_COMPARE_OP_EQUAL is not compatible with LRZ,
and since it doesn't change LRZ buffer - LRZ could be just
temporary disabled. This fixes rendering of grass/trees in
PUBG mobile on angle.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6127
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16014>
M Henning [Sun, 30 Jan 2022 03:20:58 +0000 (22:20 -0500)]
nouveau: Skip cctl for atomic counters in tgsi
The tgsi path already marked all aliasing loads of atomic counters with
CACHE_CG, so we don't need to emit a cctl. This patch uses the cache
flag on the atomic to model whether the L1 cache needs the stale
values to be flushed or not.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14386>
M Henning [Mon, 3 Jan 2022 01:29:02 +0000 (20:29 -0500)]
nouveau: Emit cctl to flush L1 cache for atomics
We were previously only emitting these for CAS, but all of the atomics
seem to need it.
Fixes spec@glsl-es-3.10@execution@fs-simple-atomic-counter-inc-dec-read
on kepler with NV50_PROG_USE_NIR=1
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14386>
Boris Brezillon [Fri, 8 Apr 2022 11:32:12 +0000 (13:32 +0200)]
dzn: refactor error-handling
Here's a couple of cleanups to the error-handling code, now that we're
no longer using ComPtr<T>.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 8 Apr 2022 08:41:24 +0000 (10:41 +0200)]
dzn: remove needless defines
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Thu, 7 Apr 2022 16:16:19 +0000 (18:16 +0200)]
dzn: merge util sources
There, no more C and C++ sources of the same base-name. We can do both
in one source.
This is our last C++ source file, so let's also clean away the C++20
mess in meson.build.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 13:04:34 +0000 (15:04 +0200)]
dzn: port code to plain c
This does quite a lot in one go, simply because C and C++ are too
different to cleanly move from one language to another. But hopefully
this won't create too many rebase-issues.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 12:38:43 +0000 (14:38 +0200)]
dzn: do not set unused default member initializer
These objects aren't allocated using C++ constructors, so these default
member initializers does nothing.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Thu, 7 Apr 2022 15:22:04 +0000 (17:22 +0200)]
dzn: c-style casts
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 13:09:09 +0000 (15:09 +0200)]
dzn: use c-style initialization
Here's a few cases where we can use C-style initialization up-front,
which reduces the diffs later on.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Thu, 7 Apr 2022 12:53:02 +0000 (14:53 +0200)]
dzn: use c-style for-statement
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Thu, 7 Apr 2022 12:51:37 +0000 (14:51 +0200)]
dzn: use define instead of constexpr
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 12:58:25 +0000 (14:58 +0200)]
dzn: no more reinterpret_cast
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 12:36:11 +0000 (14:36 +0200)]
dzn: drop using references
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Wed, 6 Apr 2022 12:30:59 +0000 (14:30 +0200)]
dzn: drop auto usage
The auto keyword isn't available in C, so let's drop it and just use
explicit types instead.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Tue, 5 Apr 2022 15:41:20 +0000 (17:41 +0200)]
dzn: add a bunch of missing struct-keywords
If we're going to have any chance of porting this code to C, we're
going to have to be better at spelling out structs.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 25 Mar 2022 16:08:50 +0000 (17:08 +0100)]
dzn: port to d3d12 c-api
Using the vulkan-helpers from C++ code has turned out to have a lot of
friction, because no other driver uses C++ for this.
So let's bite the bullet and call the D3D12 C-API instead. The C-API
wasn't really around when we started out, but it's there now.
This is still far from ideal; we should really create some wrapping
macros to generate the extremely verbose COM calls.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Thu, 7 Apr 2022 12:56:47 +0000 (14:56 +0200)]
dzn: pass IDXGIAdapter1 to d3d12_create_device
The D3D12 C API doesn't know about the relationship between
IDXGIAdapter1 and IUnknown. And there's no good reason to care about it
here either. So let's just pass the right type all the way.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 25 Mar 2022 15:29:48 +0000 (16:29 +0100)]
dzn: use ID3D10Blob instead of ID3DBlob
In the C interface, there's no such alias.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 25 Mar 2022 14:59:23 +0000 (15:59 +0100)]
dzn: always use ID3D12GraphicsCommandList1
In the C-interface, ID3D12GraphicsCommandList1 and
ID3D12GraphicsCommandList are unrelated types. So let's make sure we
consistenly use the most up-to-date version.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 25 Mar 2022 14:59:23 +0000 (15:59 +0100)]
dzn: always use ID3D12Device1
In the C-interface, ID3D12Device1 and ID3D12Device are unrelated types.
So let's make sure we consistenly use the most up-to-date version.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 25 Mar 2022 12:15:44 +0000 (13:15 +0100)]
dzn: remove all usage of ComPtr<T>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Erik Faye-Lund [Fri, 8 Apr 2022 07:56:58 +0000 (09:56 +0200)]
dzn: fixup indent
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
Georg Lehmann [Fri, 31 Dec 2021 16:38:25 +0000 (17:38 +0100)]
aco: Reuse previous -1 result in find_msb to avoid using VOP3.
Totals:
CodeSize:
388934388 ->
388933712 (-0.00%)
Totals from 208 (0.15% of 134913) affected shaders:
CodeSize: 2008016 -> 2007340 (-0.03%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16011>
Yonggang Luo [Tue, 19 Apr 2022 08:33:26 +0000 (16:33 +0800)]
zink: Remove redundant framebuffer_mtx from zink_screen.h
Fixes:
beb71504f42 ("zink: remove the worst part of basic framebuffer support")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16025>
Lionel Landwerlin [Tue, 19 Apr 2022 12:53:54 +0000 (15:53 +0300)]
ci/iris: mark another test as flaky
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16032>
Lionel Landwerlin [Wed, 13 Apr 2022 13:04:25 +0000 (16:04 +0300)]
intel/fs: tidy up lower of ray queries
We already expect a single function.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15946>
Boris Brezillon [Tue, 19 Apr 2022 08:00:51 +0000 (01:00 -0700)]
dzn: Pass the right type to CreateCommandList() in the reset path
The Command allocator and command list type must match, but we
are forcing it to D3D12_COMMAND_LIST_TYPE_DIRECT in the reset path.
Fixes:
a012b219640 ("microsoft: Initial vulkan-on-12 driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16023>
Marcin Ślusarz [Wed, 13 Apr 2022 12:37:15 +0000 (14:37 +0200)]
intel/compiler: invalidate metadata in brw_nir_initialize_mue
New "if" blocks may have been inserted.
Fixes:
bc4f8c073a2 ("intel/compiler: inject MUE initialization")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
Marcin Ślusarz [Wed, 13 Apr 2022 11:15:28 +0000 (13:15 +0200)]
intel/compiler: invalidate all metadata in brw_nir_lower_intersection_shader
New "if" blocks were inserted.
Fixes:
303378e1dd4 ("intel/rt: Add lowering for combined intersection/any-hit shaders")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
Marcin Ślusarz [Wed, 13 Apr 2022 11:09:23 +0000 (13:09 +0200)]
anv: invalidate all metadata in anv_nir_lower_ubo_loads
lower_ubo_load_instr may insert "if" blocks.
Fixes:
61749b5a151 ("anv: Add a pass for lowering A64 UBO access")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15924>
Lionel Landwerlin [Wed, 13 Apr 2022 08:08:44 +0000 (11:08 +0300)]
anv: allow getting the address of the beginning of the batch
There is no reason not to be able to get it.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
34a0ce58c7f8 ("anv: add a new execution mode for secondary command buffers")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15968>
Alexey Bozhenko [Fri, 15 Apr 2022 15:38:03 +0000 (18:38 +0300)]
intel/compiler: fix singleton pointer coverity warning
fix brw_kernel::stats member that was declared as a variable
but used as a pointer to array of 3 elements
CID: 1503279
Signed-off-by: Bozhenko Alexey <oleksii.bozhenko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15975>
Karmjit Mahil [Mon, 28 Mar 2022 15:50:48 +0000 (16:50 +0100)]
pvr: Fix clang-format errors caused by vk outarrays.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15944>
Boris Brezillon [Tue, 12 Apr 2022 14:31:50 +0000 (07:31 -0700)]
dzn: Add support for sampleRateShading
Forward the sample-rate shading info to spirv_to_dxil() so we can
claim to support sampleRateShading.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15916>
Boris Brezillon [Wed, 13 Apr 2022 09:14:36 +0000 (02:14 -0700)]
microsoft/spirv_to_dxil: Allow forcing per-sample shading
Needed to support VkPipelineMultisampleStateCreateInfo::sampleShadingEnable.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15916>
Boris Brezillon [Thu, 14 Apr 2022 14:21:26 +0000 (07:21 -0700)]
microsoft/compiler: Add a dunmmy SV_SampleIndex when needed
When per-sample shading is forced and all input variables have a flat
interpolation, DXIL validation detects a mismatch between the
SampleFrequency property and the fact that no variables are per-sample
and SV_SampleIndex is never read. When that happens, add a dummy
SV_SampleIndex.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15916>
Juan A. Suarez Romero [Thu, 17 Mar 2022 09:29:38 +0000 (10:29 +0100)]
v3d: enable GL_ARB_copy_image extension
Enable the proper capability to get activate this extension.
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4588
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Juan A. Suarez Romero [Wed, 13 Apr 2022 18:08:45 +0000 (20:08 +0200)]
v3d: define our own canonical supported formats
Some of the canonical formats defined by Gallium are not TLB compatible,
so we need to provide an alternative.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Juan A. Suarez Romero [Wed, 13 Apr 2022 18:06:21 +0000 (20:06 +0200)]
gallium: add hook on getting canonical format
On swizzled copies canonical formats are used to reduce the formats to a
simpler subset.
Nevertheless, it is possible that some of the canonical formats defined
in Gallium are actually not supported by the drivers themselves.
This provides a driver-defined hook that can be used to provide an
alternative canonical format in case the canonical one defined by
Gallium is not supported by the driver.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Juan A. Suarez Romero [Wed, 13 Apr 2022 17:42:37 +0000 (19:42 +0200)]
v3d: use surface format defined on pipe_blit
When trying to perform a TLB-based blit, we need to create a surface out
of the src and dst resources. But instead of using the same formats as
the resources, we need to use the format that is passed through
pipe_blit_info.
This was making some cases to use the render-based blit instead of the
TLB-based blit, which is more performant.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Juan A. Suarez Romero [Tue, 29 Mar 2022 11:53:27 +0000 (13:53 +0200)]
v3d: do not tile 1D textures
Hardware already support 1D untiled textures, so no need to convert them
to tile for render-based blit.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Juan A. Suarez Romero [Wed, 13 Apr 2022 12:32:19 +0000 (14:32 +0200)]
v3d: report the correct unsupported blit format
We were reporting the resource format instead of the surface format for
unsupported render blit formats.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15693>
Lionel Landwerlin [Tue, 22 Feb 2022 08:38:05 +0000 (10:38 +0200)]
anv: implement DEBUG_SYNC
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15950>