Jesse Natalie [Fri, 28 Jan 2022 19:42:59 +0000 (11:42 -0800)]
microsoft/compiler: Correctly support I/O on variables with location_frac
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 16:41:22 +0000 (08:41 -0800)]
d3d12: ARB_transform_feedback2
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Sat, 29 Jan 2022 17:37:49 +0000 (09:37 -0800)]
d3d12: Switch primitives-generated query to use XFB, GS, and IA data
Per https://www.supergoodcode.com/primitive-pain/ this is how it should work
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Thu, 27 Jan 2022 15:19:51 +0000 (07:19 -0800)]
d3d12: Rewrite subquery logic
The previous logic was a bit bolted-on, using a linked list of queries
to implement cases where a GL query needed maybe multiple D3D queries.
Once the sub-query was created, it was always begun/ended along with
the parent query, but that's not sufficient or correct.
Instead, we need to be able to have mutually-exclusive subqueries
underneath a parent query. This will let us handle using different
counters for the same GL query in different pipeline configs, and then
accumulating the results together.
Fixes the arb_transform_feedback2-pause-counting piglit test.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Thu, 27 Jan 2022 17:08:04 +0000 (09:08 -0800)]
d3d12: Compute transform UBO0 is actually binding 1
Since lower_uniforms_to_ubo will unconditionally increment UBO indices
from 0 to 1.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 23:51:54 +0000 (15:51 -0800)]
d3d12: Implement DrawAuto aka DrawTransformFeedback
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 22:34:47 +0000 (14:34 -0800)]
d3d12: Move "fake" SO buffer handling to compute transforms instead of CPU readback
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 22:31:48 +0000 (14:31 -0800)]
d3d12: Move compute transform state save/restore to compute_transforms.cpp
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 21:24:31 +0000 (13:24 -0800)]
d3d12: Add a compute transform for draw auto
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 20:52:31 +0000 (12:52 -0800)]
d3d12: Add a couple compute transforms for "fake" SO buffers
This solves 2 problems with the CPU readback we're doing for this now:
1. It's not on the CPU
2. It handles gaps, leaving the destination buffer intact in those gaps
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 20:54:21 +0000 (12:54 -0800)]
d3d12: Add a comment for what the existing compute transform does
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 19:35:11 +0000 (11:35 -0800)]
d3d12: SO buffer filled size is only 32-bit
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 17:30:28 +0000 (09:30 -0800)]
d3d12: Move indirect compute to real indirect dispatches
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 14:49:21 +0000 (06:49 -0800)]
d3d12: Support transform feedback pause/resume
Don't unconditionally reallocate/zero the fill buffer count, only
when a specific value is to be assigned.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Thu, 27 Jan 2022 18:00:35 +0000 (10:00 -0800)]
d3d12: Include SO buffer count as a PSO dirty bit
ctx->gfx_pipeline_state::num_so_targets is used when compiling PSOs,
so make sure that changes to that value result in PSO recompiles.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Wed, 26 Jan 2022 16:31:33 +0000 (08:31 -0800)]
d3d12: Add UAV barriers for UAVs that are being used by compute transforms
If an indirect arg buffer is being produced by a compute shader, then when
we go to consume it as an SSBO in a compute transform pass, we need to insert
a UAV barrier to prevent the two dispatches from overlapping. For app dispatches,
this is the app's responsibility via explicit barrier APIs, and if they don't,
then they're allowed to overlap.
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Thu, 27 Jan 2022 15:58:46 +0000 (07:58 -0800)]
d3d12: Fix compute transform for multi-draw indirect with dynamic count + state vars
NIR validation will complain on the UBO range not being set.
Fixes:
3a8c8d25 ("d3d12: Add a compute transformation to handle indirect draws that need draw params")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Jesse Natalie [Thu, 27 Jan 2022 17:55:36 +0000 (09:55 -0800)]
microsoft/compiler: Fix UAV resource ID counting for static indexed handles
Skip resource space 2 after computing the ID it would've used.
Fixes:
e5f353f2 ("microsoft/compiler: Emit statically-indexed resource handles and scratch later")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14787>
Mike Blumenkrantz [Tue, 18 Jan 2022 15:39:25 +0000 (10:39 -0500)]
zink: use SpvScopeDevice over SpvScopeWorkgroup for atomic shader ops
Workgroup is only allowed in compute shaders, and Device should be more
in line with the intended use here
the alternative would be to keep using Workgroup for compute and use Device
otherwise, but this would effectively make atomic ops non-atomic, which seems
like it isn't desirable
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
Mike Blumenkrantz [Fri, 14 Jan 2022 21:30:28 +0000 (16:30 -0500)]
zink: cast image atomic op params/results based on image type
according to spec, these must match the texel pointer type
cc: mesa-stable
fixes (nvidia):
dEQP-GLES31.functional.image_load_store.2d.atomic.exchange_r32f_return_value
dEQP-GLES31.functional.image_load_store.2d_array.atomic.exchange_r32f_return_value
dEQP-GLES31.functional.image_load_store.cube.atomic.exchange_r32f_return_value
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
Mike Blumenkrantz [Fri, 14 Jan 2022 21:10:47 +0000 (16:10 -0500)]
zink: add warning printf for drivers missing VK_EXT_shader_atomic_float
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
Mike Blumenkrantz [Fri, 14 Jan 2022 21:10:11 +0000 (16:10 -0500)]
zink: enable VK_EXT_shader_atomic_float
this is needed for atomic ops, but we can let drivers that don't support
it have some warning messages instead of gating features
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
Mike Blumenkrantz [Fri, 14 Jan 2022 20:39:11 +0000 (15:39 -0500)]
zink: handle swizzled offset/count values for shader bitfield ops
glsl/nir automatically swizzle the value if a vecN is being used, but spirv
requires a single scalar, so this has to be detected and unswizzled to avoid
violating spec and crashing shader compilers that are less permissive than mesa's
fixes (nvidia):
dEQP-GLES31.functional.shaders.builtin_functions.integer.bitfieldextract*
KHR-GL46.shader_bitfield_operation.bitfieldExtract*
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690>
Boris Brezillon [Mon, 24 Jan 2022 12:53:20 +0000 (13:53 +0100)]
microsoft/spirv_to_dxil: Define idep_libspirv_to_dxil
So we can re-use it when we need to define a dependency on spirv_to_dxil.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Fri, 14 Jan 2022 09:44:04 +0000 (01:44 -0800)]
microsoft/spirv_to_dxil: Make sure the SampleMask is a uint
DXIL doesn't like when SV_Coverage (AKA SampleMask in DXIL) is a
signed integer. Fix the type while we're in the NIR domain.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Fri, 14 Jan 2022 09:05:04 +0000 (01:05 -0800)]
microsoft/spirv_to_dxil: Lower atomics to their dxil variants
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Mon, 8 Nov 2021 12:51:59 +0000 (13:51 +0100)]
microsoft/spirv_to_dxil: Discard PSIZ accesses
D3D12 doesn't support gl_PointSize, so let's consider PointSize is
always 1.0 and discard any PointSize access.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Louis-Francis Ratté-Boulianne [Mon, 24 Jan 2022 11:10:49 +0000 (12:10 +0100)]
microsoft/spirv_to_dxil: Allow passing a vulkan -> d3d12 binding mapping table
Vulkan bindings take only one slot per variable, but d3d12 ones take one
slot per entry when the variable is an array. This forces us to pass
an explicit vulkan -> d3d12 mapping table when dealing with vulkan
shaders.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Louis-Francis Ratté-Boulianne [Mon, 24 Jan 2022 10:59:07 +0000 (11:59 +0100)]
microsoft/spirv_to_dxil: Lower push constant loads to UBO loads
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Louis-Francis Ratté-Boulianne [Wed, 10 Nov 2021 03:54:57 +0000 (22:54 -0500)]
microsoft/spirv_to_dxil: lower input attachments
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Louis-Francis Ratté-Boulianne [Wed, 10 Nov 2021 03:54:29 +0000 (22:54 -0500)]
microsoft/spirv_to_dxil: check for variables r/w access
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Thu, 14 Oct 2021 10:36:53 +0000 (03:36 -0700)]
microsoft/spirv_to_dxil: Support [un]conditional YZ-flip
The unconditional Y-flip is needed for Vulkan 1.0 since D3D12 and
Vulkan coordinate systems differ. Conditional YZ-flip is needed if
we want to support negative viewport height/depth.
Prepare spirv_to_dxil() to support that, and while at it, prepare
things for multi-viewport: the Y/Z flips are per-viewport and encoded
in a 32bit bitmask, with the upper 16bits reserved for Z flips, and the
lower 16bits reserved for Y flips.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Thu, 14 Oct 2021 09:38:42 +0000 (02:38 -0700)]
microsoft/spirv_to_dxil: Allow dumping NIR
Dumping NIR shaders is a useful debug feature. Let's tweak the
spirv_to_nir() helper so we can pass debugging options and
add one to allow dumping NIR.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Boris Brezillon [Mon, 24 Jan 2022 10:49:33 +0000 (11:49 +0100)]
microsoft/spirv_to_dxil: Remove dead variables after the struct split pass
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14765>
Jason Ekstrand [Fri, 23 Jul 2021 05:30:16 +0000 (00:30 -0500)]
anv/image: Call into WSI to create swapchain images
This guarantees that we get an image that's created with exactly the
swapchain image creation parameters instead of trying to emulate it
inside the driver. Ideally, we'd use the fancy new bind helper too but
our magic ANV_IMAGE_MEMORY_BINDING_PRIVATE gets in the way and we really
do want to re-bind ourself.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 05:30:04 +0000 (00:30 -0500)]
anv/image: Add some asserts when binding swapchain images
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 04:58:14 +0000 (23:58 -0500)]
vulkan/wsi: Add image create and bind helpers
These are needed to properly implement the Vulkan 1.1 swapchain image
create/bind functionality.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Mon, 9 Aug 2021 15:23:18 +0000 (10:23 -0500)]
wsi/common: Set VK_IMAGE_CREATE_ALIAS_BIT
With Vulkan 1.1, we have a VkImageSwapchainCreateInfoKHR struct which
lets you create a new VkImage which aliases a swapchain image. However,
there is no corresponding swapchain create flag so we have to set
VK_IMAGE_CREATE_ALIAS_BIT all the time.
We need to do a bit of work in ANV to prevent it from asserting the
moment it sees one of these. Fortunately, they're already safe because
WSI images go through a different bind path for
VkBindImageMemorySwapchainInfoKHR.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 04:50:22 +0000 (23:50 -0500)]
vulkan/wsi/drm: Drop wsi_create_native/prime_image
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 03:14:55 +0000 (22:14 -0500)]
vulkan/wsi/win32: Break create_win32_image in pieces
This is similar to the previous two commits that we did for DRM native
images. It breaks it into configure/create/bind and calls
wsi_create_image to walk through the three-step process.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Thu, 22 Jul 2021 23:27:09 +0000 (18:27 -0500)]
vulkan/wsi/win32: Delete unnecessary copy+paste from DRM
The Win32 WSI just does a copy into the window on the CPU. There's no
need for external memory or modifiers or implicit sync or any of that.
While we're at it, rename to create_win32_image.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 04:49:09 +0000 (23:49 -0500)]
vulkan/wsi/display: Split image creation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 04:44:25 +0000 (23:44 -0500)]
vulkan/wsi/wayland: Split image creation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 04:10:39 +0000 (23:10 -0500)]
vulkan/wsi/x11: Split image creation
Store the wsi_image_create_info in the swapchain and call
wsi_configure_*_image once per swapchain and then use wsi_create_image
for each image.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Thu, 22 Jul 2021 23:24:02 +0000 (18:24 -0500)]
vulkan/wsi/drm: Break create_prime_image in pieces
This is similar to the previous two commits that we did for DRM native
images. It breaks it into configure/create/bind/finish and calls
wsi_create_image to walk through the process. The primary difference is
that prime images need fifth step in the process to set up the blit
command buffer.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Fri, 23 Jul 2021 03:31:57 +0000 (22:31 -0500)]
vulkan/wsi: Add a helper for the configure/create/bind pattern
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Thu, 22 Jul 2021 22:50:38 +0000 (17:50 -0500)]
vulkan/wsi/drm: Break create_native_image in pieces
Instead of making create_native_image one monolithic function, break it
into a configure stage and a create stage. The configure stage is
further broken up, first into a common piece that constructs a simple
VkImageCreateInfo and a couple chain-ins. The second adds the extra
stuff for create_native_image. This is to prepare for eventually
storing those structs in the swapchain itself.
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Jason Ekstrand [Thu, 22 Jul 2021 23:38:20 +0000 (18:38 -0500)]
vulkan/wsi: Set MUTABLE_FORMAT_BIT in the prime path
Fixes:
4bdf8547f4dc "vulkan/wsi: Implement VK_KHR_swapchain_mutable_format"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12031>
Caleb Callaway [Fri, 28 Jan 2022 20:15:59 +0000 (12:15 -0800)]
vulkan/overlay: revise and reformat README
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14784>
Chia-I Wu [Sat, 29 Jan 2022 00:53:48 +0000 (16:53 -0800)]
turnip: respect buf->bo_offset in transform feedback
buf->bo->iova should always be offset by buf->bo_offset.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14786>
Georg Lehmann [Mon, 17 Jan 2022 23:38:10 +0000 (00:38 +0100)]
vulkan/wsi/wayland: Fix add_drm_format_modifier aplha/opaqueness.
This had the opposite problem of the shm path. R8G8B8A8 was always support if
either DRM_FORMAT_XBGR8888 or DRM_FORMAT_ABGR8888 was supported, but we need
both.
Fixes:
d944136f363 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
Georg Lehmann [Tue, 18 Jan 2022 10:19:34 +0000 (11:19 +0100)]
vulkan/wsi/wayland: Add modifiers for RGB formats.
These formats get overwritten after the FALLTHROUGH, so no modifers got added
to them at all.
Fixes:
151b65b2119 ("vulkan/wsi/wayland: generalize modifier handling")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
Georg Lehmann [Mon, 17 Jan 2022 23:40:00 +0000 (00:40 +0100)]
vulkan/wsi/wayland: Convert missing vulkan formats to shm formats.
Fixes:
6b36f35734a ("vulkan/wsi/wl: add wl_shm support for lavapipe.")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
Georg Lehmann [Mon, 17 Jan 2022 23:13:09 +0000 (00:13 +0100)]
vulkan/wsi/wayland: Fix add_wl_shm_format alpha/opaqueness.
We need both the SHM format with alpha and the opaque format to fully support
a vulkan format with alpha. Previously no surface format was reported because
the vulkan formats with aplha were never added as opaque.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5879
Fixes:
d944136f363 ("vulkan/wsi/wayland: don't expose surface formats not fully supported")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14588>
Christian Gmeiner [Sat, 29 Jan 2022 16:24:29 +0000 (17:24 +0100)]
etnaviv: add support for INTEL_blackhole_render
Passes the following piglits:
- spec@intel_blackhole_render@intel_blackhole-draw_gles2
- spec@intel_blackhole_render@intel_blackhole-draw_gles3
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14792>
Boris Brezillon [Wed, 8 Dec 2021 09:50:41 +0000 (10:50 +0100)]
microsoft/compiler: textureLoad() doesn't take a LOD on MS textures
Make sure the LOD is zero in that case.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Boris Brezillon [Wed, 1 Dec 2021 08:19:06 +0000 (09:19 +0100)]
microsoft/compiler: Skip images in redirect_texture_derefs()
The input attachment lowering pass turns input attachment loads into
texel fetch operation, and insert an image -> texture deref cast along
the way. In this situation, we can end up with a texture deref chain
pointing to an image variable, which is not a combined sampler+texture
object. Bail out when an image type is found, like we do for bare
textures.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Boris Brezillon [Wed, 1 Dec 2021 08:13:26 +0000 (09:13 +0100)]
microsoft/compiler: Fix sampler/texture array emission
Those need to be declared as sampler/SRV arrays, as we do for UAVs and
CBVs.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Louis-Francis Ratté-Boulianne [Wed, 10 Nov 2021 03:51:02 +0000 (22:51 -0500)]
microsoft/compiler: Use SRVs for read-only images
Acked-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Louis-Francis Ratté-Boulianne [Wed, 10 Nov 2021 03:43:41 +0000 (22:43 -0500)]
microsoft/compiler: Add subpass input types
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Louis-Francis Ratté-Boulianne [Wed, 10 Nov 2021 03:14:04 +0000 (22:14 -0500)]
microsoft/compiler: add support for load_layer_id
We simply return 0 for now as we don't support multi-view yet.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
Thomas H.P. Andersen [Thu, 20 Jan 2022 01:04:43 +0000 (02:04 +0100)]
svga: silence -Wsometimes-uninitialized
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sun, 26 Dec 2021 00:07:41 +0000 (01:07 +0100)]
anv: drop a set but unused variable
Fixes a warning with clang
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sun, 26 Dec 2021 00:07:47 +0000 (01:07 +0100)]
anv: drop a set but unused variable
Fixes a warning with clang
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Tue, 28 Dec 2021 15:31:13 +0000 (16:31 +0100)]
panfrost: mark two variables as unused
The variables are currently unused as panvk does not support
SSBOs yet.
Silences a compile warning with clang
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sat, 8 Jan 2022 17:28:48 +0000 (18:28 +0100)]
broadcom: drop unused functions
Fixes a clang warning about unused static inlined functions
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sat, 8 Jan 2022 19:34:01 +0000 (20:34 +0100)]
v3d: avoid warning about unused function
This function is only used if V3D_VERSION < 40
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Mon, 17 Jan 2022 18:52:36 +0000 (19:52 +0100)]
v3d: avoid warning about unused function
This function is only used if V3D_VERSION >= 40
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sat, 8 Jan 2022 19:35:45 +0000 (20:35 +0100)]
vc4: drop unused function
Fixes a clang warning about unused static inlined functions
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Thomas H.P. Andersen [Sat, 8 Jan 2022 19:36:48 +0000 (20:36 +0100)]
anv: avoid warning about unused function
This function is only used if GFX_VER == 7
Fixes a clang warning about unused static inlined functions.
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14790>
Danylo Piliaiev [Mon, 27 Dec 2021 11:49:42 +0000 (13:49 +0200)]
ci/freedreno: properly test sysmem and gmem paths
After autotuner introduction most CTS tests are running in
sysmem mode. Now we have to force gmem run and add a small
forced sysmem run since it's not guaranteed that autotuner
would select gmem in future.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12128>
Danylo Piliaiev [Thu, 7 Oct 2021 12:09:32 +0000 (15:09 +0300)]
tu: add debug option to force gmem
With autotuner we now want to be able to force gmem rendering,
it will respect existing constraints though.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12128>
Danylo Piliaiev [Fri, 28 Jan 2022 12:52:23 +0000 (14:52 +0200)]
freedreno: Update gmem/sysmem debug options to be in line with turnip
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12128>
Danylo Piliaiev [Thu, 29 Jul 2021 11:21:05 +0000 (14:21 +0300)]
tu: implement sysmem vs gmem autotuner
The implementation is separate from Freedreno due to multithreading
support.
In Vulkan application may fill command buffer from many threads
and expect no locking to occur. We do introduce the possibility of
locking on renderpass end, however assuming that application
doesn't have a huge amount of slightly different renderpasses,
there would be minimal to none contention.
Other assumptions are:
- Application does submit command buffers soon after their creation.
Breaking the above may lead to some decrease in performance or
autotuner turning itself off.
The heuristic is too simplistic at the moment, to find a proper
one - we should run a bunch of traces with sysmem and gmem, and
build better heuristic from gathered data.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12128>
Lionel Landwerlin [Mon, 31 Jan 2022 07:51:00 +0000 (09:51 +0200)]
anv: tidy long lines in descriptor code
No functional change.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14799>
Boris Brezillon [Mon, 24 Jan 2022 09:31:10 +0000 (01:31 -0800)]
d3d12: Fix "use of designated initializers requires at least '/std:c++20'" error
Fixes:
3a8c8d25fd7e ("d3d12: Add a compute transformation to handle indirect draws that need draw params")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14762>
Rhys Perry [Fri, 28 Jan 2022 14:49:50 +0000 (14:49 +0000)]
aco: preserve pass_flags during format conversions
This helps the "vopc() & exec" optimization.
fossil-db (Sienna Cichlid):
Totals from 1638 (1.21% of 134913) affected shaders:
CodeSize: 3331804 -> 3327520 (-0.13%); split: -0.19%, +0.06%
Instrs: 611807 -> 610096 (-0.28%)
Latency: 5579326 -> 5574874 (-0.08%)
InvThroughput: 936782 -> 936731 (-0.01%); split: -0.01%, +0.00%
Copies: 43324 -> 43302 (-0.05%); split: -0.06%, +0.01%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14773>
Rhys Perry [Fri, 28 Jan 2022 13:47:16 +0000 (13:47 +0000)]
aco: optimize abs(mul(a, b))
fossil-db (Sienna Cichlid):
Totals from 18 (0.01% of 134913) affected shaders:
CodeSize: 173924 -> 173852 (-0.04%)
Instrs: 33864 -> 33846 (-0.05%)
Latency: 122233 -> 122211 (-0.02%)
InvThroughput: 22482 -> 22462 (-0.09%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14773>
Rhys Perry [Fri, 28 Jan 2022 13:48:34 +0000 (13:48 +0000)]
aco: fix neg(abs(mul(a, b))) if the mul is not VOP3
Previously, is_abs was just ignored if mul_instr->isVOP3()==false.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
93c8ebfa780 ("aco: Initial commit of independent AMD compiler")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14773>
Ella Stanforth [Sun, 12 Dec 2021 22:39:55 +0000 (22:39 +0000)]
vulkan: Allow RegisterDisplayEventEXT before first page flip
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14685>
Connor Abbott [Thu, 27 Jan 2022 17:33:55 +0000 (18:33 +0100)]
tu: Initial link-time optimizations
This is mostly taken from radv, and cleaned up a bit: don't explicitly
list every stage at the beginning, and name the shaders "producer" and
"consumer" to reduce confusion. I also stripped out a lot of other stuff
to get to the bare minimum of calling nir_link_opt_varyings,
nir_remove_unused_varyings, and nir_compact_varyings and then cleaning
up the fallout. In the future we may want to temporarily scalarize I/O
like radv does, and add back a few things like the psize optimization.
In the meantime this already provides a lot of benefit.
Results from the radv fossil_db with some apps not compilable by turnip
removed:
Totals:
MaxWaves: 1637288 -> 1668200 (+1.89%); split: +1.89%, -0.00%
Instrs:
54620287 ->
54114442 (-0.93%); split: -0.98%, +0.05%
CodeSize:
92235646 ->
91277584 (-1.04%); split: -1.07%, +0.03%
NOPs:
11176775 ->
11185206 (+0.08%); split: -0.63%, +0.71%
Full: 1689271 -> 1657175 (-1.90%); split: -1.92%, +0.02%
(ss): 1318763 -> 1317757 (-0.08%); split: -1.40%, +1.32%
(sy): 618795 -> 617724 (-0.17%); split: -0.70%, +0.53%
(ss)-stall: 3496370 -> 3470116 (-0.75%); split: -1.37%, +0.62%
(sy)-stall:
23512954 ->
23511164 (-0.01%); split: -1.04%, +1.03%
STPs: 27557 -> 27461 (-0.35%)
LDPs: 22948 -> 22804 (-0.63%)
Cat0:
11823765 ->
11829681 (+0.05%); split: -0.62%, +0.67%
Cat1: 3120042 -> 2991831 (-4.11%); split: -4.43%, +0.32%
Cat2:
28605309 ->
28324829 (-0.98%); split: -0.98%, +0.00%
Cat3: 7334628 -> 7252342 (-1.12%); split: -1.12%, +0.00%
Cat4: 1216514 -> 1204894 (-0.96%)
Cat5: 863976 -> 861926 (-0.24%)
Cat6: 1648571 -> 1641457 (-0.43%)
Totals from 23575 (16.16% of 145856) affected shaders:
MaxWaves: 258806 -> 289718 (+11.94%); split: +11.94%, -0.00%
Instrs: 7571190 -> 7065345 (-6.68%); split: -7.04%, +0.36%
CodeSize:
13864308 ->
12906246 (-6.91%); split: -7.09%, +0.18%
NOPs: 959185 -> 967616 (+0.88%); split: -7.35%, +8.23%
Full: 313335 -> 281239 (-10.24%); split: -10.36%, +0.11%
(ss): 154628 -> 153622 (-0.65%); split: -11.90%, +11.25%
(sy): 69758 -> 68687 (-1.54%); split: -6.21%, +4.67%
(ss)-stall: 322002 -> 295748 (-8.15%); split: -14.92%, +6.76%
(sy)-stall: 3270366 -> 3268576 (-0.05%); split: -7.45%, +7.40%
STPs: 3624 -> 3528 (-2.65%)
LDPs: 1074 -> 930 (-13.41%)
Cat0: 1022684 -> 1028600 (+0.58%); split: -7.13%, +7.71%
Cat1: 531102 -> 402891 (-24.14%); split: -26.04%, +1.90%
Cat2: 4090309 -> 3809829 (-6.86%); split: -6.86%, +0.00%
Cat3: 1449686 -> 1367400 (-5.68%); split: -5.69%, +0.01%
Cat4: 103543 -> 91923 (-11.22%)
Cat5: 57441 -> 55391 (-3.57%)
Cat6: 316096 -> 308982 (-2.25%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14767>
Timothy Arceri [Tue, 4 Jan 2022 01:51:56 +0000 (12:51 +1100)]
glsl/st: move st_nir_opts() into gl compiler common code
This will allow us to use this in future NIR linker work. It also makes
more sense to move it here as the classic drivers are gone, tgsi is
going away and we are merging more of the st into the gl common code.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14785>
Christian Gmeiner [Sun, 25 Oct 2020 21:40:41 +0000 (22:40 +0100)]
etnaviv: add two new HI related perfmon counter
These counter are available starting with kernel 5.10.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7398>
Christian Gmeiner [Fri, 28 Jan 2022 20:14:53 +0000 (21:14 +0100)]
etnaviv: use bytes for read TX data
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7398>
Christian Gmeiner [Fri, 28 Jan 2022 19:49:56 +0000 (20:49 +0100)]
etnaviv: add multiply_with_8 flag
There are some HW counters that are exposing things in terms of 8bytes bundles.
From a user PoV those counters would be much more useful if we do the scaling
to single bytes internally.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7398>
Lionel Landwerlin [Tue, 18 Jan 2022 16:25:09 +0000 (18:25 +0200)]
docs/anv: add descriptor memory layout
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14522>
Lionel Landwerlin [Wed, 12 Jan 2022 21:39:58 +0000 (23:39 +0200)]
docs/anv: list environment variables
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14522>
Lionel Landwerlin [Wed, 12 Jan 2022 14:44:36 +0000 (16:44 +0200)]
docs: start some documentation on Anv
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14522>
Mike Blumenkrantz [Tue, 18 Jan 2022 22:40:56 +0000 (17:40 -0500)]
zink: fix waiting on current batch id
- the current batch id is always 0
- there is always a current batch
- a batch id can only be set at the time of submit
thus when passing 0 to wait on the current batch, the submit must complete
so that there is a batch id, and this must occur before the timeline wait
path or else the timeline wait does nothing
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14693>
Mike Blumenkrantz [Tue, 18 Jan 2022 22:40:36 +0000 (17:40 -0500)]
zink: print an error when the device is lost
how many hours were lost to this
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14693>
Mike Blumenkrantz [Tue, 18 Jan 2022 16:17:12 +0000 (11:17 -0500)]
zink: add vertex shader pipeline bit for generated barrier construction
if the vertex buffer resource has writes, it needs this bit too
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14691>
Mike Blumenkrantz [Tue, 18 Jan 2022 18:06:55 +0000 (13:06 -0500)]
zink: clamp tbo creation to maxTexelBufferElements
for sparse buffers, the total buffer size will be huge, so this needs
to only be the limit that the driver can support to avoid crashing
or whatever
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14692>
Mike Blumenkrantz [Wed, 26 Jan 2022 21:41:01 +0000 (16:41 -0500)]
zink: ci updates
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745>
Mike Blumenkrantz [Wed, 26 Jan 2022 20:00:19 +0000 (15:00 -0500)]
zink: make pipe_buffer_write usage trigger compiler errors
don't want to have to hunt this down ever again
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745>
Mike Blumenkrantz [Wed, 26 Jan 2022 19:58:19 +0000 (14:58 -0500)]
zink: replace other pipe_buffer_write usage with pipe_buffer_write_nooverlap
this is just to be consistent and avoid any pipe_buffer_write() usage
so that grep won't find it
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745>
Mike Blumenkrantz [Wed, 26 Jan 2022 19:54:55 +0000 (14:54 -0500)]
zink: replace qbo pipe_buffer_write usage with tc_buffer_write
this fixes flakiness with qbo readback due to the buffer being internally
invalidated without tc being aware of it
fixes:
KHR-GL46.direct_state_access.queries_functional
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14745>
Lucas Stach [Sat, 29 Jan 2022 13:58:10 +0000 (14:58 +0100)]
etnaviv: draw: only mark resources as read/written when the state changed
If the relevant state for a resource has not been dirtied between the
last and the current draw, we don't need to mark the resource as read
or written, as they are guaranteed to be marked already by the last draw.
This saves quite a bit of hashset operations for the resource tracking
in draw heavy workloads.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14791>
Thomas H.P. Andersen [Wed, 26 Jan 2022 20:31:53 +0000 (21:31 +0100)]
microsoft/compiler: fix -Wbitwise-instead-of-logical warning
Replace the bitwise operation with a more explicit do-while
loop. This fixes a warning with clang, and ensures that
nir_opt_dead_cf and nir_opt_dce are called in the right
order.
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14742>
Christian Gmeiner [Fri, 28 Jan 2022 16:56:52 +0000 (17:56 +0100)]
etnaviv: fix FRONT_AND_BACK culling
HW has no value to cull both faces (setting both CW/CCW bits results in
only CCW being culled). The blob just skips triangle draws when FRONT_AND_BACK
culling is enabled. Lets do the same in draw_vbo(..).
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14779>
Marcin Ślusarz [Mon, 13 Dec 2021 13:11:27 +0000 (14:11 +0100)]
intel/compiler: Use Task/Mesh InlineData for the first few push constants
Replace load_mesh_global_arg_addr_intel with a more general intrinsic
load_mesh_inline_data_intel, since inline data now hold both
a pointer descriptor information and the first few push constants.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14788>