Commit Graph

136944 Commits

Author SHA1 Message Date
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
Alejandro Piñeiro e354c52801 v3dv/pipeline: try to get the shader variant directly from the cache
Until now we were always doing a two-step cache lookup, as we were
using the NIR shaders to fill up the key to lookup for the compiled
shaders. But since we were already generating the sha1 key with the
original SPIR-V shader (or its internal NIR representation) any info
we were collecting from from NIR is already implicit in the original
shader, so we can avoid using the NIR in most cases.

Because the v3d_key that is used to compile a shader is populated with
data coming directly from the NIR shader or produced during NIR
lowerings, we can't use it directly as part of the pipeline cache
entry. We could split them, but that would be confusing, so we add a
new struct, v3dv_pipeline_key used specifically to search for the
compiled shaders on the pipeline cache. v3d_key would be still used to
compile the shaders.

As we are using the same sha1 key for all compiled shaders in a
pipeline, we can also group all of them in the same cache entry, so we
don't need a lookup for each stage. This also allows to cache pipeline
data shared by all the stages (like the descriptor maps).

While we are here, we also create a single BO to store the assembly
for all the pipeline stages.

Finally, we remove the link to the variant on the pipeline stage
struct, to avoid the confusion of having two links to the same
data. This mostly means that we stop to use the pipeline stage
structures after the pipeline is created, so we can freed them.

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 6afb8a9fec v3dv/pipeline: use broadcom_shader_stage as pipeline/variant stage type
So we could avoid using gl_shader_stage plus a is_coord boolean, that
only applies to VERTEX.

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 0b98f20310 v3dv: define broadcom shader stages
Mostly the same that main mesa gl_shader_stage, but including the
coordinate shader. This would allow to loop over all the available
stages (for example if we need to free them, compute the max spill
size, etc).

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 d7f4038374 v3dv/pipeline: remove v3d_key from shader_variant and pipeline stage
We stopped to re-use them after pippeline creation long ago, so let's
reduce the size of both structs, and avoid serialize/deserialize for
the variant case.

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 b8c73c512a v3dv/pipeline: remove compiled_variant_count field
We are not really compiling several variants, or at least not on the
same pipeline.

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 ebb2297a91 v3dv/pipeline: move topology to pipeline
So now we only store it once per pipeline, instead of once per
pipeline stage.

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 dd72c99d77 v3dv/pipeline: use driver_location_map instead of nir utilities
If we were able to get a shader variant from the pipeline cache, we
will not have the nir shader available.

Note that this is what we were doing on the driver before the nir io
helpers were available.

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 b71fd5587e broadcom/compiler: add driver_location_map at vs prog data
This maps the nir shader data.location to its final
data.driver_location. In general we are using the driver location as
index (like vattr_sizes on the same struct), so having this map is
useful if what we have is the data.location, and we don't have
available the original nir shader.

v2: use memset instead of for loop, and nir_foreach_shader_in_variable
    instead of nir_foreach_variable_with_modes (Iago)

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 2be0c36775 broadcom/compiler: add local_size in v3d_compute_prog_data
As we plan to try to get directly the compiled variant from the cache,
it would be possible to not have available the nir shaders, so we add
this info on prog data.

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 ab252d73a9 v3dv/pipeline: remove pipeline->use_push_constants
In the past we used this boolean for several things, it is really
superfluous right now.

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 f276efb2f8 v3dv/pipeline: remove pregenerate_variant
Right now we were not pre-generating several variants, but we decided
to let this method, just in case we need that idea back. This ended
being a bad idea. Several months have passed without that need, so
having that method just adds confusion. Also, if we need to add a
multiple-variant in the future, perhaps we would need to do it
different, so let's not template in advance.

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 098816fc9a v3dv/pipeline_cache: add more details when dumping debug info
We tweak a little some of the individual messages, and add a new
option to dump the stats when the pipeline destroy.

As we are here we also we also tweak the names of the global options
to make it more clear.

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
Mike Blumenkrantz ad241b15a9 vk: consolidate dynamic descriptor binding sorting
this code was duplicated across several drivers

Reviewed-by: Adam Jackson <ajax@redhat.com>
turnip changes Reviewed-by: Hyunjun Ko <zzoon@igalia.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9480>
2021-03-22 16:51:55 +00:00
Dylan Baker b992b38de6 docs: Add calendar entries for 21.1 release candidates.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9605>
2021-03-22 16:46:38 +00:00
Dylan Baker 4a2d123aaf docs: Extend calendar entries for 21.0 by 1 releases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9605>
2021-03-22 16:46:38 +00:00
Michel Zou 97e2d96e22 docs: missing lvp win32surface ext in features.txt
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9702>
2021-03-22 15:37:28 +00:00
Ilia Mirkin cf58debf63 nvc0: fix reported driver queries for Pascal and later GPUs
We haven't added the sm/metric info post-GM200. So make sure we don't
report available queries there. Additionally, fix the group retrieval to
take into account that either driver stats or SM stats may not be
available.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
2021-03-22 15:20:45 +00:00
Ilia Mirkin 8604cc8101 nvc0: ensure sufficient push space for indirect data
There may be up to 3 pushbuf data's submitted in this function, make
sure that we allocate enough room for these.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
2021-03-22 15:20:45 +00:00
Ilia Mirkin ee3920b215 nv50: add appropriate space check before adding new pushbuffer
nouveau_pushbuf_data does not check that there are available pushes in
the current batch. So add a space check for this. Avoids crashes with
the HUD and glxspheres.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
2021-03-22 15:20:45 +00:00
Ilia Mirkin 3e39d059df nv50,nvc0: remove explicit target argument from view creation
Before texture views were supported, this was needed in some cases.
However with texture views (added eons ago), there is now a target
attribute in the template. Use it and remove the explicit argument.

Should help prevent bugs with inconsistencies between the stored
template target and the one that's used to create the view.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
2021-03-22 15:20:45 +00:00
Ilia Mirkin 38371ff628 nv50: initialize target for blit source surfaces
This target is used to determine whether MS scaling factors are to be
uploaded.

Fixes: 1288ac7632 ("nv50: don't try to upload MSAA settings for BUFFER textures")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9740>
2021-03-22 15:20:45 +00:00
Danylo Piliaiev 208250b376 ir3: update info about applicability of saturation modifier
On a6xx saturation doesn't work on cat4 and on bary.f

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9751>
2021-03-22 15:02:14 +00:00
Gert Wollny 5942a0f1ac r60/sfn: don't lower scomp
The backend has the corresponding ops.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
2021-03-22 15:19:46 +01:00
Gert Wollny ca270207bb r600/sfn: lower find_msb variants to find_msb_rev
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
2021-03-22 15:19:46 +01:00
Gert Wollny befda5ba1b r600/sfn: optimize comp+csel using fused ops
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
2021-03-22 15:19:46 +01:00
Gert Wollny 195952786b r600/sfn: Add algebraic lowering for fsin and fcos
* fsin and fcos require normalization of the input
* bitfield_insert requires an additional shift of the insert value

v2: drop bitfield_insert lowering code, it is already avaibable as
    compiler option (Rhys Perry)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
2021-03-22 15:19:46 +01:00
Gert Wollny 318701b803 nir: Add r600 specific sin and cos variants
r600 expect the input values to be normalited by divinding by 2 *PI, so
add an opcode to be able to lower this in nir.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
2021-03-22 15:19:46 +01:00