Mike Blumenkrantz [Fri, 9 Apr 2021 14:23:48 +0000 (10:23 -0400)]
zink: create separate linear tiling image for scanout
rendering onto a linear-tiled image is unbelievably slow if any sort of
blending is enabled, so instead always render to optimal tiling and then
copy to linear for scanout
this doubles performance for now and can be deleted in its entirety along
with the rest of the related hacks once real wsi support is implemented
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10180>
Juan A. Suarez Romero [Fri, 9 Apr 2021 08:59:14 +0000 (10:59 +0200)]
broadcom/compiler: use signed pointers for packed condition
`qpu.raddr_b` is an unsigned int, so it is always positive, even after
casting to signed int.
Fixes CID#1438117 "Operands don't affect result
(CONSTANT_EXPRESSION_RESULT)":
"result_independent_of_operands: (int)inst->qpu.raddr_b >= -16 is
always true regardless of the values of its operands. This occurs as
the logical first operand of "&&".
v2:
- Use signed pointers (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10131>
Danylo Piliaiev [Fri, 9 Apr 2021 15:02:26 +0000 (18:02 +0300)]
turnip: support copying both aspects of D32_SFLOAT_S8_UINT
We cannot copy both aspects at the same time, so copy them one by one.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10140>
Jesse Natalie [Sun, 11 Apr 2021 21:09:58 +0000 (14:09 -0700)]
vtn: Add a cap for CL drivers to support read-write images
This is a required CL2.0, optional CL3.0 feature
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181>
Jesse Natalie [Sun, 11 Apr 2021 21:09:09 +0000 (14:09 -0700)]
vtn: Don't warn about linkage capability if we're creating a NIR library
We've supported this for a while now for libclc
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10181>
Mike Blumenkrantz [Thu, 31 Dec 2020 14:24:03 +0000 (09:24 -0500)]
zink: make a bunch of descriptor functions static
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10177>
Mike Blumenkrantz [Thu, 31 Dec 2020 14:15:37 +0000 (09:15 -0500)]
zink: move descriptor state management to descriptors.c
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10177>
Pierre-Eric Pelloux-Prayer [Wed, 7 Apr 2021 13:28:46 +0000 (15:28 +0200)]
radeonsi/rgp: export compute shader programs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10105>
Pierre-Eric Pelloux-Prayer [Mon, 15 Mar 2021 11:49:49 +0000 (12:49 +0100)]
radeonsi/rgp: export barriers
Wrap the si_cp_wait_mem call to emit RGP_SQTT_MARKER_IDENTIFIER_BARRIER_START and
RGP_SQTT_MARKER_IDENTIFIER_BARRIER_END events.
Only for gfx9+ for now.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10105>
Tomeu Vizoso [Mon, 12 Apr 2021 07:30:10 +0000 (09:30 +0200)]
Revert "ci: Disable panfrost t760"
The devices have been running KernelCI jobs for a good while without
glitches, let's reenable Mesa jobs on them now.
This reverts commit
c6fbbbbf70be2d4d8c20999a65d6f8de993608eb.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173>
Tomeu Vizoso [Mon, 12 Apr 2021 07:30:08 +0000 (09:30 +0200)]
Revert "ci: Disable panfrost g52"
The devices have been running KernelCI jobs for a good while without
glitches, let's reenable Mesa jobs on them now.
This reverts commit
40647fcc3dbe582e91913271cebd6b2b7c5f8584.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173>
Tomeu Vizoso [Mon, 12 Apr 2021 07:29:26 +0000 (09:29 +0200)]
Revert "ci: Disable t720 LAVA jobs"
The maintenance window is closed.
This reverts commit
4fa9c359426254d01f2a6ee61d1868adb8d980fa.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10173>
Tomeu Vizoso [Mon, 12 Apr 2021 07:09:02 +0000 (09:09 +0200)]
ci: Disable t720 LAVA jobs
As the devices providing the testing are going down due to a planned
maintenance window of 4 hours.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10167>
Pierre-Eric Pelloux-Prayer [Tue, 6 Apr 2021 19:09:52 +0000 (21:09 +0200)]
vbo: inline vbo_primitive_restart in brw_primitive_restart
This is the only user of this code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10066>
Pierre-Eric Pelloux-Prayer [Tue, 6 Apr 2021 19:01:04 +0000 (21:01 +0200)]
st/draw: remove st_draw_vbo
Driver.Draw is now unused for Gallium drivers - except for st_cb_feedback which
sets its own Draw function.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10066>
James Park [Sun, 11 Apr 2021 04:31:19 +0000 (21:31 -0700)]
vulkan/util: Use util_bitcount
__builtin_popcount is not available on all compilers.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10159>
Ilia Mirkin [Wed, 24 Feb 2021 23:39:25 +0000 (18:39 -0500)]
st/mesa: adapt for the case where buffers are not supported in frag
Some logic was tuned to buffers / atomics / images being supported in
frag stages in order to expose any support at all. Fix some of these
assumptions.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10161>
Ilia Mirkin [Mon, 1 Mar 2021 23:59:27 +0000 (18:59 -0500)]
nv50/ir: fix emission of ld/st lock/unlock
This is necessary to implement shared atomics.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Mon, 1 Mar 2021 23:57:56 +0000 (18:57 -0500)]
nv50/ir: avoid inlining results of a locked load
These are a bit special. Among other things, removing them will cause us
to potentially remove the load itself, defeating the purpose of the
locking. Also it's unclear whether it's legal to access the shared
memory directly when it's locked like this.
This only comes up on nv50, since on nvc0+, shared memory can't be
loaded from random ops.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Sat, 27 Feb 2021 01:45:21 +0000 (20:45 -0500)]
nv50: fix expression for ucp offset
It doesn't matter since it's 0, but all the offsets are in bytes whereas
the method expects words. So adjust by 2.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Sat, 27 Feb 2021 23:24:44 +0000 (18:24 -0500)]
nv50/ir: fix emission of cas without a destination
We were previously dumping $r127 in there. This has a bad effect on
nv50, so make sure we allocate an actual register for it, even if
there's nothing using the result.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Mon, 1 Mar 2021 01:08:25 +0000 (20:08 -0500)]
nv50/ir: fix emission of 16-bit add
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:21:24 +0000 (22:21 -0500)]
nv50/ir: add support for 16-bit immediates
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:18:37 +0000 (22:18 -0500)]
nv50/ir: logic ops on half-regs can't take an immediate
There does not appear to be an instruction form for this. Prevent an
immediate from being loaded into place.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:15:32 +0000 (22:15 -0500)]
nv50/ir: fix emission of shifts on half-regs
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:15:04 +0000 (22:15 -0500)]
nv50/ir: fix emission of logic ops on half-regs
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:14:16 +0000 (22:14 -0500)]
nv50/ir: fix emission of cvt with half-reg destinations
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Wed, 24 Feb 2021 19:17:55 +0000 (14:17 -0500)]
nv50/ir: fix emitting movs from imm to short registers
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Mon, 15 Feb 2021 17:24:54 +0000 (12:24 -0500)]
nv50/ir: lower buffer to global
The idea is that buffers will be bound to the appropriate indices. That
means that we can just rename them to global.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Mon, 15 Feb 2021 17:22:02 +0000 (12:22 -0500)]
nv50/ir: fix emission of RED
When the atomic result is unused, the opcode form needs to be a bit
different.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Tue, 2 Mar 2021 00:51:14 +0000 (19:51 -0500)]
nv50/ir: do not use inline offsets for global, ensure indirect access
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Fri, 26 Feb 2021 04:08:00 +0000 (23:08 -0500)]
nv50/ir: force shared memory indirect to be an address
The upstream logic will not end up using an address, so we have to force
it here. The other backends don't care either.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 03:16:52 +0000 (22:16 -0500)]
nv50/ir: retrieve (n)ctaid.z from first user param
The driver is responsible for feeding this in.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 00:34:05 +0000 (19:34 -0500)]
nv50: pass in third axis via user param
This is probably not the most efficient way to go for all geometries,
but the assumption is that kernels tend to be x/y-heavy rather than
z-heavy. Iterates over each z slice and passes in the current value via
user param. (And bump all user params by a dword.)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 02:04:25 +0000 (21:04 -0500)]
nv50: add texture, constbuf, image, buffer validation
This makes compute mostly work. For now we're laying out images/buffers
in a fixed offset from each other in the globals "array", but this
should be done dynamically. We're also missing passing image info to
shaders, as well as adding image formats to a shader key.
Heavily inspired by nvc0 variants of these.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 00:42:03 +0000 (19:42 -0500)]
nv50: implement memory barrier handling
With shader images / buffers, we can get more complex barrier requests.
This mirrors the logic in nvc0.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 00:29:57 +0000 (19:29 -0500)]
nv50: add resource tracking for shader images and buffers
Heavily inpsired by the nvc0 code. Note that these only exist for the
compute stage, so there is no shared-based indexing.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Ilia Mirkin [Thu, 25 Feb 2021 00:27:49 +0000 (19:27 -0500)]
nv50: adapt texture and constbuf paths for compute shaders
This contains the logic updates necessary to perform necessary resource
tracking and emit update / flush commands for the relevant stages.
Inspired by some changes from Pierre Moreau.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Pierre Moreau [Wed, 29 Jul 2020 08:18:59 +0000 (10:18 +0200)]
nv50: Update texture indices to match stage indices
For legacy reasons, we were using the PIPE order, instead of the
hardware order. Reorder the stages to match the order of the
BIND_TIC/etc methods, and adjust internal usage to match.
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
[imirkin: fixed numbering, removed TODO comments]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Pierre Moreau [Wed, 29 Jul 2020 07:33:38 +0000 (09:33 +0200)]
nv50: Replace hardcoded texture/constbuf count with define
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
Erico Nunes [Mon, 29 Mar 2021 23:04:56 +0000 (01:04 +0200)]
lima: enable rg formats for fp16 render
These were noticed by trial and error after fixing the fp16 render
setup.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9916>
Erico Nunes [Mon, 29 Mar 2021 23:03:34 +0000 (01:03 +0200)]
lima: fix half float render
Format 0x26 is invalid, formats are in a 4 bit field so they repeat
in increments of 16.
Frame reg flags needs to set 0x01 to actually enable fp16.
The clear color setup is also a bit different for fp16, need to use
the 16 bit values in the first two clear color registers.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9916>
Alyssa Rosenzweig [Fri, 9 Apr 2021 22:03:38 +0000 (18:03 -0400)]
pan/bi: Determine block successors correctly
Fixes GPU timeouts in Google Maps.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Icecream95 <ixn@disroot.org>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10145>
Mauro Rossi [Sat, 10 Apr 2021 11:18:31 +0000 (13:18 +0200)]
compiler/glsl: fix include for Android build
Sources outside of src/util path should include "util/string_buffer.h"
Fixes the following building error in Android:
external/mesa/src/compiler/glsl/ast_type.cpp:25:10: fatal error: 'string_buffer.h' file not found
^~~~~~~~~~~~~~~~~
1 error generated.
Fixes:
eeec9d56ad32 ("compiler/glsl: clean up output")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10156>
Matti Hamalainen [Thu, 25 Mar 2021 12:36:54 +0000 (14:36 +0200)]
gallium/tools: update trace scripts to Python 3
Bring the scripts for parsing, dumping state and diffing of Gallium
trace files to modern day by updating them to Python 3.
Add option '-p' to some tools for outputting only plaintext
instead of ANSI / colorized format.
Also fix state parsing of some dumps by adding 'clear_render_target'
and 'get_disk_shader_cache' to ignored calls list.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4321
Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9830>
Erik Faye-Lund [Sat, 10 Apr 2021 09:09:02 +0000 (11:09 +0200)]
zink: fix typo in function name
Suggested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10127>
Erik Faye-Lund [Fri, 9 Apr 2021 07:53:31 +0000 (09:53 +0200)]
zink: document scalarBlockLayout requirement
We're currently using uint arrays instead of uvec4 arrays for UBOs and
SSBOs, which requires scalarBlockLayout. Fixing this is a lot of work,
so let's just document it for now.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10127>
Erik Faye-Lund [Fri, 9 Apr 2021 06:35:02 +0000 (08:35 +0200)]
gallium/st: correct range for int16
This fixes the following dEQP tests:
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec2_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec4_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec2_fragment
- dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec4_fragment
Fixes:
1af8fe4ed52 ("gallium: add shader caps INT16 and FP16_DERIVATIVES")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128>
Erik Faye-Lund [Fri, 9 Apr 2021 06:41:07 +0000 (08:41 +0200)]
gallium/st: correct range for float16
Fixes:
b83f4b9fa23 ("glsl: Add an IR lowering pass to convert mediump operations to 16-bit")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128>
Erik Faye-Lund [Fri, 9 Apr 2021 05:25:03 +0000 (07:25 +0200)]
glsl: tolerate int16 loop counters
When lowering precision on integers from GLSL ES, we can end up with
16 bit integer loop counters. So let's tolerate this as well.
This was probably not caught earlier because most NIR drivers disable
GLSL-level loop-unrolling, and no non-NIR driver sets LowerPrecisionInt16
to true. This was discovered while trying to wire up int16 support for
Zink, which doesn't currently disable GLSL loop-unrolling.
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125>
Erik Faye-Lund [Fri, 9 Apr 2021 05:22:53 +0000 (07:22 +0200)]
glsl: fix int16 type
This shouldn't be unsigned, or else we'll trigger asserts.
Fixes:
7f00d4dac81 ("glsl: Handle 16-bit types in loop analysis")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125>
Erik Faye-Lund [Fri, 9 Apr 2021 05:15:36 +0000 (07:15 +0200)]
glsl: fix is_integer_16_32
This shouldn't check for 64-bit...
Fixes:
a052a9c2777 ("glsl: handle int16 and uint16 types and add instructions for mediump")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10125>
Icecream95 [Sat, 10 Apr 2021 03:28:15 +0000 (15:28 +1200)]
panfrost: Only do point coord replacement for PIPE_PRIM_POINTS
Fixes rendering in Terraria on Midgard.
Thanks to macc24 for reporting this and to HdkR for pointing me to a
similar issue for virgl.
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10154>
Jason Ekstrand [Thu, 8 Apr 2021 21:12:27 +0000 (16:12 -0500)]
anv: Use vk_object_alloc/free
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Jason Ekstrand [Thu, 8 Apr 2021 21:46:04 +0000 (16:46 -0500)]
vulkan: Add a vk_object_multialloc helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Jason Ekstrand [Thu, 8 Apr 2021 21:40:45 +0000 (16:40 -0500)]
anv: Clean up anv_semaphore::base on the error path
Fixes:
682c81bdfb7 "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Jason Ekstrand [Thu, 8 Apr 2021 21:27:02 +0000 (16:27 -0500)]
anv: Clean up anv_descriptor_pool::base on the error path
Fixes:
682c81bdfb7 "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Jason Ekstrand [Thu, 8 Apr 2021 21:17:22 +0000 (16:17 -0500)]
anv: Refactor framebuffer creation
This avoids having the create call duplicated.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Jason Ekstrand [Thu, 8 Apr 2021 21:10:26 +0000 (16:10 -0500)]
anv: Clean up anv_device_memory::base on failure
Fixes:
682c81bdfb7 "vulkan,anv: Add a base object struct type"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10123>
Bas Nieuwenhuizen [Thu, 8 Apr 2021 00:54:40 +0000 (02:54 +0200)]
radv: Update editorconfig.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091>
Bas Nieuwenhuizen [Sat, 10 Apr 2021 01:24:05 +0000 (03:24 +0200)]
radv: Format.
Using
find ./src/amd/vulkan -regex '.*/.*\.\(c\|h\|cpp\)' | xargs -P8 -n1 clang-format --style=file -i
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091>
Bas Nieuwenhuizen [Wed, 7 Apr 2021 20:52:55 +0000 (22:52 +0200)]
radv: Add clang-format for AMD code.
Copied from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8883
with increased colum width as 80 really made a mess.
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10091>
Icecream95 [Wed, 7 Apr 2021 11:51:01 +0000 (23:51 +1200)]
panfrost: Flush output after disassembling shaders
Fixes text printed to stderr appearing in the middle of disassembly
when piping stdout and stderr to the same place.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10088>
Mauro Rossi [Thu, 8 Apr 2021 21:32:14 +0000 (23:32 +0200)]
android: anv: fix build error in anv_android.c
Fixes the following building error:
external/mesa/src/intel/vulkan/anv_android.c:568:13: error: no member named 'stride' in 'struct anv_image_create_info'
anv_info.stride = gralloc_info->stride *
~~~~~~~~ ^
1 error generated.
Fixes:
afd2f489d338 ("anv: Drop unused anv_image_create_info::stride")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10119>
Mauro Rossi [Thu, 8 Apr 2021 21:29:12 +0000 (23:29 +0200)]
android: anv: Remove anv_intel.c from Makefile.sources
Fixes the following building error:
clang: error: no such file or directory: 'external/mesa/src/intel/vulkan/anv_intel.c'
clang: error: no input files
Fixes:
5e6db1916860 "anv: Remove vkCreateDmaBufINTEL (v4)"
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10119>
Chia-I Wu [Fri, 9 Apr 2021 04:01:58 +0000 (21:01 -0700)]
ci: enable venus in some meson build jobs
Enable it in meson-{android,clang,vulkan,i386}.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10124>
Lucas Stach [Fri, 26 Feb 2021 20:48:42 +0000 (21:48 +0100)]
etnaviv: remove stale comment in etna_resource_copy_region
The comment about using the RS engine was correct before the code got
changed to use the 3D blitter and a fallback before etnaviv was merged
into upstream Mesa. It has been incorrect ever since. As it's just
adding confusion, instead of being helpful, remove it.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9310>
Lucas Stach [Fri, 26 Feb 2021 20:28:20 +0000 (21:28 +0100)]
etnaviv: don't try to copy PIPE_BUFFER with the 3D engine
PIPE_BUFFER layout is incompatible with the 3D pipe, so don't try to
blit it via a 3D engine blit, but fall back to the software copy.
Fixes crashes in piglit tests arb_copy_buffer and arb_map_buffer_range.
Fixes:
c9e8b49b8852 (etnaviv: gallium driver for Vivante GPUs)
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9310>
Chia-I Wu [Thu, 8 Apr 2021 00:53:44 +0000 (17:53 -0700)]
venus: include individual venus-protcol headers
Include individual headers than vn_protocol_driver.h to save compile
time.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Thu, 8 Apr 2021 00:44:41 +0000 (17:44 -0700)]
venus: split out vn_queue.[ch]
Move VkQueue, VkFence, VkSemaphore, and VkEvent functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Thu, 8 Apr 2021 00:30:54 +0000 (17:30 -0700)]
venus: split out vn_device_memory.[ch]
Move VkDeviceMemory functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Thu, 8 Apr 2021 00:27:26 +0000 (17:27 -0700)]
venus: split out vn_image.[ch]
Move VkImage{,View} and VkSampler{,YcbcrConversion} functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Thu, 8 Apr 2021 00:25:40 +0000 (17:25 -0700)]
venus: split out vn_buffer.[ch]
Move VkBuffer{,View} functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 23:48:25 +0000 (16:48 -0700)]
venus: split out vn_descriptor_set.[ch]
Move VkDescriptor{Pool,Set,SetLayout,UpdateTemplate} functions to the
new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 23:42:37 +0000 (16:42 -0700)]
venus: split out vn_render_pass.[ch]
Move VkRenderPass and VkFramebuffer functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 23:37:33 +0000 (16:37 -0700)]
venus: split out vn_query_pool.[ch]
Move VkQueryPool functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 23:29:38 +0000 (16:29 -0700)]
venus: split out vn_pipeline.[ch]
Move VkShaderModule and VkPipeline{,Layout,Cache} functions to the new
files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 22:19:46 +0000 (15:19 -0700)]
venus: split out vn_command_buffer.[ch]
Move VkCommand{Pool,Buffer} functions to the new files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 22:26:15 +0000 (15:26 -0700)]
venus: prepare for splitting vn_device.[ch]
Make virtqueue/ring sync functions available to other files.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Chia-I Wu [Wed, 7 Apr 2021 22:01:06 +0000 (15:01 -0700)]
venus: update venus-protocol headers
This takes vn_protocol_driver_{structs,commands,calls}.h and split them
by Vulkan handle types. This enables us to split up vn_device.c in the
following commits without slowing down compile time too much.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10117>
Connor Abbott [Thu, 25 Feb 2021 10:14:53 +0000 (11:14 +0100)]
ir3/postsched: Make sure to schedule inputs before kill
Before, we would prefer to schedule inputs before kills, which works
assuming that the live range of the bary_ij system value don't get
split and therefore all bary.f are ready at the start of the block.
However live range splitting can mess up that assumption and cause a
kill to get scheduled before a move that leads to a bary.f.
This fixes even e.g. dEQP-GLES2.functional.shaders.discard.basic_always
on a3xx before introducing CSE of collect instructions, but even after
that it could be a problem theoretically as the register allocator
doesn't guarantee that any live ranges aren't split.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10143>
Mike Blumenkrantz [Fri, 9 Apr 2021 15:35:59 +0000 (11:35 -0400)]
anv: fix debugoptimized build compile
this function is only needed for asserts
Fixes:
2e4c153c6ba ("anv/image: Refactor check_memory_bindings()")
fixes #4599
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10141>
Adam Jackson [Thu, 8 Apr 2021 22:46:02 +0000 (18:46 -0400)]
dri: Use __DRI_BUFFER_COUNT consistently internally
These arrays were all sized with insufficiently large magic numbers,
which is probably not a good idea.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10142>
Mike Blumenkrantz [Fri, 9 Apr 2021 14:43:59 +0000 (10:43 -0400)]
zink: don't lose existing pNext when using wsi_image_create_info in image creation
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10138>
Alexander von Gluck IV [Sun, 7 Mar 2021 22:57:17 +0000 (16:57 -0600)]
egl/haiku: Fix ConfigID naming inline with mesa
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9454>
Jesse Natalie [Thu, 8 Apr 2021 16:33:46 +0000 (09:33 -0700)]
meson: Refuse to build lavapipe without llvmpipe
This config doesn't work, and as of recently it no longer links.
Let's fail it early.
Fixes:
7b79db11c2e ("lavapipe: enable correct workgroup sizing")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10107>
Matt Turner [Thu, 8 Apr 2021 20:31:14 +0000 (20:31 +0000)]
ir3: Don't count (nopX) towards the wrong category
Prior to this commit
(nop3) mad.f32 r0.y, c0.x, r1.w, c0.y
was counted as 4 cat3 instructions (and still 3 cat0/nops) in shader-db
results. With this change, it is counted as only 1 cat3 instruction.
Probably never going to have better shader-db results than this in my
career:
total cat2 in shared programs: 1214667 -> 732058 (-39.73%)
cat2 in affected programs: 1194729 -> 712120 (-40.39%)
helped: 8551
HURT: 0
total cat3 in shared programs: 376448 -> 274745 (-27.02%)
cat3 in affected programs: 344918 -> 243215 (-29.49%)
helped: 7222
HURT: 0
Reviewed-by: Rob Clark <robdclark@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10116>
Mike Blumenkrantz [Thu, 8 Apr 2021 18:52:47 +0000 (14:52 -0400)]
zink: only unmap PIPE_MAP_ONCE in synchronous mode
this flag cannot be used to infer that a transfer_map call will be matched
by a transfer_unmap call when tc reordering is active
fixes #4600
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10114>
Mike Blumenkrantz [Thu, 8 Apr 2021 14:08:00 +0000 (10:08 -0400)]
zink: handle checking batch completion from other contexts without timelines
if a batch state can't be found, it may exist on a different context, so the screen
value needs to be checked
if the screen value indicates that the batch hasn't completed and we're waiting,
force a flush so there's a fence that can be waited upon
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10115>
Mike Blumenkrantz [Thu, 8 Apr 2021 14:52:55 +0000 (10:52 -0400)]
zink: make timeline semaphores per-screen
I misread the spec, and it turns out timeline ids can't be reused across
semaphores. This is obvious in retrospect, but what can be done?
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10115>
Samuel Pitoiset [Tue, 19 Jan 2021 15:12:01 +0000 (16:12 +0100)]
radv: allow to force VRS rates on GFX10.3 with RADV_FORCE_VRS
This allows to force the VRS rates via RADV_FORCE_VRS, the supported
values are 2x2, 1x2 and 2x1. This supports the primitive shading rate
mode for non GUI elements.
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/7794>
Samuel Pitoiset [Tue, 19 Jan 2021 13:58:59 +0000 (14:58 +0100)]
radv: use explicit VRS mode when configuring PA_CL_VRS_CNTL
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/7794>
Lionel Landwerlin [Fri, 9 Apr 2021 11:58:19 +0000 (14:58 +0300)]
microsoft: fixup clc_log() define
The local msg variable shadows one of the argument of
SPIRVMessageConsumer making the error message "(null)".
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10133>
Iago Toral Quiroga [Thu, 8 Apr 2021 07:08:20 +0000 (09:08 +0200)]
broadcom/compiler: rename unifa tracking fields
The term 'last' may be misleading because the offset represents
the current unifa offset, which is the offset used by the last
load plus 4 bytes, so rename these to use the term 'current'
instead.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100>
Iago Toral Quiroga [Tue, 6 Apr 2021 11:53:36 +0000 (13:53 +0200)]
broadcom/compiler: sort constant UBO loads by index and offset
This implements a NIR pass that groups together constant UBO loads
for the same UBO index in order of increasing offset when the distance
between them is small enough that it enables the "skip unifa write"
optimization.
This may increase register pressure because it can move UBO loads
earlier, so we also add a compiler strategy fallback to disable the
optimization if we need to drop thread count to compile the shader
with this optimization enabled.
total instructions in shared programs:
13557555 ->
13550300 (-0.05%)
instructions in affected programs: 814684 -> 807429 (-0.89%)
helped: 4485
HURT: 2377
Instructions are helped.
total uniforms in shared programs: 3777243 -> 3760990 (-0.43%)
uniforms in affected programs: 112554 -> 96301 (-14.44%)
helped: 7226
HURT: 36
Uniforms are helped.
total max-temps in shared programs: 2318133 -> 2333761 (0.67%)
max-temps in affected programs: 63230 -> 78858 (24.72%)
helped: 23
HURT: 3044
Max-temps are HURT.
total sfu-stalls in shared programs: 32245 -> 32567 (1.00%)
sfu-stalls in affected programs: 389 -> 711 (82.78%)
helped: 139
HURT: 451
Inconclusive result.
total inst-and-stalls in shared programs:
13589800 ->
13582867 (-0.05%)
inst-and-stalls in affected programs: 817738 -> 810805 (-0.85%)
helped: 4478
HURT: 2395
Inst-and-stalls are helped.
total nops in shared programs: 354365 -> 342202 (-3.43%)
nops in affected programs: 31000 -> 18837 (-39.24%)
helped: 4405
HURT: 265
Nops are helped.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100>
Iago Toral Quiroga [Tue, 6 Apr 2021 11:39:23 +0000 (13:39 +0200)]
broadcom/compiler: allow compilation strategies to limit minimum thread count
This adds a minimum thread count parameter to each compilation strategy with
the intention to limit the minimum allowed thread count that can be used to
register allocate with that strategy.
For now all strategies allow the minimum thread count supported by the
hardware, but we will be using this infrastructure to impose a more
strict limit in an upcoming optimization.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100>
Iago Toral Quiroga [Thu, 8 Apr 2021 07:02:16 +0000 (09:02 +0200)]
broadcom/compiler: add a definition for the unifa skip distance
We will be using this distance to setup another optimization in a
follow-up patch.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
x# Please enter the commit message for your changes. Lines starting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100>
Iago Toral Quiroga [Fri, 9 Apr 2021 08:47:51 +0000 (10:47 +0200)]
v3dv: fix index buffer binding
This can be called outside a render pass so we should not expect to have
a job available. Also, we should not be emitting state here, instead we
should do in the pre-draw handler with all the other draw call state.
Fixes cases of crashes in RenderDoc when selecting elements in the
Event Browser.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10130>
Juan A. Suarez Romero [Thu, 8 Apr 2021 09:53:50 +0000 (11:53 +0200)]
broadcom/compiler: fix first_component assertion
first_component is an uint, and thus if it takes value 0 we can't know
if it is because writemask has its first bit to 1, or all bits to 0.
As we want to ensure that at least one bit is set, apply the assertion
in writemask.
Fixes CID#1472829 "Macro compares unsigned to 0 (NO_EFFECT)".
v2:
- Restore "first_component <= last_component" assertion (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10103>
Gert Wollny [Thu, 8 Apr 2021 16:41:47 +0000 (18:41 +0200)]
r600: Enable sb for nir only on specific request
SB si known to be buggy and the ultimate aim is to make it go away. To
test workloads with better optimizations it makes sense to be able to
enable SB, but for the NIR backend it should not be enabled together
with NIR the default. Therefore an a specific debug option "nirsb" that
enables NIR with SB.
Fixes:
3b27243b01ecdfea6df068338e56ffbd9b16b663
r600: Enable sb also for NIR
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10108>