platform/upstream/mesa.git
3 years agod3d12: also reject GDI-supporting pixel-formats
Erik Faye-Lund [Tue, 16 Jun 2020 09:39:07 +0000 (11:39 +0200)]
d3d12: also reject GDI-supporting pixel-formats

In theory, it's possible to request a GDI-supporting, double buffered
pixel-format, and we're not able to support this using the DXGI
swapchains. So let's return NULL here in that case as well.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Release swapchain buffers before resizing them
Louis-Francis Ratté-Boulianne [Tue, 12 May 2020 03:09:42 +0000 (23:09 -0400)]
d3d12: Release swapchain buffers before resizing them

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Implement winsys framebuffer
Jesse Natalie [Sat, 25 Apr 2020 20:26:56 +0000 (16:26 -0400)]
d3d12: Implement winsys framebuffer

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Wrap stw_pixelformat.h into extern C
Louis-Francis Ratté-Boulianne [Sat, 25 Apr 2020 20:24:41 +0000 (16:24 -0400)]
wgl: Wrap stw_pixelformat.h into extern C

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Create third buffer when drawing to front buffer
Louis-Francis Ratté-Boulianne [Sat, 23 May 2020 20:45:08 +0000 (16:45 -0400)]
wgl: Create third buffer when drawing to front buffer

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Wait for fence when not using winsys framebuffer
Louis-Francis Ratté-Boulianne [Wed, 27 May 2020 05:50:20 +0000 (01:50 -0400)]
wgl: Wait for fence when not using winsys framebuffer

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Call flush_resource() before presenting
Louis-Francis Ratté-Boulianne [Wed, 27 May 2020 05:47:16 +0000 (01:47 -0400)]
wgl: Call flush_resource() before presenting

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Flush in-between resolving buffer and presenting
Louis-Francis Ratté-Boulianne [Wed, 27 May 2020 05:41:12 +0000 (01:41 -0400)]
wgl: Flush in-between resolving buffer and presenting

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Use winsys framebuffer interface if present
Jesse Natalie [Wed, 18 Mar 2020 20:46:25 +0000 (13:46 -0700)]
wgl: Use winsys framebuffer interface if present

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Add winsys framebuffer object
Jesse Natalie [Sat, 25 Apr 2020 20:04:12 +0000 (16:04 -0400)]
wgl: Add winsys framebuffer object

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Add PFD flags based on stw_winsys callback response
Jesse Natalie [Wed, 18 Mar 2020 17:00:20 +0000 (10:00 -0700)]
wgl: Add PFD flags based on stw_winsys callback response

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Add stw_winsys callback to check which PFD flags should be added
Jesse Natalie [Wed, 18 Mar 2020 16:32:27 +0000 (09:32 -0700)]
wgl: Add stw_winsys callback to check which PFD flags should be added

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Add D3D12 WGL winsys
Louis-Francis Ratté-Boulianne [Fri, 24 Apr 2020 20:09:07 +0000 (16:09 -0400)]
d3d12: Add D3D12 WGL winsys

Add a winsys for code paths common to the libgl-gdi and
libgl-d3d12 targets when using the D3D12 gallium driver.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Implement get_adapter_luid callback
Jesse Natalie [Tue, 17 Mar 2020 21:48:12 +0000 (14:48 -0700)]
wgl: Implement get_adapter_luid callback

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agowgl: Marshal HDC into screen creation and LUID querying
Jesse Natalie [Tue, 17 Mar 2020 21:40:47 +0000 (14:40 -0700)]
wgl: Marshal HDC into screen creation and LUID querying

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Pipe adapter LUID from callbacks to D3D12 screen init
Jesse Natalie [Tue, 17 Mar 2020 21:30:02 +0000 (14:30 -0700)]
d3d12: Pipe adapter LUID from callbacks to D3D12 screen init

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Add glon12 target which only includes d3d12 driver
Jesse Natalie [Fri, 21 Feb 2020 21:02:35 +0000 (13:02 -0800)]
d3d12: Add glon12 target which only includes d3d12 driver

This driver has no WGL or GL entrypoints, only the ones required by the
driver-loader.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agod3d12: Support WINSYS_HANDLE_TYPE_D3D12_RES
Erik Faye-Lund [Wed, 8 Apr 2020 12:44:59 +0000 (14:44 +0200)]
d3d12: Support WINSYS_HANDLE_TYPE_D3D12_RES

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agomesa/st: Introduce WINSYS_HANDLE_TYPE_D3D12_RES
Erik Faye-Lund [Wed, 8 Apr 2020 12:59:00 +0000 (14:59 +0200)]
mesa/st: Introduce WINSYS_HANDLE_TYPE_D3D12_RES

This is analogous to VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT
from Vulkan, and GL_HANDLE_TYPE_D3D12_RESOURCE_EXT from
GL_EXT_external_objects_win32.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

3 years agov3dv: use VkSurface to retrieve an authenticated display fd
Iago Toral Quiroga [Mon, 16 Nov 2020 08:50:22 +0000 (09:50 +0100)]
v3dv: use VkSurface to retrieve an authenticated display fd

We still need a fallback for the case where the application makes
WSI allocations without a surface (Zink),  but for the general case,
this is the right way to do this, as it would ensure that we use
the same display connection that was used to create the surface.

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

3 years agoaco: fix combining max(-min(a, b), c) if a or b uses the neg modifier
Samuel Pitoiset [Tue, 17 Nov 2020 16:14:49 +0000 (17:14 +0100)]
aco: fix combining max(-min(a, b), c) if a or b uses the neg modifier

No fossils-db changes.

Cc: 20.2, 20.3
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/7657>

3 years agoradeonsi: fix scan_instruction for bindless inc_wrap/dec_wrap atomics
Marek Olšák [Mon, 16 Nov 2020 23:42:44 +0000 (18:42 -0500)]
radeonsi: fix scan_instruction for bindless inc_wrap/dec_wrap atomics

Fixes: 25fff591c1162 - radeonsi: add support for nir atomic_inc_wrap/atomic_dec_wrap

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

3 years agoradeonsi: fix NGG streamout regression
Marek Olšák [Thu, 12 Nov 2020 16:56:25 +0000 (11:56 -0500)]
radeonsi: fix NGG streamout regression

num_stream_output_components has to be set for non-GS too.

Fixes: 81d106d6eca - radeonsi: lower IO intrinsics - complete rewrite of input/output scanning

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

3 years agoradeonsi: don't add num_vbos_in_user_sgprs to the shader cache key for non-VS
Marek Olšák [Wed, 11 Nov 2020 18:10:06 +0000 (13:10 -0500)]
radeonsi: don't add num_vbos_in_user_sgprs to the shader cache key for non-VS

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

3 years agoradeonsi: don't do VGT_FLUSH before fast launch on gfx10.3
Marek Olšák [Wed, 11 Nov 2020 04:05:30 +0000 (23:05 -0500)]
radeonsi: don't do VGT_FLUSH before fast launch on gfx10.3

I don't see any hangs here. Blender and the Factorio trace work fine.

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

3 years agoac: rename num_sh_per_se -> num_sa_per_se
Marek Olšák [Wed, 11 Nov 2020 02:37:39 +0000 (21:37 -0500)]
ac: rename num_sh_per_se -> num_sa_per_se

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

3 years agoac: rename num_render_backends -> max_render_backends
Marek Olšák [Wed, 11 Nov 2020 02:34:27 +0000 (21:34 -0500)]
ac: rename num_render_backends -> max_render_backends

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

3 years agoac: fix min/max_good_num_cu_per_sa on gfx10.3 with disabled SEs
Marek Olšák [Wed, 11 Nov 2020 02:30:52 +0000 (21:30 -0500)]
ac: fix min/max_good_num_cu_per_sa on gfx10.3 with disabled SEs

Fixes: 9538b9a68ed - radeonsi: add support for Sienna Cichlid

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

3 years agoac: fix detection of Pro graphics
Marek Olšák [Tue, 10 Nov 2020 23:43:12 +0000 (18:43 -0500)]
ac: fix detection of Pro graphics

Fixes: bfb928759 "ac: add radeon_info::is_pro_graphics"

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

3 years agoac: add build_alloca with an initializer
Marek Olšák [Tue, 10 Nov 2020 13:53:02 +0000 (08:53 -0500)]
ac: add build_alloca with an initializer

combining alloca_undef + BuildStore.

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

3 years agoradeonsi: add options.inline_uniforms to the shader cache key
Marek Olšák [Tue, 10 Nov 2020 23:48:22 +0000 (18:48 -0500)]
radeonsi: add options.inline_uniforms to the shader cache key

It affects how shaders are finalized before caching.

Fixes: b7501184b90 ("radeonsi: implement inlinable uniforms")

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

3 years agoradeonsi: remove VS input loads when culling with rasterizer discard
Marek Olšák [Wed, 21 Oct 2020 17:00:41 +0000 (13:00 -0400)]
radeonsi: remove VS input loads when culling with rasterizer discard

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

3 years agoradeonsi: tweak triangle list culling performance for GS fast launch
Marek Olšák [Wed, 21 Oct 2020 16:34:51 +0000 (12:34 -0400)]
radeonsi: tweak triangle list culling performance for GS fast launch

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

3 years agoradeonsi: read vs_state_bits in vs_prolog correctly
Marek Olšák [Sat, 17 Oct 2020 02:07:09 +0000 (22:07 -0400)]
radeonsi: read vs_state_bits in vs_prolog correctly

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

3 years agoradeonsi: don't subtract max_verts_per_prim from hw_max_esverts on gfx10.3
Marek Olšák [Wed, 21 Oct 2020 18:39:26 +0000 (14:39 -0400)]
radeonsi: don't subtract max_verts_per_prim from hw_max_esverts on gfx10.3

gfx10.3 does it properly. This change enables the last 2 lanes in a workgroup
on gfx10.3.

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

3 years agoradeonsi: determine correctly if switching from normal launch to fast launch
Marek Olšák [Tue, 10 Nov 2020 13:20:21 +0000 (08:20 -0500)]
radeonsi: determine correctly if switching from normal launch to fast launch

Fixes: 3da91b3327f - radeonsi/ngg: add VGT_FLUSH when enabling fast launch

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

3 years agoradeonsi: only do VGT_FLUSH for fast launch if previous draw was normal launch
Marek Olšák [Fri, 16 Oct 2020 15:37:16 +0000 (11:37 -0400)]
radeonsi: only do VGT_FLUSH for fast launch if previous draw was normal launch

Fixes: 3da91b3327f - radeonsi/ngg: add VGT_FLUSH when enabling fast launch

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

3 years agoradeonsi: do VGT_FLUSH when switching NGG -> legacy on Sienna Cichlid
Marek Olšák [Mon, 9 Nov 2020 22:54:44 +0000 (17:54 -0500)]
radeonsi: do VGT_FLUSH when switching NGG -> legacy on Sienna Cichlid

Other chips don't need this.

Fixes: 9538b9a68ed - radeonsi: add support for Sienna Cichlid

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

3 years agoradeonsi: fix min_direct_count value
Marek Olšák [Tue, 10 Nov 2020 14:20:50 +0000 (09:20 -0500)]
radeonsi: fix min_direct_count value

It was always 0.

Fixes: 0ce68852c "radeonsi: implement multi_draw but supporting only 1 draw"

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

3 years agoRevert "anv/image: Define anv_image_get_aux_addr (v3)"
Jason Ekstrand [Wed, 18 Nov 2020 05:22:58 +0000 (23:22 -0600)]
Revert "anv/image: Define anv_image_get_aux_addr (v3)"

This reverts commit 87dc3106b077199b829a082e32ec33d0c6d400ab.

Fixes: 87dc3106b077 "anv/image: Define anv_image_get_aux_addr (v3)"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3826
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7670>

3 years agonir: Rewrite lower_undef_to_zero
Jason Ekstrand [Tue, 17 Nov 2020 23:45:22 +0000 (17:45 -0600)]
nir: Rewrite lower_undef_to_zero

This both fixes its metadata handling (it was flagging dirty regardless
of progress) and reduces the entire pass to 21 LOC including whitespace
by making better use of helpers.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agomicrosoft: Add CLC frontend and kernel/compute support to DXIL converter
Jesse Natalie [Fri, 6 Nov 2020 16:09:30 +0000 (17:09 +0100)]
microsoft: Add CLC frontend and kernel/compute support to DXIL converter

This adds a standalone library which can convert through the pipeline of
OpenCL C -> SPIR -> SPIR-V -> NIR -> DXIL. It can add in the libclc
implementations of various library functions in the NIR phase, and
also massages the NIR to shift it more towards graphics-style compute.

This is leveraged by the out-of-tree OpenCLOn12 runtime
(https://github.com/microsoft/OpenCLOn12).

This is the combination of a lot of commits from our development branch,
containing code by several authors.

Co-authored-by: Boris Brezillon <boris.brezillon@collabora.com>
Co-authored-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agospirv: Allow spirv_to_nir callers to provide a float execution mode
Jesse Natalie [Fri, 13 Nov 2020 23:08:10 +0000 (15:08 -0800)]
spirv: Allow spirv_to_nir callers to provide a float execution mode

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

3 years agonir_load_libclc: Mark libclc shader as internal
Jesse Natalie [Thu, 12 Nov 2020 17:52:11 +0000 (09:52 -0800)]
nir_load_libclc: Mark libclc shader as internal

This allows NIR_PRINT to skip passes run on it.

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

3 years agonir: Make nir_build_deref_offset() support ptr_as_array
Boris Brezillon [Thu, 14 May 2020 11:18:33 +0000 (13:18 +0200)]
nir: Make nir_build_deref_offset() support ptr_as_array

nir_build_deref_offset() can be extended to support calculating an
offset relative to a base pointer.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agovtn/opencl: Fix alignment for half vload/vstore
Jesse Natalie [Wed, 11 Nov 2020 22:24:02 +0000 (14:24 -0800)]
vtn/opencl: Fix alignment for half vload/vstore

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

3 years agonir: Add nir_alu_type -> glsl_base_type conversion helper
Jesse Natalie [Thu, 20 Aug 2020 17:20:57 +0000 (10:20 -0700)]
nir: Add nir_alu_type -> glsl_base_type conversion helper

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

3 years agocompiler/spirv: Handle the LocalSizeHint execution modes
Boris Brezillon [Tue, 14 Apr 2020 08:56:20 +0000 (01:56 -0700)]
compiler/spirv: Handle the LocalSizeHint execution modes

It's basically the same as the LocalSize version except it fills
the local_size_hint array.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agonir: Fix nextafter() for hardware that don't support denorms
Boris Brezillon [Thu, 16 Jul 2020 13:37:41 +0000 (15:37 +0200)]
nir: Fix nextafter() for hardware that don't support denorms

We need to make sure we never return a denorm float, either by flushing
the denorm to 0 or by adjusting the minimum non-zero value.

v2 (Rhys): Use shader float controls execution mode instead of a dedicated option

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agopanfrost/util: Move nir_undef_to_zero into core nir and add 'lower'
Jesse Natalie [Tue, 2 Jun 2020 15:30:35 +0000 (08:30 -0700)]
panfrost/util: Move nir_undef_to_zero into core nir and add 'lower'

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

3 years agonir,clover: Drop nir_lower_mem_constant_vars
Jason Ekstrand [Tue, 3 Nov 2020 17:34:18 +0000 (11:34 -0600)]
nir,clover: Drop nir_lower_mem_constant_vars

We have a more generic helper now so clover doesn't need quite as many
special paths.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agonir: Add a more generic helper for gathering constant initializers
Jason Ekstrand [Tue, 3 Nov 2020 17:33:19 +0000 (11:33 -0600)]
nir: Add a more generic helper for gathering constant initializers

The one we had was tied to nir_var_mem_constant but we also need it for
global and, one day, I can imagine us needing it for shared (though
there's currently no spec that requires it).

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agonir/lower_io: Add data OOB asserts to write_constant
Jason Ekstrand [Tue, 3 Nov 2020 17:07:07 +0000 (11:07 -0600)]
nir/lower_io: Add data OOB asserts to write_constant

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7565>

3 years agomicrosoft/compiler: Add scope for declaration in case statement.
Vinson Lee [Wed, 11 Nov 2020 22:08:48 +0000 (14:08 -0800)]
microsoft/compiler: Add scope for declaration in case statement.

This patch fixes this build error.

../src/microsoft/compiler/dxil_nir.c: In function 'extract_comps_from_vec32':
../src/microsoft/compiler/dxil_nir.c:52:10: error: a label can only be part of a statement and a declaration is not a statement
   52 |          unsigned dst_offs = i * comps_per32b;
      |          ^~~~~~~~

Fixes: b9c61379ab4 ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7563>

3 years agomicrosoft/compiler: Add struct glsl_type forward declaration.
Vinson Lee [Wed, 11 Nov 2020 21:27:05 +0000 (13:27 -0800)]
microsoft/compiler: Add struct glsl_type forward declaration.

This patch fixes this build error.

In file included from ../src/microsoft/compiler/dxil_enums.c:24:
../src/microsoft/compiler/dxil_enums.h:323:58: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
  323 | enum dxil_component_type dxil_get_comp_type(const struct glsl_type *type);
      |                                                          ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.h:325:71: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
  325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type);
      |                                                                       ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.h:327:61: warning: 'struct glsl_type' declared inside parameter list will not be visible outside of this definition or declaration
  327 | enum dxil_resource_kind dxil_get_resource_kind(const struct glsl_type *type);
      |                                                             ^~~~~~~~~
../src/microsoft/compiler/dxil_enums.c:31:30: error: conflicting types for 'dxil_get_prog_sig_comp_type'
   31 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/microsoft/compiler/dxil_enums.c:24:
../src/microsoft/compiler/dxil_enums.h:325:30: note: previous declaration of 'dxil_get_prog_sig_comp_type' was here
  325 | enum dxil_prog_sig_comp_type dxil_get_prog_sig_comp_type(const struct glsl_type *type);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: b9c61379ab4 ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7562>

3 years agomicrosoft/compiler: Add struct dxil_features forward declaration.
Vinson Lee [Wed, 11 Nov 2020 20:22:38 +0000 (12:22 -0800)]
microsoft/compiler: Add struct dxil_features forward declaration.

This patch fixes this build error.

In file included from ../src/microsoft/compiler/dxil_container.c:24:
../src/microsoft/compiler/dxil_container.h:98:42: warning: ‘struct dxil_features’ declared inside parameter list will not be visible outside of this definition or declaration
   98 |                             const struct dxil_features *features);
      |                                          ^~~~~~~~~~~~~
../src/microsoft/compiler/dxil_container.c:72:1: error: conflicting types for ‘dxil_container_add_features’
   72 | dxil_container_add_features(struct dxil_container *c,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/microsoft/compiler/dxil_container.c:24:
../src/microsoft/compiler/dxil_container.h:97:1: note: previous declaration of ‘dxil_container_add_features’ was here
   97 | dxil_container_add_features(struct dxil_container *c,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: b9c61379ab4 ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7560>

3 years agonv50/ir: Initialize GCRA members in constructor.
Vinson Lee [Tue, 10 Nov 2020 03:48:04 +0000 (19:48 -0800)]
nv50/ir: Initialize GCRA members in constructor.

Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member nodes is not initialized in this
constructor nor in any functions that it calls.
uninit_member: Non-static class member nodeCount 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/7522>

3 years agoradeonsi: handle pipe_draw_info::increment_draw_id
Marek Olšák [Mon, 2 Nov 2020 11:11:43 +0000 (06:11 -0500)]
radeonsi: handle pipe_draw_info::increment_draw_id

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

3 years agoradeonsi: swap DrawId and StartInstance SGPR locations
Marek Olšák [Mon, 2 Nov 2020 10:53:26 +0000 (05:53 -0500)]
radeonsi: swap DrawId and StartInstance SGPR locations

We need to change both values at the same time, so they need to be next
to each other.

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

3 years agoradeonsi: don't load DrawID for indirect draws if it's unused
Marek Olšák [Mon, 2 Nov 2020 10:53:58 +0000 (05:53 -0500)]
radeonsi: don't load DrawID for indirect draws if it's unused

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

3 years agomesa: don't FLUSH_VERTICES from primitive restart changes
Marek Olšák [Sun, 1 Nov 2020 22:56:50 +0000 (17:56 -0500)]
mesa: don't FLUSH_VERTICES from primitive restart changes

It's now a draw state with no interactions with glBegin/End.

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

3 years agomesa: add primitive restart state to Driver.Draw parameters
Marek Olšák [Sun, 1 Nov 2020 18:43:43 +0000 (13:43 -0500)]
mesa: add primitive restart state to Driver.Draw parameters

so that display lists don't have to disable it and drivers are simpler.
This will also enable unification with Gallium.

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

3 years agomesa: index _RestartIndex with index_size_shift
Marek Olšák [Sun, 1 Nov 2020 18:01:30 +0000 (13:01 -0500)]
mesa: index _RestartIndex with index_size_shift

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

3 years agomesa: move primitive restart enablement determination from st/mesa to main
Marek Olšák [Sun, 1 Nov 2020 17:55:32 +0000 (12:55 -0500)]
mesa: move primitive restart enablement determination from st/mesa to main

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

3 years agomesa: remove constant drawID parameter from _mesa_draw_arrays
Marek Olšák [Sun, 1 Nov 2020 20:45:52 +0000 (15:45 -0500)]
mesa: remove constant drawID parameter from _mesa_draw_arrays

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

3 years agomesa: clean up GLboolean types in draw.c
Marek Olšák [Sun, 1 Nov 2020 17:40:54 +0000 (12:40 -0500)]
mesa: clean up GLboolean types in draw.c

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

3 years agomesa: clean up Driver.Draw parameter types
Marek Olšák [Sun, 1 Nov 2020 17:35:48 +0000 (12:35 -0500)]
mesa: clean up Driver.Draw parameter types

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

3 years agogallium/u_threaded: add support for multi draws
Marek Olšák [Mon, 2 Nov 2020 08:26:25 +0000 (03:26 -0500)]
gallium/u_threaded: add support for multi draws

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

3 years agogallium/u_threaded: store start/count in min/max_index for better packing
Marek Olšák [Sun, 1 Nov 2020 16:44:04 +0000 (11:44 -0500)]
gallium/u_threaded: store start/count in min/max_index for better packing

This increases the maximum number of draws per batch from 192 to 256.

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

3 years agogallium: extend draw_vbo to support multi draws
Marek Olšák [Sun, 1 Nov 2020 14:04:40 +0000 (09:04 -0500)]
gallium: extend draw_vbo to support multi draws

Essentially rename multi_draw to draw_vbo and remove start and count
from pipe_draw_info.

This is only an interface change. It doesn't add multi draw support
anywhere.

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

3 years agogallium: add missing bits of the direct multi draw interface
Marek Olšák [Sun, 1 Nov 2020 15:55:43 +0000 (10:55 -0500)]
gallium: add missing bits of the direct multi draw interface

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

3 years agogallium/u_threaded: improve draw merging by clearing pipe_draw_info fields
Marek Olšák [Sun, 1 Nov 2020 14:53:32 +0000 (09:53 -0500)]
gallium/u_threaded: improve draw merging by clearing pipe_draw_info fields

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

3 years agogallium: add pipe_draw_info::index_bounds_valid
Marek Olšák [Sun, 1 Nov 2020 12:14:22 +0000 (07:14 -0500)]
gallium: add pipe_draw_info::index_bounds_valid

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

3 years agogallium/u_threaded: clean up direct vs indirect draws
Marek Olšák [Sun, 1 Nov 2020 13:38:50 +0000 (08:38 -0500)]
gallium/u_threaded: clean up direct vs indirect draws

It's called draw_single because multi draws will use a different structure.

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

3 years agogallium/u_threaded: lift DIV_ROUND_UP to eliminate it for constant expressions
Marek Olšák [Tue, 3 Nov 2020 15:52:18 +0000 (10:52 -0500)]
gallium/u_threaded: lift DIV_ROUND_UP to eliminate it for constant expressions

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

3 years agogallium: make pipe_draw_indirect_info * a draw_vbo parameter
Marek Olšák [Sun, 1 Nov 2020 11:38:32 +0000 (06:38 -0500)]
gallium: make pipe_draw_indirect_info * a draw_vbo parameter

This removes 8 bytes from pipe_draw_info (think u_threaded_context)
and a lot of info->indirect pointer indirections.

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

3 years agogallium: move count_from_stream_output into pipe_draw_indirect_info
Marek Olšák [Fri, 30 Oct 2020 13:53:50 +0000 (09:53 -0400)]
gallium: move count_from_stream_output into pipe_draw_indirect_info

This removes some overhead from tc_draw_vbo and increases the maximum number
of draws per batch from 153 to 192 in u_threaded_context.

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

3 years agomesa: add Driver.DrawTransformFeedback
Marek Olšák [Fri, 30 Oct 2020 13:50:50 +0000 (09:50 -0400)]
mesa: add Driver.DrawTransformFeedback

to remove some overhead from Driver.Draw.

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

3 years agoturnip: minor tu_queue fixes related to vk_base_object
Alejandro Piñeiro [Fri, 13 Nov 2020 10:20:08 +0000 (11:20 +0100)]
turnip: minor tu_queue fixes related to vk_base_object

Include:
   * Missing call to tu_queue_finish
   * Use the proper free method for device->queues

Fixes 5d3fdbc52bf8bee6f0acfd55c87b8d280908b559

Tested-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7663>

3 years agoturnip: Assert about the storage buffer offset alignment.
Eric Anholt [Tue, 17 Nov 2020 21:19:36 +0000 (13:19 -0800)]
turnip: Assert about the storage buffer offset alignment.

Giving us an unaligned pointer is invalid, and this helps switch a CTS bug
from being a flake to a consistent crash.

https://gitlab.khronos.org/Tracker/vk-gl-cts/-/issues/2661

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

3 years agolibgl-gdi: add zink support
Michel Zou [Mon, 16 Nov 2020 19:07:06 +0000 (20:07 +0100)]
libgl-gdi: add zink support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Closes #3802

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

3 years agozink: fix unused variable warning
Michel Zou [Tue, 17 Nov 2020 08:29:54 +0000 (09:29 +0100)]
zink: fix unused variable warning

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7643>

3 years agov3dv: implement VK_EXT_private_data
Alejandro Piñeiro [Thu, 12 Nov 2020 15:35:31 +0000 (16:35 +0100)]
v3dv: implement VK_EXT_private_data

Which is using base class's implementation.

Based on Hyunjun's commit d941c6b74fefa97d2d4a1c522170312946d964ca

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

3 years agov3dv: use the common base object type and struct
Alejandro Piñeiro [Thu, 12 Nov 2020 15:30:41 +0000 (16:30 +0100)]
v3dv: use the common base object type and struct

Used as reference Hyujun's commit
5d3fdbc52bf8bee6f0acfd55c87b8d280908b559, that does the same for
turnip.

This commit also replaces in several cases alloc for zalloc, and adds
checks on more Destroy methods if the object to be free is NULL or
not. Most of them were needed to avoid crashes/weird behaviour due
trying to use un-initialized data. Note that now that vk_object_free
iterates over a array, making it more against un-initialized or just
NULL data.

Additionally, using zalloc we can also remove some memset to 0. In
fact we needed to remove them, as if not, they would override the
vk_object_base object to 0 (the alternative would me doing a memset
computing a pointer offset, but that's is not needed as we can just
use zalloc).

v2:
   * Call memset(0) on reused descriptor sets when calling
     ResetDescriptorPool, not when reallocating them (Iago)
   * Add null check when calling DestroyImageView (detected by a full CTS run)

v3: Fixed rebase conflicts after last meta copy/clear changes

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

3 years agoradeonsi: add an option to enable 2x2 coarse shading for non-GUI elements
Marek Olšák [Wed, 11 Nov 2020 16:41:49 +0000 (11:41 -0500)]
radeonsi: add an option to enable 2x2 coarse shading for non-GUI elements

This is for experiments with VRS.

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

3 years agoamd: add register enums for VRS
Marek Olšák [Wed, 11 Nov 2020 17:08:35 +0000 (12:08 -0500)]
amd: add register enums for VRS

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

3 years agoci: update some radv trace checksums
Andres Gomez [Mon, 16 Nov 2020 21:56:05 +0000 (23:56 +0200)]
ci: update some radv trace checksums

After 16c756e55d5 ("spirv: reverse order in matrix multiplication")
some checksums for the radv driver remained to be updated.

v2:
  - Correct typo (Mihai).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7645>

3 years agoci: update some radv trace checksums
Andres Gomez [Mon, 16 Nov 2020 21:12:57 +0000 (23:12 +0200)]
ci: update some radv trace checksums

After 24a18b1a4b9 ("nir: scalarize fdot in reverse") some checksums
for the radv driver remained to be updated.

v2:
  - Correct typo (Mihai).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7645>

3 years agoutil: fix -Wshift-count-overflow warning
Michel Zou [Sat, 31 Oct 2020 12:18:30 +0000 (13:18 +0100)]
util: fix -Wshift-count-overflow warning

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7392>

3 years agomeson: Treat LLVM headers as a system dependency
Tony Wasserka [Mon, 16 Nov 2020 10:07:09 +0000 (11:07 +0100)]
meson: Treat LLVM headers as a system dependency

This will suppress warnings from LLVM includes.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7632>

3 years agofrontends/omx/av1: enable AV1 OMX Bellagio support
Leo Liu [Sun, 25 Oct 2020 00:00:18 +0000 (20:00 -0400)]
frontends/omx/av1: enable AV1 OMX Bellagio support

By adding name, role and profile to OMX decoder

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agofrontends/omx/av1: add AV1 tasks management
Leo Liu [Sat, 24 Oct 2020 23:54:46 +0000 (19:54 -0400)]
frontends/omx/av1: add AV1 tasks management

This handles different task queues based on OMX bellagio

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agofrontends/omx/av1: add AV1 OBU header parsers
Leo Liu [Sun, 18 Oct 2020 15:09:12 +0000 (11:09 -0400)]
frontends/omx/av1: add AV1 OBU header parsers

Based on AV1 spec: https://aomediacodec.github.io/av1-spec

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agofrontends/omx/bellagio: add AV1 initial support to omx dec
Leo Liu [Sun, 18 Oct 2020 14:45:05 +0000 (10:45 -0400)]
frontends/omx/bellagio: add AV1 initial support to omx dec

Also add bitstream base parser based on AV1 spec

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeonsi: cap AV1 support to SIENNA CICHLID
Leo Liu [Sun, 4 Oct 2020 19:02:40 +0000 (15:02 -0400)]
radeonsi: cap AV1 support to SIENNA CICHLID

since AV1 is avaiable from VCN3

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeonsi: cap AV1 codec configuration
Leo Liu [Sun, 4 Oct 2020 19:01:37 +0000 (15:01 -0400)]
radeonsi: cap AV1 codec configuration

This defines the support size to 8K and no interlaced buffer

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeon/vcn: fill up the probs buffer
Leo Liu [Sun, 4 Oct 2020 18:54:55 +0000 (14:54 -0400)]
radeon/vcn: fill up the probs buffer

with the segmetation data and mask

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeon/vcn: get AV1 message buffer
Leo Liu [Wed, 11 Nov 2020 02:01:15 +0000 (21:01 -0500)]
radeon/vcn: get AV1 message buffer

This passes parameters to firmware based on interface by frames.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeon/vcn: fill up the context buffer
Leo Liu [Wed, 11 Nov 2020 01:59:16 +0000 (20:59 -0500)]
radeon/vcn: fill up the context buffer

with the mode tables, mv probs tables, and coef probs tables

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>

3 years agoradeon/vcn: add AV1 context buffer
Leo Liu [Wed, 11 Nov 2020 01:58:09 +0000 (20:58 -0500)]
radeon/vcn: add AV1 context buffer

The context buffer will be filled up with the tables, and used
by firmware for decode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7596>