Commit Graph

137021 Commits

Author SHA1 Message Date
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
Daniel Schürmann
05fb5e85f2 .mailmap: fix email for Daniel Schürmann
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9755>
2021-03-22 18:56:22 +00:00
Danylo Piliaiev
a5b37c64d1 turnip: expose several already implemented extensions
They were promoted to Vulkan 1.1 and we already support them.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9757>
2021-03-22 18:20:57 +00:00
Connor Abbott
d8a2abe348 freedreno/computerator: Add script for finding reg file size
This helps with finding the various parameters introduced in the last
commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
50d5ed1e5e freedreno: Report max_waves in shaderdb output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
d274649799 freedreno/computerator: Use threadsize calculated by ir3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
2ecb9700e8 freedreno: Use threadsize calculated by ir3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
7ecc70b31c turnip: Use threadsize calculated by ir3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
fd7960e191 ir3: Calcuate max_waves and threadsize
max_waves is just for shader-db stats for now, but threadsize will
replace the various mechanisms used to determine threadsize across the
different gen's. Calculating these correctly entails adding a bunch of
details about the sizes of various things to ir3. In the future we will
use the guts of the max_waves calculation to inform RA decisions as
well, which is why the max_waves calculation is broken up into register
dependent/independent pieces.

Something should be said about the units of reg_size_vec4. These units
were chosen for two reasons:

1. As said in the comment, it makes some calculations easier.
2. For a4xx/a5xx, where we don't know as much because we haven't done
   the same sorts of experiments to probe for the HW configuration, it
   corresponds more directly to things that are known. The existing code
   switches to the smaller threadsize when r24.x or higher is used,
   which translates directly to a reg_size_vec4 of 48. If we chose
   different units (e.g. multiplying by wave_granularity and/or
   threadsize_base), then to match the same behavior we'd have to set
   reg_size_vec4 based on some other parameters that aren't 100% known.
   If someone comes along and updates them, they might inadvertantly
   break it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Connor Abbott
cbc68c79a5 freedreno: Add local_size to ir3_shader_variant
We want to use the local_size when available to calculate the threadsize
in ir3, and we need it to work with e.g. computerator where we don't
have a nir shader. Add a local_size field and use that in computerator
instead of of a separate structure that's inaccessable to core ir3.

Also set a dummy local_size in the tests to avoid a divide-by-zero.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9498>
2021-03-22 18:03:16 +00:00
Alejandro Piñeiro
74785346b4 v3dv: Add support for the on-disk shader cache
Quoting Jason's commit message (afa8f5892), that also applies here:

"The Vulkan API provides a mechanism for applications to cache their
own shaders and manage on-disk pipeline caching themselves.
Generally, this is what I would recommend to application developers
and I've resisted implementing driver-side transparent caching in the
Vulkan driver for a long time.  However, not all applications do this
and, for some use-cases, it's just not practical."

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
cf71280d74 v3dv/device: avoid unused-result warning with asprintf
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
2bee6ffec3 v3dv/pipeline: compute sha1 for no-op fragment shaders correctly
We should use the nir shader, as with internal vkShaderModule, instead
of just the name.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
2021-03-22 17:10:47 +00:00
Alejandro Piñeiro
9a4099858b v3dv/pipeline: don't create a variant if compilation failed
Also return the proper Vulkan result for this case, that is somewhat
tricky. Technically Create[Graphics/Compute]Pipeline only allow OOM
errors. So for this case, there is only the alternative of the generic
VK_ERROR_UNKNOWN, even if we known the cause of the error. From spec:

 "VK_ERROR_UNKNOWN will be returned by an implementation when an
  unexpected error occurs that cannot be attributed to valid behavior
  of the application and implementation. Under these conditions, it
  may be returned from any command returning a VkResult"

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9403>
2021-03-22 17:10:47 +00:00