Commit Graph

137134 Commits

Author SHA1 Message Date
Bas Nieuwenhuizen 66e17b410a radv: Enable sharing with DCC with modifiers.
Also disable any heuristics.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>
2021-03-24 00:28:26 +00:00
Bas Nieuwenhuizen 85e5bbd11c radv: Allow extra planes for DCC.
plane_count is only the format plane count.

Fixes: 7f7da82dbb ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8817>
2021-03-24 00:28:25 +00:00
Jesse Natalie c022c9603d d3d12: Use ID3D12Device9::CreateCommandQueue1 when available
This lets us provide a creator ID, which lets us tag GLOn12 work
and separate it from other D3D12 work on the same singleton device.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3859
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9776>
2021-03-23 22:11:19 +00:00
Eric Anholt 8120871b8d freedreno/a5xx: Switch to using ir3_cache for looking up our VS/FS
Saves the lock/unlock to get the variants for VS/BS/FS programs, gives us
a place we could hang future linked program state, and gives us safe
constlen handling that fixes a couple of our piglits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698>
2021-03-23 19:55:38 +00:00
Eric Anholt ce36e60b18 freedreno/a4xx: Switch to using ir3_cache for looking up our VS/FS
Saves the lock/unlock to get the variants for VS/BS/FS programs, and gives
us a place we could hang future linked program state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698>
2021-03-23 19:55:38 +00:00
Eric Anholt b44d52f62b freedreno/a3xx: Switch to using ir3_cache for looking up our VS/FS.
Saves the lock/unlock to get the variants for VS/BS/FS programs, and gives
us a place we could hang future linked program state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698>
2021-03-23 19:55:38 +00:00
Eric Anholt 6941cd5c98 freedreno: Move the ir3 linked shader cache to the context.
The other ir3 backends would love to have it to reduce lookups and to be
able to cache linked-program state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9698>
2021-03-23 19:55:38 +00:00
Mauro Rossi cd1d8b4371 android: vulkan/util: add vk_descriptors.{c,h} to Makefile.sources
Fixes the following building errors:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.radv_intermediates/LINKED/vulkan.radv.so
...
ld.lld: error: undefined symbol: vk_create_sorted_bindings
>>> referenced by radv_descriptor_set.c:158 (external/mesa/src/amd/vulkan/radv_descriptor_set.c:158)
...
ld.lld: error: undefined symbol: vk_create_sorted_bindings
>>> referenced by radv_descriptor_set.c:340 (external/mesa/src/amd/vulkan/radv_descriptor_set.c:340)

Fixes: ad241b15a9 ("vk: consolidate dynamic descriptor binding sorting")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9766>
2021-03-23 20:29:55 +01:00
Mauro Rossi cd135b877d android: r600/sfn: fix sfn_nir_algebraic.c gen rules
Changelog:
- Correct typo in generator name which is sfn_nir_algebraic.py
- Rename variables for the gen rules according to meson rules
- Align python command and options according to meson rules

Fixes the following building error:

FAILED: ninja: 'external/mesa/src/gallium/drivers/r600/sfn/r600_nir_algebraic.py',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_pipe_r600_intermediates/sfn_nir_algebraic.c',
missing and no known rule to make it

Fixes: 195952786b ("r600/sfn: Add algebraic lowering for fsin and fcos")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9766>
2021-03-23 20:29:55 +01:00
Erik Faye-Lund ccb50f8ad3 zink: emit all interpolation modes
It's not just flat-shading that matters in the case of fragment outputs.
Let's play nicely and emit any interpolation mode instead.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775>
2021-03-23 17:22:09 +00:00
Erik Faye-Lund 80c3a53927 zink: factor out interpolation to helper
We actually need to set all of these for fragment inputs as well, so
let's make a helper for this that we can reuse.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9775>
2021-03-23 17:22:09 +00:00
Mike Blumenkrantz 277ea7a015 zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz 116811e963 zink: trigger pending clears during flush
this applies all pending fb clears at the time of flush to handle the scenario
of start -> clear() -> flush() properly

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz 6d138b5f92 zink: refactor clears a little to track a bitfield of enabled clears on the context
this makes the state of 'are there clears pending?' more accessible

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz a1d03cd031 zink: simplify some queue-related query code
we can collapse these conditionals now that things are more unified

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz 01790bfd45 zink: always flag xfb barrier on gfx flush when appropriate
we need this to be set for internal flushes too

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz e7362a9cbd zink: move zink_flush_compute() users to zink_flush_queue()
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz fec07a664e zink: rework public batch flush function to be useful again
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9726>
2021-03-23 17:14:05 +00:00
Mike Blumenkrantz 67b20bff09 zink: relax unreachable() to debug_printf when waiting on batch
I forgot that this was a reachable case pre-tc, but if there's no longer
a record of a batch_id then that just means it completed in the distant
past

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9772>
2021-03-23 12:50:37 -04:00
Jesse Natalie e3f48ac829 wgl: Fix wglCreatePbufferARB pixel format lookup
All other call sites of stw_pixelformat_get_info pass iPixelFormat as-is,
and stw_pixelformat_get_info also subtracts one internally, so I think
this was just an error.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9760>
2021-03-23 16:17:48 +00:00
Mike Blumenkrantz e6955d440f zink: ci updates
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607>
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz 9ea9b852a2 zink: emulate PIPE_FORMAT_R8G8B8X8_UNORM
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607>
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz 3bb138ce3e zink: handle blitting of color formats with ignored alpha channels
for e.g., R8G8B8X8 -> R8G8B8A8, we have to force a u_blitter call in order to use
a sampler which ignores alpha, otherwise we end up with broken rendering

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607>
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz fc23ddc22a zink: force PIPE_SWIZZLE_1 for X channels in samplerviews
this is generic handling for RGBX-type formats

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9607>
2021-03-23 15:55:20 +00:00
Mike Blumenkrantz 62ab64c276 zink: fix multisampled shader image load/store
I didn't ever have a driver to test on which could handle multisampled shader
images while writing this, but need to actually pass the sample id here

Fixes: 9cd2aff1a3 ("zink: add handling for all basic image ops in ntv")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724>
2021-03-23 15:48:14 +00:00
Mike Blumenkrantz 3adc4c41e1 zink: fix spirv image operand ordering
image operands are ordered by their operand's spirv value, meaning that
the availability operands need to go last here

Fixes: 882ab6afb7 ("zink: add spirv builder functions for image ops")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9724>
2021-03-23 15:48:14 +00:00
Mike Blumenkrantz e696596f86 zink: move batch-tracked resources to fence object
these are effectively managed by the fence, so it makes sense to store
them there

the set is ralloc-allocated, so explicitly destroying it isn't needed

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz a8d925f52e zink: always reset batch states when finding a new one
this is a bit safer

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz d54688f1e8 zink: make batch usage unsetting function public
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
2021-03-23 15:29:42 +00:00
Mike Blumenkrantz a315e8ce3e zink: move 'batch_id' and 'is_compute' members to fence
prep for future work, no functional changes

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
2021-03-23 15:29:42 +00:00
Tomeu Vizoso 93e19b8b40 ci: Fix visibility property of LAVA jobs
LAVA expects a different syntax for this property:

https://docs.lavasoftware.org/lava/glossary.html#term-visibility

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 84f91dfea5 ("CI: Change LAVA job visibility")
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9770>
2021-03-23 15:01:53 +00:00
Tomeu Vizoso 75951a44ee Revert "CI: Disable Panfrost T760"
The machines should be stable now.

This reverts commit fc2814417e.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9770>
2021-03-23 15:01:53 +00:00
Tomeu Vizoso 573c8196e4 Revert "ci/panfrost: Disable t860/radeonsi testing while the runners are struggling."
Infrastructure should be more stable now.

This reverts commit 0a1c533c6e.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9770>
2021-03-23 15:01:53 +00:00
Tomeu Vizoso 666966969f Revert "ci/panfrost: disable the rest of these jobs temporarily"
Infrastructure should be more stable now.

This reverts commit 806c612131.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9770>
2021-03-23 15:01:53 +00:00
Mike Blumenkrantz 051460b3c9 softpipe: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741>
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz f9c83782f7 st/glsl_to_nir: lower indirect derefs of builtins in non-packed uniform case
the builtin lowering can't handle dynamic array indexing, so this requires
that all indirect derefs be lowered any time this pass is invoked in order
to avoid crashing

fixes #4132

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741>
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz 6900498faa nir: add nir_lower_indirect_builtin_uniform_derefs()
this is a special version of indirect deref lowering which is used by
mesa/st to remove dynamic indexing from builtin uniforms for the lowering
pass in non-packed uniform case

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9741>
2021-03-23 14:44:48 +00:00
Mike Blumenkrantz 11ea1d1777 zink: unify clear color conversion code
at some point this will get fixed to work for format conversions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9712>
2021-03-23 14:34:19 +00:00
Mike Blumenkrantz e4e753333b zink: cache transfer maps
vk spec disallows mapping memory regions more than once, but we always
map the full memory range, so we can just refcount and store the pointer
onto the resource object for reuse to avoid issues here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9725>
2021-03-23 14:23:17 +00:00
Mike Blumenkrantz 230748d614 zink: break out buffer mapping part of zink_transfer_map
no functional changes, but this is going to get much more complex in
the near future

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9725>
2021-03-23 14:23:17 +00:00
Mike Blumenkrantz 63fe1dc65b ci: update xfails for ppc64le and s390x
tests are passing now

Acked-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9773>
2021-03-23 14:01:49 +00:00
Samuel Pitoiset d8fa93a707 ci: update list of expected CTS failures for RADV
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9756>
2021-03-23 10:19:20 +01:00
Jose Fonseca 2a50ab8571 gitlab-ci: Build meson-mingw32-x86_64 w/o zlib.
To prevent hard requirement of zlib from creeping in, as
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9727>
2021-03-23 05:55:07 +00:00
Mauro Rossi cb4287608a android: anv: add libcutils shared dependency
My previous patch merged as 2b1930a50a was incomplete

Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/vulkan.anv_intermediates/LINKED/vulkan.anv.so
...
ld.lld: error: undefined symbol: property_get
>>> referenced by os_misc.c:193 (external/mesa/src/util/os_misc.c:193)
>>>               os_misc.o:(os_get_option) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_util_intermediates/libmesa_util.a

Cc: 21.0 <mesa-stable@lists.freedesktop.org>
Fixes: eeecc21d93 ("util: Add property_get() fallback for android")
Fixes: 2b1930a50a ("android: radv: add libcutils shared dependency")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9744>
2021-03-22 22:52:13 +01:00
Rob Clark e7202e889b freedreno: Split out devicetree helpers
The freedreno pps datasource is going to need the same, so split out
helpers that can be re-used.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758>
2021-03-22 20:46:17 +00:00
Rob Clark 9479ae9761 freedreno/fdperf: Use os_read_file()
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758>
2021-03-22 20:46:17 +00:00
Rob Clark 5871f4177c freedreno: Make headers C++ happy
We'll need a few of these for the C++ based gfx-pps performance counter
collector datasource.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9758>
2021-03-22 20:46:17 +00:00
Eric Anholt e4e393a65c freedreno/a6xx: Disable sample averaging on depth/stencil resolves.
From the GLES 3.2 spec:

"If the source formats are integer types or stencil values, a single
sample’s value is selected for each pixel. If the source formats are
floating-point or normalized types, the sample values for each pixel are
resolved in an implementation-dependent manner. If the source formats are
depth values, sample values are resolved in an implementation-dependent
manner where the result will be between the minimum and maximum depth
values in the pixel."

For Z24S8 we were doing an average, which would be invalid for the stencil
data, and apparently the CTS didn't catch that.  For Z32F, our averaging
was technically legal, but given the Vulkan spec's requirement of sample 0
support but not sample average support for depth and stencil resolves, it
suggests that our averaging behavior was unusual.  Let's not spend power
on producing surprising results.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9661>
2021-03-22 19:07:08 +00:00
Eric Anholt 431b0ef9ee freedreno/a6xx: Rename the RB_BLIT_INFO.INTEGER field to SAMPLE_0.
As @samuelig found, this is the field for disabling sample averaging and
using sample 0 instead.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9661>
2021-03-22 19:07:08 +00:00
Kenneth Graunke a30d091a10 iris: Delete stale comment in iris_lost_context_state
Hasn't been necessary since b338bb70e0.
Caught by Dave Airlie.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9752>
2021-03-22 18:58:27 +00:00