Commit Graph

133564 Commits

Author SHA1 Message Date
Mike Blumenkrantz 196794264f zink: start to refactor clearing
we currently only handle clears inside renderpasses, but it's also possible
to perform clears outside of renderpasses, so we can break this logic up a bit
to open the door to handling the non-rp case

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512>
2021-01-15 16:38:04 +00:00
Mike Blumenkrantz cf40a087f3 zink: move zink_clear to zink_clear.c
we're going to have a bunch of clear code, so having it all in a concise
place that's consistent with other gallium drivers is helpful

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8512>
2021-01-15 16:38:04 +00:00
Lionel Landwerlin 9a54aa131e intel/perf: move gt_frequency to results
We want to unify things a bit between GL & Vulkan. So store those
values in the results rather than just in the GL query code.

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/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin b7032d6776 intel/perf: link queries back to the gen_perf_config object
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/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin e79f112e4f intel/perf: add definition for generic perf counters
Those are not part of the OA report but will be used in upcoming
counters.

v2: Rename counter defines (Marcin)

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/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin bd7df91372 intel/perf: restructure i915 perf version checks
Trying to make things more readable.

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/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin d8154c4006 intel/mi_builder: fix self modifying batches
So far we only write a maximum of 4 dwords further into the batch and
it seems just going over the CS prefetch was enough.

Turns out writing more dwords can delay the writes and we start
prefetching stuff that hasn't landed in memory yet.

This fixes the issue by stalling the CS to ensure the writes have
landed before we go over the prefetch.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 796fccce63 ("intel/mi-builder: add framework for self modifying batches")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin 359312ae01 intel/mi_builder: optimize 64bit immediate register loads & memory stores
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/8525>
2021-01-15 13:26:23 +02:00
Lionel Landwerlin dbeca67a1d anv: don't disable KHR_performance_query in debug mode
This is useful to verify that queries are built properly and avoiding
to deal with i915-perf (typically under simulation).

v2: Remove likely() (Marcin)

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/8525>
2021-01-15 13:26:22 +02:00
Juan A. Suarez Romero 08b16cfe0b v3d: fix dest offset in TFU setup
It is using the source level instead of the destiny level (base_level)
to compute the dest offset.

This fixes `framebuffer-blit-levels draw rgba -auto -fbo` piglit test.

Fixes: 976ea90bdc ("v3d: Add support for using the TFU to do some blits.")
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/8491>
2021-01-15 10:31:14 +00:00
Danylo Piliaiev 5e2cee57c5 freedreno/ir3/parser: add cat7 support
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8420>
2021-01-15 10:08:38 +00:00
Marek Olšák f8fe2ca600 st/mesa: optimize binding and unbinding shader images
- use local variable num_images
- only unbind the number of shader images that we have bound

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:37:50 -05:00
Marek Olšák 8436d9c594 st/mesa: unbind sampler views, images, and vertex buffers after meta ops
v2: use a null array to unbind sampler views

Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:36:45 -05:00
Marek Olšák 211ec4226b cso_context: remove ability to restore VBs, const bufs, sampler views, images
This is meant to decrease CPU overhead and reduce the use of cso_context when
better solutions are possible.

These functions are removed. Gallium frontends should just use pipe_context:
- cso_set_sampler_views
- cso_set_shader_images
- cso_set_constant_buffer*

Additionally, vertex buffers are passed through cso_context but they are not
saved there. The only remaining role of cso_context with regard to vertex
buffers is to decide whether to go through u_vbuf or skip it. u_vbuf also
can't save and restore vertex buffers anymore.

This is how the states are restored for meta ops:
- in st/mesa, set st->dirty |= flags to re-bind whatever state has been
  touched
- outside of st/mesa, there is new interface st_context_iface::invalidate_-
 _state that external modules can use to essentially set st->dirty through
  it (like HUD)

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák fab62bb518 st/mesa: replace st->pipe with pipe in a few places
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 4c52aba41e st/mesa: don't use cso_context to set const bufs, sampler views and images
These cso_context functions will be removed and they are no longer needed
by st/mesa. They also cause CPU overhead because they save states.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák d107eef04f st/mesa: don't use cso_context to restore VBs, etc. for PBO glTexSubImage
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 7c7a6e05f4 st/mesa: don't use cso_context to restore VBs, etc. for PBO glReadPixels
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 78c0dc2f56 st/mesa: don't use cso_context to restore VBs, sampler views for glDrawTex*OES
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 82a388dc2d st/mesa: don't use cso_context to restore VBs, sampler views for glDrawPixels
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák f2141d3a9d st/mesa: don't use cso_context to restore VBs for glClear
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák cde98f3e0e st/mesa: don't use cso_context to restore VBs, sampler views for glBitmap
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 98e8dc1db8 gallium/pp: don't use cso_context to restore VBs, constbuf 0 and sampler views
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 2813688f8d gallium/hud: don't use cso_context to restore VBs, constbuf 0 and sampler views
These cso_context capabilities will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák a93ca3be01 gallium/api: add state invalidate interface as alternative to cso_save/restore
Some cso_context save/restore capabilities will be removed to decrease
CPU overhead. This is the alternative solution that e.g. the HUD will use.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 7afa7cb4b4 gallium/tests: stop using cso_set_sampler_views
It will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák 2a0195f4b9 st/xa: stop using cso_set_sampler_views
It will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Marek Olšák fc78ecd379 st/nine: stop using cso_set_sampler_views
It will be removed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8180>
2021-01-15 04:01:12 -05:00
Samuel Pitoiset 95c5675180 ci: mark some sparse CTS as expected failures on RAVEN
Same as Vega10.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8518>
2021-01-15 07:28:02 +00:00
Mauro Rossi 4bc9f7d53f android: r600/sfn: add sfn_nir_lower_64bit.cpp to Makefile.sources
Fixes the following building errors:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: r600::r600_nir_split_64bit_io(nir_shader*)
>>> referenced by sfn_nir.cpp:981 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:981)
...
ld.lld: error: undefined symbol: r600::r600_nir_64_to_vec2(nir_shader*)
>>> referenced by sfn_nir.cpp:1010 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:1010)
...
ld.lld: error: undefined symbol: r600::r600_merge_vec2_stores(nir_shader*)
>>> referenced by sfn_nir.cpp:1015 (external/mesa/src/gallium/drivers/r600/sfn/sfn_nir.cpp:1015)

Fixes: 165fb5117b ("r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2")
Cc: 21.0 <mesa-stable>
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8505>
2021-01-15 07:21:05 +00:00
Samuel Pitoiset c6849f9687 radv: do not invalidate the L2 metadata cache on compute queues
The flush VA space was only allocated for command buffers on the
graphics queue. Also, the ZPASS_DONE event should never be emitted
on compute queues because it hangs.

Invalidating the L2 metadata cache is only required for coherency
between the RBs and L2, so only on the graphics queue.

The L2 cache is invalidated at beginning of any IBs and that should
also invalidate the L2 metadata cache for compute anyways.

Fixes: 4a783a3c ("radv: Use L2 coherency on GFX9+.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8494>
2021-01-15 07:36:11 +01:00
Eric Anholt 953067ef5a ci/freedreno: Remove some long-unseen a6xx known flakes.
We haven't seen any of these since June.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt eab2bb4691 ci/freedreno: Drop skip list stuff from a5xx flakes.
I clearly copied the wrong file when setting this up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt 13be54ee08 ci/freedreno: Drop some long-unseen a5xx flakes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt 4ba6f4a053 ci/freedreno: Remove a bunch of stale flakes from a3xx.
I haven't seen these in the CI channel in many months.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt 22bf4831b8 ci/freedreno: Fix up the xfail/flake handling of a3xx texture functions.
There's only one that's been unstable for the last couple months, and it's
almost always a fail, so just mark that one's state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt 783f726ea2 ci/freedreno: Mark some a5xx separate_shader tests as xfails.
These almost always fail for us, so we get flake complaints on basically
every job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8510>
2021-01-15 03:30:40 +00:00
Eric Anholt fea6446b30 gallium/ntt: Avoid referencing undefined channels of system values.
Fixes failure to compile the shader on the host with gl_NumWorkGroups (for
example) on virgl.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:22 -08:00
Eric Anholt 37363ef663 gallium/ntt: Add support for store_per_vertex_output.
Needed by virgl and r600 to use NTT.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:19 -08:00
Eric Anholt 97d5bc7de3 gallium/ntt: Don't vectorize IBFE/UBFE/BFI.
Since our source language only allows scalar offset/bits arguments,
virglrenderer only handled scalar values too.  Just refuse to vectorize
these to prevent breakage.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:17 -08:00
Eric Anholt 942ee6a547 mesa/st: Dump nir-to-tgsi output when ST_DEBUG=tgsi or nir is set.
Suggested by Gert Wollny, and oh how I've wanted this.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:10 -08:00
Eric Anholt 45048f4829 mesa/st: Lower shader images before handing off to NIR-to-TGSI.
Otherwise you'll just throw unknown intrinsic errors on drivers ignorant
of this NIR option.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:08 -08:00
Eric Anholt 500dfc05da mesa/st: Make a single helper for the NIR-to-TGSI transfer.
The common path means that we get NIR IR dumping on builtin shaders, too.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8488>
2021-01-14 15:59:04 -08:00
Rob Clark f70c50b643 frontend/dri: Expose RGB[AX]_SRGB as well
platform_android prefers RGB[AX] over BGR[AX] to avoid buggyness with
older android versions.  But we need to include the corresponding SRGB
formats as well.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2888
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8452>
2021-01-14 23:04:53 +00:00
Mike Blumenkrantz 3d88e65e88 zink: decouple renderpass from framebuffer state
a framebuffer is based on the surfaces attached to it

a renderpass is based on the operations being performed

a zink_framebuffer object doesn't necessarily need to be changed
if the renderpass changes, as this might just indicate that a clear operation
is being used instead of a load, so we can cache the corresponding vk objects
into the zink_framebuffer based on the renderpass ops being used to (eventually)
reduce fb object thrashing by doing more incremental updates

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz 49bb791991 zink: use 'fb' variable name for zink_framebuffer objects in zink_framebuffer.c
let's be a bit consistent and intuitive

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz 301de75b25 zink: rename param in zink_create_framebuffer
this is consistent with other state naming

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz b4da9f42e5 zink: ralloc zink_framebuffer structs
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz c6741f52bd zink: remove renderpass refcounting
this is useless because we never destroy renderpasses during the lifetime
of a process and don't want to do so

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00
Mike Blumenkrantz b2e5dadd22 zink: add batch flag for checking renderpass state
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
2021-01-14 22:11:42 +00:00