platform/upstream/mesa.git
3 years agopanfrost: Implement alpha testing natively
Alyssa Rosenzweig [Tue, 12 Jan 2021 16:44:43 +0000 (11:44 -0500)]
panfrost: Implement alpha testing natively

On Midgard, we still have to lower on v6+. Passes Piglit
./fbo-mrt-alphatest (saving a cycle in the fragment shader to
compare/discard).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8447>

3 years agopanfrost: Add alpha reference to XML
Alyssa Rosenzweig [Tue, 12 Jan 2021 16:44:21 +0000 (11:44 -0500)]
panfrost: Add alpha reference to XML

Midgard only, v6 dropped support.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8447>

3 years agopanfrost: Handle explicit primitive restart
Alyssa Rosenzweig [Tue, 12 Jan 2021 16:32:45 +0000 (11:32 -0500)]
panfrost: Handle explicit primitive restart

Don't fall back. Passes piglit ./bin/primitive-restart on Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8447>

3 years agoradv: disable VK_EXT_sample_locations again on GFX10+
Samuel Pitoiset [Wed, 13 Jan 2021 13:41:19 +0000 (14:41 +0100)]
radv: disable VK_EXT_sample_locations again on GFX10+

I attempted to enable it for 21.0, only 2x and 4x were supported
but there is new failures if DCC+MSAA is enabled.

Disable it again because DCC is more important than this feature and
no Mesa releases have it on GFX10+.

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

3 years agopanfrost: Fix panfrost_afbc_format_needs_fixup()
Boris Brezillon [Wed, 13 Jan 2021 09:04:02 +0000 (10:04 +0100)]
panfrost: Fix panfrost_afbc_format_needs_fixup()

This function returns true for PIPE_FORMAT_R8G8B8X8_UNORM, which is
wrong.

Fixes: 44217be92134 ("panfrost: Adjust the format for AFBC textures on Bifrost v7")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8466>

3 years agoradv: enable DCC for mipmaps on GFX10+
Samuel Pitoiset [Wed, 13 Jan 2021 09:38:04 +0000 (10:38 +0100)]
radv: enable DCC for mipmaps on GFX10+

Seems to work fine.

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

3 years agoradv: do not enable DCC for 3D images with mipmaps on GFX10+
Samuel Pitoiset [Wed, 13 Jan 2021 09:37:19 +0000 (10:37 +0100)]
radv: do not enable DCC for 3D images with mipmaps on GFX10+

This is broken for some reasons, and probably rare enough to
care for now.

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

3 years agoradv: add support for fast-clearing DCC levels on GFX10+
Samuel Pitoiset [Wed, 13 Jan 2021 09:34:03 +0000 (10:34 +0100)]
radv: add support for fast-clearing DCC levels on GFX10+

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

3 years agoradv: prevent fast-clearing uncompressed DCC levels
Samuel Pitoiset [Wed, 13 Jan 2021 09:31:15 +0000 (10:31 +0100)]
radv: prevent fast-clearing uncompressed DCC levels

When size is 0, this means the level can't be compressed.

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

3 years agoac/surface: store DCC mip info into the surface
Samuel Pitoiset [Wed, 13 Jan 2021 09:32:15 +0000 (10:32 +0100)]
ac/surface: store DCC mip info into the surface

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

3 years agopan/bi: Implement TEXS for cube maps
Alyssa Rosenzweig [Thu, 31 Dec 2020 19:34:50 +0000 (14:34 -0500)]
pan/bi: Implement TEXS for cube maps

Saves a few instructions in the common case. Requires refactoring the
TEXS check.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8287>

3 years agoaco/tests: don't rely on argument evaluation order
Rhys Perry [Sun, 6 Dec 2020 10:38:40 +0000 (10:38 +0000)]
aco/tests: don't rely on argument evaluation order

The argument evaluation order is implementation-defined and affects the
order the instructions are inserted.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3938
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7945>

3 years agov3d: add fast-path tile-based blit for depth/stencil buffers
Juan A. Suarez Romero [Fri, 18 Dec 2020 10:33:15 +0000 (11:33 +0100)]
v3d: add fast-path tile-based blit for depth/stencil buffers

This extends the TLB based blit to support both depth and stencil
buffers.

v2:
 - Ammend comment for further clarification (Iago)
 - Remove parenthesis (Iago)
 - Remove condition so separate stencil blit is done (Iago)

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

3 years agov3d: check blit mask inside blit subpaths
Juan A. Suarez Romero [Fri, 18 Dec 2020 09:53:22 +0000 (10:53 +0100)]
v3d: check blit mask inside blit subpaths

Move the blit mask check (RGBA, Depth/Stencil) inside the blit paths
(stencil, TFU, TLB and render blit paths).

v2:
 - Add missing Fixes tag (Iago)

Fixes: 1c76f6e755a ("v3d: implement tile-based blit operation")
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/8304>

3 years agoradv: skip fast-clear eliminate for CMASK based on a predicate
Samuel Pitoiset [Tue, 5 Jan 2021 14:53:29 +0000 (15:53 +0100)]
radv: skip fast-clear eliminate for CMASK based on a predicate

If we have CMASK, we can also skip FCE like we do for DCC.

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

3 years agoradv: update the FCE predicate for fast clears using CMASK
Samuel Pitoiset [Tue, 5 Jan 2021 14:10:14 +0000 (15:10 +0100)]
radv: update the FCE predicate for fast clears using CMASK

Fast clearing with CMASK should always be eliminated.

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

3 years agoradv: allocate and initialize the FCE predicate value for CMASK too
Samuel Pitoiset [Tue, 5 Jan 2021 14:07:47 +0000 (15:07 +0100)]
radv: allocate and initialize the FCE predicate value for CMASK too

In case we don't have DCC, we can still predicate FCE with CMASK.

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

3 years agoradv: only use predication if the FCE value is allocated
Samuel Pitoiset [Tue, 12 Jan 2021 13:16:16 +0000 (14:16 +0100)]
radv: only use predication if the FCE value is allocated

The FCE predicate value is only allocated if DCC is enabled.
We only want to use predication for DCC decompressions and for FCE
but not having FMASK doesn't mean the predicate is allocated.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4075
Fixes: 6e7008e94ba ("radv: do not predicate FMASK decompression when DCC+MSAA is used")
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/8441>

3 years agoturnip: implement indirect dispatch
Danylo Piliaiev [Tue, 12 Jan 2021 15:03:11 +0000 (17:03 +0200)]
turnip: implement indirect dispatch

Vulkan guarantees only 4 byte alignment of offset for vkCmdDrawIndirect,
while CP_LOAD_STATE.EXT_SRC_ADDR requires 16 byte alignment which
makes us copy indirect parameters to a correctly aligned buffer.

Blob does essentially the same but emits indirect CP_LOAD_STATE
with src = SS6_UBO and EXT_SRC_ADDR = 0xe0000, and only for a
first dispatch.

Fixes:
dEQP-VK.compute.indirect_dispatch.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8444>

3 years agoturnip: remove unused IR3_DP_LOCAL_GROUP_SIZE_* from cs params
Danylo Piliaiev [Tue, 12 Jan 2021 19:59:09 +0000 (21:59 +0200)]
turnip: remove unused IR3_DP_LOCAL_GROUP_SIZE_* from cs params

In Turnip local group size is lowered in NIR via
nir_lower_compute_system_values.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8444>

3 years agost/mesa: use the correct src format in ReadPixels
Pierre-Eric Pelloux-Prayer [Thu, 7 Jan 2021 16:36:03 +0000 (17:36 +0100)]
st/mesa: use the correct src format in ReadPixels

If reading from an FBO that uses a texture view src->format will
be the format of the original texture, not from the view.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8387>

3 years agomesa/fbo: don't check_end_texture_render on fb read change
Pierre-Eric Pelloux-Prayer [Thu, 7 Jan 2021 14:50:46 +0000 (15:50 +0100)]
mesa/fbo: don't check_end_texture_render on fb read change

Otherwise this resets is_rtt to false in st/mesa, and then
breaks fbo + texture view.

This change also aligns the code with the comment above:
    * Note that if the ReadBuffer has texture attachments we don't consider
    * that a render-to-texture case.

Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8387>

3 years agost/mesa: consider texture view format for fbo blits
Pierre-Eric Pelloux-Prayer [Thu, 7 Jan 2021 14:50:03 +0000 (15:50 +0100)]
st/mesa: consider texture view format for fbo blits

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4034
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8387>

3 years agor600/nir: use "unreachable" instead of "assert"
Gert Wollny [Wed, 13 Jan 2021 07:53:42 +0000 (08:53 +0100)]
r600/nir: use "unreachable" instead of "assert"

In release builds the assert goes away resulting in build failures
because no return value was specified.

Fixes 165fb5117bf70402e66d34538d4085e060f57fea
   r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2

Closes #4089

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8465>

3 years agoradv: fix clearing DCC on GFX9
Samuel Pitoiset [Tue, 12 Jan 2021 12:55:54 +0000 (13:55 +0100)]
radv: fix clearing DCC on GFX9

dcc_slice_size is in DWORD on GFX9... Also, layers aren't supported
because they might be interleaved. Fix this by clearing the entire
DCC buffer.

Fixes: 5e8f6967b1d ("radv: add support for fast-clearing DCC layers on GFX9+")
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/8443>

3 years agov3d: mark some variables static const
Christian Gmeiner [Tue, 12 Jan 2021 11:53:44 +0000 (12:53 +0100)]
v3d: mark some variables static const

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8438>

3 years agov3d: update fallthrough comments
Christian Gmeiner [Tue, 12 Jan 2021 11:52:00 +0000 (12:52 +0100)]
v3d: update fallthrough comments

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8438>

3 years agov3d: drop not use function parameter
Christian Gmeiner [Tue, 12 Jan 2021 11:50:35 +0000 (12:50 +0100)]
v3d: drop not use function parameter

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8438>

3 years agonv50/ir: Initialize CodeEmitterGM107 members in constructor.
Vinson Lee [Sat, 31 Oct 2020 03:23:52 +0000 (20:23 -0700)]
nv50/ir: Initialize CodeEmitterGM107 members in constructor.

Fix defects reported by Coverity Scan.

uninit_member: Non-static class member progType is not initialized
in this constructor nor in any functions that it calls.
uninit_member: Non-static class member insn is not initialized in
this constructor nor in any functions that it calls.
uninit_member: Non-static class member data is not initialized in
this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7390>

3 years agopanfrost: Fix size assertion in bi_alu_src_index
Icecream95 [Wed, 13 Jan 2021 01:13:47 +0000 (14:13 +1300)]
panfrost: Fix size assertion in bi_alu_src_index

Shifting by the bitsize was not only wrong, the shift is undefined
behavior when bitsize is 32, causing the assertion to fire on AArch32.

Fixes: 95d62ee7cfa ("pan/bi: Add bi_alu_src_index helper")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8460>

3 years agoci: include nouveau in shader-db runs
Ilia Mirkin [Tue, 12 Jan 2021 01:57:26 +0000 (20:57 -0500)]
ci: include nouveau in shader-db runs

This should include coverage of the whole pipeline including the nouveau
codegen compiler across the "interesting" chips which should generate
sufficiently different code.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8432>

3 years agodri: Restrict glthread for CS:GO to radeonsi
Nanley Chery [Tue, 12 Jan 2021 01:45:37 +0000 (17:45 -0800)]
dri: Restrict glthread for CS:GO to radeonsi

Fixes a ~12% performance regression in iris.

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

3 years agopan/bi: Add some zero bytes after shaders on Bifrost
Icecream95 [Tue, 12 Jan 2021 09:31:55 +0000 (22:31 +1300)]
pan/bi: Add some zero bytes after shaders on Bifrost

Bifrost will prefetch bytes after the end of shaders, so make sure
these bytes are allocated and zeroed.

Fixes GPU faults in Xonotic.

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8428>

3 years agopan/bi: Add a define for the Bifrost shader prefetch size
Icecream95 [Tue, 12 Jan 2021 09:21:39 +0000 (22:21 +1300)]
pan/bi: Add a define for the Bifrost shader prefetch size

Found by adding NOPs to the start of a shader and checking dmesg to
see at what sizes the GPU faulted trying to read the following
non-executable page.

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

3 years agoradeonsi: Only set modifier creation function for GFX9+ & with kernel support.
Bas Nieuwenhuizen [Sun, 10 Jan 2021 23:40:53 +0000 (00:40 +0100)]
radeonsi: Only set modifier creation function for GFX9+ & with kernel support.

Fixes: c786150dfa5 ("radeonsi: Add modifier support.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3963
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8407>

3 years agopanfrost: Skip an XFB test that's passing/failing randomly
Boris Brezillon [Tue, 12 Jan 2021 17:51:26 +0000 (18:51 +0100)]
panfrost: Skip an XFB test that's passing/failing randomly

transform_feedback.array_element.interleaved.triangles.mediump_mat2x4
seems to pass/fail randomly, skip it for now.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

3 years agopanfrost: Re-enable AFBC on 3D, 2D arrays
Boris Brezillon [Tue, 12 Jan 2021 08:00:59 +0000 (09:00 +0100)]
panfrost: Re-enable AFBC on 3D, 2D arrays

Things have now been fixed and AFBC on 3D/2D-arrays seems to work fine.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

3 years agopanfrost: Fix estimate_texture_payload_size() on Bifrost
Boris Brezillon [Tue, 12 Jan 2021 16:43:16 +0000 (17:43 +0100)]
panfrost: Fix estimate_texture_payload_size() on Bifrost

Bifrost mandates manual stride usage.

Fixes: a3d2936a8e9e ("panfrost: The texture descriptor has a pointer to a trampoline")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

3 years agopanfrost: Pass the resource dimension to panfrost_compression_tag()
Boris Brezillon [Tue, 12 Jan 2021 13:46:42 +0000 (14:46 +0100)]
panfrost: Pass the resource dimension to panfrost_compression_tag()

The reload surface logic creates 2D image views pointing to a specific
3D texture layer, but panfrost_compression_tag() cares about the resource
dimension, not the image view one.

Fixes: 4dd7991422ce ("panfrost: Add a pan_image_layout object")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

3 years agopanfrost: Get layer stride of level 0 on staging resources
Boris Brezillon [Tue, 12 Jan 2021 13:40:18 +0000 (14:40 +0100)]
panfrost: Get layer stride of level 0 on staging resources

Staging resources have one level, we shouldn't query the stride of
level > 0.

Fixes: 3c92abe35937 ("panfrost: Use panfrost_get_layer_stride() instead of open-coding it")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8449>

3 years agovulkan/overlay: fix vkGetInstanceProcAddr self-resolving
Georg Lehmann [Thu, 31 Dec 2020 15:18:49 +0000 (16:18 +0100)]
vulkan/overlay: fix vkGetInstanceProcAddr self-resolving

vkGetInstanceProcAddr(instance, "vkGetInstanceProcAddr") should return our
vkGetInstanceProcAddr not the next in the chain.

CC: mesa-stable
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8285>

3 years agodocs/features: Fix missing close paranthesis
Alyssa Rosenzweig [Tue, 12 Jan 2021 18:08:28 +0000 (13:08 -0500)]
docs/features: Fix missing close paranthesis

My bad. This is what I get for writing documentation at midnight.

Fixes: bd697652a73 ("docs: Document extensions exposing GL3.0")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8429>

3 years agodocs/features: Mark GL3.1 as done on Panfrost
Alyssa Rosenzweig [Tue, 12 Jan 2021 18:06:21 +0000 (13:06 -0500)]
docs/features: Mark GL3.1 as done on Panfrost

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

3 years agodocs/panfrost: Update GL/ES versions for v5+
Alyssa Rosenzweig [Mon, 11 Jan 2021 22:58:23 +0000 (17:58 -0500)]
docs/panfrost: Update GL/ES versions for v5+

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

3 years agodocs: Add release note for Bifrost GL3.1
Alyssa Rosenzweig [Mon, 11 Jan 2021 22:35:50 +0000 (17:35 -0500)]
docs: Add release note for Bifrost GL3.1

GL3.1 was already new for Midgard so we adjust the wording slightly.

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

3 years agoRevert "ci: Disable the freedreno farm, which went down last night."
Eric Anholt [Tue, 12 Jan 2021 19:35:02 +0000 (11:35 -0800)]
Revert "ci: Disable the freedreno farm, which went down last night."

Networking broke on a reboot or something, fixed the broken setting and
it's back up.

This reverts commit ff67898dafaea82db669aef10ebb05e65eaa0921.

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

3 years agopanfrost: Dual-source blending on Bifrost
Icecream95 [Tue, 12 Jan 2021 13:18:10 +0000 (02:18 +1300)]
panfrost: Dual-source blending on Bifrost

Tested with the arb_blend_func_extended Piglit tests and Alacritty.

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

3 years agoradv: Add Android module info to linker script.
Bas Nieuwenhuizen [Tue, 12 Jan 2021 11:47:59 +0000 (12:47 +0100)]
radv: Add Android module info to linker script.

The Android Vulkan loader needs this symbol, so the addition of the
linker script broke Vulkan for Android.

(For non-Android builds: I checked that having a non-existent symbol in
 the linker script works ok and doesn't put the symbol in the library)

Fixes: 41bb6459d3a ("radv: restrict exported symbols with static llvm")
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8437>

3 years agogallium/ntt: Take ownership of the NIR shader we're passed.
Eric Anholt [Mon, 11 Jan 2021 18:58:43 +0000 (10:58 -0800)]
gallium/ntt: Take ownership of the NIR shader we're passed.

It makes no sense for the caller to keep it, since we've throughly changed
it to be suitable to NTT.  All callers just freed it afterward anyway.

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

3 years agomesa/st: Free the ARB_vp/fp nir-to-tgsi temporary tokens.
Eric Anholt [Mon, 11 Jan 2021 19:09:12 +0000 (11:09 -0800)]
mesa/st: Free the ARB_vp/fp nir-to-tgsi temporary tokens.

The driver interface doesn't take ownership of the TGSI tokens, so free
our temporary.

Fixes: cf3fc79cd0ab ("st/mesa: Replace mesa_to_tgsi() with prog_to_nir() and nir_to_tgsi().")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>

3 years agomesa/st: Free the NIR builtins TGSI tokens after passing to the driver.
Eric Anholt [Mon, 11 Jan 2021 19:09:12 +0000 (11:09 -0800)]
mesa/st: Free the NIR builtins TGSI tokens after passing to the driver.

The driver interface doesn't take ownership of the TGSI tokens, so free
our temporary.

Fixes: 57effa342b75 ("st/mesa: Drop the TGSI paths for PBOs and use nir-to-tgsi if needed.")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>

3 years agogallium/ntt: Fix leak of the per-instr liveness information.
Eric Anholt [Mon, 11 Jan 2021 18:40:21 +0000 (10:40 -0800)]
gallium/ntt: Fix leak of the per-instr liveness information.

Fixes: 34cc6a804ec9 ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>

3 years agor600: enable fp64 lowering to softemu with NIR
Gert Wollny [Fri, 16 Oct 2020 16:18:18 +0000 (18:18 +0200)]
r600: enable fp64 lowering to softemu with NIR

The NIR code path does not (yet) take hardware into account
that actually supports fp64 in hardware.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agor600: enable support for 64 bit DIVMOD when NIR is used
Gert Wollny [Mon, 7 Dec 2020 15:45:54 +0000 (16:45 +0100)]
r600: enable support for 64 bit DIVMOD when NIR is used

The glsl lowering seems to be broken, but the nir lowering pass handles
this correctly.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agor600/sfn: tie in 64 lowering code
Gert Wollny [Sat, 28 Nov 2020 15:37:09 +0000 (16:37 +0100)]
r600/sfn: tie in 64 lowering code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agor600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2
Gert Wollny [Sat, 28 Nov 2020 15:34:26 +0000 (16:34 +0100)]
r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2

The lower_double and lower_int64 don't lower all 64 bit IO ops and merging
to and splitting fromn 64 bit values. So here goes a bunch of lowering
passes that takes care of this and also of merging IO that might have been
split.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agor600/sfn: Add number for source components for split_y
Gert Wollny [Sat, 28 Nov 2020 15:35:23 +0000 (16:35 +0100)]
r600/sfn: Add number for source components for split_y

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agor600/sfn: C++ lower-instruct implementation
Gert Wollny [Sun, 10 Jan 2021 10:34:43 +0000 (11:34 +0100)]
r600/sfn: C++ lower-instruct implementation

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7824>

3 years agopanfrost: Enable ARB_texture_buffer_object
Icecream95 [Sun, 3 Jan 2021 02:21:57 +0000 (15:21 +1300)]
panfrost: Enable ARB_texture_buffer_object

Tested with the arb_texture_buffer_object and arb_texture_buffer_range
piglit tests.

Exposes OpenGL 3.1 by default on T760+

    $ PAN_MESA_DEBUG= glxinfo | grep "GL version"
    OpenGL version string: 3.1 Mesa 21.0.0-devel

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agopanfrost: Fix textureSize for buffer textures
Icecream95 [Thu, 7 Jan 2021 22:16:55 +0000 (11:16 +1300)]
panfrost: Fix textureSize for buffer textures

Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agopanfrost: Support buffer sampler views
Icecream95 [Sun, 3 Jan 2021 02:20:57 +0000 (15:20 +1300)]
panfrost: Support buffer sampler views

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agopanfrost: Make the width argument to panfrost_new_texture 32 bits
Icecream95 [Sun, 3 Jan 2021 02:16:55 +0000 (15:16 +1300)]
panfrost: Make the width argument to panfrost_new_texture 32 bits

This is needed to represent a width of exactly 65536, which is
required by ARB_texture_buffer_object.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agost/mesa: Use samplers for buffer textures if requested
Icecream95 [Mon, 4 Jan 2021 07:44:49 +0000 (20:44 +1300)]
st/mesa: Use samplers for buffer textures if requested

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agodocs: Mention PIPE_CAP_TEXTURE_BUFFER_SAMPLER
Icecream95 [Thu, 7 Jan 2021 22:20:02 +0000 (11:20 +1300)]
docs: Mention PIPE_CAP_TEXTURE_BUFFER_SAMPLER

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agogallium: Add new cap PIPE_CAP_TEXTURE_BUFFER_SAMPLER
Icecream95 [Mon, 4 Jan 2021 07:41:57 +0000 (20:41 +1300)]
gallium: Add new cap PIPE_CAP_TEXTURE_BUFFER_SAMPLER

This indicates whether a driver wants samplers for buffer textures as
well as normal textures.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8300>

3 years agoaco: Wait for stores when NGG or legacy VS can finish early.
Timur Kristóf [Wed, 2 Dec 2020 11:06:28 +0000 (12:06 +0100)]
aco: Wait for stores when NGG or legacy VS can finish early.

When there are no param exports in an NGG (or legacy VS) shader,
the NO_PC_EXPORT=1 is set, which means PS waves can launch before
the current stage finishes.

If the current stage has any stores, we need to make sure to wait for
those before we allow PS waves to start, so that PS can read what
these instructions stored.

Fossil DB results on Navi 10:
Totals from 45 (0.03% of 136420) affected shaders:
CodeSize: 87224 -> 87404 (+0.21%)
Instrs: 16750 -> 16795 (+0.27%)
Cycles: 69580 -> 69760 (+0.26%)
VMEM: 8022 -> 8167 (+1.81%)

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

3 years agoaco: Note if rasterization can start early.
Timur Kristóf [Mon, 11 Jan 2021 17:36:20 +0000 (18:36 +0100)]
aco: Note if rasterization can start early.

When there are no param exports in an NGG (or legacy VS) shader,
the NO_PC_EXPORT=1 is set by RADV, which means PS waves can launch
before the current stage finishes.

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

3 years agoaco/ra: fix infinite recursion in get_reg_simple() with subdword registers
Daniel Schürmann [Tue, 12 Jan 2021 11:45:46 +0000 (12:45 +0100)]
aco/ra: fix infinite recursion in get_reg_simple() with subdword registers

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: f8c7661ecaa782fdde105a4bf756023eb88ea780 ('aco: try to better align 8+ dword SGPR vectors')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoaco: simplify and fix operand/definition sizes
Daniel Schürmann [Fri, 8 Jan 2021 22:03:21 +0000 (23:03 +0100)]
aco: simplify and fix operand/definition sizes

These are mainly needed for constant propagation
and subdword register allocation.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoradv: enable .lower_ineg
Daniel Schürmann [Thu, 27 Aug 2020 14:11:13 +0000 (15:11 +0100)]
radv: enable .lower_ineg

We already emit ineg as isub most of the time.

The results are a bit mixed, but shouldn't really make a difference.
A couple of additional copies are needed as isub writes scc.

Totals from 5975 (4.29% of 139391) affected shaders:
CodeSize: 31508648 -> 31509264 (+0.00%); split: -0.00%, +0.00%
Instrs: 6073379 -> 6073531 (+0.00%); split: -0.00%, +0.00%
Cycles: 47186280 -> 47187116 (+0.00%); split: -0.00%, +0.00%
VMEM: 2528515 -> 2529139 (+0.02%); split: +0.03%, -0.01%
SMEM: 596842 -> 596924 (+0.01%); split: +0.02%, -0.00%
SClause: 280596 -> 280594 (-0.00%)
Copies: 288554 -> 288669 (+0.04%); split: -0.00%, +0.04%
PreSGPRs: 240390 -> 240397 (+0.00%)
PreVGPRs: 349630 -> 349749 (+0.03%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoradv: don't lower_pack() after load-store-vectorization
Daniel Schürmann [Fri, 8 Jan 2021 21:05:26 +0000 (22:05 +0100)]
radv: don't lower_pack() after load-store-vectorization

Totals from 7 (0.01% of 139391) affected shaders:
CodeSize: 282900 -> 283324 (+0.15%); split: -0.01%, +0.16%
Instrs: 45287 -> 45338 (+0.11%); split: -0.01%, +0.12%
Cycles: 11496332 -> 11510396 (+0.12%); split: -0.00%, +0.12%
VMEM: 2355 -> 2335 (-0.85%)
Copies: 15506 -> 15561 (+0.35%)

A bit of noise in some parallel-rdp shaders.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoradv: call nir_opt_algebraic_late() after lowering idiv for small bitsizes
Daniel Schürmann [Mon, 11 Jan 2021 13:34:26 +0000 (14:34 +0100)]
radv: call nir_opt_algebraic_late() after lowering idiv for small bitsizes

This is needed because lower_idiv() introduces ineg again
which we'll remove next.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoradv: optimize idiv_const for small bitsizes
Daniel Schürmann [Mon, 11 Jan 2021 18:05:52 +0000 (19:05 +0100)]
radv: optimize idiv_const for small bitsizes

No fossil-db changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8425>

3 years agoradv: fix color resolves if the dest image has DCC
Samuel Pitoiset [Tue, 5 Jan 2021 09:19:03 +0000 (10:19 +0100)]
radv: fix color resolves if the dest image has DCC

Using the graphics resolve path when DCC is enabled should only be
a hint to avoid DCC fixup.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3388
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/8326>

3 years agoradv: fixup DCC after color resolves using the compute path
Samuel Pitoiset [Tue, 5 Jan 2021 08:26:36 +0000 (09:26 +0100)]
radv: fixup DCC after color resolves using the compute path

If the dest image has DCC it should be re-initialized to the
uncompressed state.

Note that the driver always selects the graphics path if the dest
image has DCC, so this has no effect for now.

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

3 years agoradv: decompress DCC for partial resolves using the compute path
Samuel Pitoiset [Fri, 8 Jan 2021 10:56:00 +0000 (11:56 +0100)]
radv: decompress DCC for partial resolves using the compute path

Because DCC is re-initialized to the uncompressed state after the
resolve, so if the app does a partial resolve it should be
decompressed 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/8326>

3 years agoradv: set depth to 1 for subpass resolves using the compute path
Samuel Pitoiset [Fri, 8 Jan 2021 10:41:29 +0000 (11:41 +0100)]
radv: set depth to 1 for subpass resolves using the compute path

To match Vulkan convention.

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

3 years agoaco: improve nir_op_vec with constant operands
Rhys Perry [Mon, 11 Jan 2021 17:11:05 +0000 (17:11 +0000)]
aco: improve nir_op_vec with constant operands

Could still be improved a little. For example, 8-bit pack without
constants could be:
(s_pack_ll(x, z) & 0x00ff00ff) | ((s_pack_ll(y, w) & 0x00ff00ff) << 8)

fossil-db (Sienna):
Totals from 136 (0.10% of 139391) affected shaders:
CodeSize: 279776 -> 278144 (-0.58%)
Instrs: 50742 -> 50470 (-0.54%)
Cycles: 211560 -> 210472 (-0.51%)
SMEM: 3607 -> 3557 (-1.39%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8421>

3 years agowgl: Don't crash in stw_make_current if current framebuffer is NULL
Louis-Francis Ratté-Boulianne [Wed, 9 Dec 2020 03:57:39 +0000 (22:57 -0500)]
wgl: Don't crash in stw_make_current if current framebuffer is NULL

Fixes #3878

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7999>

3 years agoradv: set invariantgeom for Shadow of the Tomb Raider
Rhys Perry [Mon, 14 Dec 2020 22:00:23 +0000 (22:00 +0000)]
radv: set invariantgeom for Shadow of the Tomb Raider

Work around flickering foliage on GFX10.3

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4064
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8104>

3 years agoradv: add RADV_DEBUG=invariantgeom
Rhys Perry [Mon, 14 Dec 2020 21:54:28 +0000 (21:54 +0000)]
radv: add RADV_DEBUG=invariantgeom

This can be used to work around a common class of bugs appearing as
flickering.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8104>

3 years agonir/divergence_analysis: mark load_push_constant as uniform
Daniel Schürmann [Tue, 12 Jan 2021 12:01:34 +0000 (13:01 +0100)]
nir/divergence_analysis: mark load_push_constant as uniform

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8439>

3 years agoradv: mark some sparse texture CTS as expected failures on GFX9
Samuel Pitoiset [Tue, 12 Jan 2021 13:30:10 +0000 (14:30 +0100)]
radv: mark some sparse texture CTS as expected failures on GFX9

It's likely a RADV bug but marking them as expected failures
to avoid more breakage in the meantime.

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

3 years agoci: mark some sparse tests as expected failures on Pitcairn (GFX6)
Samuel Pitoiset [Mon, 11 Jan 2021 16:21:54 +0000 (17:21 +0100)]
ci: mark some sparse tests as expected failures on Pitcairn (GFX6)

Two CTS bugs reported.

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

3 years agoaco: fix inserting expcnt for MIMG on GFX6
Samuel Pitoiset [Tue, 12 Jan 2021 10:45:14 +0000 (11:45 +0100)]
aco: fix inserting expcnt for MIMG on GFX6

MIMG VDATA has moved to its own operand.

Fixes: 962c917cea9 ("aco: move MIMG VDATA to its own operand")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8435>

3 years agovbo/dlist: free prim_store->prims when vbo_save is destroyed
Tapani Pälli [Mon, 11 Jan 2021 11:01:53 +0000 (13:01 +0200)]
vbo/dlist: free prim_store->prims when vbo_save is destroyed

Fixes: 83149e1c2d8 ("vbo/dlist: refactor prim_store/vertex_store allocations")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4067
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8410>

3 years agoglcpp: disable 'windows' tests
Mike Blumenkrantz [Mon, 4 Jan 2021 21:05:11 +0000 (16:05 -0500)]
glcpp: disable 'windows' tests

these timeout a lot

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8321>

3 years agofrontends/omx: fix build warning
Leo Liu [Sun, 10 Jan 2021 16:15:38 +0000 (11:15 -0500)]
frontends/omx: fix build warning

From code path, it's easy to see that the variable is only used
with condition, and the variable gets initialized with the same
condition before getting used, but we can initialize it when defined
to avoid the warning.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8404>

3 years agonouveau: add drm-shim support
Ilia Mirkin [Sat, 9 Jan 2021 06:33:08 +0000 (01:33 -0500)]
nouveau: add drm-shim support

Seems to work reasonably well with shader-db's run.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8406>

3 years agonouveau: change fence destruction logic on screen destroy
Ilia Mirkin [Sat, 9 Jan 2021 18:13:42 +0000 (13:13 -0500)]
nouveau: change fence destruction logic on screen destroy

With the drm shim, we can't actually wait for the hardware to do
anything. But why wait for it at all? We just need to make sure to
execute all the work and clean up any resources. Add a helper to do
that.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8406>

3 years agopanfrost: Advertise ES3.0 on Bifrost
Alyssa Rosenzweig [Mon, 11 Jan 2021 20:50:03 +0000 (15:50 -0500)]
panfrost: Advertise ES3.0 on Bifrost

Doing so fixes our remaining dEQP-GLES2 failures.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopanfrost: Test GLES3 on Bifrost
Boris Brezillon [Tue, 24 Nov 2020 07:30:56 +0000 (08:30 +0100)]
panfrost: Test GLES3 on Bifrost

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopanfrost: Disable AFBC of 3D, 2D arrays
Alyssa Rosenzweig [Mon, 11 Jan 2021 21:00:41 +0000 (16:00 -0500)]
panfrost: Disable AFBC of 3D, 2D arrays

These are broken at least on v7 and likely elsewhere. Until this can be
investigated, let's disable it so we don't break dEQP-GLES3.

Example of a failing test without this patch:

dEQP-GLES3.functional.texture.filtering.2d_array.sizes.128x32x64_nearest

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopanfrost: Promote 8b to 16b for blend descriptors
Boris Brezillon [Fri, 20 Nov 2020 15:58:53 +0000 (16:58 +0100)]
panfrost: Promote 8b to 16b for blend descriptors

There is no 8-bit register_format applicable. Some lowering is needed
at the compiler level to make it work.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Lower 8bit fragment outputs to 16bit
Boris Brezillon [Fri, 20 Nov 2020 15:57:46 +0000 (16:57 +0100)]
pan/bi: Lower 8bit fragment outputs to 16bit

Bifrost does not support passing fragment colors through 8 bit registers.

(Rewrote to use NIR helpers -Alyssa)

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Assert immediate indices fit
Alyssa Rosenzweig [Mon, 11 Jan 2021 18:50:43 +0000 (13:50 -0500)]
pan/bi: Assert immediate indices fit

This would have caught the assortment of bugs fixed in the previous two
commits, and should help lint going forward.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Parametrize intrinsic immediate limits
Alyssa Rosenzweig [Mon, 11 Jan 2021 19:02:38 +0000 (14:02 -0500)]
pan/bi: Parametrize intrinsic immediate limits

Fixes issues on:

dEQP-GLES3.functional.transform_feedback.array_element.separate.points.lowp_mat2x3

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Use TEXC for indices >= 8
Alyssa Rosenzweig [Mon, 11 Jan 2021 18:52:53 +0000 (13:52 -0500)]
pan/bi: Use TEXC for indices >= 8

Otherwise it can't fit, fixes

   dEQP-GLES3.functional.texture.units.all_units.only_2d.*
   dEQP-GLES3.functional.texture.units.all_units.only_cube.*
   dEQP-GLES3.functional.texture.units.all_units.mixed.*

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Implement scalar i2i8/u2u8
Alyssa Rosenzweig [Wed, 6 Jan 2021 00:22:25 +0000 (19:22 -0500)]
pan/bi: Implement scalar i2i8/u2u8

Doesn't work for vectors though that's the vectorization branch's
problem to deal with now. Suffices for fragment output.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>

3 years agopan/bi: Allow passing thorugh 8-bit scalars
Alyssa Rosenzweig [Wed, 6 Jan 2021 00:21:26 +0000 (19:21 -0500)]
pan/bi: Allow passing thorugh 8-bit scalars

Needed for fragment output. Not nearly sufficient for actual 8-bit
types in e.g OpenCL.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8427>