platform/upstream/mesa.git
3 years agointel/tools/aub: remove superfluous new line from error messages
Marcin Ślusarz [Wed, 10 Feb 2021 14:06:59 +0000 (15:06 +0100)]
intel/tools/aub: remove superfluous new line from error messages

This function is used as a callback and the other instance
of this callback doesn't add its own new line.
Messages printed by this function already end with a new line.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988>

3 years agointel/tools/aub: handle truncated input file
Marcin Ślusarz [Wed, 10 Feb 2021 14:05:31 +0000 (15:05 +0100)]
intel/tools/aub: handle truncated input file

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988>

3 years agointel/tools/aub: print better error message when mmap fails
Marcin Ślusarz [Wed, 10 Feb 2021 11:22:11 +0000 (12:22 +0100)]
intel/tools/aub: print better error message when mmap fails

Aubinator creates lots of 4k mappings, so for large traces it's
possible to hit system limit on the number of mappings created
by a single process.

Ideally, aubinator should merge those mappings, but that's tricky
and I'm not sure it's worth spending time on.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8988>

3 years agopanfrost: Move the blend logic out of the gallium driver
Boris Brezillon [Wed, 10 Feb 2021 07:47:39 +0000 (08:47 +0100)]
panfrost: Move the blend logic out of the gallium driver

Most of it is API-independent, so let's move it out of the gallium
driver so it can be shared with the Vulkan driver.

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

3 years agopanfrost: Move the blend lowering code out of the gallium driver
Boris Brezillon [Tue, 9 Feb 2021 17:06:59 +0000 (18:06 +0100)]
panfrost: Move the blend lowering code out of the gallium driver

Will be used by the pan_blend library.

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

3 years agopanfrost: Rename pan_blend.h into pan_blend_cso.h
Boris Brezillon [Tue, 9 Feb 2021 17:46:09 +0000 (18:46 +0100)]
panfrost: Rename pan_blend.h into pan_blend_cso.h

We are about to add a pan_blend.h in src/panfrost/lib. Rename the
existing pan_blend.h so we can include both.

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

3 years agopanfrost: Use the pan_shader_prepare_rsd() helper
Boris Brezillon [Sat, 13 Feb 2021 08:01:15 +0000 (09:01 +0100)]
panfrost: Use the pan_shader_prepare_rsd() helper

This implies late preparation of the fragment shader RSD, but given the
simplicity of pan_shader_prepare_rsd() (it's basically a 1:1 translation
between shader info and the RSD fields), it's unlikely to make a
difference. If we really want to optimize the time spent preparing the
RSD, we should consider caching a packed version at the batch level and
re-using it when nothing changed.

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

3 years agopanfrost: Provide a helper to prepare the shader related parts of an RSD
Boris Brezillon [Sat, 13 Feb 2021 07:41:47 +0000 (08:41 +0100)]
panfrost: Provide a helper to prepare the shader related parts of an RSD

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

3 years agopanfrost: Move the shader compilation logic out of the gallium driver
Boris Brezillon [Sat, 13 Feb 2021 07:24:03 +0000 (08:24 +0100)]
panfrost: Move the shader compilation logic out of the gallium driver

While at it, rework the code to avoid copies between intermediate
structures: the pan_shader_info is passed to the compiler context so
the compiler can fill shader information directly.

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

3 years agopanfrost: Keep the compiler inputs in the context
Boris Brezillon [Fri, 12 Feb 2021 17:11:06 +0000 (18:11 +0100)]
panfrost: Keep the compiler inputs in the context

So we don't have to copy data around.

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

3 years agopanfrost: Move sysval_to_id out of panfrost_sysvals
Boris Brezillon [Fri, 12 Feb 2021 16:49:23 +0000 (17:49 +0100)]
panfrost: Move sysval_to_id out of panfrost_sysvals

So we can re-use the panfrost_sysvals definition outside of the
compiler without dragging the sysval_to_id hash table.

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

3 years agopanfrost: Prefix shader related helpers with pan_shader_
Boris Brezillon [Fri, 12 Feb 2021 15:59:59 +0000 (16:59 +0100)]
panfrost: Prefix shader related helpers with pan_shader_

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

3 years agopanfrost: Hide backend compiler internals
Boris Brezillon [Fri, 12 Feb 2021 15:54:17 +0000 (16:54 +0100)]
panfrost: Hide backend compiler internals

Move panfrost_compile_shader() and panfrost_get_shader_options() to
pan_shader.c and drop the {bifrost,midgard}_compile.h include so backend
compiler internals are not directly exposed to the gallium driver.

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

3 years agopanfrost: Use panfrost_get_shader_options() in panfrost_build_blit_shader()
Boris Brezillon [Fri, 12 Feb 2021 15:51:07 +0000 (16:51 +0100)]
panfrost: Use panfrost_get_shader_options() in panfrost_build_blit_shader()

We should use Bifrost NIR options when compiling for Bifrost.

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

3 years agoamd: update addrlib
Marek Olšák [Tue, 27 Oct 2020 04:13:42 +0000 (00:13 -0400)]
amd: update addrlib

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8896>

3 years agoradv: Properly handle modifier import failure.
Bas Nieuwenhuizen [Fri, 12 Feb 2021 14:08:32 +0000 (15:08 +0100)]
radv: Properly handle modifier import failure.

The layout code can fail now in the non-delayed case with modifiers.

Fixes: 7f7da82dbb7 ("radv: Add image layout with drm format modifiers.")
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9012>

3 years agoradv: Remove vk_format_has_stencil/depth helpers.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 21:22:16 +0000 (22:22 +0100)]
radv: Remove vk_format_has_stencil/depth helpers.

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

3 years agoradv: Remove the format table.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 21:19:55 +0000 (22:19 +0100)]
radv: Remove the format table.

Kill some code!

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

3 years agoradv: Start using util_format_description for everything.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 21:14:12 +0000 (22:14 +0100)]
radv: Start using util_format_description for everything.

Steps:

git reset --hard
sed -i 's/struct vk_format_description \*/struct util_format_description \*/g' *.{c,h}
sed -i 's/VK_FORMAT_COLORSPACE/UTIL_FORMAT_COLORSPACE/g' *.c
sed -i 's/= VK_FORMAT_COLORSPACE/= UTIL_FORMAT_COLORSPACE/g' *.h
sed -i 's/enum vk_format_colorspace /enum util_format_colorspace /g' *.h
sed -i 's/VK_FORMAT_TYPE/UTIL_FORMAT_TYPE/g' *.c
sed -i 's/VK_FORMAT_LAYOUT/UTIL_FORMAT_LAYOUT/g' *.c
sed -i 's/vk_format_channel_description/util_format_channel_description/g' *.c
sed -i 's/vk_format_description(/vk_format_description_legacy(/g' *.py
sed -i 's/const struct vk_format_description \*/static const struct vk_format_description \*/g' *.py

Then manually:

1) Rename the vk_format_colorspace definition back (only want the uses renamed)
2) Fix the desc->format == VK_FORMAT_... warnings
3) Add vk_format_description implementation (and remove warning pragmas)

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

3 years agoradv: Only support format with a PIPE_FORMAT.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 21:44:40 +0000 (22:44 +0100)]
radv: Only support format with a PIPE_FORMAT.

Otherwise non-supported format will be mapped to PIPE_FORMAT_NONE and
as such get a non-NULL description.

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

3 years agoradv: Stop using plane_count.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 21:06:25 +0000 (22:06 +0100)]
radv: Stop using plane_count.

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

3 years agoradv: Stop checking for MULTIPLANE layout.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 20:59:40 +0000 (21:59 +0100)]
radv: Stop checking for MULTIPLANE layout.

It is not a single layout in the util code.

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

3 years agoradv: Do not use generated table for plane formats.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 18:15:58 +0000 (19:15 +0100)]
radv: Do not use generated table for plane formats.

I want to remove the table and this is a fairly small amount of code.

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

3 years agoradv: Do no use vk_format for getting divisors.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 18:14:15 +0000 (19:14 +0100)]
radv: Do no use vk_format for getting divisors.

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

3 years agoradv: Remove VK_SWIZZLE_*.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 17:49:41 +0000 (18:49 +0100)]
radv: Remove VK_SWIZZLE_*.

Values are the same as PIPE_SWIZZLE_*.

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

3 years agoradv: Use u_format helpers when possible.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 17:49:14 +0000 (18:49 +0100)]
radv: Use u_format helpers when possible.

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

3 years agoradv: Add plane width/height helpers.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 17:34:54 +0000 (18:34 +0100)]
radv: Add plane width/height helpers.

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

3 years agoradv: Determine swizzles correctly.
Bas Nieuwenhuizen [Sat, 30 Jan 2021 20:35:59 +0000 (21:35 +0100)]
radv: Determine swizzles correctly.

Previously we were calculating the inverse swizzle instead and doing something
horrible to get 0/1 right, and then "fixing" our table.

Let's do it right an align with the mesa-wide table.

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

3 years agozink: fix detection of KHR_maintenance1/2
Hoe Hao Cheng [Sat, 13 Feb 2021 18:29:34 +0000 (02:29 +0800)]
zink: fix detection of KHR_maintenance1/2

Since some extensions never got their dedicated feature structs, not all
extensions promoted to core Vulkan have the relevant feature bits in
`VkPhysicalDeviceVulkanXYFeatures`. Those extensions are supported by
the device when the device version is high enough.

For those extensions, set the screen flags directly if the device
version is sufficient, otherwise check for the extension as usual.

Fixes: efe6f00e ("zink/codegen: do not enable extensions that are now core")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9030>

3 years agolima: implement GL_EXT_texture_swizzle
Erico Nunes [Wed, 10 Feb 2021 22:23:30 +0000 (23:23 +0100)]
lima: implement GL_EXT_texture_swizzle

This is a desktop OpenGL 2.1 extension that seems to be required by
glamor to support glyph rendering acceleration with R8 textures.
Implementation borrowed from vc4.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8969>

3 years agor600/sfn: Initialize FragmentShaderFromNir member m_pos_input.
Vinson Lee [Fri, 12 Feb 2021 04:07:00 +0000 (20:07 -0800)]
r600/sfn: Initialize FragmentShaderFromNir member m_pos_input.

Fix defect reported by Coverity Scan.

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

Fixes: 374bc76706e ("r600/sfn: Add the position input as varying")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9004>

3 years agoradeonsi: add debug options nodisplaytiling and nodisplaydcc
Marek Olšák [Tue, 20 Oct 2020 00:21:58 +0000 (20:21 -0400)]
radeonsi: add debug options nodisplaytiling and nodisplaydcc

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoradeonsi: skip s_sendmsg(gs_alloc_req) for NGG passthrough on new chips
Marek Olšák [Tue, 26 Jan 2021 22:43:32 +0000 (17:43 -0500)]
radeonsi: skip s_sendmsg(gs_alloc_req) for NGG passthrough on new chips

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoamd: sort chip enums based on hw revision
Marek Olšák [Tue, 26 Jan 2021 22:34:37 +0000 (17:34 -0500)]
amd: sort chip enums based on hw revision

A future commit will depend on this.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: conceal L2 cache sizes
Marek Olšák [Thu, 4 Feb 2021 06:55:34 +0000 (01:55 -0500)]
ac/gpu_info: conceal L2 cache sizes

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: inline get_l2_cache_size and set cache sizes farther down
Marek Olšák [Thu, 4 Feb 2021 06:18:12 +0000 (01:18 -0500)]
ac/gpu_info: inline get_l2_cache_size and set cache sizes farther down

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: remove redundant radeon_info::num_sdp_interfaces
Marek Olšák [Thu, 4 Feb 2021 06:17:19 +0000 (01:17 -0500)]
ac/gpu_info: remove redundant radeon_info::num_sdp_interfaces

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: add radeon_info::num_tcc_blocks
Marek Olšák [Thu, 4 Feb 2021 06:11:38 +0000 (01:11 -0500)]
ac/gpu_info: add radeon_info::num_tcc_blocks

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: rename num_tcc_blocks -> max_tcc_blocks
Marek Olšák [Thu, 4 Feb 2021 05:50:32 +0000 (00:50 -0500)]
ac/gpu_info: rename num_tcc_blocks -> max_tcc_blocks

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agoac/gpu_info: print use_late_alloc
Marek Olšák [Sat, 6 Feb 2021 00:20:44 +0000 (19:20 -0500)]
ac/gpu_info: print use_late_alloc

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8892>

3 years agowinsys/amdgpu: disallow pb_cache for backing buffers of sparse buffers
Marek Olšák [Sat, 6 Feb 2021 05:32:31 +0000 (00:32 -0500)]
winsys/amdgpu: disallow pb_cache for backing buffers of sparse buffers

because amdgpu_bo_wait doesn't wait for active CS jobs using the buffers.
This fixes incorrect buffer reuse of busy buffers.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8895>

3 years agocompiler: Drop now unused gl_varying_slot_name()
Caio Marcelo de Oliveira Filho [Thu, 11 Feb 2021 20:35:44 +0000 (12:35 -0800)]
compiler: Drop now unused gl_varying_slot_name()

There's reuse of values depending on the stage, so a function that
just takes the value might produce invalid results.  All the codebase
was already changed to use the gl_varying_slot_name_for_stage()
instead.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>

3 years agost/atifs: Use gl_varying_slot_name_for_stage()
Caio Marcelo de Oliveira Filho [Thu, 11 Feb 2021 20:31:41 +0000 (12:31 -0800)]
st/atifs: Use gl_varying_slot_name_for_stage()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>

3 years agoetnaviv: Use gl_varying_slot_name_for_stage()
Caio Marcelo de Oliveira Filho [Thu, 11 Feb 2021 20:30:49 +0000 (12:30 -0800)]
etnaviv: Use gl_varying_slot_name_for_stage()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>

3 years agofreedreno/ir3: Use gl_varying_slot_name_for_stage()
Caio Marcelo de Oliveira Filho [Thu, 11 Feb 2021 20:30:19 +0000 (12:30 -0800)]
freedreno/ir3: Use gl_varying_slot_name_for_stage()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>

3 years agointel/compiler: Use gl_varying_slot_name_for_stage()
Caio Marcelo de Oliveira Filho [Thu, 11 Feb 2021 20:19:13 +0000 (12:19 -0800)]
intel/compiler: Use gl_varying_slot_name_for_stage()

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8998>

3 years agozink: flag exact alu op results in ntv with NoContraction
Mike Blumenkrantz [Wed, 29 Jul 2020 14:22:55 +0000 (10:22 -0400)]
zink: flag exact alu op results in ntv with NoContraction

this propagates the exact flag and ensures precision isn't lost during
optimizations

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8660>

3 years agoaco: remove dead code for the handling of exec temporaries
Daniel Schürmann [Thu, 4 Feb 2021 15:01:44 +0000 (16:01 +0100)]
aco: remove dead code for the handling of exec temporaries

Totals from 26026 (18.67% of 139391) affected shaders (Navi10):
PreSGPRs: 370993 -> 326177 (-12.08%)

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

3 years agoaco: make all exec accesses non-temporaries
Daniel Schürmann [Wed, 3 Feb 2021 14:44:49 +0000 (15:44 +0100)]
aco: make all exec accesses non-temporaries

So that they are not counted into the register demand.

Totals from 107336 (77.00% of 139391) affected shaders (Navi10):
VGPRs: 4023452 -> 4023248 (-0.01%); split: -0.01%, +0.01%
SpillSGPRs: 14088 -> 12571 (-10.77%); split: -11.03%, +0.26%
CodeSize: 266816164 -> 266765528 (-0.02%); split: -0.04%, +0.02%
MaxWaves: 1553339 -> 1553374 (+0.00%); split: +0.00%, -0.00%
Instrs: 50977701 -> 50973093 (-0.01%); split: -0.02%, +0.01%
Cycles: 1733911128 -> 1733605320 (-0.02%); split: -0.05%, +0.03%
VMEM: 40867650 -> 40900204 (+0.08%); split: +0.13%, -0.05%
SMEM: 6835980 -> 6829073 (-0.10%); split: +0.10%, -0.20%
VClause: 1032783 -> 1032788 (+0.00%); split: -0.01%, +0.01%
SClause: 2103705 -> 2104115 (+0.02%); split: -0.09%, +0.11%
Copies: 3195658 -> 3193656 (-0.06%); split: -0.30%, +0.24%
Branches: 1140213 -> 1140120 (-0.01%); split: -0.05%, +0.04%
PreSGPRs: 3603785 -> 3437064 (-4.63%); split: -5.13%, +0.50%
PreVGPRs: 3321996 -> 3321850 (-0.00%)

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

3 years agoaco: handle non-temp phi definitions and operands
Daniel Schürmann [Thu, 4 Feb 2021 14:55:23 +0000 (15:55 +0100)]
aco: handle non-temp phi definitions and operands

This will be necessary as we make exec non-temp.

No fossil-db changes.

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

3 years agoaco: don't create unnecessary exec phi on merge blocks
Daniel Schürmann [Wed, 3 Feb 2021 14:32:32 +0000 (15:32 +0100)]
aco: don't create unnecessary exec phi on merge blocks

No fossil-db changes.

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

3 years agov3dv/meta_copy: get tlb compatible BC compressed formats for copies
Alejandro Piñeiro [Thu, 11 Feb 2021 23:18:02 +0000 (00:18 +0100)]
v3dv/meta_copy: get tlb compatible BC compressed formats for copies

So we can use the tlb path for several operations (copy image, clear,
copy buffer to image, etc).

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>

3 years agov3dv/formats: expose support for BC1-3 compressed formats
Alejandro Piñeiro [Wed, 10 Feb 2021 20:56:13 +0000 (21:56 +0100)]
v3dv/formats: expose support for BC1-3 compressed formats

Even though we can't expose textureCompressedBC as the hw doesn't
support all the formats, we can expose as supported individual
formats.

This gets several ~850 CTS tests going from skip to pass, with
patterns like:

  * dEQP-VK.texture.compressed.bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.2d*bc*
  * dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.color.3d*bc*
  * dEQP-VK.api.info.image_format_properties*bc*
  * etc

v2: BC1-3 formats are texture filterable (Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>

3 years agov3dv/device: clarify that we can't expose textureCompressionBC
Alejandro Piñeiro [Wed, 10 Feb 2021 11:38:35 +0000 (12:38 +0100)]
v3dv/device: clarify that we can't expose textureCompressionBC

From spec:

"textureCompressionBC specifies whether all of the BC compressed
 texture formats are supported. If this feature is enabled"

Note the *all*. v3d hw supports BC1, BC2, and BC3, but not BC4 through
BC7.

Let's clarify that we can't expose textureCompressionBC even if we
support some of them.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8929>

3 years agodocs/features: gl_HelperInvocation on Panfrost
Alyssa Rosenzweig [Fri, 29 Jan 2021 17:33:26 +0000 (12:33 -0500)]
docs/features: gl_HelperInvocation on Panfrost

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

3 years agodocs/features: Mark sample shading done on Panfrost
Alyssa Rosenzweig [Fri, 29 Jan 2021 17:33:15 +0000 (12:33 -0500)]
docs/features: Mark sample shading done on Panfrost

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

3 years agodocs/features: Mark some ES3.1 done on Panfrost
Alyssa Rosenzweig [Wed, 27 Jan 2021 13:21:03 +0000 (08:21 -0500)]
docs/features: Mark some ES3.1 done on Panfrost

These should be working on both Midgard and Bifrost now.

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

3 years agodocs/features: Mark more TBO exts done on panfrost
Alyssa Rosenzweig [Wed, 27 Jan 2021 13:18:23 +0000 (08:18 -0500)]
docs/features: Mark more TBO exts done on panfrost

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

3 years agopanfrost: Advertise OES_standard_derivatives
Alyssa Rosenzweig [Fri, 12 Feb 2021 01:41:54 +0000 (20:41 -0500)]
panfrost: Advertise OES_standard_derivatives

Has been implemented for ages since it's part of ES3, but we missed the
CAP needed for the ES2 extension.

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

3 years agopanfrost: Bump advertised ESSL feature level
Alyssa Rosenzweig [Wed, 27 Jan 2021 16:24:43 +0000 (11:24 -0500)]
panfrost: Bump advertised ESSL feature level

Needed to run more dEQP tests.

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

3 years agopanfrost: Bump max SSBO count
Alyssa Rosenzweig [Wed, 27 Jan 2021 18:00:38 +0000 (13:00 -0500)]
panfrost: Bump max SSBO count

There's no actual architectural limit, this is totally arbitrary, but
fixes some NotSupported errors in dEQP-GLES31.

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

3 years agopanfrost: Advertise SAMPLE_SHADING
Alyssa Rosenzweig [Thu, 11 Feb 2021 01:57:40 +0000 (20:57 -0500)]
panfrost: Advertise SAMPLE_SHADING

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

3 years agopanfrost: Assert on indirect compute shaders
Alyssa Rosenzweig [Fri, 12 Feb 2021 01:37:05 +0000 (20:37 -0500)]
panfrost: Assert on indirect compute shaders

This case was overlooked. Much simpler than indirect graphics calls, can
come as a follow on to the other indirect work.

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

3 years agopanfrost: Remove stale TODOs
Alyssa Rosenzweig [Thu, 11 Feb 2021 01:50:02 +0000 (20:50 -0500)]
panfrost: Remove stale TODOs

The answer is no, we do not. Putting them in the primary batch allows
proper intermixing with graphics work. There's no harm for pure compute
loads, either.

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

3 years agopanfrost: Simplify bind_compute_state
Alyssa Rosenzweig [Thu, 11 Feb 2021 01:49:15 +0000 (20:49 -0500)]
panfrost: Simplify bind_compute_state

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

3 years agopan/{mdg, bi}: Lower load_sample_pos
Alyssa Rosenzweig [Wed, 27 Jan 2021 21:19:04 +0000 (16:19 -0500)]
pan/{mdg, bi}: Lower load_sample_pos

Conceptually same lowering as the DDK, although we're missing a number
of relevant compiler optimizations so the generated code is awful.

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

3 years agopan/{mdg, bi}: Lower load_helper_invocation
Alyssa Rosenzweig [Wed, 27 Jan 2021 18:32:56 +0000 (13:32 -0500)]
pan/{mdg, bi}: Lower load_helper_invocation

Passes dEQP-GLES31.functional.shaders.helper_invocation.* on both
architectures

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

3 years agopan/bi: Implement coverage mask updates
Alyssa Rosenzweig [Fri, 29 Jan 2021 21:59:12 +0000 (16:59 -0500)]
pan/bi: Implement coverage mask updates

Impressive how simple this looks after dozens of patches of
sysval-related prepwork :)

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

3 years agopan/bi: Decouple sysval loading from NIR
Alyssa Rosenzweig [Fri, 29 Jan 2021 23:16:58 +0000 (18:16 -0500)]
pan/bi: Decouple sysval loading from NIR

Useful for builder-based sysvals.

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

3 years agopan/bi: Implement nir_intrinsic_load_sample_positions_pan
Alyssa Rosenzweig [Wed, 27 Jan 2021 21:18:38 +0000 (16:18 -0500)]
pan/bi: Implement nir_intrinsic_load_sample_positions_pan

Just copy the FAU result.

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

3 years agopan/bi: Implement load_sample_mask_in
Alyssa Rosenzweig [Wed, 27 Jan 2021 20:44:00 +0000 (15:44 -0500)]
pan/bi: Implement load_sample_mask_in

Preloaded.

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

3 years agopan/bi: Fix gl_SampleID read
Alyssa Rosenzweig [Wed, 27 Jan 2021 19:01:23 +0000 (14:01 -0500)]
pan/bi: Fix gl_SampleID read

Fixes dEQP-GLES31.functional.shaders.sample_variables.sample_id.default_framebuffer

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

3 years agopan/bi: Lower ifind_msb
Alyssa Rosenzweig [Wed, 27 Jan 2021 17:41:57 +0000 (12:41 -0500)]
pan/bi: Lower ifind_msb

We have ufind_msb efficient, implement in terms of that.

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

3 years agopan/bi: Implement ufind_msb
Alyssa Rosenzweig [Wed, 27 Jan 2021 17:31:45 +0000 (12:31 -0500)]
pan/bi: Implement ufind_msb

Lowered to #(sz - 1) - clz(x), taking advantage of the machine's
8-bit and 16-bit variants of clz and the widening on the second argument
of ISUB to implement neatly in two instructions.

Note that in NIR, ufind_msb can take any integer type but always output
i32.

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

3 years agopan/bi: Implement bitfield_reverse
Alyssa Rosenzweig [Wed, 27 Jan 2021 17:17:26 +0000 (12:17 -0500)]
pan/bi: Implement bitfield_reverse

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

3 years agopan/bi: Support bit_count()
Boris Brezillon [Mon, 25 Jan 2021 12:22:05 +0000 (13:22 +0100)]
pan/bi: Support bit_count()

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

3 years agopan/bi: Add uclz() support
Boris Brezillon [Mon, 25 Jan 2021 12:21:28 +0000 (13:21 +0100)]
pan/bi: Add uclz() support

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

3 years agopan/bi: Lower bitfield inserts/extracts
Alyssa Rosenzweig [Wed, 27 Jan 2021 16:51:38 +0000 (11:51 -0500)]
pan/bi: Lower bitfield inserts/extracts

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

3 years agopan/bi: Implement texture gathers
Alyssa Rosenzweig [Wed, 27 Jan 2021 16:22:10 +0000 (11:22 -0500)]
pan/bi: Implement texture gathers

Passes all of dEQP-GLES31.functional.texture.gather.*

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

3 years agopan/bi: Remove redundant TEXC opcode check
Alyssa Rosenzweig [Wed, 27 Jan 2021 16:21:48 +0000 (11:21 -0500)]
pan/bi: Remove redundant TEXC opcode check

Already checked in emit_tex

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

3 years agopan/mdg: Lower stores from helpers
Alyssa Rosenzweig [Wed, 27 Jan 2021 18:20:32 +0000 (13:20 -0500)]
pan/mdg: Lower stores from helpers

Required for correct behaviour of SSBOs in fragment shaders on Midgard.

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

3 years agopan/mdg: Stub load_barycentric_sample
Alyssa Rosenzweig [Fri, 29 Jan 2021 01:03:38 +0000 (20:03 -0500)]
pan/mdg: Stub load_barycentric_sample

Now parity with Bifrost for not failing over these intrinsics.

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

3 years agopan/mdg: Lower ufind_msb, poorly
Alyssa Rosenzweig [Wed, 27 Jan 2021 18:02:01 +0000 (13:02 -0500)]
pan/mdg: Lower ufind_msb, poorly

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

3 years agopan/mdg: Implement uclz
Alyssa Rosenzweig [Wed, 27 Jan 2021 17:57:06 +0000 (12:57 -0500)]
pan/mdg: Implement uclz

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

3 years agopan/mdg: Rename bitcount8 to popcnt, fixing the unit
Alyssa Rosenzweig [Wed, 27 Jan 2021 17:17:59 +0000 (12:17 -0500)]
pan/mdg: Rename bitcount8 to popcnt, fixing the unit

Still doesn't seem to work correctly for negative values.

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

3 years agopan/mdg: Lower bitfield instructions
Alyssa Rosenzweig [Wed, 27 Jan 2021 16:51:30 +0000 (11:51 -0500)]
pan/mdg: Lower bitfield instructions

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

3 years agopan/mdg: Remove unused pack_unorm_4x8 lowering
Alyssa Rosenzweig [Wed, 27 Jan 2021 15:27:10 +0000 (10:27 -0500)]
pan/mdg: Remove unused pack_unorm_4x8 lowering

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

3 years agopan/mdg: Assert on bad 64-bit swizzle in disassembly
Alyssa Rosenzweig [Wed, 27 Jan 2021 13:49:09 +0000 (08:49 -0500)]
pan/mdg: Assert on bad 64-bit swizzle in disassembly

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

3 years agopanfrost: Add MULTISAMPLED sysval
Alyssa Rosenzweig [Fri, 29 Jan 2021 23:10:02 +0000 (18:10 -0500)]
panfrost: Add MULTISAMPLED sysval

To be used with Bifrost coverage mask updates.

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

3 years agopanfrost: Overhaul sysval handling
Alyssa Rosenzweig [Fri, 29 Jan 2021 22:16:07 +0000 (17:16 -0500)]
panfrost: Overhaul sysval handling

Don't preassign.

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

3 years agopanfrost: Implement get_sample_position
Alyssa Rosenzweig [Fri, 29 Jan 2021 21:40:51 +0000 (16:40 -0500)]
panfrost: Implement get_sample_position

Easy now that we have the table.

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

3 years agopanfrost: Advertise MSAA 8x and 16x
Alyssa Rosenzweig [Fri, 29 Jan 2021 21:27:09 +0000 (16:27 -0500)]
panfrost: Advertise MSAA 8x and 16x

On Bifrost. Could support Mali T760+ with additional debug.

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

3 years agopanfrost: Ensure open_device has pandecode initialized
Alyssa Rosenzweig [Fri, 29 Jan 2021 21:26:57 +0000 (16:26 -0500)]
panfrost: Ensure open_device has pandecode initialized

Requires reordering some calls.

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

3 years agopanfrost: Use sample location LUT
Alyssa Rosenzweig [Wed, 27 Jan 2021 20:35:39 +0000 (15:35 -0500)]
panfrost: Use sample location LUT

Fixes multisampling issues on Bifrost.

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

3 years agopanfrost: Upload sample positions on device init
Alyssa Rosenzweig [Fri, 29 Jan 2021 20:56:05 +0000 (15:56 -0500)]
panfrost: Upload sample positions on device init

Needed to correctly implement multisampling on Bifrost, and used in
gl_SamplePosition  implementation on Midgard. These are architecturally
invariant, so it's fine to hard code.

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

3 years agopanfrost: Set sample count/pattern for tiler FBD
Alyssa Rosenzweig [Fri, 12 Feb 2021 21:40:07 +0000 (16:40 -0500)]
panfrost: Set sample count/pattern for tiler FBD

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

3 years agopanfrost: Remove batch_is_scanout
Alyssa Rosenzweig [Fri, 29 Jan 2021 19:43:42 +0000 (14:43 -0500)]
panfrost: Remove batch_is_scanout

Unused since last commit.

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

3 years agopanfrost: Remove PAN_REQ_DEPTH_WRITE
Alyssa Rosenzweig [Fri, 29 Jan 2021 19:43:15 +0000 (14:43 -0500)]
panfrost: Remove PAN_REQ_DEPTH_WRITE

No consumers, garbage collect the whole thing.

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

3 years agopanfrost: Remove PAN_REQ_MSAA
Alyssa Rosenzweig [Fri, 29 Jan 2021 19:41:55 +0000 (14:41 -0500)]
panfrost: Remove PAN_REQ_MSAA

Neglible win for draw time overhead.

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

3 years agopanfrost: Don't use PAN_REQ_MSAA in SFBD
Alyssa Rosenzweig [Fri, 29 Jan 2021 19:40:56 +0000 (14:40 -0500)]
panfrost: Don't use PAN_REQ_MSAA in SFBD

We can also generalize a bit to eliminate the state dependence.

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