Commit Graph

131714 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer 148a24f305 amd/ac: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 4d89b988ba nir/ntt: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer fecbc1e541 gallivm: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 04eb94f93b llvmpipe: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer d1532cd83f radeon: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer c7986febf2 gallium: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer cd432d9981 softpipe: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer c27563d64a gallium/util: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 7d9147438d vbo: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 7b222cd52d gallium/winsys: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer ead225bb6f radeonsi: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 4442f8eda3 compiler/spirv: update fallthrough comments
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer a2aa777b68 src/mesa: update fallthrough comments
clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 9b3e6014a9 xxhash: update fallthrough comments
clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 2d6fa03f74 gallium: update fallthrough comments
clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 805b6b426e nir: update fallthrough comments
clang doesn't support /* fallthrough */ so switch to fallthrough
attribute.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:41 +01:00
Pierre-Eric Pelloux-Prayer 5e7c00aacb util: add a FALLTROUGH macro
Not all compilers support __atttribute__((fallthrough)) so use a macro.

v2: use C++17 / C18 standard attribute (Tony Wasserka)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7747>
2020-12-01 10:04:40 +01:00
Lionel Landwerlin a5b899c7da spirv: add support for KHR_fragment_shading_rate
v2: Use VARYING (Samuel)

v3: Only allow VERTEX & GEOMETRY stages (Samuel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>
2020-12-01 08:20:38 +00:00
Lionel Landwerlin 244514addd compiler/nir: introduce a new helper to get varying name
As we now reuse the enums to remain within 64 values, we need to get
the proper name using the stage.

v2: Use enum type for parameter (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>
2020-12-01 08:20:38 +00:00
Lionel Landwerlin 1c9488e0d1 nir: wire shading rate variables
v2: Fixup comment about bits in nir_intrinsics.py

v3: Use varying for primitive shading rate builtin (samuel)

v4: Reoder switch alphabetically
    Make divergence of frag_shading_rate an option

v5: Remove stage check for frag_shading_rate in divergence (Samuel)

v6: s/frag_shading_rate_per_subgroup/single_frag_shading_rate_per_subgroup/ (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7795>
2020-12-01 08:20:38 +00:00
James Park f86668f487 vulkan/util: Consolidate typed_memcpy
Collapse typed_memcpy definitions into one header.

Use do/while(0) pattern to fix MSVC compilation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7830>
2020-12-01 07:48:08 +00:00
James Park 116b6d135d util: Add os_localtime
MSVC does not have localtime_r, so add abstraction.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7829>
2020-12-01 07:11:44 +00:00
Kenneth Graunke 531843cf2e nir/algebraic: Avoid creating new fp64 ops when using softfp64
In commit 00b28a50b2, Marek extended
a number of optimizations that had been 32-bit specific to work on
other bit-sizes.

Most optimizations preserve the data type across the transformation.
In other words, an optimization which generates e.g. fp64 operations
only does so when the source expression also contains fp64 operations.
These transformations are fine with respect to lowering, because we
will lower away all expressions that would trigger the search portion
of the expression, and so we'd never apply those rules.

However, a few of the rules create new operations that run afoul of
lowering passes.  For example,

    ('bcsel', a, 1.0, 0.0) => ('b2f', a)

where the result is a double would simply be a selection between two
different 64-bit constants.  The replacement expression, on the other
hand, involves a nir_op_b2f64 ALU operation.  If we're run after
nir_lower_doubles, then it may not be legal to generate such an
expression anymore (at least without running lowering again, which we
don't do today).

Regressions due to this are blocking the 20.3 release, so for now, we
take the easy route and simply disallow those few rules when doing full
softfp64 lowering, which fixes the immediate problem.  But it doesn't
solve the long-term problem in an extensible manner.

In the future, we may want to add a `lowered_alu_ops` bitfield to the
NIR shader, and as lowering passes are run, mark them as taboo.  Then,
we could have each algebraic transformation track which operations it
creates in the replacement expression.  With both of those in place,
nir_replace_instr could compare the transformation's list of ALU ops
against `lowered_alu_ops` and implicitly skip rules that generate
forbidden ALU operations.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3504
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7841>
2020-12-01 06:29:31 +00:00
Rob Clark 688dda5e1d mesa: Use os_get_option() for MESA_*_OVERRIDE
This will allow for overriding via setprop mesa.*.override on android.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7763>
2020-11-30 22:21:13 +00:00
Rob Clark eeecc21d93 util: Add property_get() fallback for android
Environment variables aren't the easiest thing to use on android.  So
add a fallback to android's property mechanism for os_get_option().

This is slightly complicated by the fact that the assumption that the
return value of os_get_option() need not be freed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7763>
2020-11-30 22:21:13 +00:00
Jason Ekstrand 73c6899285 intel/fs: DISCARD_JUMP does not have side-effects
This accidentally snuck into 75209d5bd1 due to a rebase fail.

Fixes: 75209d5bd1 "intel/fs: Add and implement intel-specific..."
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3897
Tested-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7839>
2020-11-30 20:33:48 +00:00
Jason Ekstrand b70847a389 nir: Use the right argument order for load_scratch_base_ptr
Fixes: c9bcad2573 "nir: add generated intrinsic builders"
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7836>
2020-11-30 12:03:33 -06:00
Iago Toral Quiroga b14679ab22 v3dv: check return value of drmGetMagic
Fixes coverty issue:

** CID 1470345: Error handling issues (CHECKED_RETURN)
/src/broadcom/vulkan/v3dv_device.c: 407 in v3dv_drm_handle_device()
Calling "drmGetMagic" without checking return value (as is done
elsewhere 5 out of 6 times).

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7828>
2020-11-30 12:42:50 +00:00
Iago Toral Quiroga 124ea8debf v3dv: expand format coverage in TFU path for buffer to image copies
Just like we do for image copies, since we are not doing any pixel
format conversions, we can translate the image format to a compatible
format that is supported by the TFU.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:21:15 +01:00
Iago Toral Quiroga b3f212c52e v3dv: fix base layer for 3D blits in the TFU path
We were always using baseArrayLayer from the image subresource, but
for 3D images we should use the Z offset of the region.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:21:15 +01:00
Iago Toral Quiroga ece8dbe68f v3dv: add a TFU path for image copies
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:21:15 +01:00
Iago Toral Quiroga f9e53c6e51 v3dv: add a format parameter to emit_tfu_job
We will be using the new parameter in an upcomig change. The TFU
unit has a limited list of supported formats, so for cases where
we don't want to do any pixel format conversions and we are just
copying raw image data, we want to be able to rewrite the underlying
image format to use a compatible format. We will be using this
in a follow-up patch that adds a TFU path for image copies. For this
purpose, we also, move the function definition up in the file
so it is available for that upcoming TFU path without having to
put its prototype earlier in the file.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:20:07 +01:00
Iago Toral Quiroga d60a3ccf52 v3dv: support compressed formats with TFU unit
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:19:27 +01:00
Iago Toral Quiroga 14e7361c4a v3dv: remove obsolete disabled code
We are successfully using TFU blits for existing CTS tests covering
1D and 3D images.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7809>
2020-11-30 13:19:27 +01:00
Samuel Pitoiset 04ea3d6501 radv: disable WGP_MODE for NGG on GFX10.3
Ported from RadeonSI, reducing the CU mask probably broke WGP mode.

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/7769>
2020-11-30 09:31:29 +00:00
Samuel Pitoiset bf36cfced1 radv: only mask 1 CU for GS/VS waves on GFX10.3
Ported from Radeonsi and PAL.

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/7769>
2020-11-30 09:31:29 +00:00
Samuel Pitoiset 7729ea3d67 radv: only disable CU2 & CU3 when NGG is enabled
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/7769>
2020-11-30 09:31:29 +00:00
Samuel Pitoiset 750591f4cb radv: enable NGG on GFX10.3 APUs by default
According to Radeonsi, VanGogh benefits.

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/7769>
2020-11-30 09:31:28 +00:00
Michel Dänzer b9ee0cd69a ci: Make test-docs job depend on sanity job
Without this, the test-docs job could end up waiting for manual action
after the sanity job failed, which prevented the pipeline as a whole
from having failed status.

(This means the test-docs job will no longer exist in one corner case
where it did before, when pushing directly to a non-master branch of
the main repository. That should be fine, since the docs are only
deployed from master.)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
Michel Dänzer 94f4497a79 ci: Squash "check mr/commits" jobs into a single sanity job
The "check commits" job can work again with current ci-templates, but
there's no need to keep it as a separate job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
Michel Dänzer 988dfc944d ci: Move sanity stage to the beginning of the pipeline
This is possible now that it uses the external ci-fairy docker image.

This allows dropping the "check mr" job from needs: of other jobs, the
container stage jobs will only become available once the sanity stage
has passed.

This also allows simplifying the "check mr" job rules and script, since
the job only needs to exist in pre-merge pipelines for MRs anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
Michel Dänzer 8749fc4261 ci: Use ci-fairy docker image instead of local git_archive one
The ci-fairy image contains pip and ci-fairy.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
Michel Dänzer cfe45f3bd5 ci: Update to current ci-templates
The 64-bit ARM architecture suffix was changed from arm64v8 to aarch64.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
Michel Dänzer cc80415a41 ci: Drop ci-templates-sha anchor
As of GitLab 13.6, multiple files can be included for a single ref.

Suggested-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7676>
2020-11-30 08:53:44 +00:00
James Park 4e074a6d52 vulkan: Portable wsi_common_get_current_time()
Use os_time_get_nano(), which has a Windows implementation.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>
2020-11-30 07:54:07 +00:00
James Park 142d7b0f36 vulkan: Replace pthread mutex with mtx_t
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>
2020-11-30 07:54:07 +00:00
James Park 440952f152 vulkan: Remove GCC pragmas by fixing warnings
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7783>
2020-11-30 07:54:07 +00:00
Samuel Pitoiset d1768b23b5 radv: save and dump vertex descriptors during GPU hang detection
It might be useful to know if the VA is valid and if other info
like the stride seems correct.

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/7753>
2020-11-30 08:31:02 +01:00
Samuel Pitoiset 9f3e7a6502 radv: fix using bitfields for debug/perftest options
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/7753>
2020-11-30 08:15:09 +01:00
Leo Liu 3a90641b0d mesa/st_vdpau: set surface winsys handle modifier
The VDPAU interop was broken without setting it explicitly

Fixes: c786150d ("radeonsi: Add modifier support")
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7803>
2020-11-29 18:26:09 -05:00