Commit Graph

136767 Commits

Author SHA1 Message Date
Michel Dänzer d8911a0ae8 Revert "meson: add enable-glcpp-tests option"
This reverts commit f9ae947e72.

Not needed anymore.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:38 +00:00
Michel Dänzer fc0d1aab50 Revert "ci: disable glcpp tests for now"
This reverts commit e25a3e21f8.

The test timeouts should be fixed now.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:38 +00:00
Michel Dänzer 7fedf51b95 glsl/tests: Use exit code 126 to detect valgrind errors
valgrind returns exit code 126 if it can't write to the file passed to
--log-file. Hopefully it'll be the same for any other invalid valgrind
command line parameters or internal errors as well.

Using a different exit code (31) for this was hiding the fact that the
valgrind test wasn't actually working.

v2:
* Use exit code 126; can't treat any non-0 exit code as failure because
  glcpp is expected to exit with non-0 for some of the input we feed it

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:38 +00:00
Michel Dänzer 4cc8c25d56 glsl/tests: Don't use tempfiles
Use pipes for direct communication between child & parent process.

Using tempfiles sometimes resulted in hitting the meson timeout if there
was high filesystem pressure (I saw a single unlink system call take as
long as 4 seconds; attempts to re-use a single tempfile just shifted the
delays to truncate/close systems calls).

As a bonus, this gets the valgrind test actually working as intended.
It wasn't working because the tempfile passed to --log-file didn't exist
(due to the earlier os.close(fd)?).

v2:
* Wrap .read() in "with open()" (Dylan Baker)

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Michel Dänzer deb654cdd0 glsl/tests: Bump glcpp valgrind test timeout to 240 seconds
Once it's actually working as intended again, it may need that much
time.

v2:
* Bump to 240 seconds, still hit timeouts with 180.
* Don't change test priority.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Michel Dänzer 26e139c776 ci: Disable valgrind in some build jobs
Once the glcpp valgrind test works as intended again, it would delay
the dependent test jobs by ~1-4 minutes.

The meson-clover job would run the glcpp valgrind test multiple times
and take more than 10 minutes to finish.

valgrind can't work in the meson-android job, would need an ARM backend.

v2:
* Disable in meson-clover as well.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Michel Dänzer 37855fd59d glcpp: Fully initialize struct gl_context
valgrind flagged members of gl_ctx->Extensions being used uninitialized:

==23417== Conditional jump or move depends on uninitialised value(s)
==23417==    at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493)
==23417==    by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132)
==23417==    by 0x11A515: glcpp_lex (glcpp-lex.l:547)
==23417==    by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302)
==23417==    by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871)
==23417==    by 0x11ADC6: glcpp_preprocess (pp.c:238)
==23417==    by 0x111384: main (glcpp.c:174)
==23417==  Uninitialised value was created by a stack allocation
==23417==    at 0x111295: main (glcpp.c:136)

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Michel Dänzer 1eb3a2d8da Revert "ci: Restrict meson-gallium job to gstreamer runners"
This reverts commit 4b4bddcd99.

Not needed anymore with the previous fix.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Michel Dänzer 05bf12ccb6 intel/tools: Use subprocess.Popen to read output directly from a pipe
Instead of using tempfiles to communicate between child & parent
process. The latter sometimes resulted in hitting the meson timeout if
there was high filesystem pressure.

Fixes: ccaa5b034f "intel/tools: rewrite run-test.sh in python"
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>
2021-03-19 08:50:37 +00:00
Mike Blumenkrantz f0c8c6581c llvmpipe/setup: force fs constant updating upon beginning queries
this flushes any pending updates and avoids trying to access constant buffers
which have been unset (and are also potentially deleted)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
2021-03-18 23:15:53 -04:00
Mike Blumenkrantz 6d995d3fe2 lavapipe: force state updates when beginning queries
the full state update is maybe not entirely necessary since this is just
to address descriptor use, but probably it won't hurt

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
2021-03-18 23:15:53 -04:00
Mike Blumenkrantz 007bf1d1dc lavapipe: rewrite cmdbufs to always do descriptor binds/pushes first
llvmpipe has some crazy dependency ordering with constant buffers that
I don't want to mess with, so instead this ensures that descriptors are
always updated as early in the command stream as possible, avoiding any
use-after-free scenarios which might result from lavapipe freeing memory
in a still-bound descriptor that's pending an update

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9692>
2021-03-18 23:15:53 -04:00
Timothy Arceri 4feb26f647 glsl: add compilation errors for attribute and varying qualifiers
These qualifiers were removed in GLSL 4.20 and GLSL ES 3.00. For
desktop GL they are now only allowed if the shader is declared as
a compatibility shader.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9552>
2021-03-19 01:13:17 +00:00
Mike Blumenkrantz 1ab309377e lavapipe: support VK_KHR_copy_commands2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9693>
2021-03-18 17:14:58 -04:00
Mike Blumenkrantz f7597e7d4f zink: flatten 2d_array surfaces when necessary
same as cube types, if this is a single layer then it's not an array

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9684>
2021-03-18 16:29:09 -04:00
Icecream95 ae62fb3737 panfrost: Disable early-z when alpha test is used
Fixes rendering artefacts in Minetest on Midgard.

Fixes: 275277a2b4 ("panfrost: Implement alpha testing natively")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9676>
2021-03-18 20:22:55 +00:00
Lionel Landwerlin 9d947127d3 anv: use the device size of CS prefetch to pad secondary buffer calls
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/9679>
2021-03-18 20:08:45 +00:00
Lionel Landwerlin 33bc2977e5 intel/mi_builder: use device info to use the right CS prefetch size
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/9679>
2021-03-18 20:08:45 +00:00
Lionel Landwerlin beb680aae4 intel/dev: store size of CS prefetch
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/9679>
2021-03-18 20:08:45 +00:00
Dave Airlie 833847603b lavapipe: fix templated descriptor updates
The template path was buggy but CTS only tested it with Vulkan 1.1 enabled.

It was just missing the dstArrayElement offset.

Fixes: 41f7fa273d ("lavapipe: add support for VK_KHR_descriptor_update_template")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie a04921d687 lavapipe: drop unused vk_format in image struct
This wasn't used at all.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie a9b79c8c09 lavapipe: add missing device group api
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie 6cb676d169 lavapipe: add missing sampler minmax properties
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Dave Airlie 42b325f398 lavapipe: fix image format properties
Fix the sample counts for compressed + non-renderable + cube compatible

Fix the mip levels max calcs

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>
2021-03-18 19:57:34 +00:00
Eric Anholt 5da520cf3d freedreno/ir3: Demote centroid usage to pixel on non-msaa.
Like with the sample qualifier on all GPUs, use pixel on older HW when
MSAA rasterization is disabled to get reliable results.  Since I ran many
CI jobs on this, this updates the A530 TF flakes list, though I don't
think that this MR necessarily made it flakier (we were already struggling
on a5xx TF, which was what was motivating me to look at this!)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9641>
2021-03-18 10:46:09 -07:00
Timur Kristóf f5717f9f54 ac/llvm: Fix alignment of shared load intrinsics.
After some research, I found out that the alignment needs to be set
on the return value of the load, rather than on the pointer.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 14ad82b4e9 "ac/llvm: Emit more efficient code for load_shared."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9688>
2021-03-18 17:28:42 +00:00
Daniel Schürmann 3413c48375 aco/ra: allow VCC on SMEM sbase operand on GFX10+
Totals from 26 (0.02% of 146267) affected shaders (Navi10):
CodeSize: 324764 -> 324560 (-0.06%)
Instrs: 61090 -> 61039 (-0.08%)
Cycles: 2681952 -> 2668872 (-0.49%)
VMEM: 5773 -> 5769 (-0.07%)
SMEM: 1621 -> 1611 (-0.62%)
SClause: 2546 -> 2543 (-0.12%)
Copies: 4671 -> 4620 (-1.09%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531>
2021-03-18 17:15:00 +00:00
Daniel Schürmann fc3606f29c aco/optimizer: set VCC hint on new v_cmp_* definitions
Totals from 11692 (7.99% of 146267) affected shaders (Navi10):
CodeSize: 97419384 -> 97352560 (-0.07%); split: -0.07%, +0.00%
Instrs: 18571138 -> 18570969 (-0.00%); split: -0.00%, +0.00%
Cycles: 1431348400 -> 1431346296 (-0.00%); split: -0.00%, +0.00%
SMEM: 696646 -> 696650 (+0.00%)
SClause: 668511 -> 668490 (-0.00%); split: -0.00%, +0.00%
Copies: 1279475 -> 1279474 (-0.00%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9531>
2021-03-18 17:15:00 +00:00
Juan A. Suarez Romero 8ab6d2b4c4 ci/broadcom: use new piglit runner
Switch from the old piglit to the new piglit-runner executor.

Acked-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9680>
2021-03-18 16:31:45 +00:00
Vasily Khoruzhick e3f703e464 lima: update dEQP fails and skips lists
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9586>
2021-03-18 16:11:39 +00:00
Eric Anholt fc6a815401 freedreno/a5xx: Fix stream-output binning handling.
This makes it match (to the best I was able) a6xx's behavior, with the
exception of the XXX note in fd5_gmem.c highlighting what I think is an
issue on both a5xx and a6xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9295>
2021-03-18 08:47:48 -07:00
Jesse Natalie 69c2a472c2 u_format: Add restrict to fn pointer and manual format pack/unpack/fetch
MSVC warns (loudly) about a mismatch between the generated functions in
u_format_table.c and the definition of util_format_[un]pack_description,
specifically having 'restrict' in the function but not in the pointer
type in the struct.

So, add 'restrict' everywhere - to the function types, and to the rest
of the implementations that are assigned to those structs.

v2: util_format_unpack_description is used in gallium/auxiliary/translate

Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670>
2021-03-18 14:53:52 +00:00
Mike Blumenkrantz 3419b16b6d zink: handle nir_intrinsic_image_deref_samples
same as the texop but for images

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz 50881d59e6 compiler/spirv: fix image sample queries
this was only implemented for textures (I assume because drivers which implement
the corresponding intrinsic don't support multisampled images), but it's also
used for shader images

Fixes: 22fdb2f855 ("nir/spirv: Update to the latest revision")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>
2021-03-18 14:16:35 +00:00
Mike Blumenkrantz 861c6a86dc zink: enable spirv extension for post depth coverage
Fixes: 3c72c86742 ("zink: Wire up ARB_post_depth_coverage")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9683>
2021-03-18 10:01:13 -04:00
Timur Kristóf 89c8e22cc6 aco: Fix constant address offset calculation for ds_read2 instructions.
Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9678>
2021-03-18 10:43:41 +00:00
Erik Faye-Lund 0b090d8e67 gallium/st: reserve space in default uniform block for lowered constants
If we don't reserve these, we risk these lowering passes eating up more
uniforms than we have available.

This fixes a crash due to an assert in Zink, because we end up trying to
use a too large UBO after lowering.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:17:05 +01:00
Erik Faye-Lund 78de2de8f3 gallium/st: fix shader_has_one_variant
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: 7eb5fd98fd ("mesa/st: handle running nir lower passes for ucp and psiz in tess stage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:16:06 +01:00
Erik Faye-Lund bdfe0e3ef4 gallium/st: fix shader_has_one_variant
I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: ad0037fcfe ("mesa/st: set lower_point_size for tes/gs during program update")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>
2021-03-18 11:16:06 +01:00
Neha Bhende cc314361e3 nir_to_tgsi: Fix indices for CMP in nir_to_tgsi for nir_op_fcsel
nir_to_tgsi utiliy was using wrong src for nir_op_fcsel.

Fixes regression with solidworks2012_viewport.trace and mudbox-2010sp1-basic-head.trace

v2: as per suggested by Brian, instead of relying assumption that
value will be 0.0 or 1.0 all the time, use -abs(src) to make any non-zero
value as negative.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9658>
2021-03-18 04:20:16 +00:00
Eric Anholt 4258ab45b7 nir_to_tgsi: Respect PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED.
If the driver can't do it, we shouldn't be putting it in the TGSI,
regardless of what the NIR compiler above us decided.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9662>
2021-03-18 03:35:14 +00:00
Mike Blumenkrantz 5d031d8f31 zink: clear framebuffer state on context destroy
ensure we don't leak surface references

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 321a569656 zink: move fence reset to zink_fence_init()
fence stuff goes in fence file

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz bb90c8b926 zink: remove query batch-tracking init from begin_query()
this is always created on startup now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz cb70132778 zink: use macro to streamline batch struct member init
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 89dce254d8 zink: move other batch-tracking implementations to unified codepath
prep for monotonic batch ids

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:29 -04:00
Mike Blumenkrantz 57021b1d4a zink: also move batch destructor into zink_batch.c
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 56452230ab zink: move batch init into zink_batch.c
this consolidates more batch code into the batch file

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz fc27594943 zink: move active query pruning to batch reset
this didn't ever really need to be on the fence in the first place

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00
Mike Blumenkrantz 6aa791f626 zink: split out batch resource-set clearing into separate function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9626>
2021-03-17 23:01:28 -04:00