platform/upstream/mesa.git
2 years agotu: Use hw binning or sysmem with QUERY_TYPE_PRIMITIVES_GENERATED
Danylo Piliaiev [Tue, 21 Jun 2022 09:41:30 +0000 (12:41 +0300)]
tu: Use hw binning or sysmem with QUERY_TYPE_PRIMITIVES_GENERATED

Without hw binning in gmem primitives generated query result could be
multiplied by tile count, which is not expected by OpenGL users for
GL_PRIMITIVES_GENERATED.

See https://gitlab.khronos.org/vulkan/vulkan/-/issues/3131

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

2 years agoaco: cleanup force-waitcnt output
Rhys Perry [Thu, 23 Jun 2022 15:30:17 +0000 (16:30 +0100)]
aco: cleanup force-waitcnt output

If we don't reset ctx.vm_cnt/gpr_map/etc, this will spam a lot of
s_waitcnt instructions.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17207>

2 years agoCODEOWNERS: evelikov renamed to xexaxo
Yonggang Luo [Thu, 16 Jun 2022 02:26:58 +0000 (10:26 +0800)]
CODEOWNERS: evelikov renamed to xexaxo

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17072>

2 years agoCODEOWNERS: Update c11 code owners
Yonggang Luo [Wed, 15 Jun 2022 03:51:45 +0000 (11:51 +0800)]
CODEOWNERS: Update c11 code owners

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17072>

2 years agointel/blorp/gen6: Set BLEND_STATEChange only if emitting the blend state
Sviatoslav Peleshko [Mon, 20 Jun 2022 09:47:25 +0000 (12:47 +0300)]
intel/blorp/gen6: Set BLEND_STATEChange only if emitting the blend state

This change is pretty straightforward: if set this field when we don't emit
the blend state, then the garbage at offset=0 will be set as a blend state,
and this will cause artifacts until the proper blend state will be given.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6544
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6232

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17132>

2 years agopvr: Rename loop iterator variable.
Karmjit Mahil [Thu, 23 Jun 2022 09:30:45 +0000 (10:30 +0100)]
pvr: Rename loop iterator variable.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17206>

2 years agopvr: Fix off by 1 error in buffer_id for ubo pds program.
Karmjit Mahil [Tue, 17 May 2022 15:27:37 +0000 (16:27 +0100)]
pvr: Fix off by 1 error in buffer_id for ubo pds program.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17206>

2 years agopvr: Handle vdm degen_cull_enable.
Karmjit Mahil [Tue, 17 May 2022 08:52:02 +0000 (09:52 +0100)]
pvr: Handle vdm degen_cull_enable.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17206>

2 years agopvr: Fix physical device limits.
Karmjit Mahil [Thu, 9 Jun 2022 12:03:30 +0000 (13:03 +0100)]
pvr: Fix physical device limits.

This commit changes to the physical device limits which were
missed during the 1.17 transition.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17206>

2 years agoanv: make apply_pipeline_layout/compute_push_layout visible to NIR debug
Lionel Landwerlin [Thu, 23 Jun 2022 12:26:17 +0000 (15:26 +0300)]
anv: make apply_pipeline_layout/compute_push_layout visible to NIR debug

Useful for debug.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17209>

2 years agoradv: Don't check if we need to copy immutable samplers for non push templates.
Georg Lehmann [Tue, 21 Jun 2022 14:44:33 +0000 (16:44 +0200)]
radv: Don't check if we need to copy immutable samplers for non push templates.

This should allow the compiler to optimize this out because it knows that
cmd_buffer is NULL.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17166>

2 years agoci: add wrapper script for Valve's traces runner
Andres Gomez [Wed, 22 Jun 2022 11:27:18 +0000 (14:27 +0300)]
ci: add wrapper script for Valve's traces runner

Contributed by Charlie Turner.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: move b2c artifacts to its own directory
Andres Gomez [Wed, 22 Jun 2022 12:36:02 +0000 (15:36 +0300)]
ci: move b2c artifacts to its own directory

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: upgrade to DXVK v1.10.1
Charlie Turner [Thu, 20 Jan 2022 08:15:25 +0000 (08:15 +0000)]
ci: upgrade to DXVK v1.10.1

Additionally, improve the building scripts.

Contributed by Andres Gomez.

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: upgrade gfxreconstruct build to v0.9.10
Charlie Turner [Wed, 22 Jun 2022 08:05:37 +0000 (11:05 +0300)]
ci: upgrade gfxreconstruct build to v0.9.10

Additionally improve the style of the build script.

 - Instead of using platform build tools, use the CMake wrappers
 - Instead of build all targets, then manually stripping, use the
   CMake helpers.

Contributed by Andres Gomez.

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: add Linux build of apitrace
Charlie Turner [Wed, 22 Jun 2022 07:35:26 +0000 (10:35 +0300)]
ci: add Linux build of apitrace

This is needed for some of Valve's GL traces to run.

Additionally, make the building commands for apitrace more standard.

Contributed by Andres Gomez.

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: fix shellcheck violations in the test-vk building script
Charlie Turner [Tue, 2 Nov 2021 13:48:23 +0000 (13:48 +0000)]
ci: fix shellcheck violations in the test-vk building script

Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: install gfxinfo-mupuf in the test-vk image
Andres Gomez [Wed, 22 Jun 2022 07:17:45 +0000 (10:17 +0300)]
ci: install gfxinfo-mupuf in the test-vk image

This python module is needed for Valve's tracing jobs.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoci: install a more recent version of Wine in the test-vk image
Andres Gomez [Wed, 22 Jun 2022 07:01:18 +0000 (10:01 +0300)]
ci: install a more recent version of Wine in the test-vk image

Debian's Wine 5.0 has shown some problems when running Vulkan tests in
the past. Let's install the stable version provided by WineHQ (7.0 at
this time).

v2:
  - Remove OBS repository for Wine since it is unused (previously, it
    was providing libfaudio0) (Daniel).

v3:
  - Add WineHQ's repository GPG key (Michel).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agoradv/ci: update vkd3d-proton results for AMD's Kabini
Andres Gomez [Wed, 22 Jun 2022 19:35:46 +0000 (22:35 +0300)]
radv/ci: update vkd3d-proton results for AMD's Kabini

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17184>

2 years agozink: use tracked barrier info for generated barriers
Mike Blumenkrantz [Mon, 20 Jun 2022 15:25:43 +0000 (11:25 -0400)]
zink: use tracked barrier info for generated barriers

this should be simpler to read through and maintain while providing
the same results as well as some possible perf and compile time improvements

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

2 years agozink: track gfx/compute descriptor barrier info
Mike Blumenkrantz [Mon, 20 Jun 2022 15:20:44 +0000 (11:20 -0400)]
zink: track gfx/compute descriptor barrier info

update_barriers has steadily grown more and more complex when the original
idea was for it to be a small function to handle deferred jit barriers and
simplify sync in patterns like bind_ubo -> draw -> buffer_subdata -> draw

instead, track the pending barrier info at bind time so that the stages and
access are already updated by the time draw/compute are reached

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

2 years agozink: fix image bind counting
Mike Blumenkrantz [Mon, 20 Jun 2022 15:08:52 +0000 (11:08 -0400)]
zink: fix image bind counting

these must only be incremented if the image descriptor has changed

cc: mesa-stable

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

2 years agozink: track overall samplerview bind counts
Mike Blumenkrantz [Mon, 20 Jun 2022 15:03:56 +0000 (11:03 -0400)]
zink: track overall samplerview bind counts

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

2 years agozink: track ssbo bind counts
Mike Blumenkrantz [Mon, 20 Jun 2022 14:52:26 +0000 (10:52 -0400)]
zink: track ssbo bind counts

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

2 years agozink: use the bigger of the variable type and interface type for bo sizing
Mike Blumenkrantz [Thu, 23 Jun 2022 19:49:43 +0000 (15:49 -0400)]
zink: use the bigger of the variable type and interface type for bo sizing

this avoids the scenario where the full bo size isn't accounted for because
no variable for the block has been created

cc: mesa-stable

affects:
KHR-GL33.shaders.uniform_block.random.all_per_block_buffers.3

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

2 years agoutil: use force_gl_map_buffer_synchronized workaround with RAGE
Timothy Arceri [Thu, 23 Jun 2022 01:50:29 +0000 (11:50 +1000)]
util: use force_gl_map_buffer_synchronized workaround with RAGE

CC: 22.1 22.0 <mesa-stable>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1326
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17199>

2 years agoutil: add dri config option to disable GL_MAP_UNSYNCHRONIZED_BIT
Timothy Arceri [Thu, 23 Jun 2022 01:27:32 +0000 (11:27 +1000)]
util: add dri config option to disable GL_MAP_UNSYNCHRONIZED_BIT

GL_MAP_UNSYNCHRONIZED_BIT depends on the app having its threading
handled correctly. This allows us to force disable the bit when
they get it wrong.

CC: 22.1 22.0 <mesa-stable>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17199>

2 years agolavapipe: skip post-copy pNext checking during pipeline creation for composites
Mike Blumenkrantz [Thu, 23 Jun 2022 14:28:16 +0000 (10:28 -0400)]
lavapipe: skip post-copy pNext checking during pipeline creation for composites

these values should have all been set during pipeline compositing above,
so reapplying the values is at best, redundant, and at worst, broken

cc: mesa-stable

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

2 years agolavapipe: add a pipeline library assert
Mike Blumenkrantz [Thu, 23 Jun 2022 14:27:51 +0000 (10:27 -0400)]
lavapipe: add a pipeline library assert

ensure that pipeline libraries are created with the library bit

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

2 years agolavapipe: fix renderpass info handling during pipeline creation
Mike Blumenkrantz [Thu, 23 Jun 2022 14:26:09 +0000 (10:26 -0400)]
lavapipe: fix renderpass info handling during pipeline creation

only the viewMask parameter of VkPipelineRenderingCreateInfoKHR can
be accessed in the fragment stage, so for pipeline libraries it should
be assumed that zs attachments exist for the purpose of copying dynamic
state values, and then these dynamic states will naturally be pruned
during final pipeline construction if the attachments turn out to not
be present

cc: mesa-stable

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

2 years agolavapipe: copy more pNexts for pipeline creation
Mike Blumenkrantz [Wed, 22 Jun 2022 21:06:53 +0000 (17:06 -0400)]
lavapipe: copy more pNexts for pipeline creation

also add some unreachable() handlers for unknown types

cc: mesa-stable

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

2 years agolavapipe: zero out blend info if blend isn't enabled
Mike Blumenkrantz [Wed, 22 Jun 2022 21:06:25 +0000 (17:06 -0400)]
lavapipe: zero out blend info if blend isn't enabled

this makes reading traces easier

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

2 years agopanfrost: Use u_default_clear_buffer
Jason Ekstrand [Thu, 14 Apr 2022 16:42:21 +0000 (11:42 -0500)]
panfrost: Use u_default_clear_buffer

[Alyssa: This is required for OpenCL.]

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

2 years agoiris: Use u_default_clear_buffer
Jason Ekstrand [Tue, 19 Apr 2022 17:39:59 +0000 (12:39 -0500)]
iris: Use u_default_clear_buffer

iris uses u_default_buffer_subdata for buffer uploads via a CPU map so
clearing shouldn't be substantially worse.  We can do it with BLORP in
the future if we decide it's useful.

[Alyssa: A BLORP implementation is available at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15931 however nobody
has taken to reviewing that solution.]

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

2 years agogallium: Add a u_default_clear_buffer helper
Jason Ekstrand [Thu, 14 Apr 2022 16:41:41 +0000 (11:41 -0500)]
gallium: Add a u_default_clear_buffer helper

[Alyssa: Add a default CPU implementation of pipe->clear_buffer(). This hook is
mandatory for OpenCL support. Even though this implementation isn't optimal by
any means, having a conformant default available in core will lower the barrier
of entry to OpenCL support.]

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

2 years agoanv: disable perf queries on non RCS engines
Lionel Landwerlin [Thu, 9 Jun 2022 18:17:01 +0000 (21:17 +0300)]
anv: disable perf queries on non RCS engines

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17015>

2 years agou_blitter: Remove util_blitter_copy_buffer
Alyssa Rosenzweig [Mon, 20 Jun 2022 15:09:23 +0000 (11:09 -0400)]
u_blitter: Remove util_blitter_copy_buffer

It is now unused. We cannot yet remove the streamout functionality in u_blitter
as r600g still uses it for clear_buffer on GPUs older than Evergreen.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17142>

2 years agor600g: Remove streamout-based buffer copy path
Alyssa Rosenzweig [Mon, 20 Jun 2022 15:04:58 +0000 (11:04 -0400)]
r600g: Remove streamout-based buffer copy path

r600g is the only user of util_blitter_copy_buffer in tree, which implements
buffer copies with streamout. This path for r600g was added in 8ac9801669c
("r600g: accelerate buffer copying"), a commit from 2012. At that point there
was no DMA path for buffer copies. Since then, a DMA path has been added,
conditional only on the kernel version -- not the hardware. It appears the
required kernel support has been mainline for at least 4 years now. Mesa 22.2
doesn't need to provide optimal performance on an old kernel -- for performance,
a DMA-capable kernel should be used, and for compatability, the CPU fallback
(used for unaligned buffers as it is) is still available. Remove the streamout
path "in the middle" that appears ~unused today.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17142>

2 years agomicrosoft/spirv_to_dxil: Fix discard semantics
Enrico Galli [Wed, 22 Jun 2022 00:40:51 +0000 (17:40 -0700)]
microsoft/spirv_to_dxil: Fix discard semantics

Unlike in nir, discard is not a super return in DXIL. Therefore, we
will lower discard and terminate to demote + return.

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

2 years agonir/range_analysis: Teach range analysis about fdot opcodes
Ian Romanick [Tue, 21 Jun 2022 23:47:31 +0000 (16:47 -0700)]
nir/range_analysis: Teach range analysis about fdot opcodes

This really, really helps on platforms where fabs() isn't free.  A great
many shaders use a * frsq(fabs(fdot(a, a))) to normalize a vector.
Since the result of the fdot must be non-negative, the fabs can be
eliminated by an existing algebraic rule.

shader-db results:

r300 (run on R420 - X800XL)
total instructions in shared programs: 1369807 -> 1368550 (-0.09%)
instructions in affected programs: 59986 -> 58729 (-2.10%)
helped: 609
HURT: 0

total vinst in shared programs: 512899 -> 512861 (<.01%)
vinst in affected programs: 1522 -> 1484 (-2.50%)
helped: 36
HURT: 0

total sinst in shared programs: 260690 -> 260570 (-0.05%)
sinst in affected programs: 1419 -> 1299 (-8.46%)
helped: 120
HURT: 0

total consts in shared programs: 957295 -> 957230 (<.01%)
consts in affected programs: 849 -> 784 (-7.66%)
helped: 65
HURT: 0

LOST:   0
GAINED: 3

The 3 gained shaders are all vertex shaders from XCom: Enemy Unknown.
I'm guessing that game is never going to run on my X800XL. :)

i915
total instructions in shared programs: 791121 -> 780843 (-1.30%)
instructions in affected programs: 220170 -> 209892 (-4.67%)
helped: 2085
HURT: 0

total temps in shared programs: 47765 -> 47766 (<.01%)
temps in affected programs: 9 -> 10 (11.11%)
helped: 0
HURT: 1

total const in shared programs: 93048 -> 92983 (-0.07%)
const in affected programs: 784 -> 719 (-8.29%)
helped: 65
HURT: 0

LOST:   0
GAINED: 36

Haswell, Ivy Bridge, and Sandy Bridge had similar results. (Haswell shown)
total instructions in shared programs: 16702250 -> 16697908 (-0.03%)
instructions in affected programs: 119277 -> 114935 (-3.64%)
helped: 1065
HURT: 0
helped stats (abs) min: 1 max: 20 x̄: 4.08 x̃: 4
helped stats (rel) min: 0.48% max: 10.17% x̄: 3.66% x̃: 3.94%
95% mean confidence interval for instructions value: -4.26 -3.89
95% mean confidence interval for instructions %-change: -3.76% -3.56%
Instructions are helped.

total cycles in shared programs: 880772068 -> 880734134 (<.01%)
cycles in affected programs: 2134456 -> 2096522 (-1.78%)
helped: 941
HURT: 324
helped stats (abs) min: 2 max: 2180 x̄: 123.06 x̃: 44
helped stats (rel) min: 0.04% max: 49.96% x̄: 7.08% x̃: 3.81%
HURT stats (abs)   min: 2 max: 2098 x̄: 240.33 x̃: 35
HURT stats (rel)   min: 0.04% max: 77.07% x̄: 12.34% x̃: 3.00%
95% mean confidence interval for cycles value: -47.93 -12.04
95% mean confidence interval for cycles %-change: -2.87% -1.34%
Cycles are helped.

No shader-db changes on any other Intel platform.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17181>

2 years agoegl/wayland: Don't try to access modifiers u_vector as dynarray
Sebastian Keller [Wed, 22 Jun 2022 00:42:15 +0000 (02:42 +0200)]
egl/wayland: Don't try to access modifiers u_vector as dynarray

The modifiers are u_vectors, but the code was trying to access them
as dynarrays. This resulted in a wrong number of modifiers, which then
later on would also lead to invalid reads used as modifiers.

In the case of the iris driver, a wrongly read number of modifiers > 0
would also trigger an error message.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6643
Fixes: b5848b2dac1 ("egl/wayland: use surface dma-buf feedback to allocate surface buffers")
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17180>

2 years agovulkan: Add a vk_pipeline_shader_stage_to_nir helper
Jason Ekstrand [Wed, 22 Jun 2022 21:40:34 +0000 (16:40 -0500)]
vulkan: Add a vk_pipeline_shader_stage_to_nir helper

This is similar to vk_shader_module_to_nir only it takes a
VkPipelineShaderStageCreateInfo and handles
VK_KHR_graphics_pipeline_library semantics for when a
VkShaderModuleCreateInfo is provided instead of an actual module.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17196>

2 years agovulkan/nir: Make spirv_data const in vk_spirv_to_nir
Jason Ekstrand [Wed, 22 Jun 2022 21:40:13 +0000 (16:40 -0500)]
vulkan/nir: Make spirv_data const in vk_spirv_to_nir

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17196>

2 years agopvr: csbgen: Make all generated enums unambiguous
Matt Coster [Thu, 26 May 2022 09:04:40 +0000 (10:04 +0100)]
pvr: csbgen: Make all generated enums unambiguous

This change involves two enums:
 * rogue_texstate.xml: All COMPRESSED_* members of FORMAT are moved
   to FORMAT_COMPRESSED (without the prefix). A second field is added
   to IMAGE_WORD0 (texformat_compressed) which overlaps with the
   original (texformat), and
 * rogue_pbestate.xml: REG_WORD0_LINESTRIDE was not a real enum; it's
   removed entirely. It only has value when feature
   pbe_stride_align_1pixel is present, so a FIXME comment was added to
   this effect.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17204>

2 years agor300: only run merge_movs pass on R500
Pavel Ondračka [Mon, 20 Jun 2022 20:17:21 +0000 (22:17 +0200)]
r300: only run merge_movs pass on R500

This pass currently generates some swizzles that the R300 and R400
hardware can't handle, make it R500 for now.

Fixes: 6c2959c0

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17150>

2 years agotu: Check dereferenced value of rop_reads_dst.
Vinson Lee [Thu, 16 Jun 2022 22:42:29 +0000 (15:42 -0700)]
tu: Check dereferenced value of rop_reads_dst.

Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking rop_reads_dst suggests that it may be
null, but it has already been dereferenced on all paths leading to the
check.

Fixes: 94be0dd0b86 ("tu: Implement extendedDynamicState2LogicOp")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17099>

2 years agoir3: Fix vectorizer condition for SSBOs
Connor Abbott [Tue, 14 Jun 2022 18:47:29 +0000 (20:47 +0200)]
ir3: Fix vectorizer condition for SSBOs

SSBO access works very differently from UBO access. Straddling
loads/stores isn't an issue, loads/stores instead must be aligned to the
element size and can have up to 4 components.

We support 16-bit access with SSBOs on a650+, and sometimes the
vectorizer tries to create a misaligned 32-bit access when combining
32-bit and 16-bit accesses. The UBO-focused logic didn't reject this,
which is now fixed. This fixes a number of VK-CTS regressions on a650+.

Fixes: bf49d4a084b ("freedreno/ir3: Enable load/store vectorization for SSBO access, too.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17040>

2 years agoaco: don't skip VS->TCS barrier if TCS output vertices doesn't match input
Rhys Perry [Tue, 21 Jun 2022 17:34:44 +0000 (18:34 +0100)]
aco: don't skip VS->TCS barrier if TCS output vertices doesn't match input

TCS invocations correspond to output patch vertices, not input. If they
differ, TCS invocations can be in a different subgroup than VS invocations
of the input patch.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6564
Fixes: 152092b8ead ("aco: skip s_barrier if TCS patches are within subgroup")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17174>

2 years agomeson: Enable wgl tests on mingw
Yonggang Luo [Thu, 21 Apr 2022 18:09:52 +0000 (02:09 +0800)]
meson: Enable wgl tests on mingw

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agoci: Building all mesa functional with mingw on debian
Yonggang Luo [Thu, 5 May 2022 17:08:59 +0000 (01:08 +0800)]
ci: Building all mesa functional with mingw on debian

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agod3d12: Turn d3d12_format.h to include d3d12_common.h
Yonggang Luo [Wed, 1 Jun 2022 08:03:38 +0000 (16:03 +0800)]
d3d12: Turn d3d12_format.h to include d3d12_common.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agoci: Trigger the new mingw/linux dockers to be build
Yonggang Luo [Thu, 5 May 2022 17:08:59 +0000 (01:08 +0800)]
ci: Trigger the new mingw/linux dockers to be build

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agoci: Prepare the container for building all mesa components with mingw under linux
Yonggang Luo [Thu, 5 May 2022 11:44:02 +0000 (19:44 +0800)]
ci: Prepare the container for building all mesa components with mingw under linux

`x86_build-base-wine.sh` are usd to install wine and xvfb
`x86_build-mingw-patch.sh` are used to pull packages from msys2 that can be directly used.
`x86_build-mingw-source-deps.sh` are used to building llvm, libclc, clang, spirv-tools and directx-headers from source

xvfb are used to enable wgl tests on debian

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agoci/x86_build: Getting pushd popd be paired, avoid using cd
Yonggang Luo [Fri, 6 May 2022 22:48:57 +0000 (06:48 +0800)]
ci/x86_build: Getting pushd popd be paired, avoid using cd

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agodzn: Fixes incompatible pointer type error
Yonggang Luo [Wed, 15 Jun 2022 03:00:14 +0000 (11:00 +0800)]
dzn: Fixes incompatible pointer type error

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agomicrosoft/clc: Disable clc_compiler_test on non-windows platform
Yonggang Luo [Sat, 7 May 2022 22:04:55 +0000 (06:04 +0800)]
microsoft/clc: Disable clc_compiler_test on non-windows platform

The test can compile, but can not pass, so compile it but not running it

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agomicrosoft/clc: Fixes narrowing error in clc_compiler_test.cpp with mingw/gcc
Yonggang Luo [Sat, 7 May 2022 01:46:21 +0000 (09:46 +0800)]
microsoft/clc: Fixes narrowing error in clc_compiler_test.cpp with mingw/gcc

errors:
../../src/microsoft/clc/clc_compiler_test.cpp:563:19: error: narrowing conversion of '268435457' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
  563 |       0x00000000, 0x10000001, 0x20000020, 0x30000300,
      |                   ^~~~~~~~~~
../../src/microsoft/clc/clc_compiler_test.cpp:563:31: error: narrowing conversion of '536870944' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
  563 |       0x00000000, 0x10000001, 0x20000020, 0x30000300,
      |                               ^~~~~~~~~~
../../src/microsoft/clc/clc_compiler_test.cpp:563:43: error: narrowing conversion of '805307136' from 'int' to 'uint16_t' {aka 'short unsigned int'} [-Wnarrowing]
  563 |       0x00000000, 0x10000001, 0x20000020, 0x30000300,

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agod3d12: Fixes compiling error in d3d12/wgl/d3d12_wgl_framebuffer.cpp with gcc
Yonggang Luo [Tue, 10 May 2022 21:24:10 +0000 (05:24 +0800)]
d3d12: Fixes compiling error in d3d12/wgl/d3d12_wgl_framebuffer.cpp with gcc

error message:
```
../../src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp:231:42: error: no matching function for call to 'operator new(sizetype, d3d12_wgl_framebuffer*&)'
  231 |    new (fb) struct d3d12_wgl_framebuffer();
      |                                          ^
<built-in>: note: candidate: 'void* operator new(long long unsigned int)'

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agod3d12: Convert #include <Windows.h> to #include <windows.h> for mingw on linux
Yonggang Luo [Wed, 1 Jun 2022 01:09:55 +0000 (09:09 +0800)]
d3d12: Convert #include <Windows.h> to #include <windows.h> for mingw on linux

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agod3d12: Use static_cast instead of dynamic_cast in d3d12_video_enc_h264.cpp
Yonggang Luo [Thu, 19 May 2022 01:37:07 +0000 (09:37 +0800)]
d3d12: Use static_cast instead of dynamic_cast in d3d12_video_enc_h264.cpp

Because we may compile mesa with both rtti=enabled and rtti=disabled because of LLVM
Fixes errors:
../../src/gallium/drivers/d3d12/d3d12_video_enc_h264.cpp:777:7: error: 'dynamic_cast' not permitted with '-fno-rtti'
  777 |       dynamic_cast<d3d12_video_bitstream_builder_h264 *>(pD3D12Enc->m_upBitstreamBuilder.get());
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16084>

2 years agoturnip: Use the new border color helpers
Jason Ekstrand [Sat, 12 Mar 2022 18:28:22 +0000 (12:28 -0600)]
turnip: Use the new border color helpers

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

2 years agolavapipe: Use the new border color helper
Jason Ekstrand [Sat, 12 Mar 2022 18:19:52 +0000 (12:19 -0600)]
lavapipe: Use the new border color helper

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

2 years agopanvk: Use the new border color helpers
Jason Ekstrand [Sat, 12 Mar 2022 18:10:08 +0000 (12:10 -0600)]
panvk: Use the new border color helpers

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

2 years agovulkan: Add some border color helpers
Jason Ekstrand [Sat, 12 Mar 2022 17:00:52 +0000 (11:00 -0600)]
vulkan: Add some border color helpers

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

2 years agoiris: Wa_14016820455 for GFX_VERx10 == 12.5
Zhang, Jianxun [Tue, 10 May 2022 19:55:13 +0000 (12:55 -0700)]
iris: Wa_14016820455 for GFX_VERx10 == 12.5

Reprogram SF CLIP viewport pointer by not skipping its
dirty flag bit.

Many thanks to Lin, Shuicheng <shuicheng.lin@intel.com>,
Jerez Plata, Francisco <francisco.jerez.plata@intel.com>,
Graunke, Kenneth W <kenneth.w.graunke@intel.com>,
and others for their great help.

Signed-off-by: Zhang, Jianxun <jianxun.zhang@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17171>

2 years agoanv: limit RT writes to number of color outputs
Lionel Landwerlin [Mon, 4 Apr 2022 20:40:24 +0000 (23:40 +0300)]
anv: limit RT writes to number of color outputs

Not doing so crates skews occlusion queries. Fixes Zink's piglit
occlusion_query tests.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: a4f502de3228 ("anv: fix VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT state")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6205
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15740>

2 years agoagx: Handle loop { if { loop { .. } } }
Alyssa Rosenzweig [Sat, 11 Jun 2022 23:57:38 +0000 (19:57 -0400)]
agx: Handle loop { if { loop { .. } } }

We need to push loop nesting to handle this correctly -- at the end of
the innermost loop, the correct nesting is 1 (from the if), not 0.

Fixes assertion failure in

  dEQP-GLES2.functional.shaders.struct.local.dynamic_loop_nested_struct_array_fragment,UnexpectedPass
  dEQP-GLES2.functional.shaders.struct.local.dynamic_loop_nested_struct_array_vertex,UnexpectedPass
  dEQP-GLES2.functional.shaders.struct.uniform.dynamic_loop_nested_struct_array_fragment,UnexpectedPass
  dEQP-GLES2.functional.shaders.struct.uniform.dynamic_loop_nested_struct_array_vertex,UnexpectedPass

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

2 years agoci/bare-metal: Collapse artifacts wget by default.
Emma Anholt [Mon, 20 Jun 2022 19:03:40 +0000 (12:03 -0700)]
ci/bare-metal: Collapse artifacts wget by default.

In trying to figure out why an rpi3 job took so long, I wished that the
wget verbosity was hidden by default, and that it told me how long it took
like other sections do.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17146>

2 years agoci/bare-metal: Consolidate needs declarations in .baremetal-test-*.
Emma Anholt [Mon, 20 Jun 2022 18:51:40 +0000 (11:51 -0700)]
ci/bare-metal: Consolidate needs declarations in .baremetal-test-*.

We had it set up for arm64 asan already, do it for everyone else too.  In
cleaning up the duplication, this fixes a pasteo in rpi3 which had the
"artifacts: false" on the wrong job, causing it to do a slow download of
the mesa build from gitlab.

Doing this required also moving the ".use-debian/arm_test" in as well, so
that its "needs:" didn't overwrite ours if it appeared after us in the
consumer's "extends:"

Should save about 20 seconds on rpi3 jobs.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17146>

2 years agoci/bare-metal: Remove "stage: test" from .baremetal-test.
Emma Anholt [Tue, 21 Jun 2022 15:41:44 +0000 (08:41 -0700)]
ci/bare-metal: Remove "stage: test" from .baremetal-test.

This is not one of the valid stages in the top level "stages:"
declaration, you're supposed to get your stage from your
test-source-dep.yml include.  Avoids issues when .baremetal-test gets
included after your test-source-dep.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17146>

2 years agozink: flag dmabufs for foreign queue transition on flush_resource call
Mike Blumenkrantz [Thu, 7 Apr 2022 22:03:06 +0000 (18:03 -0400)]
zink: flag dmabufs for foreign queue transition on flush_resource call

this is needed by ext_external_objects

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

2 years agozink: add flag to indicate if a resource is a dmabuf
Mike Blumenkrantz [Thu, 7 Apr 2022 22:02:57 +0000 (18:02 -0400)]
zink: add flag to indicate if a resource is a dmabuf

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

2 years agoci/freedreno: Turn a530 back on by default and update expectations.
Emma Anholt [Tue, 7 Jun 2022 00:07:43 +0000 (17:07 -0700)]
ci/freedreno: Turn a530 back on by default and update expectations.

I think it should be fixed since I redid how we manage serial around
restarts.  Haven't seen a fail in the manual runs I've done.

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

2 years agofreedreno/a5xx: Set the buffer bit appropriately in XS_CTRL_REG0.
Emma Anholt [Tue, 7 Jun 2022 18:31:03 +0000 (11:31 -0700)]
freedreno/a5xx: Set the buffer bit appropriately in XS_CTRL_REG0.

This seems to be how the bit gets used, from grepping my blob traces.
Hopefully this helps stabilize some stuff.

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

2 years agofreedreno/ir3: Disable image/ssbo 16-bit conversion folding pre-a6xx.
Emma Anholt [Tue, 7 Jun 2022 17:53:57 +0000 (10:53 -0700)]
freedreno/ir3: Disable image/ssbo 16-bit conversion folding pre-a6xx.

I don't see it in blob dumps, and the reordered args tripped up validation.

Fixes: 49dc60efa1df ("freedreno/ir3: Fold 16-bit conversions into image load/store src/dsts.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17004>

2 years agonir: Add and use algebraic property "is selection"
Ian Romanick [Wed, 19 Jun 2019 01:08:45 +0000 (18:08 -0700)]
nir: Add and use algebraic property "is selection"

There are several places that should have supported the various sized
versions of bcsel and the various nir_op_[fi]csel_* opcodes.  Rather
than enumerate the whole list, add a property.

v2: Make the comment for NIR_OP_IS_SELECTION more descriptive.
Suggested by Jason.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17048>

2 years agonir/algebraic: Fix NaN-unsafe fcsel patterns
Ian Romanick [Thu, 25 Mar 2021 20:13:21 +0000 (13:13 -0700)]
nir/algebraic: Fix NaN-unsafe fcsel patterns

For example, the proof for this pattern

    (('bcsel', ('flt', 'a@32', 0), 'b@32', 'c@32'), ('fcsel_ge', a, c, b)),

would be

    bcsel(a < 0, b, c)
    bcsel(!(a < 0), c, b)
    bcsel(a >= 0, c, b)
    fcsel_ge(a, c, b)

However, !(a < 0) => (a >= 0) is well known to produce different
results if `a` is NaN.

Instead of that replacement, use this replacement:

    bcsel(a < 0, b, c)
    bcsel(-0 < -a, b, c)
    bcsel(0 < -a, b, c)
    fcsel_gt(-a, b, c)

This is NaN-safe and exact.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Fixes: 0f5b3c37c5d ("nir: Add opcodes for fused comp + csel and optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17048>

2 years agonir: i32csel opcodes should compare with integer zero
Ian Romanick [Wed, 15 Jun 2022 16:21:10 +0000 (09:21 -0700)]
nir: i32csel opcodes should compare with integer zero

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Noticed-by: Georg Lehmann <dadschoorse@gmail.com>
Fixes: 0f5b3c37c5d ("nir: Add opcodes for fused comp + csel and optimizations")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17048>

2 years agotu: Fix linemode for tessellation with isolines
Connor Abbott [Wed, 22 Jun 2022 15:42:46 +0000 (17:42 +0200)]
tu: Fix linemode for tessellation with isolines

Fixes: 542211676c5 ("turnip: enable VK_EXT_line_rasterization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17190>

2 years agov3d: Drop workaround for u_blitter bug
Alyssa Rosenzweig [Fri, 17 Jun 2022 21:21:20 +0000 (17:21 -0400)]
v3d: Drop workaround for u_blitter bug

This doesn't seem to be necessary.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17113>

2 years agotu: Do not expose storage image/buffer features for PACK16 formats
Danylo Piliaiev [Tue, 21 Jun 2022 15:33:15 +0000 (18:33 +0300)]
tu: Do not expose storage image/buffer features for PACK16 formats

We don't support storing into them.

Fixes GL CTS tests running through ZINK:
 KHR-GL46.packed_pixels.pbo_rectangle.*

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

2 years agovc4: Propagate txf_ms's dest_type to the lowered txf.
Emma Anholt [Tue, 21 Jun 2022 16:12:50 +0000 (09:12 -0700)]
vc4: Propagate txf_ms's dest_type to the lowered txf.

This was missing, and the added validation caught it.

Fixes: 708c47e663be ("nir: Validate nir_tex_instr::dest_type bitsize")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17172>

2 years agoci/vc4: Turn on deqp-egl testing by default.
Emma Anholt [Tue, 21 Jun 2022 16:10:33 +0000 (09:10 -0700)]
ci/vc4: Turn on deqp-egl testing by default.

Now that we have one less job, let's flip this on.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17172>

2 years agoci/vc4: Merge quick_shader in with deqp-gles
Emma Anholt [Tue, 21 Jun 2022 16:03:54 +0000 (09:03 -0700)]
ci/vc4: Merge quick_shader in with deqp-gles

All 4 jobs had a total of about 26 minutes of runner time, so squish them
onto 3 runners and use gbm for the .shader_tests to avoid X overhead and
hopefully succeed with full concurrency.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17172>

2 years agozink: ci updates
Mike Blumenkrantz [Mon, 20 Jun 2022 19:28:24 +0000 (15:28 -0400)]
zink: ci updates

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

2 years agomesa: explicitly disallow multiple pointsize exports from generating
Mike Blumenkrantz [Mon, 20 Jun 2022 18:39:36 +0000 (14:39 -0400)]
mesa: explicitly disallow multiple pointsize exports from generating

for the fixedfunc vertex case this is important since the fixedfunc shader
may have already added an (attenuated) pointsize

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

2 years agomesa: enforce pointsize exports if pointsize is being clamped
Mike Blumenkrantz [Mon, 20 Jun 2022 18:38:06 +0000 (14:38 -0400)]
mesa: enforce pointsize exports if pointsize is being clamped

min/max pointsize clamping affects the value that must be used,
meaning that it may not be 1.0

in the case where clamping changes the value from 1.0, ensure the shader
export path is used if attenuation isn't enabled

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

2 years agomesa: skip pointsize exports if pointsize attenuation is enabled
Mike Blumenkrantz [Mon, 20 Jun 2022 18:37:04 +0000 (14:37 -0400)]
mesa: skip pointsize exports if pointsize attenuation is enabled

attenuation has its own method of exporting pointsize in fixedfunc shaders,
so ensure the attenuated size isn't overwritten

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

2 years agomesa: rename PointSizeIsOne -> PointSizeIsSet
Mike Blumenkrantz [Mon, 20 Jun 2022 18:36:21 +0000 (14:36 -0400)]
mesa: rename PointSizeIsOne -> PointSizeIsSet

this will better convey the meaning of the value

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

2 years agomesa: break out PointSizeIsOne setting to util function
Mike Blumenkrantz [Mon, 20 Jun 2022 18:35:35 +0000 (14:35 -0400)]
mesa: break out PointSizeIsOne setting to util function

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

2 years agonir/lower_point_size: apply point size clamping
Mike Blumenkrantz [Mon, 20 Jun 2022 18:33:09 +0000 (14:33 -0400)]
nir/lower_point_size: apply point size clamping

point size min/max values are provided through the state vars, so ensure
these are always applied in order to respect ARB_point_parameters

cc: mesa-stable

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

2 years agovirgl: overpropagate precise flags
Italo Nicola [Mon, 20 Jun 2022 17:45:43 +0000 (14:45 -0300)]
virgl: overpropagate precise flags

As it turns out, MOVs weren't the only instructions that blocked precise
flags propagation in the transition to nir-to-tgsi.
This commit fixes some rendering regressions caused by a4a34cd3.

Fixes: a4a34cd3

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collanora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17144>

2 years agoradeon: Support shared memory user pointers.
Jason Volk [Wed, 9 Mar 2022 21:14:38 +0000 (13:14 -0800)]
radeon: Support shared memory user pointers.

The RADEON_GEM_USERPTR_ANONONLY flag is hardcoded here which excludes
shared memory pages. DRM is actually capable of supporting shared file-
backed memory, but only if it's read-only. This mutability intent has to
be conveyed through the stack, so a flags argument is added to the winsys
regime to pass RADEON_FLAG_READ_ONLY.

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

2 years agointel/compiler: assert that base is 0 for [load|store]_shared intrins
Marcin Ślusarz [Tue, 21 Jun 2022 08:47:10 +0000 (10:47 +0200)]
intel/compiler: assert that base is 0 for [load|store]_shared intrins

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17143>

2 years agonir/lower_task_shader: don't use base index for shared memory intrinsics
Timur Kristóf [Mon, 20 Jun 2022 15:31:06 +0000 (17:31 +0200)]
nir/lower_task_shader: don't use base index for shared memory intrinsics

Intel backend doesn't handle them very well.

Fixes: 8aff8d3dd42 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17143>

2 years agonir/lower_task_shader: insert barrier before/after shared memory read/write
Marcin Ślusarz [Mon, 20 Jun 2022 13:41:38 +0000 (15:41 +0200)]
nir/lower_task_shader: insert barrier before/after shared memory read/write

Fixes: 8aff8d3dd42 ("nir: Add common task shader lowering to make the backend's job easier.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17143>

2 years agoir3/sched: Fix could_sched() determination
Connor Abbott [Fri, 20 May 2022 11:57:23 +0000 (13:57 +0200)]
ir3/sched: Fix could_sched() determination

This needs to be accurate so that when we split and then schedule a new
a0.x/a1.x/p0.x write we will eventually make progress. It wasn't taking
the kill_path into account which could create an infinite loop as we
keep scheduling writes whose uses are blocked because they are memory
instructions not on the kill_path.

Closes: #6413
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16635>

2 years agomeson/tu: Don't compile libdrm paths if KGSL is selected
Danylo Piliaiev [Tue, 21 Jun 2022 18:07:22 +0000 (21:07 +0300)]
meson/tu: Don't compile libdrm paths if KGSL is selected

Even if there is libdrm we shouldn't use it if KGSL is selected.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17173>

2 years agomeson/pps: Check if libdrm exists to compile pps
Danylo Piliaiev [Tue, 21 Jun 2022 18:05:51 +0000 (21:05 +0300)]
meson/pps: Check if libdrm exists to compile pps

For Turnip with KGSL we may have perffeto enabled but we don't
have libdrm.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17173>