platform/upstream/mesa.git
2 years agozink: drop requirement for 6 descriptorsets to use bindless
Mike Blumenkrantz [Fri, 27 May 2022 18:46:30 +0000 (14:46 -0400)]
zink: drop requirement for 6 descriptorsets to use bindless

compact mode takes care of this

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>

2 years agozink: only infer modifiers if winsys handle has a stride
Mike Blumenkrantz [Thu, 26 May 2022 13:17:44 +0000 (09:17 -0400)]
zink: only infer modifiers if winsys handle has a stride

if no stride is passed, the image creation will fail, so avoid this case

fixes:
spec@ext_external_objects@vk-image-overwrite

Fixes: d79c716331f ("zink: create images with modifiers any time there is an import handle")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16722>

2 years agost,nir: Use nir_shader::xfb_info in nir_lower_io_passes
Jason Ekstrand [Fri, 27 May 2022 18:36:50 +0000 (13:36 -0500)]
st,nir: Use nir_shader::xfb_info in nir_lower_io_passes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoglsl/nir: Stash the xfb_info in the nir_shader when linking XFB
Jason Ekstrand [Fri, 27 May 2022 18:55:18 +0000 (13:55 -0500)]
glsl/nir: Stash the xfb_info in the nir_shader when linking XFB

This pass is used for shaders coming in from SPIR-V.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoglsl/nir: Stop leaking varyings_info
Jason Ekstrand [Fri, 27 May 2022 18:53:07 +0000 (13:53 -0500)]
glsl/nir: Stop leaking varyings_info

Fixes: 34b3b92bbee1 ("nir/xfb: move varyings info out of nir_xfb_info")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoglsl/nir: Populate nir_shader::xfb_info after linking varyings
Jason Ekstrand [Fri, 27 May 2022 17:52:25 +0000 (12:52 -0500)]
glsl/nir: Populate nir_shader::xfb_info after linking varyings

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agonir: Drop nir_shader_get_xfb_info
Jason Ekstrand [Fri, 27 May 2022 17:33:11 +0000 (12:33 -0500)]
nir: Drop nir_shader_get_xfb_info

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoradv: Use nir_gather_xfb_info
Jason Ekstrand [Fri, 27 May 2022 17:30:02 +0000 (12:30 -0500)]
radv: Use nir_gather_xfb_info

Instead of gathering XFB info over and over again every time we even
want to know if the shader uses XFB, gather it once when we compile the
shader and refer to the copy in the NIR.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoturnip: Use nir_gather_xfb_info
Jason Ekstrand [Fri, 27 May 2022 17:03:52 +0000 (12:03 -0500)]
turnip: Use nir_gather_xfb_info

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agolavapipe: Use nir_shader_gather_xfb_info
Jason Ekstrand [Fri, 27 May 2022 16:57:41 +0000 (11:57 -0500)]
lavapipe: Use nir_shader_gather_xfb_info

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agoanv: Use nir_shader_gather_xfb_info
Jason Ekstrand [Fri, 27 May 2022 16:53:43 +0000 (11:53 -0500)]
anv: Use nir_shader_gather_xfb_info

Now that the resulting xfb_info is stashed on the shader, we can put
this with all the other NIR stuff and only fetch it out at the last
minute when we upload the kernel.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agonir: Add a nir_xfb_info to nir_shader
Jason Ekstrand [Tue, 17 May 2022 15:16:55 +0000 (10:16 -0500)]
nir: Add a nir_xfb_info to nir_shader

We want to be able to carry this along with the shader instead of always
having to re-generate it from scratch.  A new nir_gather_xfb_info()
helper is also added which, instead of returning it, adds it to the
shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agonir: Rename nir_gather_xfb_info to nir_shader_get_xfb_info
Jason Ekstrand [Tue, 17 May 2022 15:56:52 +0000 (10:56 -0500)]
nir: Rename nir_gather_xfb_info to nir_shader_get_xfb_info

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>

2 years agonir: Consider PNTC to be a varying
Jesse Natalie [Sat, 28 May 2022 00:19:23 +0000 (17:19 -0700)]
nir: Consider PNTC to be a varying

Fixes: 3528dcdf ("nir: add nir_io_semantics::no_varying, no_sysval_output, and helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6091
Reviewed-by: Marek Ol\9aák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16761>

2 years agost/pbo_compute: fix z coords for compute pbos
Mike Blumenkrantz [Thu, 26 May 2022 18:19:15 +0000 (14:19 -0400)]
st/pbo_compute: fix z coords for compute pbos

without manually taking the value from the global_id vec, this will
end up being offset.y again, which breaks z-indexing

Fixes: e7b95619596 ("gallium: implement compute pbo download")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>

2 years agost/pbo_compute: make compute download conditional in shader slightly more readable
Mike Blumenkrantz [Thu, 26 May 2022 18:52:46 +0000 (14:52 -0400)]
st/pbo_compute: make compute download conditional in shader slightly more readable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>

2 years agost/pbo_compute: use different calc for non-3d compute buffer sizing
Mike Blumenkrantz [Thu, 26 May 2022 18:48:47 +0000 (14:48 -0400)]
st/pbo_compute: use different calc for non-3d compute buffer sizing

this avoids looking at irrelevant 3d pixelstore params like
GL_PACK_IMAGE_HEIGHT when they don't apply, which will cause the storage
buffer to be incorrectly sized and break the operation

Fixes: e7b95619596 ("gallium: implement compute pbo download")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>

2 years agost/pbo_compute: do pbo readback directly to the buffer object if it exists
Mike Blumenkrantz [Tue, 17 May 2022 18:58:35 +0000 (14:58 -0400)]
st/pbo_compute: do pbo readback directly to the buffer object if it exists

no point in copying more than needed

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16802>

2 years agozink: drop largePoints requirement
Mike Blumenkrantz [Fri, 27 May 2022 21:28:02 +0000 (17:28 -0400)]
zink: drop largePoints requirement

this is not required by any version of GL, so don't pretend it's needed

cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16758>

2 years agozink: drop wideLines requirement
Mike Blumenkrantz [Fri, 27 May 2022 21:26:13 +0000 (17:26 -0400)]
zink: drop wideLines requirement

this is not a requirement for any version of GL, so don't pretend it's
a requirement

cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16758>

2 years agozink: remove first_frame stalling
Mike Blumenkrantz [Tue, 31 May 2022 13:56:30 +0000 (09:56 -0400)]
zink: remove first_frame stalling

this is fixed by kopper

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16796>

2 years agoCI: Re-enable Windows builds
Jesse Natalie [Fri, 27 May 2022 16:24:33 +0000 (09:24 -0700)]
CI: Re-enable Windows builds

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agodzn: Update fails/flakes
Jesse Natalie [Fri, 27 May 2022 20:07:02 +0000 (13:07 -0700)]
dzn: Update fails/flakes

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/windows: Move --fraction for deqp-runner to run command line
Jesse Natalie [Fri, 27 May 2022 20:15:21 +0000 (13:15 -0700)]
CI/windows: Move --fraction for deqp-runner to run command line

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/windows: Disable LLVM CMake developer warnings to shrink log size
Jesse Natalie [Fri, 27 May 2022 17:58:43 +0000 (10:58 -0700)]
CI/windows: Disable LLVM CMake developer warnings to shrink log size

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/windows: Disable chocolatey progress printing to shrink log size
Jesse Natalie [Fri, 27 May 2022 17:58:18 +0000 (10:58 -0700)]
CI/windows: Disable chocolatey progress printing to shrink log size

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/windows: Delete comment for installing vulkan-runtime
Jesse Natalie [Fri, 27 May 2022 17:46:06 +0000 (10:46 -0700)]
CI/windows: Delete comment for installing vulkan-runtime

Since we're now actually running Vulkan tests on Dozen, the comment
was wrong and we actually want the runtime. The referenced issue
has been fixed anyway.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/windows: Install Vulkan SDK from LunarG directly isntead of Chocolatey
Jesse Natalie [Fri, 27 May 2022 17:20:23 +0000 (10:20 -0700)]
CI/windows: Install Vulkan SDK from LunarG directly isntead of Chocolatey

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoCI/d3d12: Add skips and update baselines
Jesse Natalie [Fri, 27 May 2022 20:08:33 +0000 (13:08 -0700)]
CI/d3d12: Add skips and update baselines

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agod3d12: Re-add missed bitmasks to shader key comparison
Jesse Natalie [Fri, 27 May 2022 19:47:25 +0000 (12:47 -0700)]
d3d12: Re-add missed bitmasks to shader key comparison

Fixes: a064e63e ("d3d12: Reduce cost of shader key comparisons")
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agonir_lower_task_shader: Fix return from lower_task_intrin (bool, not void*)
Jesse Natalie [Fri, 27 May 2022 18:33:52 +0000 (11:33 -0700)]
nir_lower_task_shader: Fix return from lower_task_intrin (bool, not void*)

Fixes: 8aff8d3d ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16756>

2 years agoaco/tests: update for GFX11's removal of SDWA
Rhys Perry [Fri, 13 May 2022 15:36:53 +0000 (16:36 +0100)]
aco/tests: update for GFX11's removal of SDWA

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco: use v_perm_b32 to copy 0xff00/0x00ff/0xff/0x00
Rhys Perry [Fri, 13 May 2022 14:11:48 +0000 (15:11 +0100)]
aco: use v_perm_b32 to copy 0xff00/0x00ff/0xff/0x00

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco: disable sdwa on gfx11
Rhys Perry [Fri, 13 May 2022 11:01:03 +0000 (12:01 +0100)]
aco: disable sdwa on gfx11

Instead of SDWA v_mov_b32/v_xor_b32, we can use a combination of
v_add_u16/v_sub_u16 (add/sub swap, similar to xor swap) and v_perm_b32
with a literal.

I don't know yet if GFX11 adds any new instructions which makes this
easier, but this approach should have full functionality.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco/tests: fix gfx11 variants printed as gfx12
Rhys Perry [Fri, 13 May 2022 14:27:31 +0000 (15:27 +0100)]
aco/tests: fix gfx11 variants printed as gfx12

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco/tests: disable regalloc.subdword_alloc.reuse_16bit_operands on GFX11
Rhys Perry [Fri, 13 May 2022 14:27:12 +0000 (15:27 +0100)]
aco/tests: disable regalloc.subdword_alloc.reuse_16bit_operands on GFX11

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco: clarify a portion of do_pack_2x16
Rhys Perry [Fri, 13 May 2022 12:49:49 +0000 (13:49 +0100)]
aco: clarify a portion of do_pack_2x16

This confused me a bit when I first saw it.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agoaco: use p_parallelcopy for uniform reduction with zero source
Rhys Perry [Fri, 13 May 2022 12:39:01 +0000 (13:39 +0100)]
aco: use p_parallelcopy for uniform reduction with zero source

I think v_mov_b32 was only used because a sub-dword p_parallelcopy
couldn't take constants on some gfx levels. That shouldn't be the case
anymore.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16595>

2 years agov3d: expose GL_ARB_draw_buffers_blend
Juan A. Suarez Romero [Fri, 27 May 2022 11:32:50 +0000 (13:32 +0200)]
v3d: expose GL_ARB_draw_buffers_blend

This automatically exposes GL_OES_draw_buffers_indexed too.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16747>

2 years agov3d: fix blending for mixed RT formats
Juan A. Suarez Romero [Fri, 27 May 2022 11:12:11 +0000 (13:12 +0200)]
v3d: fix blending for mixed RT formats

Blending configuration needs to be adapted in case the RT format does
not have an alpha channel. This is handled so far correctly.

But when we have two RT, one with alpha and other without it, we need
to split the blend configuration, so one is adapted and the other not.

Otherwise we would be changing the blend config for the wrong RT.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16747>

2 years agoci: bump VK-GL-CTS to 1.3.2.0
Juan A. Suarez Romero [Tue, 31 May 2022 09:23:35 +0000 (11:23 +0200)]
ci: bump VK-GL-CTS to 1.3.2.0

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16689>

2 years agozink: lower subgroup width to 1 for unsupported subgroup vote stages
Mike Blumenkrantz [Tue, 31 May 2022 13:02:06 +0000 (09:02 -0400)]
zink: lower subgroup width to 1 for unsupported subgroup vote stages

this should handle unsupported gfx subgroup vote

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>

2 years agozink: fix subgroup vote detection
Mike Blumenkrantz [Fri, 27 May 2022 20:40:10 +0000 (16:40 -0400)]
zink: fix subgroup vote detection

this is uses the 1.1 features, not 1.3

also check the shader stages available since the GL extension requires
all of them

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>

2 years agozink: use correct scope for subgroup vote ops
Mike Blumenkrantz [Fri, 27 May 2022 21:03:43 +0000 (17:03 -0400)]
zink: use correct scope for subgroup vote ops

this is restricted to subgroup for vulkan use

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>

2 years agozink: emit spirv cap for subgroup vote ops
Mike Blumenkrantz [Fri, 27 May 2022 21:03:29 +0000 (17:03 -0400)]
zink: emit spirv cap for subgroup vote ops

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>

2 years agozink: require draw params ext/cap in ntv if drawid is used
Mike Blumenkrantz [Fri, 27 May 2022 20:16:04 +0000 (16:16 -0400)]
zink: require draw params ext/cap in ntv if drawid is used

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16757>

2 years agonir: Add a correctness note for nir_lower_phis_to_regs_block
Jason Ekstrand [Mon, 30 May 2022 23:57:58 +0000 (18:57 -0500)]
nir: Add a correctness note for nir_lower_phis_to_regs_block

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16111>

2 years agonir: Handle register sources in lower_phis_to_regs_block
Jason Ekstrand [Fri, 22 Apr 2022 21:37:37 +0000 (16:37 -0500)]
nir: Handle register sources in lower_phis_to_regs_block

During certain control-flow manipulation passes, we go out-of-SSA
temporarily in certain areas of the code to make control-flow
manipulation easier.  This can result in registers being in phi sources
temporarily.  If two sub-passes run before we get a chance to do
clean-up, we can end up doing some out-of-SSA and then a bit more
out-of-SSA and trigger this case.  It's easy enough to handle.

Fixes: a620f66872c2 ("nir: Add a couple quick-and-dirty out-of-SSA helpers")
Fixes: 79a987ad2a1e ("nir/opt_if: also merge break statements with ones after the branch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6370
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16111>

2 years agoisl: Add some asserts about multisampled surfaces
Jason Ekstrand [Mon, 30 May 2022 14:52:10 +0000 (09:52 -0500)]
isl: Add some asserts about multisampled surfaces

This isn't really necessary because the API doesn't allow MSAA and
mipmapping at the same time but people forget that pretty often so it's
good to have it as documentation if nothing else.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14129>

2 years agoanv: Implement VK_EXT_image_view_min_lod
Jason Ekstrand [Tue, 6 Jul 2021 15:59:49 +0000 (10:59 -0500)]
anv: Implement VK_EXT_image_view_min_lod

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14129>

2 years agointel/isl: Add isl_view::min_lod_clamp for IVB+
Jason Ekstrand [Tue, 6 Jul 2021 15:54:28 +0000 (10:54 -0500)]
intel/isl: Add isl_view::min_lod_clamp for IVB+

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14129>

2 years agovulkan/runtime: Add min_lod to vk_image_view
Jason Ekstrand [Wed, 8 Dec 2021 22:45:33 +0000 (16:45 -0600)]
vulkan/runtime: Add min_lod to vk_image_view

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14129>

2 years agoradeonsi: enable use_waterfall_for_divergent_tex_samplers
Pierre-Eric Pelloux-Prayer [Wed, 25 May 2022 14:05:39 +0000 (16:05 +0200)]
radeonsi: enable use_waterfall_for_divergent_tex_samplers

And run the nir_divergence_analysis pass in si_get_nir_shader to make
sure it's up to date.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2253
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16709>

2 years agoac/llvm: add use_waterfall_for_divergent_tex_samplers option
Pierre-Eric Pelloux-Prayer [Wed, 25 May 2022 13:57:53 +0000 (15:57 +0200)]
ac/llvm: add use_waterfall_for_divergent_tex_samplers option

GLSL says that indexing in a samplers array should be done with
a dynamically uniform value.

If the app doesn't obey this constraint, it'll get incorrect
results.

But there's one case where the app might be correct and yet
get incorrect result: if 2 consecutive draws are used, with no
state changes in between, the hardware might run them in the
same wave and the app will get incorrect result as-if it was
using non-dynamically uniform index.

To prevent this, this commit takes advantage of the divergence
analysis pass - if the index is marked as divergent, then it will
have the same effect as using ACCESS_NON_UNIFORM in SPIR-V.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16709>

2 years agonir/gce: pin call instructions
Karol Herbst [Tue, 26 Apr 2022 19:22:43 +0000 (21:22 +0200)]
nir/gce: pin call instructions

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16202>

2 years agonir/gather_info: allow to run it before inlining
Karol Herbst [Tue, 26 Apr 2022 15:12:07 +0000 (17:12 +0200)]
nir/gather_info: allow to run it before inlining

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16202>

2 years agonv50: Fix tlsSpace alignment
M Henning [Wed, 18 May 2022 19:38:26 +0000 (15:38 -0400)]
nv50: Fix tlsSpace alignment

Commit d1ff453a added this alignment in the wrong spot - it needs to
happen after RA because spilling can increment this 32 bits at a time.
Also assert that we align this correctly now.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16596>

2 years agoac/nir/taskmesh: Use 3 dimensional workgroup ID.
Timur Kristóf [Thu, 26 May 2022 11:36:14 +0000 (13:36 +0200)]
ac/nir/taskmesh: Use 3 dimensional workgroup ID.

For the sake of consistency, do not rely on a 1-dimensional
workgroup ID anymore.

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/16721>

2 years agoac/nir/taskmesh: Use task shader lowering from common NIR code.
Timur Kristóf [Thu, 26 May 2022 11:35:24 +0000 (13:35 +0200)]
ac/nir/taskmesh: Use task shader lowering from common NIR code.

This also implements task_payload atomics for RADV.

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/16721>

2 years agoradv, ac/nir: Fix multiview layer export for mesh shaders.
Timur Kristóf [Fri, 13 May 2022 19:32:12 +0000 (21:32 +0200)]
radv, ac/nir: Fix multiview layer export for mesh shaders.

Unfortunately, radv_lower_multiview is not suitable for mesh shaders
because it can't know the mapping between API mesh shader
invocations and output primitives.

Additionally, when lowering view id to layer, it must be created
as a per-primitive PS input.

Fixes: d32656bc65a7c0165e53d551e23462d626bbf870
Signed-off-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/16504>

2 years agolima/ci: reenable lima-mali450-piglit-gpu:arm64
Erico Nunes [Fri, 20 May 2022 15:25:15 +0000 (17:25 +0200)]
lima/ci: reenable lima-mali450-piglit-gpu:arm64

With the kernel uprev we are no longer affected by the kernel
regression that was causing issues.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16641>

2 years agolima/ci: update piglit ci expectations
Erico Nunes [Tue, 24 May 2022 12:24:50 +0000 (14:24 +0200)]
lima/ci: update piglit ci expectations

This new test reports a failure and started to run during the time
piglit runs were temporarily disabled.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16641>

2 years agoci: update docs for linux kernel uprevs
Erico Nunes [Fri, 20 May 2022 15:23:53 +0000 (17:23 +0200)]
ci: update docs for linux kernel uprevs

Update a few paths that have changed since this doc was first submitted.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16641>

2 years agoci: update linux kernel to v5.17
Erico Nunes [Fri, 20 May 2022 15:21:21 +0000 (17:21 +0200)]
ci: update linux kernel to v5.17

In addition to pushing it to the current latest stable, the v5.17 kernel
for mesa CI pulls a patch to address a regression in drm that affects at
least the lima jobs.

The dtb for sc7180-trogdor-lazor-limozeen-nots is also updated since the
old one no longer exists in v5.17.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16641>

2 years agov3dv: limit sync for barriers to hw queues selected by source mask
Iago Toral Quiroga [Mon, 30 May 2022 07:12:22 +0000 (09:12 +0200)]
v3dv: limit sync for barriers to hw queues selected by source mask

Until know when we consumed a barrier we would implement it by
setting the serialize flag on a job, which would cause it to
be serialized across all hardware queues (CL, CSD, TFU). However,
now that we track the source(s) of the barrier, we can restrict this
to only the relevant queue(s) instead (multisync path only).

It should be noted that we can implement transfers via TFU or CL
jobs, so if the source of a barrier is a transfer, we currently
synchronize against both the TFU and the CL queues, however, we
may be able to more effectively track this in the future to
restrict this to just one of the queues.

Also, for secondary command buffers we are taking the easy way
out and always synchronize against all queues, but we should
be able to do the same for secondaries without too much effort.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>

2 years agov3dv: track sources of barriers
Iago Toral Quiroga [Mon, 30 May 2022 06:52:31 +0000 (08:52 +0200)]
v3dv: track sources of barriers

Until now we have been tracking the dstStageMask of barriers (where they
are consumed) but not where they are produced (the srcStageMask). With
this change we extend our barrier state to keep track of this as well.

This allows the driver to have better knowledge of the intended barrier
semantics so it can limit the amount of synchronization it does only
to the source stages involved with a barrier. We will do this in a
later patch.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>

2 years agov3dv: use an explicit struct type to track barrier state
Iago Toral Quiroga [Mon, 30 May 2022 06:31:17 +0000 (08:31 +0200)]
v3dv: use an explicit struct type to track barrier state

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>

2 years agov3dv: only clear BCL barrier state if we don't have pending graphics barriers
Iago Toral Quiroga [Mon, 30 May 2022 06:04:04 +0000 (08:04 +0200)]
v3dv: only clear BCL barrier state if we don't have pending graphics barriers

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>

2 years agov3dv: consume barriers at the right stages
Iago Toral Quiroga [Wed, 25 May 2022 11:56:33 +0000 (13:56 +0200)]
v3dv: consume barriers at the right stages

Until now, we have always consumed barriers with the next GPU job
recorded into the command buffer after the barrier even if the job
was not the target of the barrier itself. This works based on the
idea that when we consume a barrier in a job we serialize it against
all queues, so effectively we are ensuring that whatever came
before it has completed, so if the barrier was intended for an
even later job, it would have served its purpose anyway.

It should be noted that CL jobs are special because they are actually
split in two different queues: the binning queue and the render
queue, with a dependency between them to ensure render runs after
binning. With our current implementation, if we have 3 jobs (A, B,
C) and we have a barrier after job A which is intended to block job C
on A's completion, with our implementation we would instead block
B on A's completion. If C is a CL job, and the barrier was targetting
the binning stage then we can have the following scenarios:

1. If B) is a CL job, it will consume the barrier at its binning
   stage, so we know that B's binning will not start until A has
   completed. Then C's binning will not start until B's binning
   has completed, and thus, will not start until A has completed,
   as intended.

2. If B) is not a CL job, it will consume the barrier and will not
   start until A has completed, however, C's binning job will be
   submitted to the binning queue without any sync requirements
   and since B did not put any jobs in the binning queue it will
   start as soon as A's binning has completed, but not A's render,
   which would be incorrect.

Further, since a981ac0539 we now skip consumming BCL barriers if
a job does not have draw calls that can be affected by them. In the
same scenarios as before, now case 1) would also be problematic,
since B may skip the binning sync in that case and start immediately,
and since C's binning would be allowe to start immediately after B's
binning, there is no guarantee that this doesn't happen in parallel
with A's render.

With this patch we fix this situation by tracking the intended
consumer of each barrier: graphics, compute or transfer, and we make
sure to consume them only with jobs that match those semantics.

This fixes flakyness in dEQP-VK.device_group.*

Fixes: a981ac0539 ('v3dv: skip binning sync if binning shaders don't access external resources')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16743>

2 years agoac/gpu_info: always retile DCC on gfx10 and newer chips
Marek Olšák [Thu, 26 May 2022 15:55:08 +0000 (11:55 -0400)]
ac/gpu_info: always retile DCC on gfx10 and newer chips

Unaligned DCC doesn't work there.

Fixes: f8cf5ea982a - amd: add support for gfx1036 and gfx1037 chips

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16726>

2 years agoamd: Initialize Gfx11Lib members in constructor.
Vinson Lee [Mon, 23 May 2022 23:39:10 +0000 (16:39 -0700)]
amd: Initialize Gfx11Lib members in constructor.

Fix defects reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_numPkrLog2 is not initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member m_numSaLog2 is not initialized in this constructor nor in any functions that it calls.

Fixes: 4fdf42b3c29 ("amd: import gfx11 addrlib")
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/16679>

2 years agonv50/ir: fix ALD/AST where address comes from AL2P
Ben Skeggs [Mon, 8 Nov 2021 05:33:54 +0000 (15:33 +1000)]
nv50/ir: fix ALD/AST where address comes from AL2P

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16784>

2 years agonv50/ir: fix scope of memory ops on ampere
Ben Skeggs [Fri, 5 Nov 2021 23:51:59 +0000 (09:51 +1000)]
nv50/ir: fix scope of memory ops on ampere

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16784>

2 years agonv50/ir: fix OUT.FINAL on ampere
Ben Skeggs [Fri, 5 Nov 2021 05:58:36 +0000 (15:58 +1000)]
nv50/ir: fix OUT.FINAL on ampere

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16784>

2 years agonv50/ir: recoginse Ampere
Karol Herbst [Mon, 30 May 2022 21:39:59 +0000 (23:39 +0200)]
nv50/ir: recoginse Ampere

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16784>

2 years agoir3: handle intrinsic_load_draw_id when scanning driver constants
Hyunjun Ko [Mon, 30 May 2022 06:26:15 +0000 (06:26 +0000)]
ir3: handle intrinsic_load_draw_id when scanning driver constants

Fixes: #6567

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16769>

2 years agonir/gcm: fix pushing instructions into if blocks
Timothy Arceri [Mon, 7 Feb 2022 08:10:13 +0000 (19:10 +1100)]
nir/gcm: fix pushing instructions into if blocks

The previous logic would just set the block to the instructions
original location if we couldn't evict it from a loop.

For now we only push const loads to a later block inside ifs
but we can add more heuristics later. This change helps a
hand full of shaders but also stops a CTS regression caused
by excess spilling after a series I'm working on to disable
more of the GLSL IR optimisation passes.

Shader-db results iris (BDW):

total instructions in shared programs: 17529759 -> 17529749 (<.01%)
instructions in affected programs: 15929 -> 15919 (-0.06%)
helped: 5
HURT: 2
helped stats (abs) min: 1 max: 5 x̄: 2.40 x̃: 2
helped stats (rel) min: 0.06% max: 0.15% x̄: 0.11% x̃: 0.12%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.06% max: 0.06% x̄: 0.06% x̃: 0.06%
95% mean confidence interval for instructions value: -3.34 0.49
95% mean confidence interval for instructions %-change: -0.14% 0.02%
Inconclusive result (value mean confidence interval includes 0).

total cycles in shared programs: 861109994 -> 861099681 (<.01%)
cycles in affected programs: 7027698 -> 7017385 (-0.15%)
helped: 95
HURT: 72
helped stats (abs) min: 1 max: 7995 x̄: 138.54 x̃: 9
helped stats (rel) min: <.01% max: 15.96% x̄: 0.54% x̃: 0.11%
HURT stats (abs)   min: 1 max: 474 x̄: 39.56 x̃: 12
HURT stats (rel)   min: <.01% max: 1.17% x̄: 0.20% x̃: 0.11%
95% mean confidence interval for cycles value: -159.05 35.54
95% mean confidence interval for cycles %-change: -0.45% 0.01%
Inconclusive result (value mean confidence interval includes 0).

total spills in shared programs: 17606 -> 17605 (<.01%)
spills in affected programs: 323 -> 322 (-0.31%)
helped: 1
HURT: 0

total fills in shared programs: 22599 -> 22598 (<.01%)
fills in affected programs: 1348 -> 1347 (-0.07%)
helped: 1
HURT: 0

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14940>

2 years agoci: traces: temporarily disable nheko trace
David Heidelberg [Mon, 30 May 2022 11:04:20 +0000 (13:04 +0200)]
ci: traces: temporarily disable nheko trace

Disable nheko trace until apitrace gets fixed.
apitrace currently fails with this trace, when more than 1 run is
requested.

Upstream issue: https://github.com/apitrace/apitrace/issues/800

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16774>

2 years agopan/bi: Interpolate varyings at 16-bit
Alyssa Rosenzweig [Fri, 27 May 2022 18:39:14 +0000 (14:39 -0400)]
pan/bi: Interpolate varyings at 16-bit

On Bifrost, we have a single "load float varying" instruction that controls the
bit size of the result, allowing us to fold a f2f16 into the load. However, the
larger benefit is that 16-bit varying loads are interpolated at 16-bit. Arm
claims that the varying unit has a 32-bit data path, allowing 16-bit varyings to
be interpolated in half the cycles from 32-bit. This change should therefore
improve performance for workloads that are varying units. This means we want to
be aggressive about 16-bit varying loads, even if it costs some extra f2f32
instructions.

glmark2 total score on Mali-G52 up from 1173fps to 1218fps with particular wins
in -brefract, -bshadow, -bjellyfish, and -bshading.

total instructions in shared programs: 2432246 -> 2423668 (-0.35%)
instructions in affected programs: 516056 -> 507478 (-1.66%)
helped: 3641
HURT: 432
helped stats (abs) min: 1.0 max: 12.0 x̄: 2.91 x̃: 2
helped stats (rel) min: 0.08% max: 54.55% x̄: 9.88% x̃: 5.71%
HURT stats (abs)   min: 1.0 max: 42.0 x̄: 4.71 x̃: 4
HURT stats (rel)   min: 0.23% max: 200.00% x̄: 12.58% x̃: 6.37%
95% mean confidence interval for instructions value: -2.21 -2.00
95% mean confidence interval for instructions %-change: -7.92% -7.07%
Instructions are helped.

total tuples in shared programs: 1941309 -> 1934647 (-0.34%)
tuples in affected programs: 353169 -> 346507 (-1.89%)
helped: 3233
HURT: 453
helped stats (abs) min: 1.0 max: 14.0 x̄: 2.46 x̃: 2
helped stats (rel) min: 0.12% max: 50.00% x̄: 9.90% x̃: 5.56%
HURT stats (abs)   min: 1.0 max: 25.0 x̄: 2.85 x̃: 2
HURT stats (rel)   min: 0.22% max: 150.00% x̄: 8.96% x̃: 5.26%
95% mean confidence interval for tuples value: -1.89 -1.72
95% mean confidence interval for tuples %-change: -8.01% -7.15%
Tuples are helped.

total clauses in shared programs: 357354 -> 356610 (-0.21%)
clauses in affected programs: 25794 -> 25050 (-2.88%)
helped: 994
HURT: 317
helped stats (abs) min: 1.0 max: 3.0 x̄: 1.16 x̃: 1
helped stats (rel) min: 1.49% max: 33.33% x̄: 10.78% x̃: 10.00%
HURT stats (abs)   min: 1.0 max: 4.0 x̄: 1.31 x̃: 1
HURT stats (rel)   min: 1.19% max: 50.00% x̄: 13.56% x̃: 8.33%
95% mean confidence interval for clauses value: -0.63 -0.50
95% mean confidence interval for clauses %-change: -5.63% -4.16%
Clauses are helped.

total cycles in shared programs: 167697.96 -> 167431.15 (-0.16%)
cycles in affected programs: 12638.29 -> 12371.48 (-2.11%)
helped: 2652
HURT: 350
helped stats (abs) min: 0.04166399999999726 max: 0.75 x̄: 0.11 x̃: 0
helped stats (rel) min: 0.12% max: 100.00% x̄: 14.39% x̃: 5.04%
HURT stats (abs)   min: 0.041665999999999315 max: 0.5833329999999997 x̄: 0.11 x̃: 0
HURT stats (rel)   min: 0.00% max: 75.00% x̄: 7.90% x̃: 4.71%
95% mean confidence interval for cycles value: -0.09 -0.08
95% mean confidence interval for cycles %-change: -12.56% -11.02%
Cycles are helped.

total arith in shared programs: 74169.46 -> 73891.71 (-0.37%)
arith in affected programs: 13885.87 -> 13608.12 (-2.00%)
helped: 3215
HURT: 445
helped stats (abs) min: 0.04166399999999726 max: 0.5416680000000014 x̄: 0.10 x̃: 0
helped stats (rel) min: 0.12% max: 100.00% x̄: 14.16% x̃: 6.67%
HURT stats (abs)   min: 0.041665999999999315 max: 1.125 x̄: 0.12 x̃: 0
HURT stats (rel)   min: 0.00% max: 100.00% x̄: 9.76% x̃: 5.49%
95% mean confidence interval for arith value: -0.08 -0.07
95% mean confidence interval for arith %-change: -11.91% -10.59%
Arith are helped.

total texture in shared programs: 11936 -> 11931 (-0.04%)
texture in affected programs: 20 -> 15 (-25.00%)
helped: 10
HURT: 0
helped stats (abs) min: 0.5 max: 0.5 x̄: 0.50 x̃: 0
helped stats (rel) min: 14.29% max: 100.00% x̄: 45.71% x̃: 33.33%
95% mean confidence interval for texture value: -0.50 -0.50
95% mean confidence interval for texture %-change: -73.16% -18.26%
Texture are helped.

total vary in shared programs: 4180.88 -> 3447.19 (-17.55%)
vary in affected programs: 2109.88 -> 1376.19 (-34.77%)
helped: 2202
HURT: 39
helped stats (abs) min: 0.0625 max: 1.4375 x̄: 0.34 x̃: 0
helped stats (rel) min: 2.38% max: 66.67% x̄: 40.43% x̃: 50.00%
HURT stats (abs)   min: 0.125 max: 0.375 x̄: 0.26 x̃: 0
HURT stats (rel)   min: 0.00% max: 300.00% x̄: 92.54% x̃: 23.08%
95% mean confidence interval for vary value: -0.34 -0.32
95% mean confidence interval for vary %-change: -39.22% -37.01%
Vary are helped.

total quadwords in shared programs: 1689664 -> 1684852 (-0.28%)
quadwords in affected programs: 265522 -> 260710 (-1.81%)
helped: 2864
HURT: 447
helped stats (abs) min: 1.0 max: 14.0 x̄: 2.10 x̃: 2
helped stats (rel) min: 0.15% max: 31.58% x̄: 6.05% x̃: 4.65%
HURT stats (abs)   min: 1.0 max: 22.0 x̄: 2.67 x̃: 2
HURT stats (rel)   min: 0.27% max: 38.46% x̄: 6.79% x̃: 4.55%
95% mean confidence interval for quadwords value: -1.54 -1.37
95% mean confidence interval for quadwords %-change: -4.55% -4.08%
Quadwords are helped.

total threads in shared programs: 53656 -> 53688 (0.06%)
threads in affected programs: 32 -> 64 (100.00%)
helped: 32
HURT: 0
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00%
95% mean confidence interval for threads value: 1.00 1.00
95% mean confidence interval for threads %-change: 100.00% 100.00%
Threads are helped.

total preloads in shared programs: 116212 -> 103476 (-10.96%)
preloads in affected programs: 45222 -> 32486 (-28.16%)
helped: 3022
HURT: 11
helped stats (abs) min: 1.0 max: 11.0 x̄: 4.23 x̃: 4
helped stats (rel) min: 7.14% max: 68.75% x̄: 30.39% x̃: 25.00%
HURT stats (abs)   min: 2.0 max: 4.0 x̄: 3.45 x̃: 4
HURT stats (rel)   min: 14.29% max: 50.00% x̄: 25.93% x̃: 25.00%
95% mean confidence interval for preloads value: -4.26 -4.14
95% mean confidence interval for preloads %-change: -30.68% -29.69%
Preloads are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Chris Healy cphealy@gmail.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16752>

2 years agopan/bi: Model Valhall source formats
Alyssa Rosenzweig [Mon, 30 May 2022 19:29:56 +0000 (15:29 -0400)]
pan/bi: Model Valhall source formats

LD_VAR_BUF instructions on Valhall take a source format, indicating the
in-memory format of the varying independent from the register format, which we
still model within the compiler for compatibility with Bifrost. (Prior to
Valhall, source format is specified in the attribute descriptor as a physical
pixel format.)

Model this information, allowing us to generate fp16 LD_VAR_BUF instructions
correctly on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16752>

2 years agopan/bi: Make LD_VAR w=format instead of w=vecsize
Alyssa Rosenzweig [Fri, 27 May 2022 19:32:59 +0000 (15:32 -0400)]
pan/bi: Make LD_VAR w=format instead of w=vecsize

Fixes a vector dimension validation failure in
dEQP-GLES3.functional.shaders.indexing.varying_array.vec4_static_write_dynamic_read
after we enable fp16 varyings.

No shader-db changes, as we don't yet support fp16 varyings.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16752>

2 years agopan/va: Fill in missing src_flat16 enum
Alyssa Rosenzweig [Mon, 30 May 2022 19:28:09 +0000 (15:28 -0400)]
pan/va: Fill in missing src_flat16 enum

Valhall gains(?) the ability to flatshade 16-bit varyings, this is indicated by
a particular source format.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16752>

2 years agopan/bi: Add VAR_TEX fusing unit test
Alyssa Rosenzweig [Fri, 27 May 2022 18:13:40 +0000 (14:13 -0400)]
pan/bi: Add VAR_TEX fusing unit test

As fusing VAR_TEX is an optimization, it's helpful to have unit tests since
functional tests won't check that the optimization triggers when expected.
Originally written when I was touching the VAR_TEX code. Those changes have
since been dropped by the unit test remains useful.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16752>

2 years agoradv: Use vk_buffer
Konstantin Seurer [Sat, 28 May 2022 10:11:20 +0000 (12:11 +0200)]
radv: Use vk_buffer

Use vk_buffer as a base for radv_buffer and
replace manual handling of VK_WHOLE_SIZE with
vk_buffer_range.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16764>

2 years agovulkan: Use the correct enum in vk_buffer
Konstantin Seurer [Sat, 28 May 2022 09:34:11 +0000 (11:34 +0200)]
vulkan: Use the correct enum in vk_buffer

VkBufferCreateFlags is correct.

Fixes: f6ae21b ("vulkan: Add a base struct for buffers")
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16764>

2 years agomesa: Drop dead #include "sparc/sparc.h"
Matt Turner [Sun, 29 May 2022 18:25:37 +0000 (14:25 -0400)]
mesa: Drop dead #include "sparc/sparc.h"

sparc.h was removed in when the classic drivers were removed. It only
contained a prototype for _mesa_init_all_sparc_transform_asm() which
wasn't even called by context.c. Remove the #include to fix the build on
sparc.

Fixes: e030d5ba8ac ("mesa: Delete libmesa_classic")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6425
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16765>

2 years agoaco/ra: fix usage of invalidated iterator
Rhys Perry [Wed, 11 May 2022 14:10:22 +0000 (15:10 +0100)]
aco/ra: fix usage of invalidated iterator

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 58bd9a379ef ("aco/ra: fix live-range splits of phi definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16454>

2 years agopan/bi: Don't allow spilling coverage mask writes
Alyssa Rosenzweig [Fri, 27 May 2022 15:36:01 +0000 (11:36 -0400)]
pan/bi: Don't allow spilling coverage mask writes

The register precolouring logic assumes that coverage masks are always in R60,
so spilling them causes incorrect results. We could do better. Fixes on Valhall:

   dEQP-GLES3.functional.ubo.random.all_per_block_buffers.28

Fixes: 3df5446cbd4 ("pan/bi: Simplify register precolouring in the IR")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16748>

2 years agopanfrost: Set allow_rotating_primitives
Alyssa Rosenzweig [Fri, 27 May 2022 13:06:31 +0000 (09:06 -0400)]
panfrost: Set allow_rotating_primitives

On Valhall, the driver should set this flag if the hardware may rotate
primitives. This happens if:

1. The rasterization of lines does not matter, AND
2. The provoking vertex does not matter.

The first condition we may satisfy by checking for LINES and the second by
checking for flat shading. Otherwise, we should set this flag to allow
optimizations. This may be more efficient for tiling.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16748>

2 years agopanfrost: Set overdraw_alpha[01] flags
Alyssa Rosenzweig [Fri, 27 May 2022 12:46:46 +0000 (08:46 -0400)]
panfrost: Set overdraw_alpha[01] flags

These basically correspond to the alpha_zero_nop and alpha_one_store flags we
already compute and set. Except those flags don't exist on Valhall, so these
need to be used instead (on Bifrost, in addition .. unclear why the duplication
on Bifrost).

Set these flags when we can. Ostensibly this is for performance (neglible
improvement on glmark2 score), but mostly I want to get us using the hardware
optimally.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16748>

2 years agopanfrost: Allow FPK on Valhall
Alyssa Rosenzweig [Wed, 25 May 2022 21:29:17 +0000 (17:29 -0400)]
panfrost: Allow FPK on Valhall

Reuse the logic from Bifrost for a performance win.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16748>

2 years agoradv: init states from VkPipelineFragmentShadingRateState at only one place
Samuel Pitoiset [Mon, 23 May 2022 09:33:30 +0000 (11:33 +0200)]
radv: init states from VkPipelineFragmentShadingRateState at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from VkPipelineDiscardRectangleState at only one place
Samuel Pitoiset [Fri, 20 May 2022 13:44:57 +0000 (15:44 +0200)]
radv: init states from VkPipelineDiscardRectangleState at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from VkAttachmentSampleCountInfo at only one place
Samuel Pitoiset [Fri, 20 May 2022 13:25:12 +0000 (15:25 +0200)]
radv: init states from VkAttachmentSampleCountInfo at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from pColorBlendState at only one place
Samuel Pitoiset [Fri, 20 May 2022 11:44:42 +0000 (13:44 +0200)]
radv: init states from pColorBlendState at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: use AMD values for computing blend related state
Samuel Pitoiset [Fri, 20 May 2022 09:56:11 +0000 (11:56 +0200)]
radv: use AMD values for computing blend related state

This will allow to translate the function and factors earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from VkPipelineRenderingCreateInfo at only one place
Samuel Pitoiset [Fri, 20 May 2022 06:25:13 +0000 (08:25 +0200)]
radv: init states from VkPipelineRenderingCreateInfo at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from pDepthStencilState at only one place
Samuel Pitoiset [Wed, 18 May 2022 07:22:59 +0000 (09:22 +0200)]
radv: init states from pDepthStencilState at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: init states from pMultisampleState at only one place
Samuel Pitoiset [Thu, 19 May 2022 14:04:17 +0000 (16:04 +0200)]
radv: init states from pMultisampleState at only one place

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>

2 years agoradv: copy viewport/scissor when initializing radv_viewport_info
Samuel Pitoiset [Fri, 20 May 2022 14:07:13 +0000 (16:07 +0200)]
radv: copy viewport/scissor when initializing radv_viewport_info

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16672>