Marek Olšák
14a2117fc8
mesa: replace _mesa_problem with unreachable in fetch_state
...
let's get this out of release builds
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
4035a19320
mesa: don't read from destination memory when computing state parameter values
...
The destination memory can be uncached, e.g. a buffer object.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
bde7fa0cb3
mesa: skip redundant uniform updates for glUniformHandle
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
b32e20e630
mesa: skip redundant uniform updates for glUniformMatrix
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
736f1f70ab
mesa: skip redundant uniform updates for glUniform
...
Viewperf does a lot of redundant uniform updates - 60-80% in some tests.
Those are sometimes the only state changes between draw calls.
This improves performance by 33% in one viewperf subtest.
If you are worried about CPU overhead in the non-redundant case,
glthread is the solution.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
d0c66c167d
mesa: move sampler condition for flushing into mesa_flush_vertices_for_uniforms
...
This is just a code consolidation. It might fix something, not sure.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
0a2117bc9e
mesa: call FLUSH_VERTICES before changing sampler uniforms
...
Fixes: 9545139ce5
"mesa: skip FLUSH_VERTICES() if no samplers were changed"
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
9281dfca3f
mesa: don't print GL errors in release builds if MESA_DEBUG=silent
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
eda37fb269
mesa: properly disallow param list reallocation
...
This can more easily detect shader variants adding too many state
parameters and causing a reallocation.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
158351007e
mesa: track ParameterValues size separately
...
This is needed for multi-slot parameters.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Marek Olšák
25e242155b
mesa: don't duplicate allocation code in _mesa_new_parameter_list_sized
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946 >
2020-12-01 11:52:10 +00:00
Indrajit Kumar Das
5d14562da8
radeonsi/gfx10: fix overflow and primitive queries
...
This aligns the offsets to match the memory layout of the query buffer
defined by gfx10_sh_query_buffer_mem and calls si_launch_grid_internal
to flush caches and wait for completion of shaders prior to retrieving
results.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7181 >
2020-12-01 11:34:16 +00:00
Iago Toral Quiroga
fd4016f978
v3dv: ignore filter in TFU blit path
...
The filter is only relevant to handle blits that invole scaling, but
our TFU path doesn't handle any kind of scaling so we can safely
ignore it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7845 >
2020-12-01 11:24:17 +00:00
Iago Toral Quiroga
eb75a67bd6
v3dv: add a helper to choose a compatible TFU format
...
We are now doing this in 3 different places so it makes sense.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7845 >
2020-12-01 11:24:17 +00:00
Iago Toral Quiroga
329afedd8b
v3dv: handle Z mirroring in the TFU blit path
...
The TFU path only activates for blits that are really copies
(no linear filtering, no scaling, same pixel format, etc.), and
we do it slice by slice, so we can easily handle mirroring of the
Z coordinate for 3D images by reversing the order of the layers
as we copy them.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7845 >
2020-12-01 11:24:17 +00:00
Iago Toral Quiroga
29f62061d9
v3dv: expand the formats that can be handled in the TFU blit path
...
Same as with other TFU paths, we only handle exact copies without
conversion, so we can rewrite the format to use a compatible TFU format
based on its texel size, which allows us to use this path with more
formats.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7845 >
2020-12-01 11:24:17 +00:00
James Park
cc62a0dfe4
aco: Avoid extra bitfield padding
...
MSVC may insert padding for data type switches.
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
44f05d6b74
aco: Stub sections that don't have _WIN32 support
...
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
2c3fd34103
aco: Fix warnings for bools in bitwise logic
...
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
8bc2a419fc
aco: Initialize union within Operand for MSVC
...
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
a2c981f8d0
aco: Use u_memstream instead of POSIX memstream
...
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
8259cfaa65
aco: Replace indexed array initialization
...
Use std::array instead to make MSVC happy.
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
76ad75dbb8
aco: Const correct aco_compiler_statistics
...
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
9779a9a51e
aco: Declare num_reduce_ops for array size
...
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
93094b8c5e
aco: Remove nonstandard parentheses
...
Remove parentheses in cases where a parenthesized type is followed by an
initializer list.
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
d1f742e497
aco: Add missing C++ includes
...
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
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