platform/upstream/mesa.git
3 years agogallium/threaded_context: add another rule for buffer mapping
Mike Blumenkrantz [Thu, 8 Apr 2021 18:43:04 +0000 (14:43 -0400)]
gallium/threaded_context: add another rule for buffer mapping

a synchronous driver can use PIPE_MAP_ONCE to infer that a buffer is
guaranteed to not be mapped multiple times, as this is only used when
doing map -> memcpy -> unmap directly

a threaded driver performs maps/unmaps asynchronously, so this flag
can only be used by the driver to confirm that the mapped region is accessed
exactly once, not that it will not need to remain mapped for other transfer_map
uses after it is unmapped

in short, consider this scenario:
  transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A) ->
  transfer_map(A) -> memcpy(map, data) -> transfer_unmap(map_A)

when a synchronous driver executes this, the call chain is unmodified

when a tc driver executes this, the call chain may become:
  transfer_map(A) -> memcpy(map, data) ->
  transfer_map(A) -> memcpy(map, data) ->
  transfer_unmap(map_A) -> transfer_unmap(map_A)

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

3 years agoetnaviv: tell the truth if alpha-test is supported
Christian Gmeiner [Fri, 12 Mar 2021 08:18:51 +0000 (09:18 +0100)]
etnaviv: tell the truth if alpha-test is supported

GPUs with the feature bit PE_NO_ALPHA_TEST set have no fixed-function
alpha test unit and we want to let st lower it with a shader variant.

For GC7000K this fixes all fbo-alphatest-formats piglits like:
 spec@ext_framebuffer_object@fbo-alphatest-formats
 spec@ext_packed_float@fbo-alphatest-formats
 spec@ext_texture_srgb@fbo-alphatest-formats

This only works with the NIR compiler backend.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9871>

3 years agofeatures: mark off ARB_fragment_shader_interlock for zink
Mike Blumenkrantz [Thu, 8 Apr 2021 16:55:41 +0000 (12:55 -0400)]
features: mark off ARB_fragment_shader_interlock for zink

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

3 years agovenus: implement vn_debug_init_once with os_get_option
Yiwei Zhang [Tue, 6 Apr 2021 00:50:36 +0000 (00:50 +0000)]
venus: implement vn_debug_init_once with os_get_option

getenv is not working well with Android VM. Instead, use os_get_option
to read Android system property.

e.g. adb shell setprop mesa.vn.debug drm

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>

3 years agovenus: bring up Android support
Yiwei Zhang [Sat, 3 Apr 2021 19:14:00 +0000 (19:14 +0000)]
venus: bring up Android support

1. implement hwvulkan_device_t
2. mask Android extension support

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>

3 years agovenus: properly enable WSI for different platforms
Yiwei Zhang [Mon, 5 Apr 2021 21:20:09 +0000 (21:20 +0000)]
venus: properly enable WSI for different platforms

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10112>

3 years agonir/spirv: remove unused fields from `vtn_builder`
Andrii Simiklit [Thu, 8 Apr 2021 11:17:00 +0000 (14:17 +0300)]
nir/spirv: remove unused fields from `vtn_builder`

They were used for tracking whether SSA needed to be repaired,
but now the repair is done for all functions with structured control flow.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755>

3 years agospirv: repair ssa defs for switchs with only default case
Andrii Simiklit [Tue, 24 Nov 2020 12:28:12 +0000 (14:28 +0200)]
spirv: repair ssa defs for switchs with only default case

This fixes OpSwitch corner case when switch doesn't have any targets
just a `default` and SSAs defined in it is used after switch block
directly without phis.

v2: Just use `repair_ssa` for all structured control-flow cases
               ( - Jason Ekstrand <jason@jlekstrand.net>
                 - Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> )

Closes: #3787
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755>

3 years agointel/compiler: remove unused member 'input_vue_map'
Yevhenii Kharchenko [Tue, 6 Apr 2021 22:23:08 +0000 (01:23 +0300)]
intel/compiler: remove unused member 'input_vue_map'

v2: Instead of fixing unitialized member 'fs_visitor::input_vue_map'
(as reported by Coverity Scan in defect CID 1474559),
remove unused members 'vec4_tcs_visitor::input_vue_map' and
'fs_visitor::input_vue_map'.

Also fixed 'debug_enabled' argument skipped in a fs_visitor constructor
call from brw_compile_tes().

Signed-off-by: Yevhenii Kharchenko <yevhenii.kharchenko@globallogic.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10040>

3 years agoradv: add MSAA support to ClearColorImage() on compute queue
Samuel Pitoiset [Wed, 7 Apr 2021 07:08:18 +0000 (09:08 +0200)]
radv: add MSAA support to ClearColorImage() on compute queue

Found by inspection.

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

3 years agovenus: initial support for WSI
Chia-I Wu [Mon, 21 Oct 2019 20:52:12 +0000 (13:52 -0700)]
venus: initial support for WSI

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for transform feedback
Chia-I Wu [Fri, 9 Oct 2020 17:33:23 +0000 (10:33 -0700)]
venus: initial support for transform feedback

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: advertise extensions promoted to 1.2
Chia-I Wu [Fri, 11 Sep 2020 22:14:34 +0000 (15:14 -0700)]
venus: advertise extensions promoted to 1.2

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: advertise extensions promoted to 1.1
Chia-I Wu [Fri, 11 Sep 2020 17:39:17 +0000 (10:39 -0700)]
venus: advertise extensions promoted to 1.1

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for command buffers
Chia-I Wu [Tue, 5 Nov 2019 20:53:15 +0000 (12:53 -0800)]
venus: initial support for command buffers

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for module and pipelines
Chia-I Wu [Tue, 5 Nov 2019 20:52:14 +0000 (12:52 -0800)]
venus: initial support for module and pipelines

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for events and queries
Chia-I Wu [Tue, 5 Nov 2019 20:51:09 +0000 (12:51 -0800)]
venus: initial support for events and queries

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for render pass and fb
Chia-I Wu [Tue, 5 Nov 2019 20:50:20 +0000 (12:50 -0800)]
venus: initial support for render pass and fb

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for descriptor sets
Chia-I Wu [Tue, 5 Nov 2019 20:48:58 +0000 (12:48 -0800)]
venus: initial support for descriptor sets

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for buffers/images/samplers
Chia-I Wu [Mon, 4 Nov 2019 21:09:04 +0000 (13:09 -0800)]
venus: initial support for buffers/images/samplers

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for VkDeviceMemory commands
Chia-I Wu [Mon, 4 Nov 2019 20:57:01 +0000 (12:57 -0800)]
venus: initial support for VkDeviceMemory commands

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for queue/fence/semaphore
Chia-I Wu [Wed, 6 Nov 2019 18:19:20 +0000 (10:19 -0800)]
venus: initial support for queue/fence/semaphore

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for VkDevice commands
Chia-I Wu [Mon, 4 Nov 2019 20:49:32 +0000 (12:49 -0800)]
venus: initial support for VkDevice commands

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for VkPhysicalDevice commands
Chia-I Wu [Tue, 29 Oct 2019 19:03:53 +0000 (12:03 -0700)]
venus: initial support for VkPhysicalDevice commands

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: initial support for vkCreateInstance
Chia-I Wu [Tue, 29 Oct 2019 19:03:53 +0000 (12:03 -0700)]
venus: initial support for vkCreateInstance

Connect to the renderer.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: add a ring buffer
Chia-I Wu [Mon, 1 Mar 2021 19:54:21 +0000 (11:54 -0800)]
venus: add a ring buffer

vn_ring is a fast way to submit commands, skipping vn_renderer entirely.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: add a CS encoder/decoder
Chia-I Wu [Tue, 1 Oct 2019 20:48:57 +0000 (13:48 -0700)]
venus: add a CS encoder/decoder

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: add experimental renderers
Chia-I Wu [Tue, 29 Oct 2019 18:00:00 +0000 (11:00 -0700)]
venus: add experimental renderers

There are a virtio-gpu renderer and a vtest renderer.  The vtest
renderer must be enabled with VN_DEBUG=vtest.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: add generated venus-protocol headers
Chia-I Wu [Mon, 29 Jun 2020 19:53:34 +0000 (12:53 -0700)]
venus: add generated venus-protocol headers

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovenus: add driver skeleton
Chia-I Wu [Wed, 3 Jun 2020 20:18:30 +0000 (13:18 -0700)]
venus: add driver skeleton

It only has enough stubs to be loadable by the loader.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agovirgl: update headers from virglrenderer
Chia-I Wu [Thu, 20 Aug 2020 20:06:24 +0000 (13:06 -0700)]
virgl: update headers from virglrenderer

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5800>

3 years agonir/gather_info: fix partial masking of compact I/O with location_frac!=0
Rhys Perry [Fri, 2 Apr 2021 09:17:25 +0000 (10:17 +0100)]
nir/gather_info: fix partial masking of compact I/O with location_frac!=0

nir_lower_clip_cull_distance_arrays() can create compact variables with
location_frac!=0.

Fixes: cc7a1874112 ("nir/gather_info: implement partial masking of struct and compact I/O")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4554
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10002>

3 years agoaux/trace: dump all the blend state members
Mike Blumenkrantz [Wed, 7 Apr 2021 12:34:29 +0000 (08:34 -0400)]
aux/trace: dump all the blend state members

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

3 years agonir: Do not reset shared_size in nir_lower_io.
Bas Nieuwenhuizen [Wed, 7 Apr 2021 22:53:52 +0000 (00:53 +0200)]
nir: Do not reset shared_size in nir_lower_io.

I'd like to use raw shared intrinsics already for some raytracing
stuff before this pass gets called and this was a real pitfall.

This mirrors scratch_size and constant_data_size.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094>

3 years agonir: Remove nir_shader->shared_size.
Bas Nieuwenhuizen [Wed, 7 Apr 2021 22:52:18 +0000 (00:52 +0200)]
nir: Remove nir_shader->shared_size.

The same info is in shader_info. Dedupe.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094>

3 years agonir: Extract shader_info->cs.shared_size out of union.
Bas Nieuwenhuizen [Thu, 8 Apr 2021 10:30:14 +0000 (12:30 +0200)]
nir: Extract shader_info->cs.shared_size out of union.

It is valid for all stages, just 0 for most of them. In particular
mesh/task shaders might be using it.

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

3 years agoanv: Drop unused anv_image_create_info::stride
Chad Versace [Thu, 1 Apr 2021 23:14:32 +0000 (16:14 -0700)]
anv: Drop unused anv_image_create_info::stride

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

3 years agoanv: Remove vkCreateDmaBufINTEL (v4)
Chad Versace [Thu, 20 Aug 2020 17:10:28 +0000 (10:10 -0700)]
anv: Remove vkCreateDmaBufINTEL (v4)

Superceded by VK_EXT_image_drm_format_modifier.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v4)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466>

3 years agoanv: Enable VK_EXT_image_drm_format_modifier
Chad Versace [Tue, 23 Mar 2021 05:27:21 +0000 (22:27 -0700)]
anv: Enable VK_EXT_image_drm_format_modifier

Also enable the dependency VK_EXT_queue_family_foreign.

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

3 years agoanv/image: Support VkImageDrmFormatModifierExplicitCreateInfoEXT
Chad Versace [Tue, 23 Feb 2021 00:59:46 +0000 (16:59 -0800)]
anv/image: Support VkImageDrmFormatModifierExplicitCreateInfoEXT

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

3 years agoanv/image: Add 'offset' param to add_surface()
Chad Versace [Tue, 23 Feb 2021 00:41:02 +0000 (16:41 -0800)]
anv/image: Add 'offset' param to add_surface()

Will be used by VkImageDrmFormatModifierExplicitCreateInfoEXT.

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

3 years agoanv: Declare anv_layout_to_* as pure functions
Chad Versace [Tue, 23 Mar 2021 04:23:43 +0000 (21:23 -0700)]
anv: Declare anv_layout_to_* as pure functions

Because I want the compiler to eliminate some function calls in
transition_color_buffer() that produce unused return values. Let's hope
the compiler gets the hint.

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

3 years agoanv: Implement image acquire/release of modifier images
Chad Versace [Tue, 23 Mar 2021 05:20:54 +0000 (22:20 -0700)]
anv: Implement image acquire/release of modifier images

If VkImageMemoryBarrier acquires ownership of the image on
VK_QUEUE_FAMILY_FOREIGN_EXT or VK_QUEUE_FAMILY_EXTERNAL, and if the
image has a DRM format modifier with an aux surface, then we must ensure
that the image's aux state is consistent with the modifier. In the other
direction, if VkImageMemoryBarrier releases ownership, then we may have
to resolve the image's aux surface.

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

3 years agoanv/image: Fix vkGetImageSubresourceLayout for modifier images
Chad Versace [Thu, 1 Apr 2021 23:52:08 +0000 (16:52 -0700)]
anv/image: Fix vkGetImageSubresourceLayout for modifier images

For modifier images, the spec requires that aspect be one of
VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT.

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

3 years agoanv: Move assert in vkGetImageSubresourceLayout
Chad Versace [Thu, 8 Apr 2021 02:08:54 +0000 (19:08 -0700)]
anv: Move assert in vkGetImageSubresourceLayout

Assert the value is valid before we use it.

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

3 years agoanv/image: Fix Vk*ImagePlaneMemory*Info for modifier images
Chad Versace [Thu, 1 Apr 2021 23:52:56 +0000 (16:52 -0700)]
anv/image: Fix Vk*ImagePlaneMemory*Info for modifier images

In VkImagePlaneMemoryRequirementsInfo and VkBindImagePlaneMemoryInfo,
the spec requires the aspect to be
VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT for modifier images.

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

3 years agoanv/image: Add ANV_IMAGE_MEMORY_BINDING_PRIVATE
Chad Versace [Sun, 28 Mar 2021 00:14:00 +0000 (17:14 -0700)]
anv/image: Add ANV_IMAGE_MEMORY_BINDING_PRIVATE

Used for storing the aux surface and/or aux state data for some images
that have a DRM format modifier.

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

3 years agoanv/image: Fix cleanup of failed image creation
Chad Versace [Thu, 1 Apr 2021 18:34:23 +0000 (11:34 -0700)]
anv/image: Fix cleanup of failed image creation

In anv_image_create(), the failure path neglected to call
vk_object_base_finish().

CC: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1466>

3 years agoanv/image: Refactor check_memory_bindings()
Chad Versace [Fri, 19 Mar 2021 19:20:34 +0000 (12:20 -0700)]
anv/image: Refactor check_memory_bindings()

Reduce boilerplate with a helper function, because DRM format modifiers
will soon increase the complexity. In particular, remove the
'prev_range' variable.

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

3 years agoanv/image: Check that anv_image is compatible with its modifier
Chad Versace [Mon, 22 Mar 2021 00:14:12 +0000 (17:14 -0700)]
anv/image: Check that anv_image is compatible with its modifier

At end of image creation, check for incompatibilities that
vkGetPhysicalDeviceImageFormatProperties2() has difficulty predicting.

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

3 years agoanv/image: In vkCreateDmaBufImageINTEL use modifiers
Chad Versace [Mon, 22 Mar 2021 17:55:15 +0000 (10:55 -0700)]
anv/image: In vkCreateDmaBufImageINTEL use modifiers

In vkCreateDmaBufImageINTEL, use VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT.

No intended change in publicly visible behavior.

I really don't want to update this soon-to-be-removed function, but this
change is necessary to avoid upcoming assertion failures. In particular,
we will soon assert that the image has a modifier if and only if it has
modifier tiling.

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

3 years agoanv/image: Fix tiling if VkImageSwapchainCreateInfoKHR
Chad Versace [Mon, 22 Mar 2021 17:49:59 +0000 (10:49 -0700)]
anv/image: Fix tiling if VkImageSwapchainCreateInfoKHR

We incorrectly used VK_IMAGE_TILING_OPTIMAL when the original swapchain
image had VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. When we soon begin
using a different memory layout for modifier images, this mismatch would
have produced undefined behavior.

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

3 years agoanv/image: Simplify assertions in anv_image_from_swapchain()
Chad Versace [Mon, 22 Mar 2021 18:17:08 +0000 (11:17 -0700)]
anv/image: Simplify assertions in anv_image_from_swapchain()

No intended change in behavior.

Conceptual diff:
  |- assert(swapchain_image->apples == (pCreateInfo->apples + MORE));
  |  local_create_info->apples = pCreateInfo->apples + MORE;
  |+ assert(swapchain_image->apples == local_create_info->apples);

And, where appropriate:
  |- local_create_info->orange = X;
  |+ /* See spec anchor #swapchain-wsi-image-create-info .  */
  |+ assert(local_create_info->orange == X);

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

3 years agovulkan: Track dependencies of Python imports
Chad Versace [Mon, 29 Mar 2021 19:39:07 +0000 (12:39 -0700)]
vulkan: Track dependencies of Python imports

The meson.build was unaware of transitive dependencies introduced by
Python imports.

Android still needs fixing. But I did not update the Android files lest
I break the build.

Ideally, we would fix this by using a Python runner that generates
a depfile, similar to how meson creates depfiles for C files by passing
flags -MD -MQ -MF to gcc. But this patch gets the job done, without
stalling on the ideal general solution, by manually tracking the Python
imports in new 'foo_depend_files' variables.

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

3 years agonir: Fix shader calls with nir_opt_dead_write_vars.
Bas Nieuwenhuizen [Wed, 31 Mar 2021 00:41:15 +0000 (02:41 +0200)]
nir: Fix shader calls with nir_opt_dead_write_vars.

Fixes: 5a288932797 ("spirv,nir: Add ray-tracing intrinsics")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10096>

3 years agov3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support
Jose Maria Casanova Crespo [Thu, 25 Feb 2021 12:09:23 +0000 (13:09 +0100)]
v3d: Enables DRM_FORMAT_MOD_BROADCOM_SAND128 support

It enables SAND modifier with columns 128-bytes-wide support for
NV12 format.

When a DRM_FORMAT_MOD_BROADCOM_SAND128 is enabled an imported NV12
texture format has a different layout. Luma and Chroma planes layout
is interleaved for every 128-bytes-wide columns.

Although TFU was supposed to convert a NV12 with SAND_COL128 modifier
from YUV to sRGB color space, it expects a particular swizzle that is not
the one provided by the video decoder available at the Raspberry Pi 4.

This patch follows a similar approach to VC4 YUV blit, using a custom
blit shader that transforms a NV12 texture with SAND_COL128 modifier
with the two interleaved planes to two not-interleaved textures with
UIF format, as it was a regular NV12 format texture.

To reduce the number of texture-fetch operations during the blit, we
are reading and writing the textures in pixel groups of 32-bits. This
implies some swizzling of the pixels to meet the particularities
of the different micro-tile layouts for 8bpp, 16bpp and 32bpp.

With this approach, we are not adding a new format that could be named
"NV12_SAND128". We are just enabling a format modifier.

v2: Rework checks for supported modifiers (Alejandro Piñeiro)
    Destroy custom shaders on context destroy (Alejandro Piñeiro)
    Add more comments (Alejandro Piñeiro)
    SAND128 in query_dmabuf_modifiers should report external_only true.

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

3 years agomeson: Fix missing xcb-xrandr dependency for Vulkan X11 WSI
Philipp Zabel [Thu, 1 Apr 2021 08:04:33 +0000 (10:04 +0200)]
meson: Fix missing xcb-xrandr dependency for Vulkan X11 WSI

Fixes a build failure when building any Vulkan driver for the X11
platform with -Dxlib-lease=disabled. For example:

  /usr/bin/ld: src/vulkan/wsi/libvulkan_wsi.a(wsi_common_x11.c.o): in function `wsi_x11_detect_xwayland':
  src/vulkan/wsi/wsi_common_x11.c:123: undefined reference to `xcb_randr_query_version_unchecked'

Fixes: 1de2fd0cf205 "wsi/x11: Always link against xcb-xrandr"
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9972>

3 years agoaco: ensure loops nested in a WQM loop are in WQM
Rhys Perry [Wed, 7 Apr 2021 10:51:29 +0000 (11:51 +0100)]
aco: ensure loops nested in a WQM loop are in WQM

Fixes a potential empty exec mask in this situation:
enter_wqm()
loop {
   ... wqm code ...
   enter_exact()
   loop {
      ... no wqm code ...
   }
}

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: f0074a6f053 ("aco: do not flag all blocks WQM to ensure we enter all nested loops in WQM")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4546
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10075>

3 years agodraw: fix pstipple, aaline and aapoint without LLVM
Rhys Perry [Wed, 7 Apr 2021 09:34:57 +0000 (10:34 +0100)]
draw: fix pstipple, aaline and aapoint without LLVM

Because of nir_to_tgsi, LLVM is not required here.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: d0f8fe59091 ("softpipe: Switch to using NIR as the shader format from mesa/st.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10072>

3 years agointel/fs: limit OW reads to 8 owords on XeHP+
Lionel Landwerlin [Mon, 15 Mar 2021 15:40:56 +0000 (17:40 +0200)]
intel/fs: limit OW reads to 8 owords on XeHP+

We can only use 16 OW reads/writes on SLM.

v2: Update comment (Curro)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
BSpec: 47652
Fixes: 369eab9420cfc8 ("intel/fs: Emit code for Gen12-HP indirect compute data")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10082>

3 years agoanv: put correct number of BT prefetch for compute on XeHP+
Lionel Landwerlin [Wed, 7 Apr 2021 19:19:21 +0000 (22:19 +0300)]
anv: put correct number of BT prefetch for compute on XeHP+

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10084>

3 years agoradv: make sure FMASK decompress and FCE are performed on gfx queue
Samuel Pitoiset [Tue, 6 Apr 2021 13:11:24 +0000 (15:11 +0200)]
radv: make sure FMASK decompress and FCE are performed on gfx queue

To catch possible transition failures.

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

3 years agozink: support ARB_fragment_shader_interlock
Mike Blumenkrantz [Fri, 2 Apr 2021 18:36:02 +0000 (14:36 -0400)]
zink: support ARB_fragment_shader_interlock

just smashing in some caps and intrinsics

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

3 years agozink: hook up EXT_fragment_shader_interlock
Mike Blumenkrantz [Fri, 2 Apr 2021 18:10:10 +0000 (14:10 -0400)]
zink: hook up EXT_fragment_shader_interlock

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

3 years agozink: use explicit subpass deps
Mike Blumenkrantz [Wed, 3 Mar 2021 19:54:05 +0000 (14:54 -0500)]
zink: use explicit subpass deps

this lets us avoid the spec-mandated barrier and use flags based on
what we'll actually be doing in the pass

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

3 years agozink: use set_foreach_remove()
Mike Blumenkrantz [Tue, 12 Jan 2021 19:51:44 +0000 (14:51 -0500)]
zink: use set_foreach_remove()

this saves potentially thousands of iterations on each batch reset

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

3 years agozink: simplify clear-apply on fb state change
Mike Blumenkrantz [Tue, 9 Mar 2021 20:39:50 +0000 (15:39 -0500)]
zink: simplify clear-apply on fb state change

since surfaces are cached and deduplicated, we no longer have to
do deep comparisons to determine whether two surfaces are equal and can
just compare the pointers

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

3 years agozink: stop unmapping resources
Mike Blumenkrantz [Tue, 26 Jan 2021 23:10:13 +0000 (18:10 -0500)]
zink: stop unmapping resources

it turns out there's not actually a requirement that resources be unmapped,
which means that a ton of overhead can be saved both in the unmap codepath
(the cpu overhead here is pretty insane) and then also when mapping cached
resource memory, as the map can now be added to the cache for immediate reuse

as seen in radeonsi

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

3 years agozink: fix conditional when assigning tess variable io
Mike Blumenkrantz [Thu, 1 Apr 2021 21:43:50 +0000 (17:43 -0400)]
zink: fix conditional when assigning tess variable io

this was not copied directly and changed the old conditional, which
was intended to catch only non-patch tess io

fixes tess io with legacy builtins, e.g., spec@!opengl 2.0@vertex-program-two-side back front2 back2

Fixes: 2d98efd3232 ("zink: pre-populate locations in variables")

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

3 years agozink: bypass separate stencil path in resource_reference_rw when not a zs image
Mike Blumenkrantz [Tue, 12 Jan 2021 22:05:24 +0000 (17:05 -0500)]
zink: bypass separate stencil path in resource_reference_rw when not a zs image

no point in trying to get a stencil resource if none exists

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

3 years agozink: remove atomic usage from batch tracking comparisons
Mike Blumenkrantz [Tue, 12 Jan 2021 17:28:22 +0000 (12:28 -0500)]
zink: remove atomic usage from batch tracking comparisons

race conditions here have no impact because it cannot change the evaluation
of this condition

also no need to check zs stuff if there's no update happening

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

3 years agozink: add env var to force uniform inlining
Mike Blumenkrantz [Tue, 29 Dec 2020 18:30:24 +0000 (13:30 -0500)]
zink: add env var to force uniform inlining

this is great for debugging/testing, but there's no great heuristics
for using it yet

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

3 years agozink: implement uniform inlining
Mike Blumenkrantz [Wed, 16 Dec 2020 17:20:39 +0000 (12:20 -0500)]
zink: implement uniform inlining

this lets us inline away our problems

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

3 years agozink: add a pipe_screen::finalize_nir hook
Mike Blumenkrantz [Tue, 29 Dec 2020 16:32:18 +0000 (11:32 -0500)]
zink: add a pipe_screen::finalize_nir hook

moves some of the always-run passes into the base nir

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

3 years agoaux/trace: add GALLIUM_TRACE_TRIGGER mode
Mike Blumenkrantz [Tue, 6 Apr 2021 13:40:21 +0000 (09:40 -0400)]
aux/trace: add GALLIUM_TRACE_TRIGGER mode

similar to amd/radv driver debug modes for sqtt, this specifies a filename
which is checked on every flush(PIPE_FLUSH_END_OF_FRAME); when it exists,
the next frame (and only that frame) is captured into the trace

to use, specify a file with the env var, run your app, and 'touch /path/to/file'
when you want to capture a trace

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

3 years agomicrosoft/spirv_to_dxil: Use non-zero exit code on failed compilations
Enrico Galli [Tue, 6 Apr 2021 23:12:49 +0000 (16:12 -0700)]
microsoft/spirv_to_dxil: Use non-zero exit code on failed compilations

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

3 years agomicrosoft/spirv_to_dxil: Add support for load_vulkan_descriptor
Enrico Galli [Wed, 24 Mar 2021 07:41:04 +0000 (00:41 -0700)]
microsoft/spirv_to_dxil: Add support for load_vulkan_descriptor

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

3 years agoutil/hash_table: add macro for destructively iterating entries
Mike Blumenkrantz [Tue, 12 Jan 2021 19:49:48 +0000 (14:49 -0500)]
util/hash_table: add macro for destructively iterating entries

a common usage for hash tables is for tracking exactly one instance of a pointer
for a given period of time, after which the table's entries are purged and it
is reused

this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries

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

3 years agoutil/set: add macro for destructively iterating set entries
Mike Blumenkrantz [Tue, 12 Jan 2021 19:49:48 +0000 (14:49 -0500)]
util/set: add macro for destructively iterating set entries

a common usage for sets is for tracking exactly one instance of a pointer
for a given period of time, after which the set's entries are purged and it
is reused

this macro enables the purge phase of such usage to reset the table to a
pristine state, avoiding future rehashing due to ballooning of deleted entries

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

3 years agoaux/trace: add a bunch of methods for lavapipe
Mike Blumenkrantz [Wed, 31 Mar 2021 17:54:17 +0000 (13:54 -0400)]
aux/trace: add a bunch of methods for lavapipe

with all of these, lavapipe can now be traced

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

3 years agoaux/trace: add screen deduplication for zink+lavapipe tracing
Mike Blumenkrantz [Tue, 6 Apr 2021 14:07:49 +0000 (10:07 -0400)]
aux/trace: add screen deduplication for zink+lavapipe tracing

if zink+lavapipe is enabled at compile-time, special handling is needed
to ensure that only the intended screen is traced, otherwise malformed
xml will be generated

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

3 years agodocs: update lavapipe bits for 1.1
Dave Airlie [Wed, 7 Apr 2021 20:24:19 +0000 (06:24 +1000)]
docs: update lavapipe bits for 1.1

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

3 years agozink: export PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER
Mike Blumenkrantz [Thu, 10 Dec 2020 16:14:51 +0000 (11:14 -0500)]
zink: export PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER

avoids memcpy slowpath

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

3 years agolavapipe: enable Vulkan 1.1 support
Dave Airlie [Thu, 4 Mar 2021 05:34:35 +0000 (15:34 +1000)]
lavapipe: enable Vulkan 1.1 support

This is not fully conformant but the failures are the same as the Vulkan 1.0
failures.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agolavapipe: enable correct workgroup sizing
Dave Airlie [Mon, 5 Apr 2021 21:41:58 +0000 (07:41 +1000)]
lavapipe: enable correct workgroup sizing

If I say layering violation, you say?

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agolavapipe: enable subgroups features
Dave Airlie [Fri, 19 Mar 2021 02:05:01 +0000 (12:05 +1000)]
lavapipe: enable subgroups features

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add compute shader subgroup system values support
Dave Airlie [Fri, 19 Mar 2021 02:04:32 +0000 (12:04 +1000)]
gallivm: add compute shader subgroup system values support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup lowering support
Dave Airlie [Fri, 19 Mar 2021 02:04:11 +0000 (12:04 +1000)]
gallivm: add subgroup lowering support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup read invocation support
Dave Airlie [Fri, 19 Mar 2021 02:03:56 +0000 (12:03 +1000)]
gallivm: add subgroup read invocation support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup ballot support
Dave Airlie [Fri, 19 Mar 2021 02:03:38 +0000 (12:03 +1000)]
gallivm: add subgroup ballot support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup reduction + in/ex scan support
Dave Airlie [Fri, 19 Mar 2021 02:02:50 +0000 (12:02 +1000)]
gallivm: add subgroup reduction + in/ex scan support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup elect intrinsic support.
Dave Airlie [Fri, 19 Mar 2021 02:01:41 +0000 (12:01 +1000)]
gallivm: add subgroup elect intrinsic support.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup system values support
Dave Airlie [Fri, 19 Mar 2021 01:59:33 +0000 (11:59 +1000)]
gallivm: add subgroup system values support

This just adds support for retrieving subgroup system values.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: move get_flt_bld to header.
Dave Airlie [Fri, 19 Mar 2021 01:58:18 +0000 (11:58 +1000)]
gallivm: move get_flt_bld to header.

Rewrite a little as we have to add 16-bit support later in life

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agogallivm: add subgroup vote 64-bit and feq support.
Dave Airlie [Fri, 19 Mar 2021 01:56:35 +0000 (11:56 +1000)]
gallivm: add subgroup vote 64-bit and feq support.

These are both required for vulkan subgroup support.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agolavapipe: fix missing protected memory properties
Dave Airlie [Wed, 17 Mar 2021 22:54:43 +0000 (08:54 +1000)]
lavapipe: fix missing protected memory properties

This is needed for vk 1.1

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agolavapipe: add vulkan 1.1 properties/features apis
Dave Airlie [Tue, 22 Dec 2020 07:02:29 +0000 (17:02 +1000)]
lavapipe: add vulkan 1.1 properties/features apis

Still have to add subgroups before advertising 1.1

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645>

3 years agolavapipe: add some asserts for blit region extents
Mike Blumenkrantz [Fri, 2 Apr 2021 15:05:09 +0000 (11:05 -0400)]
lavapipe: add some asserts for blit region extents

this enforces spec for 3d vs array texture blits, more to come

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

3 years agoci: update zink/virgl results for depth clamping fixes
Dave Airlie [Wed, 7 Apr 2021 03:44:14 +0000 (13:44 +1000)]
ci: update zink/virgl results for depth clamping fixes

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068>

3 years agollvmpipe: always take depth clamping from state tracker
Dave Airlie [Wed, 7 Apr 2021 01:18:44 +0000 (11:18 +1000)]
llvmpipe: always take depth clamping from state tracker

Don't be smarter than state tracker here, of d3d10 wants to do
something the state tracker should hard code that. Since lavapipe
wants to use clip_halfz and depth clipping independently.

This fixes some issues blitting Z that zink was seeing

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10068>