Marek Olšák [Thu, 26 Nov 2020 00:51:42 +0000 (19:51 -0500)]
radeonsi: disable WGP mode on gfx10.3 to prevent hangs
I think that reducing the CU mask to 1 disabled CU per SA broke the WGP mode
on VanGogh, causing a hang. To be sure, disable it on all chips.
Fixes: 9538b9a68ed - radeonsi: add support for Sienna Cichlid
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Thu, 26 Nov 2020 00:49:52 +0000 (19:49 -0500)]
ac: enable late allocation on VanGogh to increase perf
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 08:02:17 +0000 (03:02 -0500)]
radeonsi: don't update provoking vertex and outprim states in SGPR if unused
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 07:25:59 +0000 (02:25 -0500)]
radeonsi: don't update indexed flag in SGPR if it's unused
to skip the register update when switching between indexed and non-indexed
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Wed, 25 Nov 2020 07:13:27 +0000 (02:13 -0500)]
ac,radeonsi: fix load_first_vertex
GL doesn't use it, so this change is not necessary, but it's better
this way.
There is also a small cleanup using si_unpack_param.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 22:17:42 +0000 (17:17 -0500)]
radeonsi: only mask 1 CU for GS/VS waves on gfx10.3
ported from PAL
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 04:19:44 +0000 (23:19 -0500)]
radeonsi: fix a nasty bug in si_pm4.c
If you did:
si_pm4_set_reg(pm4, reg, val0);
si_pm4_cmd_add(pm4, val1);
si_pm4 set_reg(pm4, reg + 4, val1);
it wrote val0 to reg, val1 to reg + 4, and val2 to reg + 8.
This fixes it by clearing last_opcode in si_pm4_cmd_add, so that
si_pm4_set_reg doesn't try to combine set_reg calls across si_pm4_cmd_add.
Fixes: da78d50bc87 - radeonsi: make si_pm4_cmd_begin/end static and simplify all usages
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sat, 10 Oct 2020 11:19:03 +0000 (07:19 -0400)]
radeonsi: eliminate shader code for disabled or masked color outputs
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 05:09:54 +0000 (00:09 -0500)]
radeonsi: add AMD_DEBUG=nofastlaunch for debugging
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 09:51:37 +0000 (04:51 -0500)]
radeonsi: enable NGG and NGG culling on gfx10.3 APUs by default
VanGogh benefits.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 09:49:59 +0000 (04:49 -0500)]
radeonsi: unduplicate code setting MIN_COMPRESSED_BLOCK_SIZE
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 03:57:25 +0000 (22:57 -0500)]
winsys/amdgpu: don't use debug_get_option_noop in a hot path
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Tue, 24 Nov 2020 03:52:20 +0000 (22:52 -0500)]
winsys/radeon: don't use debug_get_option_noop in a hot path
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 21:27:06 +0000 (16:27 -0500)]
radeonsi: fix max_lds_size warning in release builds
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 23 Nov 2020 21:24:59 +0000 (16:24 -0500)]
radeonsi: fix line stippling with LINES_ADJACENCY without GS
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sun, 22 Nov 2020 08:18:18 +0000 (03:18 -0500)]
radeonsi: fix a memory leak in si_create_dcc_retile_cs
Fixes: 1f21396431a - radeonsi: add support for displayable DCC for multi-RB chips
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Thu, 19 Nov 2020 06:08:33 +0000 (01:08 -0500)]
radeonsi: use util_logbase2 instead of division by index_size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 12 Oct 2020 12:19:12 +0000 (08:19 -0400)]
radeonsi: correct the MAD/FMA support table
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Mon, 12 Oct 2020 01:23:40 +0000 (21:23 -0400)]
radeonsi: always use a staging texture for linear 1D textures in VRAM
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Marek Olšák [Sat, 10 Oct 2020 11:18:45 +0000 (07:18 -0400)]
radeonsi: print more fields in si_dump_shader_key
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
Jordan Justen [Mon, 30 Nov 2020 21:15:18 +0000 (13:15 -0800)]
intel/compiler: Add GEN125 to enum gen
Recommended-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 10:16:51 +0000 (03:16 -0700)]
intel/iris: Build gen 12.5
Reworks:
* genX_call in iris_screen.c (found by Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 10:06:46 +0000 (03:06 -0700)]
intel/anv: Build gen 12.5
Reworks:
* Jason: call gen125_init_device_state
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:59:42 +0000 (02:59 -0700)]
intel/isl: Build gen 12.5
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:02:25 +0000 (02:02 -0700)]
intel/genxml: Build gen 12.5
Reworks:
* Fix typo always returning gen12 for 12.5 (found by Lionel)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Fri, 15 May 2020 09:02:25 +0000 (02:02 -0700)]
intel/genxml: Copy gen12.xml to gen125.xml
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Mon, 6 Jan 2020 10:09:35 +0000 (02:09 -0800)]
intel/dev: Add gen_device_info_is_12hp
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Jordan Justen [Mon, 6 Jan 2020 10:05:21 +0000 (02:05 -0800)]
intel/dev: Use GEN_GEN if defined for gen_device_info_is_9lp
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7757>
Adam Jackson [Tue, 17 Nov 2020 20:15:03 +0000 (15:15 -0500)]
glx: Remove DRI1
The DRI1 drivers were removed in Mesa 8.0, released in February 2012.
Time to say goodnight.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Tue, 10 Nov 2020 21:06:47 +0000 (16:06 -0500)]
glx: Handle create_context in terms of create_context_attribs
For the DRI backends we factor this out to a dri_common_create_context
method. Indirect gets the same transformation but doesn't use the common
method since it can't rely on DRI being built.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Tue, 17 Nov 2020 18:48:46 +0000 (13:48 -0500)]
glx: Check share ctx compatibility in ::create_context_attribs
Most of the legacy CreateContext paths already did this, this is just
aligning the two so we can implement one in terms of the other.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Wed, 16 Sep 2020 16:22:46 +0000 (12:22 -0400)]
glx: Remove unused __GLXDRIscreen::createContext
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Adam Jackson [Wed, 16 Sep 2020 15:21:10 +0000 (11:21 -0400)]
glx: Eliminate some stub functions for !GLX_DIRECT_RENDERING
Move the ifdefs into the corresponding (real) function bodies. No
functional change, just making this file's style consistent.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7660>
Erik Faye-Lund [Fri, 20 Nov 2020 13:29:00 +0000 (14:29 +0100)]
docs: inline contents.rst into index.rst
The idea of having a single file containing the ToC is not really how
things are done in Sphinx, and kinda makes it harder to structure
documentation more naturally. This was just something I did to mirror
what we used to do for the old HTML-only version of the docs, to ease
the transition and to de-clutter index.rst.
Now that the transition is far behind us, and index.rst is much cleaner,
we can finally start inlining this.
In the long run, I expect most of these to be moved to separate "chapter
articles" that summarize what these topics are, and thus disappear from
here.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 13:20:47 +0000 (14:20 +0100)]
docs: mention egl in api-list
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 13:01:27 +0000 (14:01 +0100)]
docs: do not explicitly call out es-versions
There's no reason to explicitly call out GL ES versions here, as these
are all major versions there are, and it's very unlikely that more
versions will emerge.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:58:40 +0000 (13:58 +0100)]
docs: use external link-references
The rST code here is much more to the point and easy to read if we
define the links as external link-references instead of inlining them.
This will make the next few patches much easier to grok.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:44:53 +0000 (13:44 +0100)]
docs: move major versions history out of front-page
The features added in each major version is also unlikely the first things
someone wants to know about Mesa. So let's move this into the
versions.rst article.
This documentation is severely out of date anyway, and as it doesn't
seem like anyone is interested in documenting this any more, we should
probably consider driopping versions.rst entirely in the longer run.
But for now, this makes the front-page much more approachable.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Fri, 20 Nov 2020 12:35:36 +0000 (13:35 +0100)]
docs: break project history out of front-page
The project history isn't usually what a user wants to read first when
they read about a project, so let's remove it from the front-page of the
documentation.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7709>
Erik Faye-Lund [Thu, 26 Nov 2020 19:54:02 +0000 (20:54 +0100)]
zink: revert to old load_ubo implementation
It turns out, the load_ubo to load_ubo_vec4 implementation isn't quite
enough for us, for a few reasons:
1. We use a single array of uvec4s for our UBOs, and to handle 64-bit
values in UBOs, we need further lowering.
2. The whole vec4 stuff seems a bit hard to reconsile with glsl 4.3
packing as well as PackedDriverUniformStorage.
In addition to the above, this fixes several piglit tests that *aren't*
part of quick_gl, which is what I've been running. So this doesn't even
work correctly right now.
So let's go back to what we had before instead.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3643
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7858>
Mike Blumenkrantz [Fri, 26 Jun 2020 19:53:30 +0000 (15:53 -0400)]
zink: add alternate ubo loader in ntv
This is a loader that handles more cases than the current vec4-based
loader, that is a bit easier to extend to more features.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7858>
Erik Faye-Lund [Tue, 1 Dec 2020 09:59:48 +0000 (10:59 +0100)]
util/slab: do not dereference NULL-pointer
This used to not be a problem, because these mutexes were the first
members of this array, meaning that we ended up trying to lock/unlock
NULL mutexes. But this isn't guaranteed to be allowed, so we were
relying on luck here.
Recently, this changed. We introduced asserts for NULL-pointers, and
changed the behavior in a way that leads to crashes in release-builds.
This means we can't rely on luck any longer.
Fixes: e3171037539 ("c11/threads: Remove Win32 null checks")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3903
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7853>
Ruijing Dong [Fri, 27 Nov 2020 17:08:30 +0000 (12:08 -0500)]
radeon/vcn: hevc main10 profile decoding pitch fix
for hevc main10 profile decoding, dpb buffer alignment fix
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7827>
Jesse Natalie [Thu, 26 Nov 2020 01:18:26 +0000 (17:18 -0800)]
d3d12: Fix GCC warnings for missing function prototypes
Most of these are adding 'static', for functions that are local
to a translation unit but weren't declared static.
There's one instance of a missing include for bringing the prototype
into the translation unit, one function missing a return type (default-int),
and one which added inline to avoid it being considered unused in some sources.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:29:18 +0000 (08:29 -0800)]
microsoft/compiler: Add missing 'return' to switch case
Fixes: b9c61379 ("microsoft/compiler: translate nir to dxil")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:26:43 +0000 (08:26 -0800)]
d3d12: Fix use of incorrect clear color variable
Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Tue, 1 Dec 2020 16:44:40 +0000 (08:44 -0800)]
microsoft/compiler: Misc fixes caught by GCC
* Fix const-correctness on dxil_mdnode pointer arrays
* Fix warning for a missing scope in a case block
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:15:11 +0000 (17:15 -0800)]
d3d12: Misc fixes caught by GCC warnings / code inspection
* A const-correctness issue
* Some uninitialized variables
* A missing copyright header
* A comment with a /* in it when only * was needed
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Sat, 28 Nov 2020 16:20:27 +0000 (08:20 -0800)]
microsoft/compiler: Fix unhandled switch case warnings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:10:39 +0000 (17:10 -0800)]
d3d12: Fix unhandled switch case warnings
Some D3D enums have invalid values (e.g. NONE) in the enum,
so default: makes sense to catch invalid values in those cases.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:07:05 +0000 (17:07 -0800)]
d3d12: Clean up d3d12_compiler.h
Move some stuff from d3d12_context.h to d3d12_compiler.h, and
fix d3d12_compiler.h to not include d3d12_context.h.
This serves two purposes:
1. Putting declarations and definitions where they really belong.
2. Making it so only C++ code needs d3d12.h simplifies the helpers
we need to add to add to support d3d12.h for Linux.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:05:29 +0000 (17:05 -0800)]
d3d12: Remove Windows-specific macros
These all have trivial standard or Mesa replacements
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 01:02:25 +0000 (17:02 -0800)]
d3d12: Fix signed-unsigned comparison warnings
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 00:57:47 +0000 (16:57 -0800)]
d3d12: Fix brace-initialization issues
For C++ code, we shouldn't use {0}, instead use {} to default-
initialize everything. For code with nested structs/unions, make
sure there's enough braces to appropriately scope initialization.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 00:52:52 +0000 (16:52 -0800)]
microsoft/compiler: Remove dead code/variables
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Jesse Natalie [Thu, 26 Nov 2020 00:49:43 +0000 (16:49 -0800)]
d3d12: Delete unused local variables
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
Michel Zou [Sun, 29 Nov 2020 10:41:04 +0000 (11:41 +0100)]
gallium/tests: fix unused-but-set-variable warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Michel Zou [Wed, 25 Nov 2020 11:18:37 +0000 (12:18 +0100)]
softpipe: fix maybe-uninitialized warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Michel Zou [Tue, 24 Nov 2020 17:59:11 +0000 (18:59 +0100)]
wgl: fix maybe-uninitialized warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Michel Zou [Tue, 24 Nov 2020 15:06:07 +0000 (16:06 +0100)]
glsl: fix redefinition warning on win32
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Michel Zou [Sun, 22 Nov 2020 09:38:38 +0000 (10:38 +0100)]
glapi: fix unused-function warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Michel Zou [Sat, 21 Nov 2020 12:34:18 +0000 (13:34 +0100)]
util: fix mingw format-extra-args warning
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7713>
Daniel Schürmann [Thu, 19 Nov 2020 11:21:17 +0000 (12:21 +0100)]
nir: don't sink instructions into loops
Repeatedly loading constants or evaluating ALU operations
in loops doesn't seem beneficial. This might increase the register
pressure, but the tradeoff seems worth it.
Totals from 13629 (9.77% of 139517) affected shaders (RAVEN):
SGPRs:
1179481 ->
1184697 (+0.44%); split: -0.03%, +0.47%
VGPRs: 978776 -> 978732 (-0.00%); split: -0.02%, +0.02%
SpillSGPRs: 51036 -> 50943 (-0.18%); split: -1.35%, +1.17%
CodeSize:
113775020 ->
113428812 (-0.30%); split: -0.34%, +0.04%
MaxWaves: 49877 -> 49881 (+0.01%); split: +0.02%, -0.01%
Instrs:
22295979 ->
22204936 (-0.41%); split: -0.42%, +0.02%
Cycles:
1637198832 ->
1626916048 (-0.63%); split: -0.64%, +0.01%
VMEM:
2403434 ->
2507645 (+4.34%); split: +4.76%, -0.42%
SMEM: 849676 -> 834576 (-1.78%); split: +0.60%, -2.38%
VClause: 412396 -> 398139 (-3.46%); split: -3.46%, +0.01%
SClause: 810480 -> 817349 (+0.85%); split: -0.19%, +1.04%
Copies:
2188260 ->
2166716 (-0.98%); split: -1.18%, +0.19%
Branches: 761204 -> 760475 (-0.10%); split: -0.15%, +0.05%
PreSGPRs: 972892 -> 981054 (+0.84%); split: -0.05%, +0.89%
PreVGPRs: 925390 -> 925420 (+0.00%); split: -0.02%, +0.02%
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7694>
Erik Faye-Lund [Tue, 1 Dec 2020 13:37:06 +0000 (14:37 +0100)]
d3d12: do not inspect NULL samplers
We can risk having NULL samplers in this range, so let's ignore them
while we're populating the shader-key.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7856>
Timur Kristóf [Fri, 27 Nov 2020 20:31:50 +0000 (21:31 +0100)]
aco: Fix NGG GS assert failure from the WG scan.
There was a temp which was defined in a branch but used outside,
without a phi.
Fixes: 62b5012ec35358a7c109746bfe1da33ca1b04f24
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7817>
Marcin Ślusarz [Mon, 30 Nov 2020 12:21:35 +0000 (13:21 +0100)]
intel/tools/aubinator_error_decode: allow 0 arguments
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7833>
Marcin Ślusarz [Mon, 30 Nov 2020 12:18:42 +0000 (13:18 +0100)]
intel/tools/aubinator_error_decode: allow "-" as an input file
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7833>
Marcin Ślusarz [Mon, 30 Nov 2020 12:15:18 +0000 (13:15 +0100)]
intel/tools/aubinator_error_decode: exit with an error on unknown option
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7833>
Erik Faye-Lund [Tue, 1 Dec 2020 12:13:20 +0000 (13:13 +0100)]
d3d12: lower bitfield_extract to shifts
This wasn't implemented yet, because we hadn't encountered it yet. But
now it seems we can trigger this, thanks to the nv_copy_depth_to_color
piglit tests.
This makes the test go from crash to fail, which isn't perfect, but it's
better than nothing.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7855>
Samuel Pitoiset [Tue, 1 Dec 2020 12:00:00 +0000 (13:00 +0100)]
Revert "radv/llvm,aco: always split typed vertex buffer loads on GFX6 and GFX10+"
It introduces regressions.
This reverts commit
6fb4babfe98e222e648eb2ab210136b7540bf039.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7852>
Samuel Pitoiset [Tue, 1 Dec 2020 13:27:42 +0000 (14:27 +0100)]
ci: disable check-commits
Otherwise the CI sanity check fails if the commit title exceed
80 characters
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7852>
Christian Gmeiner [Mon, 30 Nov 2020 08:55:39 +0000 (09:55 +0100)]
etnaviv/drm: add some locking asserts
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7832>
Christian Gmeiner [Mon, 30 Nov 2020 08:39:35 +0000 (09:39 +0100)]
etnaviv/drm: convert to simple_mtx
We do not need a full blown pthread mutex.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7832>
Christian Gmeiner [Tue, 1 Dec 2020 10:50:22 +0000 (11:50 +0100)]
etnaviv/drm: fix evil-twin etna_drm_table_lock
Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7832>
Iago Toral Quiroga [Tue, 1 Dec 2020 10:52:28 +0000 (11:52 +0100)]
v3dv: don't log out of pool memory errors for internal driver pools
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7848>
Iago Toral Quiroga [Tue, 1 Dec 2020 10:51:02 +0000 (11:51 +0100)]
v3dv: move error string definition to debug path
No point in computing this if debug is disabled.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7848>
Marek Olšák [Sun, 22 Nov 2020 08:39:56 +0000 (03:39 -0500)]
mesa: replace ParameterValueOffset[i] with Parameters[i].ValueOffset
to merge both arrays and remove malloc because both arrays have
the same size.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Thu, 12 Nov 2020 21:41:15 +0000 (16:41 -0500)]
compiler: decrease STATE_LENGTH from 5 to 4
The rework of matrix state vars made the last element unused.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Thu, 12 Nov 2020 21:37:40 +0000 (16:37 -0500)]
st/mesa: fix uninitialized/random clip plane state vars in lower_ucp
Fixes: 584f27326c1 - st/mesa: factor ucp-lowering logic into helper
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Thu, 12 Nov 2020 00:11:09 +0000 (19:11 -0500)]
mesa: allocate the attribute stack on demand
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sat, 3 Oct 2020 04:55:57 +0000 (00:55 -0400)]
mesa: remove gl_texture_object references from glPush/PopAttrib stack
I don't see why this is needed and it's not used anywhere.
As long as apps don't call glDeleteTextures, nothing will release them.
And even if they do, we don't use the saved textures anywhere.
Also, BindTexture will fail for deleted textures anyway, so they can't be
popped. The existing code already binds the Name that was saved, not
the texture object that was saved.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 5 Oct 2020 01:48:51 +0000 (21:48 -0400)]
mesa: more optimizations in glPopAttrib (colormask, drawbuffers, coord replace)
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 5 Oct 2020 01:32:12 +0000 (21:32 -0400)]
mesa: optimize out no-op calls in glPopAttrib
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sun, 4 Oct 2020 06:26:19 +0000 (02:26 -0400)]
mesa: skip _mesa_set_enable in glPopAttrib if there are no changes
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sun, 4 Oct 2020 05:31:30 +0000 (01:31 -0400)]
mesa: reduce the size of gl_texture_attrib_node::Texture by about 90%
Let's get rid of the big memcpy.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sat, 3 Oct 2020 04:48:30 +0000 (00:48 -0400)]
mesa: optimize saving/restoring bound textures for glPush/PopAttrib
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 5 Oct 2020 06:45:03 +0000 (02:45 -0400)]
mesa: reorganize gl_texture and sampler structures for glPush/PopAttrib
Put the fields saved by glPush/PopAttrib into the sub-structure declared
as Attrib. This will make glPush/PopAttrib much faster because it will
only save and restore that structure.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sat, 3 Oct 2020 07:58:01 +0000 (03:58 -0400)]
mesa: add a fast path for restoring light attributes in glPopAttrib
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sat, 3 Oct 2020 07:39:28 +0000 (03:39 -0400)]
mesa: add a fast path for restoring fixed-func tex state in glPopAttrib
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Sat, 3 Oct 2020 05:13:10 +0000 (01:13 -0400)]
mesa: rewrite glPushAttrib/glPopAttrib to get rid of malloc
This was inevitable. This gets rid of the malloc/free calls and chaining
each push group in a linked list. Now the whole attribute stack is declared
statically in gl_context.
Yes, this improves performance a lot.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Tue, 6 Oct 2020 00:10:31 +0000 (20:10 -0400)]
mesa: treat glPopMatrix as a no-op state change if it doesn't change the matrix
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Tue, 6 Oct 2020 01:20:47 +0000 (21:20 -0400)]
mesa: memset matrices at initialization to enable memcpy on it
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Tue, 6 Oct 2020 00:38:51 +0000 (20:38 -0400)]
mesa: canonicalize matrix in glPushMatrix to make glPopMatrix possibly a no-op
If there are no changes to the matrix, we can move pop the stack but not
update any state constants.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Tue, 6 Oct 2020 01:01:31 +0000 (21:01 -0400)]
mesa: consider glPushMatrix a no-op change from the driver perspective
It doesn't change any states.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Tue, 6 Oct 2020 00:02:46 +0000 (20:02 -0400)]
mesa: skip glMultMatrix if the matrix is identity
This happens a lot with viewperf and it causes unnecessary constant buffer
updates.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 5 Oct 2020 09:51:22 +0000 (05:51 -0400)]
mesa: fix crashes in the no_error case of invalid glUniform calls
I copied error conditions from validate_uniform_parameters.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Fri, 2 Oct 2020 19:54:10 +0000 (15:54 -0400)]
st/mesa: replace st_context::state::constants with a mask
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 28 Sep 2020 03:00:22 +0000 (23:00 -0400)]
st/mesa: add a faster path for uploading state parameters into constant buffers
The old path copies state parameters into the parameter list, and then
the driver copies them into a buffer.
The optional new path loads state parameters into a buffer directly.
This increases performance by 5% in one subtest of viewperf.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 28 Sep 2020 02:57:10 +0000 (22:57 -0400)]
gallium: add PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
Marek Olšák [Mon, 28 Sep 2020 02:57:37 +0000 (22:57 -0400)]
mesa: add helpers for drivers to load state parameters into buffers
Drivers should upload only UniformBytes of uniforms and constants,
and then use _mesa_upload_state_parameters to upload state parameters.
This allows removing one copy of state parameters.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>