Mike Blumenkrantz [Thu, 30 Jul 2020 15:05:06 +0000 (11:05 -0400)]
mesa/st: flag ST_NEW_CONSTANTS upon running nir_lower_point_size_mov
this reduces to a load_ubo after optimization, so we need to ensure that
the constant data is put in a buffer instead of relying on it happening
coincidentally
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
Mike Blumenkrantz [Thu, 16 Jul 2020 13:39:16 +0000 (09:39 -0400)]
mesa/st: handle running nir lower passes for ucp and psiz in tess stage
if tess is the last shader program to run then we need to perform these
lowering passes at that time rather than during the vs
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
Mike Blumenkrantz [Thu, 16 Jul 2020 13:20:53 +0000 (09:20 -0400)]
mesa/st: tabs -> spaces in st_program
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
Mike Blumenkrantz [Wed, 15 Jul 2020 12:33:28 +0000 (08:33 -0400)]
mesa/st: do not run lower_psiz_mov on vertex shader if geometry shader is present
this only needs to be changed on the last stage between the two
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
Mike Blumenkrantz [Wed, 8 Jul 2020 15:59:57 +0000 (11:59 -0400)]
mesa/st: run nir_lower_point_size_mov on geometry shaders based on cap
geometry shaders need to output this variable as well, and the variable
added using the pass on the vertex shader won't be passed through here
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
Samuel Pitoiset [Tue, 15 Dec 2020 09:34:59 +0000 (10:34 +0100)]
radv: fix maxFragmentShadingRateRasterizationSamples
It's not a bitfield. This limit is purely informational.
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/8100>
Samuel Pitoiset [Mon, 14 Dec 2020 16:30:11 +0000 (17:30 +0100)]
radv: adjust the maximum number of coverage samples for VRS
It should actually be 4 because the maximum fragment size supported
by the hardware is 2x2.
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/8100>
jzielins [Thu, 17 Dec 2020 13:46:18 +0000 (14:46 +0100)]
swr: Fix crashes on Windows
SWR is missing implementation of pipe_context::flush_resource
function, which is now in the execution path on Windows.
This change adds an empty implementation (flush_resource
is NOOP in SWR) to prevent crashes
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8159>
Erik Faye-Lund [Fri, 18 Dec 2020 09:26:57 +0000 (10:26 +0100)]
docs/features: update list of zink features
There's a few GL4 features that zink already supports.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8158>
Rhys Perry [Fri, 11 Dec 2020 12:01:59 +0000 (12:01 +0000)]
ac/llvm: insert phis before demote kill
LLVM (like NIR) requires phi instructions to be before any other
instructions in the block. ac_branch_exited() can insert non-phi
instructions before visit_block() adds phis, so visit_block() should add
phi instructions before the non-phi instructions ac_branch_exited()
inserts.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: aa757f4f8c3 ("ac/llvm: fix demote inside conditional branches")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8054>
Juan A. Suarez Romero [Thu, 17 Dec 2020 10:22:30 +0000 (11:22 +0100)]
doc/features: add VC4 driver
Include this Broadcom driver in the feature matrix, together with the
implemented extensions.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8137>
Tony Wasserka [Wed, 11 Nov 2020 16:02:49 +0000 (17:02 +0100)]
gitlab: add RADV bug report template
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7551>
Samuel Pitoiset [Thu, 17 Dec 2020 10:06:10 +0000 (11:06 +0100)]
radv: enable TC-compat HTILE for D32_SFLOAT+MSAA on GFX10+
This was disabled due to some depth/stencil resolve CTS failures
which are now fixed.
I figured that disabling TC-compat HTILE for D32_SFLOAT+MSAA reduced
performance in Control by -11% on Vega10. In fact, the game only uses
D32_SFLOAT for depth rendering.
This gives a huge boost in Control on Navi10 (eg. +17% in MSAA4x).
Note that the game is still slower than PRO without MSAA on Navi10,
but as fast (or even a bit faster) on Vega10.
I think TC-compat HILE could also be enabled for D32_SFLOAT_S8_UINT
but it needs more testing first.
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/8143>
Samuel Iglesias Gonsálvez [Mon, 14 Dec 2020 13:05:57 +0000 (14:05 +0100)]
turnip: fix cube map array image size calculation
imageSize() expects the last component of the return value to be the
number of layers in the texture array. In the case of cube map array,
it will return a ivec3, with the third component being the number of
layer-faces.
Fixes: dEQP-VK.image.image_size.cube_array.*
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8087>
Marek Olšák [Sat, 12 Dec 2020 05:47:10 +0000 (00:47 -0500)]
mesa: call Driver.TexParameter in glPopAttrib to fix r100, r200, old nouveau
The glPopAttrib optimizations incorrectly removed it.
Use GL_ALL_ATTRIB_BITS to mean "all texture parameters have changed" to
make it more efficient.
Fixes: d0e18550e26 - mesa: optimize saving/restoring bound textures for glPush/PopAttrib
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Sat, 12 Dec 2020 04:46:42 +0000 (23:46 -0500)]
mesa: don't restore texture state into unbound textures in glPopAttrib
It was a typo, or thinko, sort of.
Fixes: d0e18550e26 - mesa: optimize saving/restoring bound textures for glPush/PopAttrib
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Sun, 22 Nov 2020 22:12:58 +0000 (17:12 -0500)]
mesa: overallocate program parameter values
See the comment. This is something I spotted in the code. There is
no known bug caused by this.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Fri, 11 Dec 2020 21:13:26 +0000 (16:13 -0500)]
mesa: remove unused LastUniformIndex
This is now dead code.
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Fri, 11 Dec 2020 21:04:58 +0000 (16:04 -0500)]
mesa: fix assertion paramList->LastUniformIndex < paramList->FirstStateVarIndex
This changes the code so that program parameters no longer have to be
sorted (meaning uniforms and constants are before state variables).
Instead of checking if the parameter is a state variable for every element,
teach all functions to handle non-state parameters safely. This is better
for the most common case where parameters are sorted or semi-sorted.
The new enum STATE_NOT_STATE_VAR identifes that a parameter is not
a state variable.
Fixes: 63f7d7dd - mesa: take advantage of sorted parameters in _mesa_load_state_parameters
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3914
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Fri, 11 Dec 2020 01:03:50 +0000 (20:03 -0500)]
draw: fix incorrect NIR support code
"state" contains NIR, while "vs->base.state" contains TGSI generated
from NIR. It was a typo.
This fixes the arb_vp subtest of: DRAW_USE_LLVM=1 piglit/bin/rasterpos
Fixes: df11ceaaaf7 - draw: add NIR support to draw_create_vertex_shader
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Marek Olšák [Fri, 11 Dec 2020 00:23:57 +0000 (19:23 -0500)]
nir_to_tgsi: fix NIR options instead of asserting
Drivers can return any NIR options, but nir_to_tgsi doesn't support
any options because it was written to assume certain options are set.
This fixes a regression caused when st/mesa switched to NIR for passing
shaders to the draw module.
Fixes: 44b7e1497f9 - st/mesa: don't generate TGSI for the draw VS because it now supports NIR too
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3949
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3965
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8046>
Eric Anholt [Thu, 17 Dec 2020 20:30:16 +0000 (12:30 -0800)]
freedreno/a6xx: Flush depth at the end of bypass rendering, too.
We apparently don't have anything else making sure that it's flushed in
between use as a render target and use as a texture source, so bypass-mode
depth texture sampling could get stale data.
Fixes consistent (as far as I could see) failures in FD_MESA_DEBUG=nogmem
on:
dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d
dEQP-GLES31.functional.stencil_texturing.render.depth24_stencil8_draw
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8146>
Eric Anholt [Mon, 14 Dec 2020 17:24:58 +0000 (09:24 -0800)]
mesa/st: Finalize the texture before BlitFramebuffer from it.
If the texture hasn't yet been validated, the current tex image contents
may have been ignored in favor of the texture's main miptree. Fixes test
failure on softpipe and intermittent failures on radeonsi in:
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/428
Cc: mesa-stable
Tested-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8091>
Marcin Ślusarz [Tue, 15 Dec 2020 15:06:57 +0000 (16:06 +0100)]
util/list: use helper function in list_is_singular
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 15:00:16 +0000 (16:00 +0100)]
omx: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:59:47 +0000 (15:59 +0100)]
r600: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:59:34 +0000 (15:59 +0100)]
iris: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:59:16 +0000 (15:59 +0100)]
gallium: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:58:24 +0000 (15:58 +0100)]
nine: use list_is_linked
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:56:02 +0000 (15:56 +0100)]
util/list: add list_is_linked
v2: verify node is valid in list_is_linked (Timothy)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:43:21 +0000 (15:43 +0100)]
iris: remove redundant check
list_del dereferences both next and prev, so if only one of them could
be NULL we would get crashes already.
Should fix "Dereference after null check" reported by Coverity.
Code was added in:
64b73b770b7 ("iris: Fix bad external BO hash table and zombie list interactions")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Marcin Ślusarz [Tue, 15 Dec 2020 14:40:50 +0000 (15:40 +0100)]
svga: remove duplicated code
list_del unconditionally sets "next" and "prev" to NULL.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110>
Daniel Schürmann [Wed, 16 Dec 2020 09:33:59 +0000 (10:33 +0100)]
nir/opt_if: split ALU from Phi more aggressively
If the only user is a trivial bcsel which in a second step
can be turned into a phi, this conversion is also worth it
even if the previous result is not undefined or constant.
Allows for some more loop unrolling or saves a few instructions.
Totals from 62 (0.04% of 139391) affected shaders (NAVI10):
SGPRs: 4976 -> 4992 (+0.32%)
VGPRs: 4408 -> 4472 (+1.45%); split: -0.45%, +1.91%
CodeSize: 453632 -> 464000 (+2.29%); split: -0.32%, +2.60%
MaxWaves: 527 -> 511 (-3.04%); split: +0.38%, -3.42%
Instrs: 84940 -> 86681 (+2.05%); split: -0.36%, +2.41%
Cycles:
11946844 ->
11783708 (-1.37%); split: -1.40%, +0.04%
VMEM: 9403 -> 10357 (+10.15%); split: +11.59%, -1.45%
SMEM: 3003 -> 3025 (+0.73%); split: +1.07%, -0.33%
VClause: 1756 -> 1997 (+13.72%); split: -0.11%, +13.84%
SClause: 2914 -> 2915 (+0.03%); split: -0.10%, +0.14%
Copies: 6426 -> 6768 (+5.32%); split: -4.14%, +9.46%
Branches: 2105 -> 2102 (-0.14%); split: -1.66%, +1.52%
PreSGPRs: 2921 -> 2909 (-0.41%); split: -0.55%, +0.14%
PreVGPRs: 4151 -> 4179 (+0.67%); split: -0.24%, +0.92%
cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8123>
Pierre Moreau [Thu, 12 Nov 2020 20:37:21 +0000 (21:37 +0100)]
clover/api: Add extended versioning query for OpenCL C
The cl_khr_extended_versioning extension differs from the OpenCL 3.0
version on this specific as it only reports a single supported OpenCL C
version, whereas the OpenCL 3.0 equivalent will report all of them.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7590>
Pierre Moreau [Thu, 12 Nov 2020 20:31:24 +0000 (21:31 +0100)]
clover/api: Add extended versioning query for built-in kernels
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7590>
Mike Blumenkrantz [Thu, 5 Nov 2020 18:01:24 +0000 (13:01 -0500)]
zink: enable 64bit pipe caps
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 18:01:02 +0000 (13:01 -0500)]
zink: set nir options for 64bit handling based on feature presence
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:58:47 +0000 (12:58 -0500)]
zink: split ubo loading for 64bit types into 2x32bit loads
this loads 2x32 for each 64bit value and then zips it back into 64bit
for storage
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Erik Faye-Lund [Thu, 17 Dec 2020 14:02:07 +0000 (15:02 +0100)]
zink: more conversion ALUs
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:58:21 +0000 (12:58 -0500)]
zink: handle 64bit constant loading in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:57:55 +0000 (12:57 -0500)]
zink: add 64bit glsl basetype handling in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:57:37 +0000 (12:57 -0500)]
zink: change function params and asserts to permit 64bit types in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:56:33 +0000 (12:56 -0500)]
zink: set 64bit shader caps in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Tue, 15 Dec 2020 16:33:10 +0000 (11:33 -0500)]
zink: add handlers for some bitfield ops in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Erik Faye-Lund [Thu, 17 Dec 2020 14:02:33 +0000 (15:02 +0100)]
zink: nir_op_b2f64 implementation
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Dave Airlie [Wed, 22 Jul 2020 00:28:42 +0000 (10:28 +1000)]
zink: add some 64-bit conversion ALUs
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Tue, 15 Dec 2020 16:37:24 +0000 (11:37 -0500)]
zink: support nir_op_f2f32
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Mike Blumenkrantz [Thu, 5 Nov 2020 18:00:23 +0000 (13:00 -0500)]
zink: add handling for 64bit values in spirv_builder
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
Jesse Natalie [Wed, 9 Dec 2020 01:15:19 +0000 (17:15 -0800)]
drisw: Prefer hardware-layered sw-winsys drivers over pure sw
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8128>
Jesse Natalie [Wed, 9 Dec 2020 00:32:03 +0000 (16:32 -0800)]
drisw: Add fallback logic for choosing a driver to use
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8128>
Rhys Perry [Thu, 17 Dec 2020 16:52:24 +0000 (16:52 +0000)]
aco: add block to worklist in mark_block_wqm()
Since we're requiring the branch condition to be in WQM, we have to ensure
that the block is in the worklist.
Fixes Trials Fusion hang at 4K and High settings.
fossil-db (Sienna):
Totals from 216 (0.15% of 139391) affected shaders:
SGPRs: 13392 -> 13360 (-0.24%)
CodeSize:
1321184 ->
1318592 (-0.20%)
Instrs: 255310 -> 254662 (-0.25%)
Cycles:
2178360 ->
2174652 (-0.17%)
Affected fossils in fossil-db are dirt4, nier and youngblood.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3863
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8145>
Mike Blumenkrantz [Thu, 17 Dec 2020 16:12:49 +0000 (11:12 -0500)]
zink: add struct type support for ntv
also interface types since they're the same
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 17 Dec 2020 16:26:32 +0000 (11:26 -0500)]
zink: ntv formatting
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 23 Jul 2020 11:47:14 +0000 (07:47 -0400)]
zink: handle struct derefs in ntv
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 17 Dec 2020 17:31:46 +0000 (12:31 -0500)]
zink: add get_storage_class() ntv util
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Mike Blumenkrantz [Thu, 23 Jul 2020 11:46:15 +0000 (07:46 -0400)]
zink: be more paranoid about array strides in ntv
arraystride is a required decoration for arrays of scalars, so ensure that
we put in some effort on this for the case where an array doesn't specify
an explicit stride
Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
Eric Anholt [Wed, 16 Dec 2020 20:16:22 +0000 (12:16 -0800)]
ci/freedreno: Stop specifying the number of deqp threads
For "0" (its default) deqp-runner picks a number of jobs corresponding to
the CPU count, so set our hardware runners to use that (note that mesa's
deqp-runner.sh will pick a default of 4 if we don't specify a
DEQP_PARALLEL).
This means we'll allocate threads for the slow cores on a630 now, reducing
gles3 runtime from 6.5 minutes to around 5.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8132>
Eric Anholt [Wed, 16 Dec 2020 20:14:26 +0000 (12:14 -0800)]
ci/freedreno: Treat all freedreno deqp runs as saving results.
They've been doing so since the webdav results upload was added. This
means that we'll get normal truncated failures lists with the pointer to
the job artifacts, rather than filling a log file if you broke everything.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8132>
Mike Blumenkrantz [Fri, 23 Oct 2020 16:07:08 +0000 (12:07 -0400)]
zink: add nir pass for splitting 64bit vertex attribs which cross slot boundaries
according to spec, dvec3 and dvec4 vertex attribs require 2 slots (locations),
and so the shader loads have to be explicitly split to reflect this
helpfully, gallium already gives us the vertex element state in a split format,
so no other changes are necessary to have this work as expected
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8141>
Mike Blumenkrantz [Fri, 23 Oct 2020 20:08:40 +0000 (16:08 -0400)]
zink: support frem shader op
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8144>
Danylo Piliaiev [Thu, 17 Dec 2020 12:41:52 +0000 (14:41 +0200)]
tu: pCounterBuffers can be NULL in vkCmd*TransformFeedbackEXT()
According to the spec:
"pCounterBuffers is an optional array of buffer handles [...]
If pCounterBuffers is NULL, then transform feedback will start
capturing vertex data to byte offset zero in all bound transform
feedback buffers."
"If counterBufferCount is not 0, and pCounterBuffers is not NULL,
pCounterBuffers must be a valid pointer to an array [...]"
So counterBufferCount could be non-zero with pCounterBuffers
being NULL.
Fixes crash in RenderDoc when inspecting draw call with tesselation
or geometry shader present.
Fixes: 98b0d900 "turnip: rework streamout state and add missing counter buffer read/writes"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8140>
Danylo Piliaiev [Thu, 17 Dec 2020 11:50:04 +0000 (13:50 +0200)]
tu: Ignore pTessellationState if there is no tesselation shaders
According to the spec:
"pTessellationState [...] is ignored if the pipeline does not
include a tessellation control shader stage and tessellation
evaluation shader stage."
Fixes crash in RenderDoc when inspecting draw call with
geometry shader but without tesselation shaders.
Fixes: eefdca2e "turnip: Parse tess state and support PATCH primtype"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8140>
Mike Blumenkrantz [Thu, 5 Nov 2020 17:52:21 +0000 (12:52 -0500)]
glsl/float64: make this compatible with glsl 330
just a minor tweak
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7483>
Samuel Pitoiset [Thu, 17 Dec 2020 11:01:40 +0000 (12:01 +0100)]
radv: add missing DB flush after depth/stencil resolve operations
I thought this was a bug in CTS but the Vulkan spec says:
"VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT specifies write access
to a color, resolve, or depth/stencil resolve attachment during
a render pass or via certain subpass load and store operations."
So, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT is used to synchronize
depth/stencil resolve attachments. Yes, it's counterintuitive.
This can't actually be fixed properly for now because RADV performs
the end subpass barrier *before* resolve attachments instead of after.
Cc: mesa-stable
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/8138>
Daniel Schürmann [Tue, 15 Dec 2020 15:21:12 +0000 (16:21 +0100)]
aco/ra: fix phi operand renaming
In case one operand was renamed and another operand came
from an incomplete phi, it could happen, that the original
name was not restored.
This has no impact on the code, but ensures correct SSA
is maintained during RA.
Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8109>
Juan A. Suarez Romero [Mon, 14 Dec 2020 12:57:59 +0000 (13:57 +0100)]
ci: Bump deqp to current vulkan-cts-1.2.5.0
This new version contains several fixes.
v1 (Eric):
- Rebuild fail list for freedreno and lavapipe
- Move freedreno crashes to skip list
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3902
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8088>
Pierre-Eric Pelloux-Prayer [Tue, 15 Dec 2020 18:19:22 +0000 (19:19 +0100)]
egl: fix EGL_EXT_protected_content/surface mixup
EGL_EXT_protected_surface introduces EGL_PROTECTED_CONTENT_EXT,
while EGL_EXT_protected_content is about protected context.
When I implemented EGL_EXT_protected_surface I mixed up the 2
names, so this commit fixes it.
Fixes: bd182777c8f ("egl: implement EGL_EXT_protected_surface support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8122>
Erik Faye-Lund [Mon, 14 Dec 2020 11:01:40 +0000 (12:01 +0100)]
lavapipe: implement VK_EXT_index_type_uint8
Since Gallium supports 8 bit indices, this extension is a simple matter
of plumbing a value through, exposing a feature and flipping the switch
for the extension. This lets zink avoid up-converting the index-buffer
before drawing.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8082>
Iago Toral Quiroga [Tue, 15 Dec 2020 08:21:49 +0000 (09:21 +0100)]
v3dv: fix BO list for TFU jobs
Instead of checking whether the source and destination are the same,
we should check if the underlying BOs are the same, since we may
be suballocating resources from the same allocation and the kernel
will fail to execute jobs if the BO list has duplicated entries.
Fixes aborts with Unreal Engine due to failed TFU jobs.
Fixes: 30f1fc25ce ('v3dv: implement TFU blits')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8098>
Iago Toral Quiroga [Tue, 15 Dec 2020 08:20:41 +0000 (09:20 +0100)]
v3dv: fix incorrect slice selection for TFU jobs
Fixes: 30f1fc25ce ('v3dv: implement TFU blits')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8098>
cheyang [Mon, 14 Dec 2020 11:55:28 +0000 (19:55 +0800)]
symbol_table:fix mesa symbol table return scope error
According to the comment of this function,return a non-negative
number for the number of scopes between the current scope and
the scope where a symbol was defined.
Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8084>
Vinson Lee [Wed, 25 Nov 2020 02:51:10 +0000 (18:51 -0800)]
glsl: Initialize glsl_type member name.
Fix defect reported by Coverity Scan.
Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member name is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7766>
Alyssa Rosenzweig [Tue, 15 Dec 2020 00:04:27 +0000 (19:04 -0500)]
docs: Add a stub page for Panfrost
List the supported hardware with some remarks. This page should grow in
the future.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8096>
Michael Forney [Wed, 16 Dec 2020 08:48:25 +0000 (00:48 -0800)]
meson: add missing dependency on generated git_sha1.h
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8121>
Dylan Baker [Wed, 16 Dec 2020 21:58:01 +0000 (13:58 -0800)]
docs: update calendar and link releases notes for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Dylan Baker [Wed, 16 Dec 2020 21:53:03 +0000 (13:53 -0800)]
docs: Add sha256 sums for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Dylan Baker [Wed, 16 Dec 2020 21:40:05 +0000 (13:40 -0800)]
docs: add release notes for 20.2.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8131>
Icecream95 [Wed, 16 Dec 2020 10:00:24 +0000 (23:00 +1300)]
pan/decode: Fix "Access to unknown memory" message formatting
The format string was missing a newline.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 10:14:19 +0000 (23:14 +1300)]
panfrost: Fix negative LOD bias support on Bifrost
The LOD bias can be negative, so mark it as signed in the XML.
The code in pan_cmdstream.c already calls FIXED_16 with
'allow_negative' set to true, so doesn't need to be adjusted.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 10:03:29 +0000 (23:03 +1300)]
pan/gen_pack: Fix signed integer packing
Any excess sign-extend bits would spill into adjacent fields, so mask
off anything after the end bit.
Shift from 2 instead of 1, because there needs to be one extra bit in
the mask as 'end' is inclusive.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Icecream95 [Wed, 16 Dec 2020 09:57:22 +0000 (22:57 +1300)]
panfrost: Split up batches with many jobs
If there are too many jobs in a batch, split it. Although the GPU
theoretically supports 65536 jobs in a batch, set the threshold lower
to avoid GPU timeouts.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>
Erik Faye-Lund [Mon, 7 Dec 2020 20:20:55 +0000 (21:20 +0100)]
zink: map some more formats
These formats correspond to missing vk_format_to_pipe_format formats, so
let's add support for them as well.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:53:31 +0000 (20:53 +0100)]
zink: add format test
This will help avoid future mistakes when mapping formats.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:51:45 +0000 (20:51 +0100)]
zink: fix format-mapping
These formats are incorrectly mapped, and should be reversed.
Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 18:50:04 +0000 (19:50 +0100)]
zink: make zink_format all about raw format-translation
This moves the parts of zink_format.c that also operates on zink_screen
into zink_screen.c. This has the benefit that we can start testing the
enum-translation code separately from the state.
This will make the next commit a bit cleaner.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Erik Faye-Lund [Mon, 7 Dec 2020 19:49:15 +0000 (20:49 +0100)]
zink: convert x8-formats in zink_get_format
This allows us to make zink_pipe_format_to_vk_format a perfectly
roudtripable function.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>
Dylan Baker [Wed, 16 Dec 2020 19:00:45 +0000 (11:00 -0800)]
docs: update calendar and link releases notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:57:25 +0000 (10:57 -0800)]
docs: Add sha256 sums for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:19:43 +0000 (10:19 -0800)]
docs: add release notes for 20.3.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:59:51 +0000 (10:59 -0800)]
docs: update calendar and link releases notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 18:16:23 +0000 (10:16 -0800)]
docs: add sha256 sums for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Dylan Baker [Wed, 16 Dec 2020 17:41:49 +0000 (09:41 -0800)]
docs: add release notes for 20.2.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8129>
Jesse Natalie [Tue, 15 Dec 2020 17:57:43 +0000 (09:57 -0800)]
d3d12: Flush and wait in flush_frontbuffer
If we have a context, make sure any work on it's done before
reading from the render target. There may even be pending
MSAA resolves that haven't been submitted yet.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Mon, 7 Dec 2020 21:19:58 +0000 (13:19 -0800)]
gallium/dri: Add D3D12 software driver option
This lets you use GALLIUM_DRIVER=d3d12 to choose the d3d12
backend with a software winsys.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Fri, 4 Dec 2020 23:39:55 +0000 (15:39 -0800)]
d3d12: Don't require DXIL for WSL
Always use the experimental shader models feature, which allows
unsigned DXIL to be used, so we don't need a libdxil for WSL.
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 22:57:12 +0000 (14:57 -0800)]
d3d12: Support Linux eventfds for fences
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:58:16 +0000 (10:58 -0800)]
d3d12: Only support DXGI and GDI APIs on Windows
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Thu, 10 Dec 2020 01:10:45 +0000 (17:10 -0800)]
d3d12: Only play DLL path tricks on Windows
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:56:03 +0000 (10:56 -0800)]
d3d12: Use u_dl instead of Windows DLL APIs
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>
Jesse Natalie [Tue, 8 Dec 2020 18:17:24 +0000 (10:17 -0800)]
d3d12: Add forward declaration for LUID
This is needed so that the driver can be initialized by
external code without windows.h or winadapter.h.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>