Commit Graph

152659 Commits

Author SHA1 Message Date
Emma Anholt 814b0edae5 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>
2022-04-20 21:58:33 +00:00
Emma Anholt 6040107dc1 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>
2022-04-20 21:58:33 +00:00
Emma Anholt adb6d7fe9a ci/nouveau: Add nv92 xfails.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
2022-04-20 21:58:33 +00:00
Emma Anholt ea5873f787 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>
2022-04-20 21:58:33 +00:00
M Henning c0c198ffc1 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>
2022-04-20 21:58:33 +00:00
Emma Anholt 1b32d4b7d4 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>
2022-04-20 21:58:33 +00:00
Emma Anholt a4840e15ab 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>
2022-04-20 21:46:09 +00:00
Emma Anholt 0879c15666 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>
2022-04-20 21:46:09 +00:00
Emma Anholt 25836895f3 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>
2022-04-20 21:46:09 +00:00
Emma Anholt 26189cdb1d 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>
2022-04-20 21:46:09 +00:00
Emma Anholt 04a6d7b380 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>
2022-04-20 21:46:09 +00:00
Rhys Perry dab745f3b4 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: ff05137c2d ("nir: introduce and use nir_component_mask")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16029>
2022-04-20 21:03:03 +00:00
Daniel Stone f01e3400dc 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>
2022-04-20 20:19:22 +00:00
Boris Brezillon 14c195a055 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>
2022-04-20 20:19:22 +00:00
Jason Ekstrand 1b8a43a0ba 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>
2022-04-20 18:44:35 +00:00
Daniel Schürmann 90a0675989 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>
2022-04-20 17:53:48 +00:00
Daniel Stone 5f09ee77a1 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>
2022-04-20 14:52:40 +00:00
Emma Anholt 7f01299c40 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>
2022-04-20 13:47:50 +00:00
Emma Anholt 09fd1e94fd 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>
2022-04-20 13:47:50 +00:00
Gert Wollny 535f0b9391 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>
2022-04-20 13:05:57 +00:00
Mike Blumenkrantz b043d4c4c6 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>
2022-04-20 12:12:36 +00:00
Mike Blumenkrantz 27a43b531b 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>
2022-04-20 12:12:36 +00:00
Konstantin Seurer 324b2ae5f2 radv: Enable rt primitive culling for spirv2nir
Fixes: c8fe408fcc ("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>
2022-04-20 11:38:52 +00:00
Konstantin Seurer b3896fa8c7 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>
2022-04-20 10:46:29 +00:00
Lionel Landwerlin a468f26ca5 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>
2022-04-20 10:37:24 +03:00
Emma Anholt 30daa7d6d8 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>
2022-04-19 20:05:41 +00:00
Emma Anholt 73e1a54623 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>
2022-04-19 20:05:41 +00:00
Emma Anholt fc96397256 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>
2022-04-19 20:05:41 +00:00
Emma Anholt bac7ec1a89 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>
2022-04-19 20:05:41 +00:00
Emma Anholt 21282879f9 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>
2022-04-19 20:05:41 +00:00
Emma Anholt 4850dbb3f9 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>
2022-04-19 20:05:41 +00:00
Yonggang Luo a3a43e5fa8 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>
2022-04-19 19:38:47 +00:00
Yonggang Luo 4ead2f6579 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>
2022-04-19 19:38:47 +00:00
Emma Anholt 550975f229 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>
2022-04-19 18:45:30 +00:00
Emma Anholt 7ba63f516a 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>
2022-04-19 18:45:30 +00:00
Emma Anholt 1bcd848816 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>
2022-04-19 18:45:29 +00:00
Emma Anholt 7ba0c44607 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>
2022-04-19 18:45:29 +00:00
Emma Anholt d60282f5d2 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>
2022-04-19 18:45:29 +00:00
Emma Anholt ce15bf19fb 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>
2022-04-19 18:45:29 +00:00
Danylo Piliaiev 2c683519e2 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>
2022-04-19 18:06:58 +00:00
M Henning 8313a9231c 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>
2022-04-19 16:33:36 +00:00
M Henning 850197b3e0 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>
2022-04-19 16:33:36 +00:00
Boris Brezillon 9eace7f2e4 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>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund cfdaf1af9b dzn: remove needless defines
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund 2ca4e21df7 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>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund 0551f8ed62 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>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund b369e10d08 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>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund c5e979f632 dzn: c-style casts
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15816>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund 3d608de882 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>
2022-04-19 15:39:48 +00:00
Erik Faye-Lund 05af6f0434 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>
2022-04-19 15:39:48 +00:00