James Park
e352ebf88e
aco: Fix warnings about unsafe integer/bool mix
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785 >
2020-12-01 11:08:21 +00:00
James Park
fcd53bebe6
aco: Define NOMINMAX in Meson build file
...
Fix conflicts between std::min/max and Win32 min/max.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785 >
2020-12-01 11:08:21 +00:00
Rhys Perry
2d12991e01
aco: use FALLTHROUGH macro
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7844 >
2020-12-01 10:28:36 +00:00
Rhys Perry
ce56902f85
radv: use FALLTHROUGH macro
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7844 >
2020-12-01 10:28:36 +00:00
Samuel Pitoiset
6fb4babfe9
radv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+
...
To avoid any alignment issues that triggers memory violations and
eventually a GPU. This can happen if the stride (static or dynamic)
is unaligned and also if the VBO offset is aligned to scalar
(eg. stride is 8 and VBO offset is 2 for R16G16B16A16_SNORM).
The AMD Windows driver also always splits typed vertex fetches.
fossils-db (Sienna Cichlid):
Totals from 56508 (40.54% of 139391) affected shaders:
SGPRs: 2643545 -> 2664516 (+0.79%); split: -0.19%, +0.98%
VGPRs: 2007472 -> 1995408 (-0.60%); split: -0.74%, +0.13%
CodeSize: 70596372 -> 73913312 (+4.70%); split: -0.00%, +4.70%
MaxWaves: 772653 -> 774916 (+0.29%); split: +0.37%, -0.08%
Instrs: 14074162 -> 14567072 (+3.50%); split: -0.00%, +3.51%
Cycles: 69281276 -> 71253252 (+2.85%); split: -0.00%, +2.85%
VMEM: 22047039 -> 25554196 (+15.91%); split: +17.20%, -1.29%
SMEM: 4120370 -> 4360820 (+5.84%); split: +7.41%, -1.58%
VClause: 416913 -> 438361 (+5.14%); split: -1.86%, +7.01%
SClause: 536739 -> 542637 (+1.10%); split: -0.33%, +1.43%
Copies: 977194 -> 970015 (-0.73%); split: -2.43%, +1.69%
Branches: 241205 -> 241193 (-0.00%); split: -0.06%, +0.06%
PreVGPRs: 1505645 -> 1505379 (-0.02%)
This fixes GPU hangs with bin/draw-vertices from Piglit on GFX10+
with Zink.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7751 >
2020-12-01 10:14:27 +00:00
Dave Airlie
bf7c4108fb
zink: allow the backend to optimise shaders.
...
I can't think of any reason for ever requesting this here,
maybe in some future with parallel threads optimised compiles
and where vulkan drivers respect this bit.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7840 >
2020-12-01 09:35:56 +00:00
Pierre-Eric Pelloux-Prayer
e2e383e36a
glx: 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
ff89a0afc6
tgsi: 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
842088667f
egl: 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
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