Commit graph

32494 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Mike Blumenkrantz
ecb50b37a9 zink: return enum zink_queue from zink_batch_reference_resource_rw()
this is a little cleaner

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
870e0e73d7 zink: abstract zink_get_resource_usage() and move it to be internal
I'll be rewriting how resource tracking works, so abstracting it and removing
direct uses is going to reduce the chances of breaking things as well as code churn

plus it's a bit easier to use

downside is that until that rewrite happens, this will be a (very small) perf hit and
there's some kinda gross macros involved to consolidate code

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
62b10ad1b8 zink: convert ZINK_RESOURCE_ACCESS defines to enum
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
c5390b2ef7 zink: refactor resource_sync_writes_from_batch_usage() to manage batch id internally
this is always used the same way, so we can simplify the code a bit for future use

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
304ee56cab zink: add enum for different queues
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
49efef9d55 zink: add a pipe_context::fence_server_sync hook
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
6d005ba3fc zink: more consolidation for null sampler/image view hashing
by using the new helper functions, this is even more consistent

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9625>
2021-03-18 02:51:21 +00:00
Mike Blumenkrantz
c22e56f454 zink: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673>
2021-03-18 02:40:56 +00:00
Mike Blumenkrantz
e02d1eb950 zink: always use requested format for sampler view creation
this should be fine and good

Fixes: c768c5297a ("zink: force stencil format for stencil-only samplers and swizzle the right component")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9673>
2021-03-18 02:40:56 +00:00
Adam Jackson
3c72c86742 zink: Wire up ARB_post_depth_coverage
Just a matter of passing the bits through in the right place.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9637>
2021-03-17 23:15:12 +00:00
Marek Olšák
a94bd9033d radeonsi: use pipe_sampler_state::border_color_is_integer to simplify stuff
We don't need the separate integer sampler state if we know the border
color type.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9577>
2021-03-17 22:36:42 +00:00
Axel Davy
ff6f11acdc radeonsi: fix leak when the in-memory cache is full
When the hw_binary is not put in the in-memory
cache it must be freed.

Fixes: 8283ed65cf ("radeonsi: Limit the size of the in-memory shader cache")

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9587>
2021-03-17 21:05:06 +00:00
Mike Blumenkrantz
d85d780202 zink: switch to deqp-runner for piglit jobs
There's a few changes in the expected results. First of all, there's a
few failures that are now interpreted as crashes. These test are:

- glx@glx-visuals-depth
- glx@glx-visuals-depth -pixmap
- glx@glx-visuals-stencil
- glx@glx-visuals-stencil -pixmap

Secondly, and more surprisingly, there's three tests that were
previously passing, but are now failing. These are all EGL-related, so
it's likely that there's some EGL interaction that is different with the
new runner. These tests are:

- spec@egl 1.4@eglterminate then unbind context
- spec@egl_khr_surfaceless_context@viewport
- spec@egl_mesa_configless_context@basic

commit log and skiplist by Erik Faye-Lund <erik.faye-lund@collabora.com>

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9630>
2021-03-17 20:15:02 +00:00
Eric Anholt
a917cafdd7 ci/freedreno: Mark the rest of the glx_arb_sync_control@timing as flakes.
IIRC I've seen -msc-delta 2 flake set, so just complete the set.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9660>
2021-03-17 18:10:44 +00:00
Eric Anholt
2b8a73f949 ci/freedreno: Mark an a630 piglit flake from async shader compiling.
It seems that right around when we enabled piglit, some timing also
changed so this one started flaking.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9660>
2021-03-17 18:10:44 +00:00
Rob Clark
5d2c9fd161 freedreno/drm: Avoid unitialized timestamp in submit fail
Saw a flood of "waiting on invalid fence" with a completely bogus
looking fence # in a log of a rather strange low-memory crash.  Not
sure if it is coming from memory corruption in userspace, but if a
submit ioctl is failing due to failed allocation (or other reason)
we would get left with random stack garbage as the fence #.  Let's
not have that as a potential problem.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9638>
2021-03-17 16:36:37 +00:00
Marek Olšák
32eb74e1e1 ac/gpu_info: fix more non-coherent RB and GL2 combinations
It ignored non-harvested chips with a non-power-of-two memory bus.

Fixes: abed921ce7 - amd: add support for Navy Flounder

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9568>
2021-03-17 14:40:54 +00:00
Erik Faye-Lund
d4bcb58caf zink: fix free of ralloced pointer
When we alloc with ralloc, we also need to free with it.

But let's take a step back here; we don't just need to use ralloc, we
also need to destroy all other screen-resources. So let's call the
destructor here instead.

Fixes: 2643f9ed28 ("zink: ralloc screen objects")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9647>
2021-03-17 13:08:10 +00:00
Erik Faye-Lund
539036a990 zink: fix emulation of no mipfilter
This approach is taken from the Vulkan spec[1], where a robust maxLod
of 0.25 is proposed instead of 0.0.

This has the effect of allowing room for both minification and
magnification filters, yet still rounding down to the right miplevel in
the end.

[1]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkSamplerCreateInfo.html#_description

Fixes: 8d46e35d16 ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9649>
2021-03-17 12:58:12 +00:00
Juan A. Suarez Romero
557c86d6ce vc4: destroy renderonly object if present
When destroying the VC4 screen, check if renderonly exists before
freeing it.

This fixes for instance a segmentation fault caused when invoking
wflinfo.

Fixes: 187218395d ("renderonly: remove layering violations")
Reviewed-by: Andres Gomez <agomez@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9562>
2021-03-17 11:40:58 +00:00
Mike Blumenkrantz
62d6ec083b zink: enable PIPE_CAP_INVALIDATE_BUFFER
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
d5367cee09 zink: invalidate resources on map when discarding range
we can dump the whole vulkan object here for this case, which ends up being
much neater

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
cfa361e6cd zink: handle streamout buffer rebinds
this really just means to nuke the counter buffer, and this can be done
by using a special bind_history bit that can be unset when the buffer has
been rebound

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
a00f10207c zink: set valid region for streamout buffers on bind
this catches rebinds and is more accurate about the state of the region

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
8c1422dca5 zink: add a pipe_context::invalidate_resource hook
this creates new backing objects for the invalidated resource and, if
needed, rebinds it to any descriptor sets it might be used in by invalidating
the descriptor state and creating new view objects

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
d84c7c2a85 zink: remove direct samplerview batch-tracking
this moves tracking onto the surface/bufferview, which is more accurate
and allows the removal of a temporary hack in resource invalidation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
2729513d29 zink: hook up resource bind history
seems like this should be a gallium thing with how many drivers copy/paste it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9546>
2021-03-17 01:40:55 +00:00
Mike Blumenkrantz
806c612131 ci/panfrost: disable the rest of these jobs temporarily
runners having a hard time right now

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9639>
2021-03-17 01:34:49 +00:00
Mike Blumenkrantz
08d8aee222 zink: ci updates
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624>
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
2f3b09e422 zink: set ntv variable descriptor sets during compile phase
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624>
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
c1cdf30a11 zink: apply Delete All The Code methodology to the ubo/ssbo variables
gallium rewrites all the ubo/ssbo instructions to use the buffer index as
the instruction src. the nir variables which are passed to zink after that
point are completely worthless, and it's impossible to accurately determine
which one corresponds to which buffer

thus, deleting all the variables and creating new ones based on the buffers
that are used is the best option, and it also enables simplifying a ton
of code as well as doing even better improvements in the future

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624>
2021-03-17 01:27:00 +00:00
Mike Blumenkrantz
769c6dce23 zink: move zink_binding() to compiler.c
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9624>
2021-03-17 01:27:00 +00:00