Gert Wollny [Fri, 26 Feb 2021 20:23:39 +0000 (21:23 +0100)]
r600/sfn: remove code for nir_op_fsign since it is lowered
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Gert Wollny [Fri, 26 Feb 2021 20:11:44 +0000 (21:11 +0100)]
r600: unify nir shader options evaluation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Gert Wollny [Fri, 26 Feb 2021 17:44:13 +0000 (18:44 +0100)]
r600/sfn: Allow any channel for the helper invocation evaluation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Gert Wollny [Fri, 26 Feb 2021 17:42:52 +0000 (18:42 +0100)]
r600/sfn: lower isign and iabs in nir
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Gert Wollny [Fri, 26 Feb 2021 15:33:41 +0000 (16:33 +0100)]
r600/sfn: set info about using helper_invocation to skip sb
sb can't handle helper invocations, so skip sb when it is used.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Gert Wollny [Fri, 26 Feb 2021 15:14:52 +0000 (16:14 +0100)]
r600/sfn: Lower FS inputs to temps late and, and lower interpolate at
This fixes FS shaders where a var is loaded with two different
interpolators.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>
Jose Fonseca [Wed, 24 Feb 2021 20:02:34 +0000 (20:02 +0000)]
util: Always use timespec_get on Windows.
include/c11/threads_win32.h provides a fallback implementation of
timespec_get when necessary.
Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/4109
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9280>
Rhys Perry [Fri, 26 Feb 2021 16:05:40 +0000 (16:05 +0000)]
aco: add missing usable_read2 check
A Hitman 2 shader does: read64(local_invocation_index() * 4 - 4). This was
likely emitting a ds_read2_b32 on GFX6. For local_invocation_index()=0,
because the first dword was out-of-bounds, the second was likely also
considered out-of-bounds (even though it's not, at offset 0).
Likely fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/3882
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
57e6886f981 ("aco: refactor load_lds to use new helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9332>
Rhys Perry [Mon, 1 Mar 2021 10:43:01 +0000 (10:43 +0000)]
Revert "radv,aco: allow unaligned LDS access on GFX9+"
This reverts commit
1a0b0e8460c1881f94975b3dfbe9c312d9c3fcf7.
The bounds checking behaviour of ds_read_b64, ds_read_b96 and ds_read_b128
make this feature very difficult to use safely.
This fixes a blocking artifact in Hitman 2. Previously, it contained:
ds_read_b64(local_invocation_index() * 4 - 4)
For local_invocation_index()=0, the second dword would be considered
out-of-bounds, even though it's at offset 0.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9332>
Iago Toral Quiroga [Tue, 2 Mar 2021 08:35:30 +0000 (09:35 +0100)]
broadcom/compiler: ldvary pipelining tracking and documentation clean-ups
Now that we can pipeline all varyings we should not be referring
specifically to smooth varyings anywhere.
Also, rename the instruction field 'ldvary_pipelining' to
'is_ldvary_sequence', which is more appropriate, since we always
set this for any instruction involved with varying setups,
independently of whether they end up being pipelined or not.
This also does some other minor edits which intend to slightly
simplify the code and make it a bit more compact.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9363>
Kenneth Graunke [Mon, 1 Mar 2021 21:56:35 +0000 (13:56 -0800)]
glsl/float64: Bump #version to 400
An earlier commit tried to make this shader compatible with GLSL 3.30,
but it requires, GL_ARB_gpu_shader_int64, which requires GLSL 4.00 and
GL 4.0 according to the extension spec. So we were failing to enable
the required extension, breaking compilation of this shader.
The original intention of that patch was to get this working on zink,
which at the time only supported GL 3.3. But now it supports later
OpenGL versions, so we don't need to do this any longer. Rather than
revert the patch and raise the version all the way back to 430, just
bump it to the require 400 at Ian Romanick's suggestion.
Fixes:
4d47b22bf00 ("glsl/float64: make this compatible with glsl 330")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3991
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9351>
Karol Herbst [Wed, 24 Feb 2021 11:44:41 +0000 (12:44 +0100)]
clover: Fix build with llvm-12.
Fix build error after LLVM commit
c495dfe0268b ("[clang][cli] NFC:
Decrease the scope of ParseLangArgs parameters").
../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’:
../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’
252 | c->getPreprocessorOpts(),
| ~~~~~~~~~~~~~~~~~~~~~~^~
| |
| clang::PreprocessorOptions
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8543>
Iago Toral Quiroga [Mon, 1 Mar 2021 08:18:39 +0000 (09:18 +0100)]
broadcom/compiler: allow pipelining of flat and noperspective varyings
These end up having a NOP between the ldvary and the next instruction
in the sequence (a MOV for flat and an FADD for noperspetive):
nop ; nop ; ldvary.r0
nop ; nop
fadd rf6, r0, r5 ; nop ; ldvary.r1
nop ; nop
fadd rf5, r1, r5 ; nop ; ldvary.r2
nop ; nop
fadd rf4, r2, r5 ; nop ; ldvary.r3
To pipeline these, we can reuse the same infrastructure we have in
place for smooth varyings but we need to avoid breaking the sequence
due to the NOP instruction. We do that by testing if dropping the
sequence when we failed to pick up the next instruction also fails
to choose an instruction.
This is not perfect, because we may be able to choose an instruction
outside the sequence such as an ldunif, and use that to break a
sequence that we could otherwise continue after scheduling the NOP
instruction, but it is still better than nothing.
total instructions in shared programs:
13820690 ->
13819774 (<.01%)
instructions in affected programs: 64026 -> 63110 (-1.43%)
helped: 479
HURT: 62
Instructions are helped.
total max-temps in shared programs: 2326435 -> 2326423 (<.01%)
max-temps in affected programs: 102 -> 90 (-11.76%)
helped: 7
HURT: 0
Max-temps are helped.
total sfu-stalls in shared programs: 30683 -> 30710 (0.09%)
sfu-stalls in affected programs: 13 -> 40 (207.69%)
helped: 2
HURT: 24
Sfu-stalls are HURT.
total inst-and-stalls in shared programs:
13851373 ->
13850484 (<.01%)
inst-and-stalls in affected programs: 62818 -> 61929 (-1.42%)
helped: 466
HURT: 65
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
Iago Toral Quiroga [Fri, 26 Feb 2021 11:31:52 +0000 (12:31 +0100)]
broadcom/compiler: pipeline smooth ldvary sequences
Typically, we would schedule smooth varyings like this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0
fadd rf13, r0, r5 ; nop ; ldvary.r1
nop ; fmul r2, r1, rf0
fadd rf12, r2, r5 ; nop ; ldvary.r3
nop ; fmul r4, r3, rf0
fadd rf11, r4, r5 ; nop ; ldvary.r0
where we pair up an ldvary with the fadd of the previous sequence
instead of the previous fmul. This is because ldvary has an implicit
write to r5 which is read by the fadd of the previous sequence, so
our dependency tracking doesn't allow us to move the ldvary before the
fadd, however, the r5 write of the ldvary instruction happens in the
instruction after it is emitted so we can actually move it to the fmul
and the r5 write would still happen in the same instruction as the fadd,
which is fine.
This patch allows us to pipeline these sequences optimally. For that,
after merging an ldvary into a previous instruction in the middle of
a pipelineable ldvary sequence, we check if we can manually move it
to the last scheduled instruction instead (the one before the
instruction we are currently scheduling).
If we are successful at moving the ldvary to the previous instruction,
then we flag the ldvary as scheduled immediately, which may promote
its children (the follow-up fmul instruction for that ldvary) to DAG
heads and continue the merge loop so that fmul can be picked and
merged into the final fadd of the previous sequence (where we had
originally merged the ldvary). This leads to a result that looks like
this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0 ; ldvary.r1
fadd rf13, r0, r5 ; fmul r2, r1, rf0 ; ldvary.r3
fadd rf12, r2, r5 ; fmul r4, r3, rf0 ; ldvary.r0
Shader-db results:
total instructions in shared programs:
14071591 ->
13820690 (-1.78%)
instructions in affected programs: 7809692 -> 7558791 (-3.21%)
helped: 41209
HURT: 4528
Instructions are helped.
total max-temps in shared programs: 2335784 -> 2326435 (-0.40%)
max-temps in affected programs: 84302 -> 74953 (-11.09%)
helped: 4561
HURT: 293
Max-temps are helped.
total sfu-stalls in shared programs: 31537 -> 30683 (-2.71%)
sfu-stalls in affected programs: 3551 -> 2697 (-24.05%)
helped: 1713
HURT: 750
Sfu-stalls are helped.
total inst-and-stalls in shared programs:
14103128 ->
13851373 (-1.79%)
inst-and-stalls in affected programs: 7820726 -> 7568971 (-3.22%)
helped: 41411
HURT: 4535
Inst-and-stalls are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
Iago Toral Quiroga [Fri, 26 Feb 2021 11:23:12 +0000 (12:23 +0100)]
broadcom/compiler: track pipelineable ldvary sequences
If we have two (or more) smooth varyings like this:
nop t3; ldvary.rf0
fmul t5, t3, t0
fadd t6, t5, r5
nop t7; ldvary.rf0
fmul t9, t7, t0
fadd t10, t9, r5
nop t11; ldvary.rf0
fmul t13, t11, t0
fadd t14, t13, r5
We may be able to pipeline them like this:
nop ; nop ; ldvary.r4
nop ; fmul r0, r4, rf0 ; ldvary.r1
fadd rf13, r0, r5 ; fmul r2, r1, rf0 ; ldvary.r3
fadd rf12, r2, r5 ; fmul r4, r3, rf0 ; ldvary.r0
But in order to do this, we will need to manually tweak the
QPU scheduling.
This patch tracks information about ldvary sequences that are
good candidates for pipelining, and a follow-up patch will
use this information to pipeline them when we emit the QPU
code.
v2 (apinheiro):
- Rename the v3d_compile fields to avoid confusion with the qinst fields.
- Assert that a sequence's start instruction is not the same as the end.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
Iago Toral Quiroga [Fri, 26 Feb 2021 11:22:47 +0000 (12:22 +0100)]
broadcom/compiler: fix indentation style
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
Iago Toral Quiroga [Wed, 24 Feb 2021 10:22:16 +0000 (11:22 +0100)]
broadcom/compiler: fix DAG pre-remove for merged instructions
When selecting an instruction to merge, we want to pre-remove that
instruction from the DAG, not the one we are merging it in, which
we had already pre-removed right before.
The reason this was not causing problems before is that the
consequence of this bug is we will choose the same instruction
again in the merge loop and trying to merge that instruction twice
will fail and we would break out of the merge loop and move on.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9304>
Tapani Pälli [Sun, 14 Feb 2021 15:49:35 +0000 (17:49 +0200)]
anv: toggle on sample shading if it is set in the shader
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4300
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9040>
Jordan Justen [Sat, 27 Feb 2021 23:38:53 +0000 (15:38 -0800)]
intel: Use devinfo genx10 field
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329>
Jordan Justen [Sat, 27 Feb 2021 23:09:56 +0000 (15:09 -0800)]
intel/dev: Add devinfo genx10 field
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329>
Jordan Justen [Sat, 27 Feb 2021 22:03:47 +0000 (14:03 -0800)]
intel: Use GEN_VERSIONx10 in more places
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9329>
Eleni Maria Stea [Sun, 14 Feb 2021 18:28:02 +0000 (20:28 +0200)]
iris: fix in fences backend for ext_external_objects edge case
EXT_external_objects require we call glSignalSemaphoreEXT followed by a
glFlush. If the rendering workload is small when Signal and Flush
take place the relevant batch buffers with the actual rendering might
have been submitted already. In that case the following condition is met:
(iris_batch_bytes_used(batch) == 0). This causes:
glFlush() --> iris_fence_flush() -> iris_batch_flush() ->
_iris_batch_flush() to no-op, and so the fence doesn't get submitted to the
kernel. Then when anv tries to submit an execuf2 that must wait on the
shared VkSempahore / drm_syncobj fence, there isn't one and the kernel
rejects the batchbuffer causing an -EINVAL return of the execbuf2 ioctl
and a VK_DEVICE_LOST error. Empty batch buffers do have typically one
fence attached, but the ones carrying the extra fence from a
glSignalSempahore() call do have at least 2.
See also: the discussion in MR!4337.
v2: Changed the batch struct to have a contains_fence_signal variable
that is set to true when i915_EXEC_FENCE_SIGNAL fence is added to the
batch and off when batch is reset (Tapani Pälli)
Authored-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8861>
Timothy Arceri [Mon, 1 Mar 2021 04:26:36 +0000 (15:26 +1100)]
util/disk_cache: move cache tests to the util directory
The cache has been detangled from glsl and used outside it (with Vulkan drivers)
for years now.
This also cleans up the dependancies in the build file. The test doesn't
depend on the glsl lib but rather the util lib.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9327>
Dave Airlie [Mon, 1 Mar 2021 05:52:07 +0000 (15:52 +1000)]
lavapipe: VK_EXT_extended_dynamic_state support
zink can use this in some paths, and it's not a crazy thing to support
for lavapipe.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9328>
Marek Olšák [Fri, 26 Feb 2021 23:01:19 +0000 (18:01 -0500)]
radeonsi: don't index si_context::shaders with enum gl_shader_stage
Fixes:
a8373b3d387 "radeonsi: store si_context::xxx_shader members in union"
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9313>
Dave Airlie [Tue, 16 Feb 2021 04:17:20 +0000 (14:17 +1000)]
lavapipe: Define supported extensions in C
One less python generator, like anv/radv
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075>
Dave Airlie [Mon, 1 Mar 2021 03:08:46 +0000 (13:08 +1000)]
lavapipe: expose a 1.0 vulkan API for now.
lavapipe doesn't have all 1.1 features yet, just return
the baseline 1.0 API always.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075>
Dave Airlie [Mon, 1 Mar 2021 03:07:10 +0000 (13:07 +1000)]
zink/instance: work with vulkan 1.0 and later loader.
If zink is meant to work against Vulkan 1.0 API then it
should expose the 1.0 API as create time as well as always
ask for all the vulkan 1.0 extensions.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9075>
Mike Blumenkrantz [Mon, 1 Mar 2021 21:57:35 +0000 (16:57 -0500)]
mesa/st: even better no-oping for clears
<imirkin> zmike: re
6a8c51dc5a4 -- couldn't minx be > maxx after the clamping? in nouveau i did >= for the bail condition
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9350>
Mike Blumenkrantz [Mon, 1 Mar 2021 22:11:15 +0000 (17:11 -0500)]
zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9276>
Mike Blumenkrantz [Fri, 9 Oct 2020 21:32:59 +0000 (17:32 -0400)]
zink: handle GLSL_SAMPLER_DIM_EXTERNAL in ntv
this fixes most of the tests that use it
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9276>
Kenneth Graunke [Mon, 1 Mar 2021 19:55:42 +0000 (11:55 -0800)]
tnl: Call _mesa_matrix_analyse to make sure the inverse MVP is updated
A recent commit stopped updating the inverse MVP matrix, because usually
only GLSL built-ins need it. However, TNL also needs it. So make sure
it's correct when needed.
Fixes:
10371c520c1 ("mesa: don't compute the ModelView * Projection matrix if not used")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9346>
Mauro Rossi [Thu, 25 Feb 2021 20:54:00 +0000 (21:54 +0100)]
android: driconf: Generate a static table when no xmlconfig
Fixes the following building error:
FAILED: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_util_intermediates/xmlconfig.o
...
external/mesa/src/util/xmlconfig.c:1030:12: fatal error: 'driconf_static.h' file not found
^~~~~~~~~~~~~~~~~~
1 error generated.
Fixes: a6b0ceb ("driconf: Generate a static table when no xmlconfig")
Acked-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9294>
Mauro Rossi [Thu, 25 Feb 2021 20:55:31 +0000 (21:55 +0100)]
driconf: avoid Non-ASCII character error in driconf_static.py
MR to move to python3 in Android build gen rules is still pending
The change is to avoid following building error:
FAILED: out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_util_intermediates/driconf_static.h
/bin/bash -c "/usr/bin/python external/mesa/src/util/driconf_static.py external/mesa/src/util/00-mesa-defaults.conf > out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_util_intermediates/driconf_static.h"
File "external/mesa/src/util/driconf_static.py", line 2
SyntaxError: Non-ASCII character '\xc2' in file external/mesa/src/util/driconf_static.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Fixes: a6b0ceb ("driconf: Generate a static table when no xmlconfig")
Acked-by: Rob Clark <robclark@freedesktop.org>
Tested-by: Marijn Suijten <marijn.suijten@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9294>
Jesse Natalie [Mon, 1 Mar 2021 17:37:57 +0000 (09:37 -0800)]
d3d12: Handle null constant buffers
RuneScape ends up hitting this path, and it's easy enough to get
some well-defined behavior instead of a crash.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-By: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9342>
Mike Blumenkrantz [Mon, 1 Mar 2021 19:53:50 +0000 (14:53 -0500)]
mesa/st: no-op scissored clear calls with size zero
Wx0 and 0xH should result in no-ops in the driver, so they can just
become no-ops before they reach the driver to save some validation later
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9344>
Mike Blumenkrantz [Mon, 1 Mar 2021 19:52:25 +0000 (14:52 -0500)]
mesa/st: clamp scissored clear regions to fb size
these should never be larger than the fb and drivers shouldn't have to
care about it
Fixes:
1c8bcad81a7 ("gallium: add pipe cap for scissored clears and pass scissor state to clear() hook")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9344>
Rob Clark [Sun, 28 Feb 2021 19:06:13 +0000 (11:06 -0800)]
freedreno/a6xx: Fix uncompressed resource vs stale CSO
A sequence like:
1) create sampler view CSO with UBWC resource
2) later create another sampler view or image view with the same
resource, but a format that triggers demoting the resource to
uncompressed
3) bind CSO created in step #1
would not work correctly, because the CSO created in step #1 is still
setup for UBWC, despite the fact that the resource had been demoted to
uncompressed.
Fortunately this is easy enough to detect, as the resource's seqno would
have been updated.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9321>
Rob Clark [Sun, 28 Feb 2021 19:04:42 +0000 (11:04 -0800)]
freedreno/a6xx: Always pass ctx to fd6_emit_textures()
Prep for next patch.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9321>
Mike Blumenkrantz [Mon, 28 Sep 2020 14:51:57 +0000 (10:51 -0400)]
zink: force batch flush if batches are using more than 1/10 total system memory
this is only tracking memory used by resources referenced in the batch, but it
can be adjusted a bit if we see that we're flushing too often
fixes spec@!opengl 1.1@streaming-texture-leak hogging all system memory and ooming
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274>
Mike Blumenkrantz [Mon, 28 Sep 2020 14:51:06 +0000 (10:51 -0400)]
zink: track resource mem usage per batch
we want to be able to track this so we can check whether a given batch is
going wild with memory usage for resources that might be pending free once
the batch finishes
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274>
Mike Blumenkrantz [Mon, 28 Sep 2020 14:50:23 +0000 (10:50 -0400)]
zink: store total memory size on zink_screen
need this for oom handling
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9274>
Juan A. Suarez Romero [Mon, 1 Mar 2021 12:44:52 +0000 (13:44 +0100)]
ci/broadcom: retry always when serial log timeout
So far we were retrying the testing (through device rebooting) if we did
not detect the boot sequence.
But found a couple of times that the serial log can also be "lost"
during the testing process. In all those times a manual retry of the job
was enough to complete the test.
Thus, let's apply the retry once automatically in this case.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9335>
Juan A. Suarez Romero [Mon, 1 Mar 2021 12:20:03 +0000 (13:20 +0100)]
ci/baremetal: highlight message errors
Highlight in red errors from the baremetal run, so user is more aware of
what happened.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9335>
Samuel Pitoiset [Wed, 24 Feb 2021 17:59:38 +0000 (18:59 +0100)]
radv: remove useless decompression of the DS resolve attachment
The DS resolve attachment is the destination attachment, it doesn't
need to be decompressed before resolving the depth/stencil attachment.
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/9256>
Rhys Perry [Fri, 29 Jan 2021 17:42:36 +0000 (17:42 +0000)]
nir/copy_prop: use nir_{instr,if}_rewrite_{src,condition}_ssa
Compile-time (nir_copy_prop):
Difference at 95.0% confidence
-2470.88 +/- 19.8762
-35.7461% +/- 0.247259%
(Student's t, pooled s = 23.4747)
Compile-time (overall):
Difference at 95.0% confidence
-2175.72 +/- 178.786
-1.73627% +/- 0.140826%
(Student's t, pooled s = 211.155)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784>
Rhys Perry [Fri, 29 Jan 2021 17:29:32 +0000 (17:29 +0000)]
nir/copy_prop: visit copies instead of sources
There are less copy instructions than sources, so instead of visiting each
source and rewriting it if it's uses a copy instruction, visit each copy
instruction and rewrite it's users.
Besides improving compile time, this also has a side effect of fixing a
rare situation where copy-propagation does not happen:
loop {
a = phi ..., b
c = vec ...
b = mov c.y
}
It might have been the case that a phi source could not be rewritten until
the copy was visited later.
Compile-time (nir_copy_prop):
Difference at 95.0% confidence
-2613.13 +/- 15.2094
-27.4333% +/- 0.150247%
(Student's t, pooled s = 17.963)
Comple-time (overall):
Difference at 95.0% confidence
-2627.89 +/- 201.557
-2.05404% +/- 0.156221%
(Student's t, pooled s = 238.048)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784>
Rhys Perry [Fri, 29 Jan 2021 14:32:50 +0000 (14:32 +0000)]
nir/copy_prop: remove unused copies
These were hurting performance of other passes.
Compile-time (overall):
Difference at 95.0% confidence
-5496.3 +/- 219.752
-4.11912% +/- 0.160285%
(Student's t, pooled s = 259.538)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784>
Rhys Perry [Tue, 2 Feb 2021 16:00:53 +0000 (16:00 +0000)]
nir: add nir_ssa_def_is_unused()
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8784>
Italo Nicola [Fri, 26 Feb 2021 10:52:55 +0000 (10:52 +0000)]
pan/mdg: prevent csel_v from being scheduled alongside writeout
Midgard writeout arguments need to be written to in the same bundle the
writeout happens. Both csel, csel_v and their float variants also
require their conditional to be performed on the same bundle.
This patch prevents scheduling csel the same bundle as a writeout,
fixing the scheduling issue.
But... there's still room for optimizations since in some cases it might
be possible to fit all these instructions in the same bundle.
No shader-db changes.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9340>
Alyssa Rosenzweig [Mon, 1 Mar 2021 16:01:22 +0000 (16:01 +0000)]
panfrost/lcra: Fix constraint counting
We need to iterate the whole row, we can't be clever and only look at
one side, the symmetry doesn't work like that. See the original paper.
total instructions in shared programs: 69392 -> 69322 (-0.10%)
instructions in affected programs: 9002 -> 8932 (-0.78%)
helped: 82
HURT: 28
Instructions are helped.
total bundles in shared programs: 32225 -> 32155 (-0.22%)
bundles in affected programs: 4286 -> 4216 (-1.63%)
helped: 82
HURT: 28
Bundles are helped.
total quadwords in shared programs: 56102 -> 56102 (0.00%)
quadwords in affected programs: 0 -> 0
helped: 0
HURT: 0
total registers in shared programs: 4552 -> 4572 (0.44%)
registers in affected programs: 298 -> 318 (6.71%)
helped: 18
HURT: 38
Registers are HURT.
total threads in shared programs: 3772 -> 3775 (0.08%)
threads in affected programs: 84 -> 87 (3.57%)
helped: 15
HURT: 14
Inconclusive result (value mean confidence interval includes 0).
total spills in shared programs: 0 -> 0
spills in affected programs: 0 -> 0
helped: 0
HURT: 0
total fills in shared programs: 0 -> 0
fills in affected programs: 0 -> 0
helped: 0
HURT: 0
Fixes:
66ad64d73d2 ("pan/midgard: Implement linearly-constrained register allocation")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9338>
Mike Blumenkrantz [Thu, 25 Feb 2021 21:30:34 +0000 (16:30 -0500)]
zink: track all framebuffers per batch
now that 1 batch != 1 renderpass, this needs to be a set
Fixes:
1cb3015a31c ("zink: just end the current renderpass in zink_batch_no_rp()")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9298>
Mike Blumenkrantz [Mon, 1 Mar 2021 15:40:05 +0000 (10:40 -0500)]
zink: handle null src for fb refs
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9298>
Mike Blumenkrantz [Wed, 19 Aug 2020 14:10:30 +0000 (10:10 -0400)]
zink: add more usage bits for buffer resource creation
gallium doesn't give us enough info here, so yolo
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9197>
Mike Blumenkrantz [Thu, 25 Feb 2021 15:32:41 +0000 (10:32 -0500)]
zink: don't start renderpasses during descriptor update
this is unnecessary
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9292>
Bas Nieuwenhuizen [Sun, 28 Feb 2021 01:59:25 +0000 (02:59 +0100)]
radv: Add nodisplaydcc option.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9318>
Bas Nieuwenhuizen [Sat, 27 Feb 2021 19:16:21 +0000 (20:16 +0100)]
radv: Add sam option.
So that people without large BAR can try this out.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9318>
Iago Toral Quiroga [Mon, 1 Mar 2021 09:42:42 +0000 (10:42 +0100)]
v3dv: fix branching to large secondaries with more than one BCL buffer.
Fixes:
dEQP-VK.api.command_buffers.record_many_draws_secondary_*
Tested-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9333>
Bas Nieuwenhuizen [Sun, 28 Feb 2021 02:09:48 +0000 (03:09 +0100)]
radv: Enable linear sampling for depth textures.
Turns out there are CTS tests.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4258
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9319>
Samuel Pitoiset [Fri, 26 Feb 2021 14:19:25 +0000 (15:19 +0100)]
radeonsi,radv: do not overallocate the SQTT buffer size
The number of shader engines isn't always 4.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9307>
Samuel Pitoiset [Fri, 26 Feb 2021 14:23:33 +0000 (15:23 +0100)]
Revert "radv: do not overallocate the SQTT buffer"
This fixes computing the thread trace data offset.
This reverts commit
c7e6f4ff3da39f36fdda8f0ec6eea4925cd3afdc.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9307>
Samuel Pitoiset [Fri, 26 Feb 2021 15:36:39 +0000 (16:36 +0100)]
radv: exclude perf counters for SQTT also on GFX10.3
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/9300>
Samuel Pitoiset [Fri, 26 Feb 2021 07:53:57 +0000 (08:53 +0100)]
radv: fix exporting SQTT pipelines with LLVM
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/9300>
Samuel Pitoiset [Fri, 26 Feb 2021 07:43:48 +0000 (08:43 +0100)]
radv: always select the first active CU when profiling with SQTT
This probably fixes instruction tracing on many chips.
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/9300>
Samuel Pitoiset [Fri, 26 Feb 2021 07:27:16 +0000 (08:27 +0100)]
radv: remove duplicate REG_INCLUDE_CONTEXT setting for SQTT
It was set twice.
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/9300>
Andreas Bergmeier [Sat, 27 Feb 2021 22:28:19 +0000 (22:28 +0000)]
v3dv: Output a message if file open fails in physical_device_init
In the caller, this error simply gets mapped to VK_ERROR_INIT[...].
Especially for users it is very valuable to know what the driver
tried and what kind of failure occured. Thus just straight out log
to stderr.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9317>
Tapani Pälli [Mon, 1 Mar 2021 06:39:16 +0000 (08:39 +0200)]
gitlab-ci: bump piglit commit for windows
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8520>
Tapani Pälli [Tue, 19 Jan 2021 05:43:41 +0000 (07:43 +0200)]
mesa: add check that non base level attachment is mipmap complete
Patch adds a check for mipmap completeness of framebuffer object texture
attachments. Since a glTexImage call might have updated miplevels
meanwhile, we test the completeness before setting framebuffer object
incomplete.
Fixes some upcoming framebuffer completeness CTS tests that explicitly
test case where we have mipmap incomplete non base level texture which
should make also framebuffer object incomplete. After update to the
texture it should make framebuffer object complete again.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8520>
Jordan Justen [Sun, 28 Feb 2021 21:23:07 +0000 (13:23 -0800)]
i965: Call util_cpu_detect() early in screen creation
This helps to avoid this assertion in debug builds:
src/util/u_cpu_detect.h:116: util_get_cpu_caps: Assertion `util_cpu_caps.nr_cpus >= 1' failed.
Fixes:
a9618e7c421 ("util: Add accessor for util_cpu_caps")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9325>
Greg V [Sat, 14 Nov 2020 14:53:28 +0000 (17:53 +0300)]
meson: Add missing lavapipe dep
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7620>
Bas Nieuwenhuizen [Tue, 23 Feb 2021 23:00:58 +0000 (00:00 +0100)]
frontends/va: Use correct size for secondary planes.
And initialize the whandle format while at it.
Fixes:
f7a4051b836 ("radeonsi: Check pitch and offset for validity.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4126
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9236>
Simon Ser [Fri, 26 Feb 2021 15:49:17 +0000 (16:49 +0100)]
radeonsi/uvd: make format modifiers-aware
When format modifiers are supported, use
resource_create_with_modifiers instead of resource_create. This
allows radeonsi to set the modifier field, and allows VA-API
clients to have a proper modifier instead of
DRM_FORMAT_MOD_INVALID.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9308>
Pierre Moreau [Thu, 7 May 2020 11:45:11 +0000 (13:45 +0200)]
docs/features: Add OpenCL status
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/142
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4979>
Andres Gomez [Wed, 17 Feb 2021 16:23:30 +0000 (18:23 +0200)]
ci: add libdrm to the x86_test-vk container
Fixes:
5d0ba8b1834 (ci: Split building of libdrm to its own script)
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9102>
Andrii Simiklit [Thu, 25 Feb 2021 12:28:24 +0000 (14:28 +0200)]
mesa: ensure parameter list capacity before associating uniform storage
We have to reserve at lease 16 program parameters in storage to
avoid its reallocation.
v2: move allocation to `st_deserialise_ir_program` and add helper for that
( Eric Anholt <eric@anholt.net> )
v3 amend comments a bit
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4352
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9282>
Lionel Landwerlin [Wed, 9 Dec 2020 11:23:16 +0000 (13:23 +0200)]
anv: group as many command buffers into a single execbuf
When semaphores are not involved, try to batch things up as much as
possible across VkSubmitInfo and also batch command buffers within a
VkSubmitInfo.
v2: Reuse anv_cmd_buffer_is_chainable()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
Lionel Landwerlin [Wed, 9 Dec 2020 11:22:45 +0000 (13:22 +0200)]
anv: allow multiple command buffers in anv_queue_submit
v2: Fixup crash spotted by Mark about missing alloc vfuncs
v3: Fixup double iteration over device->memory_objects (that ought to
be expensive...) (Ken)
v4: Add more asserts for non-softpin cases (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
Lionel Landwerlin [Wed, 9 Dec 2020 11:19:30 +0000 (13:19 +0200)]
anv: end command buffer with a potential jump
We would like to chain multiple primary command buffer to be submitted
together to i915. For prepare this, add end the command buffers with a
MI_BATCH_BUFFER_START and at submit time, replace it with
MI_BATHC_BUFFER_END if needed.
v2: Don't even consider non softpin platforms
v3: Fix inverted condition
v4: Limit is_chainable() to checking device->use_softpin (Jason)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
Lionel Landwerlin [Wed, 9 Dec 2020 09:56:31 +0000 (11:56 +0200)]
anv: track the end of the command buffers
Where MI_BATCH_BUFFER_END is recorded.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
Lionel Landwerlin [Sun, 6 Dec 2020 21:38:03 +0000 (23:38 +0200)]
anv: make use of new helper function directly in anv_QueueSubmit()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2371>
Bas Nieuwenhuizen [Thu, 25 Feb 2021 12:29:09 +0000 (13:29 +0100)]
radv: Expose robustBufferAccessUpdateAfterBind correctly.
We do support it.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4351
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9281>
Marek Olšák [Wed, 3 Feb 2021 07:40:59 +0000 (02:40 -0500)]
mesa: skip a subset of _mesa_update_state if no relevant flags are set
We only need to check 12 out of 32 flags.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 19:02:39 +0000 (14:02 -0500)]
mesa: don't update tnl spaces on irrelevant _NEW_POINT/TEXTURE_STATE changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:13:51 +0000 (13:13 -0500)]
mesa: don't update the fixed-func frag prog on irrelevant _NEW_COLOR changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:13:51 +0000 (13:13 -0500)]
mesa: don't update fixed-func programs on irrelevant _NEW_RENDER_MODE changes
The fixed-func vertex program uses it too, which was ignored. This commit
fixes it.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:13:51 +0000 (13:13 -0500)]
mesa: don't update fixed-func programs on irrelevant _NEW_FOG changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:13:51 +0000 (13:13 -0500)]
mesa: don't update fixed-func programs on irrelevant _NEW_POINT changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:13:51 +0000 (13:13 -0500)]
mesa: don't update fixed-func vert prog on irrelevant _NEW_TRANSFORM changes
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:03:24 +0000 (13:03 -0500)]
mesa: only update fixed-func programs on texture matrix enablement changes
This should reduce fixed-func program key recomputations.
I also update the fixed-func fragment program, which was incorrectly
ignored because it's clearly used there.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 17:56:52 +0000 (12:56 -0500)]
mesa: move _mesa_update_pixel out of _mesa_update_state
This only has to be called in a few places and not in normal draw calls.
egl_image_target_texture doesn't call _mesa_update_pixel because it only
assigns an EGL image to a texture object.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 17:41:18 +0000 (12:41 -0500)]
mesa: be precise about when to set _NEW_CURRENT_ATTRIB and _NEW_MATERIAL
This commit fixes _mesa_update_color_material, which allows cleaning up
the unnecessary state flagging.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 16:58:49 +0000 (11:58 -0500)]
vbo: don't call update_color_material in copy_to_current if it's a no-op
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Tue, 2 Feb 2021 01:01:13 +0000 (20:01 -0500)]
vbo: optimize copy_to_current functions
- execute vbo_set_vertex_format in a separate skipable conditional block
- replace dmul with dmul_shift
- don't check <= VBO_ATTRIB_MAT_BACK_INDEXES because there is no attrib
above that
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Sun, 13 Dec 2020 04:04:56 +0000 (23:04 -0500)]
mesa: merge STATE_LIGHT_ATTENUATION and STATE_LIGHT_POSITION_* parameters
This decreases the CPU time spent in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Sat, 5 Dec 2020 21:00:14 +0000 (16:00 -0500)]
mesa: merge STATE_LIGHTPROD parameters
This decreases the CPU time spent in fetch_state.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Mon, 1 Feb 2021 23:55:42 +0000 (18:55 -0500)]
mesa: sort state parameters for ffvp to enable better parameter merging
_mesa_optimize_state_parameters will benefit from this.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Mon, 1 Feb 2021 21:57:12 +0000 (16:57 -0500)]
mesa: remove the fixed-func vert prog dependency on all texture states
Just flag _NEW_FF_VERT_PROGRAM where needed. There are only a few places
that must do it.
Also do the same with _NEW_FF_FRAG_PROGRAM, but this is not sufficient
for the ff frag prog to ignore texture states.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Wed, 3 Feb 2021 18:54:34 +0000 (13:54 -0500)]
mesa: don't push/pop ctx->Texture._* derived states
They are always recomputed by _mesa_update_state, which will need the old
values, so that it can update other dependent states if needed.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Mon, 1 Feb 2021 21:09:04 +0000 (16:09 -0500)]
mesa: remove _NEW_LIGHT_FF_PROGRAM in favor of _NEW_FF_(VERT|FRAG)_PROGRAM
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>
Marek Olšák [Mon, 1 Feb 2021 21:09:04 +0000 (16:09 -0500)]
mesa: remove _NEW_VARYING_VP_INPUTS in favor of _NEW_FF_(VERT|FRAG)_PROGRAM
This adds _NEW_FF_FRAG_PROGRAM.
_mesa_set_varying_vp_inputs flags both fixed-func programs because both use
the state.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8850>