platform/upstream/mesa.git
2 years agonine: update bound sampler mask directly during texture updates
Mike Blumenkrantz [Fri, 6 Aug 2021 15:48:45 +0000 (11:48 -0400)]
nine: update bound sampler mask directly during texture updates

Reviewed-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865>

2 years agonine: split enabled/dummy texture binds into separate iterators
Mike Blumenkrantz [Fri, 6 Aug 2021 15:00:20 +0000 (11:00 -0400)]
nine: split enabled/dummy texture binds into separate iterators

this removes a conditional from the loops

Reviewed-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865>

2 years agonine: optimize texture binds a bit
Mike Blumenkrantz [Tue, 13 Jul 2021 20:38:12 +0000 (16:38 -0400)]
nine: optimize texture binds a bit

this can just iterate over the mask of active textures instead of always
iterating over and rebinding all textures

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: <Axel Davy davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865>

2 years agotu: Raise maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to 16
Matt Turner [Tue, 3 Aug 2021 21:49:34 +0000 (14:49 -0700)]
tu: Raise maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to 16

... and reduce maxDescriptorSetUpdateAfterBindStorageBuffersDynamic from 12 to
8.

MAX_DYNAMIC_BUFFERS is MAX_DYNAMIC_UNIFORM_BUFFERS +
MAX_DYNAMIC_STORAGE_BUFFERS. We set

maxDescriptorSetUniformBuffersDynamic = MAX_DYNAMIC_UNIFORM_BUFFERS
maxDescriptorSetStorageBuffersDynamic = MAX_DYNAMIC_STORAGE_BUFFERS
maxDescriptorSetUpdateAfterBindUniformBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic = MAX_DYNAMIC_BUFFERS / 2

The CTS test checks that

maxDescriptorSetUpdateAfterBindUniformBuffersDynamic
- is at least 8; and
- is at least maxDescriptorSetUniformBuffersDynamic
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic
- is at least 4; and
- and is at least maxDescriptorSetStorageBuffersDynamic

Prior to this patch maxDescriptorSetUpdateAfterBindUniformBuffersDynamic was 12
but maxDescriptorSetUniformBuffersDynamic was 16, thus causing the CTS failure
in
  dEQP-VK.api.info.vulkan1p2_limits_validation.ext_descriptor_indexing

By raising maxDescriptorSetUpdateAfterBindUniformBuffersDynamic to the same
value as maxDescriptorSetUniformBuffersDynamic, we bring the limits into the
appropriate ranges. We do the same thing for
maxDescriptorSetUpdateAfterBindStorageBuffersDynamic by assigning it the same
value as maxDescriptorSetStorageBuffersDynamic.

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

2 years agomesa: Add EXT_texture_mirror_clamp_to_edge to extension table
Gert Wollny [Mon, 19 Apr 2021 12:22:17 +0000 (14:22 +0200)]
mesa: Add EXT_texture_mirror_clamp_to_edge to extension table

This is the OpenGL ES version of ARB_texture_mirror_clamp_to_edge.

v2: fix TexParameter validation (Erik)
v3: Use modernized extension test (Erik)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325>

2 years agomesa: Add support for EXT_clear_texture
Gert Wollny [Mon, 19 Apr 2021 11:59:30 +0000 (13:59 +0200)]
mesa: Add support for EXT_clear_texture

This extension implements a subset of ARB_clear_texture (i.e.
only the features that are not available in OpenGL ES have been
dropped).

v2: Move call declarations from function to offsets  (Emil)

v3: Update llvmpipe and softpipe expectations

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10325>

2 years agolavapipe: remove duplicate xfail with typo
Erik Faye-Lund [Fri, 6 Aug 2021 08:47:09 +0000 (10:47 +0200)]
lavapipe: remove duplicate xfail with typo

Seems there's a rogue "time" in here, causing it to look like a new
failure. But if we remove that and resort the list, we'll see that this
failure was already listed.

Fixes: dfccbdff981 ("ci: update to VK-GL-CTS 1.2.7.0")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12233>

2 years agonine: set CSO_NO_USER_VERTEX_BUFFERS for main cso context
Mike Blumenkrantz [Wed, 14 Jul 2021 17:29:14 +0000 (13:29 -0400)]
nine: set CSO_NO_USER_VERTEX_BUFFERS for main cso context

this skips vbuf for radeonsi and saves some cpu

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

2 years agonine: don't memset sampler state during conversion
Mike Blumenkrantz [Wed, 14 Jul 2021 17:35:47 +0000 (13:35 -0400)]
nine: don't memset sampler state during conversion

this ends up having pretty huge overhead

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

2 years agoir3: Document RA-related register flags better
Connor Abbott [Thu, 5 Aug 2021 14:54:17 +0000 (16:54 +0200)]
ir3: Document RA-related register flags better

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

2 years agogbm: add GBM_FORMAT_R16
Simon Zeni [Wed, 28 Jul 2021 13:40:44 +0000 (09:40 -0400)]
gbm: add GBM_FORMAT_R16

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12101>

2 years agoradv: Write RSRC2_GS for NGGC when pipeline is dirty but not emitted.
Timur Kristóf [Fri, 6 Aug 2021 09:07:54 +0000 (11:07 +0200)]
radv: Write RSRC2_GS for NGGC when pipeline is dirty but not emitted.

The radv_emit_ngg_culling_state function won't write the
SPI_SHADER_PGM_RSRC2_GS register when it knows in advance that
radv_emit_graphics_pipeline will overwrite it anyway.

However, there is an unhandled case:

radv_emit_graphics_pipeline will not emit anything (including this
register) when the pipeline is already emitted. Hence, improve
the check in radv_emit_ngg_culling_state to consider this.

Fixes: 9a95f5487f5ab83fa44bea12afa30cf1a25fc9db
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12237>

2 years agost/pbo: add a fast pbo download code-path
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:42:28 +0000 (18:42 +0200)]
st/pbo: add a fast pbo download code-path

Based on the glReadPixels code.

pbobench piglit benchmark reports identical/similar results on about 50% of
the test cases. The other test cases get a 2x-50x speedup.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5084
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1030
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agost/pbo: set nir_tex_instr::is_array field
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:20:47 +0000 (18:20 +0200)]
st/pbo: set nir_tex_instr::is_array field

Otherwise the layer argument won't be used.

Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agost/pbo: only use x coord when reading a PIPE_TEXTURE_1D
Pierre-Eric Pelloux-Prayer [Fri, 23 Jul 2021 16:20:26 +0000 (18:20 +0200)]
st/pbo: only use x coord when reading a PIPE_TEXTURE_1D

This fixes the following NIR validation error in the
st/pbo download FS:

vec2 32 ssa_14 = mov ssa_4.xy
vec2 32 ssa_15 = f2i32 ssa_14
vec1 32 ssa_16 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_17 = (float32)txf ssa_16 (texture_deref), ssa_16 (sampler_deref), ssa_15 (coord)
error: nir_src_num_components(instr->src[i].src) == instr->coord_components (../src/compiler/nir/nir_validate.c:839)

With this change, the FS becomes:

vec4 32 ssa_2 = intrinsic load_frag_coord () ()
vec1 32 ssa_3 = f2i32 ssa_2.x
[...]
vec1 32 ssa_9 = deref_var &tex (uniform sampler1D)
vec4 32 ssa_10 = (float32)txf ssa_9 (texture_deref), ssa_9 (sampler_deref), ssa_3 (coord), ssa_0 (lod)

Fixes: a01ad311 ("st/mesa: Add NIR versions of the PBO upload/download shaders. ")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12096>

2 years agogallivm: handle fisfinite/fisnormal
Dave Airlie [Thu, 5 Aug 2021 21:22:59 +0000 (07:22 +1000)]
gallivm: handle fisfinite/fisnormal

lower one, do the other.

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

2 years agonir: add fisnormal lowering
Dave Airlie [Thu, 5 Aug 2021 21:19:27 +0000 (07:19 +1000)]
nir: add fisnormal lowering

just lower the 32-bit version for now.

Thanks to alyssa for this suggested lowering.

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

2 years agonir: add 32-bit bool of fisfinite
Dave Airlie [Mon, 2 Aug 2021 10:38:27 +0000 (20:38 +1000)]
nir: add 32-bit bool of fisfinite

Add the bool lowering as well.

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

2 years agovtn: add support for atomic flag test/set/clear
Dave Airlie [Tue, 24 Nov 2020 20:34:42 +0000 (06:34 +1000)]
vtn: add support for atomic flag test/set/clear

This adds support for SpvOpAtomicFlag operations.

This is just a simple implementation that lowers
Clear to Store 0
and
TestAndSet to Cas (0, -1)

There are likely platforms/hw that will want to
lower this all the way through NIR and into their
backend, but this will do for now.

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

2 years agonir/libclc: handle null callee name when lowering
Dave Airlie [Thu, 5 Aug 2021 20:02:48 +0000 (06:02 +1000)]
nir/libclc: handle null callee name when lowering

fixes a crash in the CTS spirv_new get_program_il test

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

2 years agomicrosoft/compiler: Add support for local_invocation_index
Enrico Galli [Thu, 5 Aug 2021 20:42:05 +0000 (13:42 -0700)]
microsoft/compiler: Add support for local_invocation_index

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

2 years agomicrosoft/spirv_to_dxil: Enable support for shared memory
Enrico Galli [Thu, 5 Aug 2021 20:39:39 +0000 (13:39 -0700)]
microsoft/spirv_to_dxil: Enable support for shared memory

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

2 years agoci/a5xx: Skip some piglit stress tests that destabilize CI.
Emma Anholt [Wed, 4 Aug 2021 23:14:32 +0000 (16:14 -0700)]
ci/a5xx: Skip some piglit stress tests that destabilize CI.

Previously, most piglit GL manual runs on a5xx would get a bunch of
failures in random tests around the same time in the run, with a
characteristic OUT_OF_MEMORY in the logs.  With this, that instability
seems to have gone away.

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

2 years agospirv_to_dxil: expose version number
Michael Tang [Thu, 5 Aug 2021 19:55:19 +0000 (12:55 -0700)]
spirv_to_dxil: expose version number

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

2 years agoanv: don't try to access Android swapchains
Lionel Landwerlin [Thu, 5 Aug 2021 15:10:15 +0000 (18:10 +0300)]
anv: don't try to access Android swapchains

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5180
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12217>

2 years agolavapipe: remove stale xfails
Erik Faye-Lund [Thu, 5 Aug 2021 16:14:00 +0000 (18:14 +0200)]
lavapipe: remove stale xfails

These were fixed already in !10219, but a bad conflict resolution added
them back again. And because the CI doesn't actually end up running
these tests, this went unnoticed.

Fixes: dfccbdff981 ("ci: update to VK-GL-CTS 1.2.7.0")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12220>

2 years agogallivm: use lp_build_log2_safe for pow
Erik Faye-Lund [Tue, 27 Jul 2021 12:28:44 +0000 (14:28 +0200)]
gallivm: use lp_build_log2_safe for pow

lp_build_log2 isn't robust enough to handle special cases for pow, so
let's use lp_build_log2_safe instead.

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

2 years agotu, freedreno/a6xx: Fix setting PC_XS_OUT_CNTL::PRIMITVE_ID
Connor Abbott [Mon, 2 Aug 2021 09:56:15 +0000 (11:56 +0200)]
tu, freedreno/a6xx: Fix setting PC_XS_OUT_CNTL::PRIMITVE_ID

This is supposed to be set when that stage needs the PrimID sysval
preloaded, except for the VS which doesn't have this bit and instead
infers it from the HS or GS bit (depending on whether tess/GS is
enabled). Therefore for HS, GS, and DS we should set it whenever the
corresponding sysval is there. This includes adding a missing
PC_HS_OUT_CNTL, which I confirmed is set when the HS reads PrimID from
the VS. Note that the DS sysval is currently always enabled whenever
there's a GS, if we were to fix that then we should also change the
logic here.

This doesn't fix anything that I know of, but aligns us more with what
the blob does.

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

2 years agotu, freedreno/a6xx, ir3: Rewrite tess PrimID handling
Connor Abbott [Mon, 2 Aug 2021 09:55:15 +0000 (11:55 +0200)]
tu, freedreno/a6xx, ir3: Rewrite tess PrimID handling

The previous handling conflated RelPatchID and PrimID, which would
result in incorrect gl_PrimitiveID when doing draw splitting and didn't
work with PrimID passthrough which fills the VPC slot with the "correct"
PrimID value from the tess factor BO which we left 0. Replace PrimID in
the tess lowering pass with a new RelPatchID sysval, and relace PrimID
with RelPatchID in the VS input code in turnip/freedreno at the same
time so that there is no net change in the tess lowering code. However,
now we have to add new mechanisms for getting the user-level PrimID:

- In the TCS it comes from the VS, just like gl_PrimitiveIDIn in the GS.
  This means we have to add another register to our VS->TCS ABI. I
  decided to put PrimID in r0.z, after the TCS header and RelPatchID,
  because it might not be read in the TCS.
- If any stage after the TCS uses PrimID, the TCS stores it in the first
  dword of the tess factor BO, and it is read by the fixed-function
  tessellator and accessed in the TES via the newly-uncovered DSPRIMID
  field. If we have tess and GS, the TES passes this value through to
  the GS in the same way as the VS does. PrimID passthrough for reading
  it in the FS when there's tess but no GS also "just works" once we
  start storing it in the TCS. In particular this fixes
  dEQP-VK.pipeline.misc.primitive_id_from_tess which tests exactly that.

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

2 years agofreedreno: Rename and document tess primid-related sysvals
Connor Abbott [Thu, 29 Jul 2021 15:40:17 +0000 (17:40 +0200)]
freedreno: Rename and document tess primid-related sysvals

DSPATCHID and HSPATCHID, which we mapped gl_PrimitiveID to, are actually
relative to the current subdraw. Subdraws aren't supported yet by turnip
but they are by freedreno for indirect draws.

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

2 years agotu: disable gmem in primary cmdbuffer if secondary has it disabled
Danylo Piliaiev [Thu, 5 Aug 2021 15:45:40 +0000 (18:45 +0300)]
tu: disable gmem in primary cmdbuffer if secondary has it disabled

If secondary command buffer is emitted within a subpass it may have
barriers which forces us to disable gmem for current renderpass.

Fixes: 20547a110edb7913fc1176b9605498a58e691cb5 "tu: delay decision of forcing sysmem due to subpass self-dependencies"

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

2 years agoci: Drop "success" job
Michel Dänzer [Wed, 4 Aug 2021 15:41:46 +0000 (17:41 +0200)]
ci: Drop "success" job

It was added to make sure every pipeline for a merge request has at
least one job which passes (otherwise it's not possible to merge the
MR). Now the "sanity" job always exists in such pipelines, so this
isn't needed anymore.

Fixes: 4c41d1900e58 "ci: Add jobs running ci-fairy checks"
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12198>

2 years agoaco: calculate correct register demand for branch instructions
Rhys Perry [Mon, 26 Jul 2021 16:55:48 +0000 (17:55 +0100)]
aco: calculate correct register demand for branch instructions

Since copies for the successor's linear phis are inserted before the
branch, we should consider the definitions and operands of the successor's
linear phis.

Fixes a Detroit: Become Human spilling failure with GCM+GVN.

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

2 years agoci/v3dv: update expected results
Juan A. Suarez Romero [Mon, 2 Aug 2021 12:00:55 +0000 (14:00 +0200)]
ci/v3dv: update expected results

v1:
 - Include CTS fix comment (Juan)

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12168>

2 years agomicrosoft/compiler: harmonize num_psv_inputs with outputs
Erik Faye-Lund [Wed, 4 Aug 2021 12:13:15 +0000 (14:13 +0200)]
microsoft/compiler: harmonize num_psv_inputs with outputs

This doesn't seems to make a practical difference, but it seems better
to do it the same way as we do for outputs, as well as what DXC does.

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

2 years agomicrosoft/compiler: fix psv-output calculation
Erik Faye-Lund [Wed, 4 Aug 2021 11:49:35 +0000 (13:49 +0200)]
microsoft/compiler: fix psv-output calculation

Rather surprisingly, the value stored in the NumVectors field of the
DXIL PSV header isn't the number of vectors, but rather the *maximum*
vector used.

This makes a difference when we're not writing to the first element of
an array, where we would previously generate a validation error.

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

2 years agofreedreno/ci: Add a manual job for tracking performance
Antonio Caggiano [Wed, 28 Apr 2021 14:16:42 +0000 (16:16 +0200)]
freedreno/ci: Add a manual job for tracking performance

Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.

This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.

This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12185>

2 years agoclover/llvm: turn off optional CL 3 features.
Dave Airlie [Wed, 7 Jul 2021 04:05:06 +0000 (14:05 +1000)]
clover/llvm: turn off optional CL 3 features.

We don't support these with clover yet, so turn them off to get
clang back to the older llvm 12 behaviour.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11752>

2 years agoac/surface: implement CmaskAddrFromCoord in NIR on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:35:25 +0000 (13:35 +0200)]
ac/surface: implement CmaskAddrFromCoord in NIR on GFX10+

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182>

2 years agoac/surface: add tests for CmaskAddrFromCoord on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:29:52 +0000 (13:29 +0200)]
ac/surface: add tests for CmaskAddrFromCoord on GFX10+

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182>

2 years agoamd/addrlib: expose CMASK address equations to drivers on GFX10+
Samuel Pitoiset [Tue, 3 Aug 2021 11:26:33 +0000 (13:26 +0200)]
amd/addrlib: expose CMASK address equations to drivers on GFX10+

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12182>

2 years agoci: Update canvas_text trace
Tomeu Vizoso [Wed, 4 Aug 2021 06:31:51 +0000 (08:31 +0200)]
ci: Update canvas_text trace

The previous one had all rendering and setup in a single frame, so
repeatedly replaying it for performance tracking was reaching OOM due to
the repeated creation of resources that weren't being released.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12195>

2 years agobin/gen_release_notes: Fix commits with multiple Closes:
Dylan Baker [Wed, 4 Aug 2021 18:37:12 +0000 (11:37 -0700)]
bin/gen_release_notes: Fix commits with multiple Closes:

Currently we'd only handle the last one, not all of them. Which is
clearely not correct.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agobin/gen_release_notes: Don't consider issues for other projects
Dylan Baker [Wed, 4 Aug 2021 18:32:19 +0000 (11:32 -0700)]
bin/gen_release_notes: Don't consider issues for other projects

We have enough commits in mesa that have external dependencies that we
need to be sure that a Closes: https://... is actually for mesa and not
for another project.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agobin/gen_release_notes: Add basic tests for parsing issues
Dylan Baker [Wed, 4 Aug 2021 18:26:53 +0000 (11:26 -0700)]
bin/gen_release_notes: Add basic tests for parsing issues

Since test coverage here is pretty important for a heuristic like this.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12201>

2 years agodocs: Add calendar entries for 21.2 release.
Dylan Baker [Wed, 4 Aug 2021 19:10:05 +0000 (12:10 -0700)]
docs: Add calendar entries for 21.2 release.

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

2 years agodocs: update calendar and link releases notes for 21.2.0
Dylan Baker [Wed, 4 Aug 2021 19:09:26 +0000 (12:09 -0700)]
docs: update calendar and link releases notes for 21.2.0

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

2 years agodocs: update calendar for 21.2.0-rc3
Dylan Baker [Wed, 4 Aug 2021 19:09:23 +0000 (12:09 -0700)]
docs: update calendar for 21.2.0-rc3

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

2 years agodocs: update calendar for 21.2.0-rc2
Dylan Baker [Wed, 4 Aug 2021 19:09:21 +0000 (12:09 -0700)]
docs: update calendar for 21.2.0-rc2

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

2 years agodocs: add release notes for 21.2.0
Dylan Baker [Wed, 4 Aug 2021 18:44:30 +0000 (11:44 -0700)]
docs: add release notes for 21.2.0

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

2 years agozink: simplify else clause for mem info gathering
Mike Blumenkrantz [Wed, 4 Aug 2021 16:05:04 +0000 (12:05 -0400)]
zink: simplify else clause for mem info gathering

it doesn't matter if this is host-visible, it just has to not be device-local

Fixes: 73f6bff07f1 ("zink: fix mem info query to be more permissive")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199>

2 years agozink: sum available memory heaps instead of assigning
Mike Blumenkrantz [Wed, 4 Aug 2021 15:44:28 +0000 (11:44 -0400)]
zink: sum available memory heaps instead of assigning

this is supposed to accumulate now

Fixes: 73f6bff07f1 ("zink: fix mem info query to be more permissive")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12199>

2 years agoci/freedreno: Mark border_color as passing on a5xx.
Emma Anholt [Wed, 4 Aug 2021 00:27:38 +0000 (17:27 -0700)]
ci/freedreno: Mark border_color as passing on a5xx.

They're marked as flaky, but they're all passing on my board, and maybe in
CI too.  Let's see if CI still sees them as flaky once the expectations
are right.

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

2 years agofreedreno/a5xx: Don't try to emit FS images in binning command streams.
Emma Anholt [Wed, 4 Aug 2021 00:01:26 +0000 (17:01 -0700)]
freedreno/a5xx: Don't try to emit FS images in binning command streams.

We don't have a compiled FS in that case, so the shader deref fails.  We
don't need the state, anyway.

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

2 years agofreedreno/a5xx: Disable TF when pausing or transitioning to non-TF.
Emma Anholt [Tue, 3 Aug 2021 19:45:57 +0000 (12:45 -0700)]
freedreno/a5xx: Disable TF when pausing or transitioning to non-TF.

This is not as clean as on a6xx where we just re-emit the SO state, but it
cleans up our dEQP results a ton.

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

2 years agoci/freedreno: Clear out TF API errors xfails.
Emma Anholt [Tue, 3 Aug 2021 21:20:19 +0000 (14:20 -0700)]
ci/freedreno: Clear out TF API errors xfails.

These tests are flaky and sometimes segfault in CI, but usually pass.  We
hadn't noticed their change due to the test being marked as flaky.

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

2 years agoac: Remove deprecated use_late_alloc field as nobody uses it anymore.
Timur Kristóf [Thu, 15 Jul 2021 09:54:33 +0000 (11:54 +0200)]
ac: Remove deprecated use_late_alloc field as nobody uses it anymore.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905>

2 years agoradv: Use ac_compute_late_alloc in radv_pipeline.
Timur Kristóf [Thu, 15 Jul 2021 09:48:25 +0000 (11:48 +0200)]
radv: Use ac_compute_late_alloc in radv_pipeline.

This aligns RADV with RadeonSI in how it handles late alloc,
making it easier for us to deal with deadlocks and such.

Also move setting the RSRC3 registers for VS, GS and NGG
into radv_pipeline.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905>

2 years agoradv: Don't toggle PC oversubscription for NGG culling.
Timur Kristóf [Thu, 15 Jul 2021 09:51:32 +0000 (11:51 +0200)]
radv: Don't toggle PC oversubscription for NGG culling.

We are going to add this directly to the pipeline.
If a pipeline has such a shader, NGG culling is turned on
most of the time, so it's not useful to toggle this setting.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11905>

2 years agoaco: Use Navi 10 empty NGG output workaround on NGG culling shaders.
Timur Kristóf [Mon, 2 Aug 2021 14:48:41 +0000 (16:48 +0200)]
aco: Use Navi 10 empty NGG output workaround on NGG culling shaders.

Navi 10 can hang when an NGG workgroup has no output,
so we work around that by always exporting a single zero-area
triangle with a single vertex that has all-NaN coordinates.

Thus far, we only employed this for NGG GS, because on all
other stages, the output can't be empty.

However, with NGG culling, the output can be empty, so let's
apply the same workaround there too.

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

2 years agoaco: use image_dim and image_array intrinsic indices
Rhys Perry [Tue, 3 Aug 2021 18:04:48 +0000 (19:04 +0100)]
aco: use image_dim and image_array intrinsic indices

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12190>

2 years agoradv: set image_dim and image_array intrinsic indices
Rhys Perry [Fri, 30 Jul 2021 12:25:26 +0000 (13:25 +0100)]
radv: set image_dim and image_array intrinsic indices

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12190>

2 years agoci: bump to latest virglrenderer for anisotropic support
Dave Airlie [Mon, 2 Aug 2021 07:01:56 +0000 (17:01 +1000)]
ci: bump to latest virglrenderer for anisotropic support

Update ci results

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944>

2 years agovirgl: add support for anisotropic texture filtering
Dave Airlie [Sun, 18 Jul 2021 20:36:01 +0000 (06:36 +1000)]
virgl: add support for anisotropic texture filtering

This is the guest side for adding correct anisotropic filtering support

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944>

2 years agovirgl: disable anisotropic filtering.
Dave Airlie [Sun, 18 Jul 2021 19:58:48 +0000 (05:58 +1000)]
virgl: disable anisotropic filtering.

virgl doesn't yet support anisotropic filtering so don't advertise it.

Fixes: a8987b88ff1d ("virgl: add driver for virtio-gpu 3D (v2)")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11944>

2 years agoiris: Fix Null pointer dereferences
Sergii Melikhov [Mon, 2 Aug 2021 12:15:34 +0000 (15:15 +0300)]
iris: Fix Null pointer dereferences

Fix the error from Coverity report: CID 1489765

Signed-off-by: Sergii Melikhov <sergii.v.melikhov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12179>

2 years agoaux/draw: Check for preferred IR to take nir-to-tgsi path in draw module
Charmaine Lee [Fri, 30 Jul 2021 23:53:53 +0000 (16:53 -0700)]
aux/draw: Check for preferred IR to take nir-to-tgsi path in draw module

When a vertex program is translated to nir, it uses
nir_to_tgsi_compile_options for drivers with only nir-to-tgsi based
NIR support. But this compile option might not be the same as the NIR
compile option from llvmpipe, hence when the nir shader is bound
to the draw module, it hits an assertion in do_alu_action() when
encounters nir_op_fdot3.

With this patch, draw will take the nir-to-tgsi path if preferred IR
from the driver is TGSI.

Fixes assert running Maya on SVGA device.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12176>

2 years agonir: Removing uses of SSA defs destroys SSA liveness
Jason Ekstrand [Tue, 3 Aug 2021 15:16:58 +0000 (10:16 -0500)]
nir: Removing uses of SSA defs destroys SSA liveness

The liveness information will be a superset of real liveness so it's
unlikely something will explode if it tries to use it.  However, it is
out-of-date and should be re-run if someone really wants it.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12186>

2 years agoisl: Use CLAMP macro instead of MIN of MAX
Ian Romanick [Tue, 3 Aug 2021 00:56:40 +0000 (17:56 -0700)]
isl: Use CLAMP macro instead of MIN of MAX

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

2 years agoutil: Add and use functions to calculate min and max int for a size
Ian Romanick [Mon, 2 Aug 2021 23:43:52 +0000 (16:43 -0700)]
util: Add and use functions to calculate min and max int for a size

Many places need to know the maximum or minimum possible value for a
given size integer... so everyone just open-codes their favorite
version.  There is some potential to hit either undefined or
implementation-defined behavior, so having one version that Just Works
seems beneficial.

v2: Fix copy-and-pasted bug (INT64_MAX instead of INT64_MIN) in
u_intmin.  Noticed by CI.  Lol.  Rename functions
`s/u_(uint|int)(min|max)/u_\1N_\2/g`.  Suggested by Jason.  Add some
unit tests that would have caught the copy-and-paste bug before wasting
CI time.  Change the implementation of u_intN_min to use the same
pattern as stdint.h.  This avoids the integer division.  Noticed by
Jason.

v3: Add changes to convert_clear_color
(src/gallium/drivers/iris/iris_clear.c).  Suggested by Nanley.

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

2 years agoci: Update piglit to 4545a28cd8fea03fbab0e5f90bfbd812c32f3be1
Emma Anholt [Wed, 28 Jul 2021 17:00:12 +0000 (10:00 -0700)]
ci: Update piglit to 4545a28cd8fea03fbab0e5f90bfbd812c32f3be1

Brings in duplicate subtest fixes, gpu_shader4 tests, and more.  This
shuffles the radeonsi fractional test run, so we get to catch up with more
failing subtests.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci/zink: Use deqp-runner suite support to reduce the CI job count.
Emma Anholt [Fri, 23 Jul 2021 18:14:16 +0000 (11:14 -0700)]
ci/zink: Use deqp-runner suite support to reduce the CI job count.

The tests were passing so quickly, and the 1/4th GLES3 subset changed on
the transition to multiple testsuites, so I promoted it to a full run.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci/virgl: Use deqp-runner suite support to reduce CI job count.
Emma Anholt [Thu, 22 Jul 2021 19:56:23 +0000 (12:56 -0700)]
ci/virgl: Use deqp-runner suite support to reduce CI job count.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci: Save dEQP results on all tests.
Emma Anholt [Thu, 22 Jul 2021 19:51:41 +0000 (12:51 -0700)]
ci: Save dEQP results on all tests.

Everyone can get artifacts now.  Let's make those artifacts useful.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci/i915g: Merge the two dEQP runs together.
Emma Anholt [Thu, 22 Jul 2021 17:40:36 +0000 (10:40 -0700)]
ci/i915g: Merge the two dEQP runs together.

Fewer buttons for me to have to click for manual MR testing.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci/llvmpipe: Use the deqp-runner suite support to consolidate jobs.
Emma Anholt [Wed, 21 Jul 2021 23:40:02 +0000 (16:40 -0700)]
ci/llvmpipe: Use the deqp-runner suite support to consolidate jobs.

5 jobs become 2, plus we add KHR-GLES3 and 31 to the test set since
it's cheap.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci: Uprev deqp-runner and use "suite" support to merge softpipe runs.
Emma Anholt [Wed, 21 Jul 2021 20:12:29 +0000 (13:12 -0700)]
ci: Uprev deqp-runner and use "suite" support to merge softpipe runs.

The deqp-runner "suite" support lets us specify all the deqp variants at
once and shard them across gitlab jobs, so we reduce docker overhead and
get fewer jobs to review the output of.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agoci/i915: Update deqp expectations for another test passing.
Emma Anholt [Wed, 28 Jul 2021 19:08:48 +0000 (12:08 -0700)]
ci/i915: Update deqp expectations for another test passing.

!11411 made this one start passing thanks to reducing instruction counts.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12110>

2 years agointel/disasm: fix missing oword index decoding
Lionel Landwerlin [Tue, 3 Aug 2021 12:48:03 +0000 (15:48 +0300)]
intel/disasm: fix missing oword index decoding

Also switch to array of strings to show high/low dwords.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: daba2894ffc300 ("intel/disasm: decode/describe more send messages")
Acked-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12183>

2 years agoclover/nir: Set constant buffer pointer size to host
Pierre Moreau [Sun, 25 Apr 2021 19:59:27 +0000 (21:59 +0200)]
clover/nir: Set constant buffer pointer size to host

The `argument::size` is supposed to represent the size of a pointer on
the host and not on the device (for which argument::target_size`
exists).

v3: Use `sizeof(buf)` instead of `marg.size`. (Francisco Jerez)

Fixes: 7c6f1d3bf99 ("clover/nir: extract constant buffer into its own section")

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agoclover/api: Interleave details in dispatch table
Pierre Moreau [Fri, 14 Aug 2020 07:51:30 +0000 (09:51 +0200)]
clover/api: Interleave details in dispatch table

By adding comments regarding which version or extension introduced the
following dispatched functions, it makes it easier to glance at the
table and see which functions are missing for a particular version, but
more importantly makes it easier to compare against cl_icd.h and see if
anything is missing.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agoclover/spirv: Properly size 3-component vector args
Pierre Moreau [Tue, 13 Apr 2021 20:14:03 +0000 (22:14 +0200)]
clover/spirv: Properly size 3-component vector args

This resolves clover returning `CL_INVALID_ARG_SIZE` whenever the OpenCL
CTS called `clSetKernelArg()` for 3-component vectors.

Fixes: 21473865050 ("clover/spirv: Add functions for parsing arguments, linking programs, etc.")

v2: Remove “api/clsetkernelarg/set kernel argument for cl_int3” from the
  expected fails for llvmpipe

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agoclover/spirv: Increase max amount of function args
Pierre Moreau [Thu, 21 May 2020 16:48:22 +0000 (18:48 +0200)]
clover/spirv: Increase max amount of function args

OpenCL only has an upper limit on the size taken by all arguments to a
kernel (implementation-defined, but at least 1024 bytes), and not on the
count of those arguments.

This fixes OpenCL-CTS’s api.min_max_parameter_size.

v2: Use `numeric_limits<>::max()` instead of hardcoded value.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agoclover: Local memory needs to be aligned.
Karol Herbst [Sat, 15 Aug 2020 23:51:49 +0000 (01:51 +0200)]
clover: Local memory needs to be aligned.

Fixes a couple of OpenCL CTS tests.

v3:
* Add a comment in module.hpp explaining that target_align means
  something different for arguments of type local (Francisco Jerez)
* Squash in the fix for the LLVM backend.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agoclover: Do not advertise OpenCL x.y when unsupported
Pierre Moreau [Sat, 16 Jan 2021 13:55:36 +0000 (14:55 +0100)]
clover: Do not advertise OpenCL x.y when unsupported

Instead of hardcoding a fixed version for all devices, compute the
highest version supported by a device based on the different constraints
mandated by each new version.

For example, besides new functionalities, OpenCL 1.1 also increases the
minimum limits regarding the amount of local memory and the amount of
bytes taken by all arguments to a kernel. Some hardware (such as all
GPUs from NVIDIA’s Tesla micro-architecture) can support the additional
features but do not pass those new minimums.

v3:
* Change `get_highest_supported_version()` to return the version instead
  of modifying the version components passed as arguments. (Francisco
  Jerez)
* Tweak the line wrapping for `has_extension()`. (Francisco Jerez)

v2:
* Invert the ordering of OpenCL and OpenCL C version, to restrict OpenCL
  version based on supported OpenCL C version.
* Rename `get_supported_version()` to `get_highest_supported_version()`;
* Use device methods to query parameters instead of manually executing
  them;
* Clarify that the limit checking is only for non-custom devices
  supporting the full profile.
* Check for mandatory extensions as well;
* Validate CL_DEVICE_MEM_BASE_ADDR_ALIGN;
* Fix the OpenCL>=1.1 minimum limit for CL_DEVICE_LOCAL_MEM_SIZE, from
  32 * 1000 to 32 * 1024;
* Restrict to OpenCL 1.0 if OpenCL C 1.1 is not supported.
* Compute the highest supported version based on constraints (ignoring
  2.x versions).

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10256>

2 years agod3d12: split up root parameter update and set
Erik Faye-Lund [Tue, 3 Aug 2021 15:08:44 +0000 (17:08 +0200)]
d3d12: split up root parameter update and set

SRV descriptors can require state-transitions before it's legal to set
them on the command-list. We used to just set them right away, and get
away with is, because the validator didn't verify this because we used
to flag the parameters as volatile.

Now that we don't, we trigger validation errors when setting a root
parameter that needs a transition first.

So let's split up the logic a bit, so we can prepare the tables, then do
the transision, and finally set the tables. We do this for all tables
instead of just the SRVs, just because it makes the logic a bit easier to
follow. We leave root constants alone, because they will never require
this, and doing them late would just compilcate things.

Fixes: 12082905582 ("d3d12: Sets all SRV descriptors as data-static")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12187>

2 years agoci: Use crosvm to run dEQP tests for virgl
Corentin Noël [Thu, 3 Jun 2021 14:32:54 +0000 (16:32 +0200)]
ci: Use crosvm to run dEQP tests for virgl

Allows to use virtio-gpu to actually test the virgl driver.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320>

2 years agoci: Increase crosvm version
Corentin Noël [Wed, 16 Jun 2021 14:04:28 +0000 (16:04 +0200)]
ci: Increase crosvm version

Also require newer dependencies.

This makes it easier to debug possible crosvm issues as a big refactor occured since the
previous commit included in the CI.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320>

2 years agoci: Increase the default Rust toolchain version
Corentin Noël [Fri, 9 Jul 2021 09:40:46 +0000 (11:40 +0200)]
ci: Increase the default Rust toolchain version

We need a newer Rust toolchain to be able to build the latest crosvm.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320>

2 years agoci: Disable llvmpipe optimizations when running virgl CI
Corentin Noël [Thu, 29 Jul 2021 09:16:21 +0000 (11:16 +0200)]
ci: Disable llvmpipe optimizations when running virgl CI

We are only using the result once so we spend more time optimizing it than
actually using it.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11320>

2 years agogallium/hud: initialize query
Juan A. Suarez Romero [Tue, 3 Aug 2021 11:05:23 +0000 (13:05 +0200)]
gallium/hud: initialize query

Most of the drivers don't set up the maximum value in the query info. So
when later hud_pane_set_max_value() is invoked, we are using a rather
"random" number.

Turns out that in some 32bit cases, this random number is big enough
that `leftmost_digit` is 0 because DIV_ROUND_UP() overflows, aborting
with an assertion.

Fixes: c91cf7d7d2c ("gallium: implement a heads-up display module")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12181>

2 years agoradv: fix missing cache flushes when clearing HTILE levels on GFX10+
Samuel Pitoiset [Mon, 2 Aug 2021 14:43:15 +0000 (16:43 +0200)]
radv: fix missing cache flushes when clearing HTILE levels on GFX10+

The driver should accumulate the cache flush bits because if it uses
CP DMA for clearing the last level, it won't flush.

Found by inspection.

Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12170>

2 years agoradv: fix selecting the first active CU when profiling with SQTT
Samuel Pitoiset [Mon, 2 Aug 2021 12:27:11 +0000 (14:27 +0200)]
radv: fix selecting the first active CU when profiling with SQTT

Fixes: d26bcc0f5cb ("radv: always select the first active CU when profiling with SQTT")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12167>

2 years agogallivm: remove pointless no_filter_hacks flag
Erik Faye-Lund [Mon, 2 Aug 2021 12:36:47 +0000 (14:36 +0200)]
gallivm: remove pointless no_filter_hacks flag

This flag now does the same thing as the no_quad_lod flag, so let's get
rid of it to reduce confusion.

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

2 years agoci: Stop disabling filter hacks for llvmpipe.
Emma Anholt [Mon, 19 Jul 2021 23:49:02 +0000 (16:49 -0700)]
ci: Stop disabling filter hacks for llvmpipe.

Now that we've disabled brilinear and have per-pixel cube derivatives, we
can use the same rendering paths that end users will see.

In a few cases, we switch to the no_quad_lod option instead, because
otherwise we get a piglit failure.

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

2 years agogallivm: make rho-approximation opt-in instead of opt-out
Erik Faye-Lund [Mon, 2 Aug 2021 12:34:02 +0000 (14:34 +0200)]
gallivm: make rho-approximation opt-in instead of opt-out

The RHO approximation code has issues passing the OpenGL ES 3.0 CTS, so
let's make correctness the default instead.

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

2 years agonir: add heuristic for instructions in loops with GCM
Timothy Arceri [Mon, 26 Jul 2021 13:25:58 +0000 (23:25 +1000)]
nir: add heuristic for instructions in loops with GCM

Moving instructions out of large loops tends to cause excessive
spilling. This appears to be a good limit.

In future it might make sense to make this a NIR options so
other drivers can set their own limits.

Tiger Lake
total instructions in shared programs: 20930180 -> 20926952 (-0.02%)
instructions in affected programs: 280768 -> 277540 (-1.15%)
helped: 734
HURT: 192
helped stats (abs) min: 1 max: 61 x̄: 5.16 x̃: 4
helped stats (rel) min: 0.04% max: 10.64% x̄: 3.23% x̃: 3.14%
HURT stats (abs)   min: 1 max: 52 x̄: 2.90 x̃: 1
HURT stats (rel)   min: 0.03% max: 9.76% x̄: 1.13% x̃: 0.61%
95% mean confidence interval for instructions value: -3.89 -3.08
95% mean confidence interval for instructions %-change: -2.49% -2.16%
Instructions are helped.

total cycles in shared programs: 841825217 -> 838817552 (-0.36%)
cycles in affected programs: 122088078 -> 119080413 (-2.46%)
helped: 941
HURT: 100
helped stats (abs) min: 1 max: 160080 x̄: 3274.31 x̃: 2660
helped stats (rel) min: <.01% max: 41.64% x̄: 5.50% x̃: 4.80%
HURT stats (abs)   min: 1 max: 41856 x̄: 734.62 x̃: 26
HURT stats (rel)   min: <.01% max: 7.29% x̄: 0.44% x̃: 0.27%
95% mean confidence interval for cycles value: -3236.56 -2541.85
95% mean confidence interval for cycles %-change: -5.26% -4.60%
Cycles are helped.

total sends in shared programs: 977905 -> 977782 (-0.01%)
sends in affected programs: 2279 -> 2156 (-5.40%)
helped: 119
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.93% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.42% -6.45%
Sends are helped.

LOST:   2
GAINED: 0

Ice Lake
total instructions in shared programs: 19865361 -> 19861747 (-0.02%)
instructions in affected programs: 185789 -> 182175 (-1.95%)
helped: 593
HURT: 47
helped stats (abs) min: 1 max: 27 x̄: 6.17 x̃: 4
helped stats (rel) min: 0.19% max: 8.65% x̄: 4.53% x̃: 4.60%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.03% max: 0.23% x̄: 0.11% x̃: 0.04%
95% mean confidence interval for instructions value: -5.93 -5.37
95% mean confidence interval for instructions %-change: -4.32% -4.06%
Instructions are helped.

total loops in shared programs: 6120 -> 6117 (-0.05%)
loops in affected programs: 6 -> 3 (-50.00%)
helped: 3
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%

total cycles in shared programs: 961777176 -> 959404350 (-0.25%)
cycles in affected programs: 172224180 -> 169851354 (-1.38%)
helped: 936
HURT: 80
helped stats (abs) min: 1 max: 9566 x̄: 2621.08 x̃: 2550
helped stats (rel) min: <.01% max: 41.77% x̄: 4.22% x̃: 3.84%
HURT stats (abs)   min: 1 max: 59146 x̄: 1006.34 x̃: 24
HURT stats (rel)   min: <.01% max: 3.78% x̄: 0.44% x̃: 0.25%
95% mean confidence interval for cycles value: -2513.72 -2157.20
95% mean confidence interval for cycles %-change: -4.13% -3.57%
Cycles are helped.

total sends in shared programs: 1019995 -> 1019872 (-0.01%)
sends in affected programs: 2283 -> 2160 (-5.39%)
helped: 119
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.91% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.39% -6.42%
Sends are helped.

LOST:   4
GAINED: 0

Skylake
total instructions in shared programs: 17994337 -> 17993846 (<.01%)
instructions in affected programs: 146294 -> 145803 (-0.34%)
helped: 190
HURT: 47
helped stats (abs) min: 1 max: 12 x̄: 2.83 x̃: 3
helped stats (rel) min: 0.14% max: 4.29% x̄: 1.08% x̃: 0.90%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.03% max: 0.22% x̄: 0.11% x̃: 0.04%
95% mean confidence interval for instructions value: -2.30 -1.84
95% mean confidence interval for instructions %-change: -0.95% -0.74%
Instructions are helped.

total loops in shared programs: 6029 -> 6023 (-0.10%)
loops in affected programs: 12 -> 6 (-50.00%)
helped: 6
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.

total cycles in shared programs: 939062940 -> 938023548 (-0.11%)
cycles in affected programs: 169671482 -> 168632090 (-0.61%)
helped: 980
HURT: 134
helped stats (abs) min: 1 max: 25000 x̄: 1075.57 x̃: 1052
helped stats (rel) min: <.01% max: 42.75% x̄: 2.51% x̃: 1.32%
HURT stats (abs)   min: 1 max: 837 x̄: 109.45 x̃: 20
HURT stats (rel)   min: <.01% max: 5.71% x̄: 0.73% x̃: 0.21%
95% mean confidence interval for cycles value: -1005.89 -860.17
95% mean confidence interval for cycles %-change: -2.39% -1.84%
Cycles are helped.

total sends in shared programs: 1026848 -> 1026724 (-0.01%)
sends in affected programs: 2302 -> 2178 (-5.39%)
helped: 120
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 6.91% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.40% -6.43%
Sends are helped.

LOST:   1
GAINED: 1

Broadwell
total instructions in shared programs: 17605621 -> 17605154 (<.01%)
instructions in affected programs: 145691 -> 145224 (-0.32%)
helped: 184
HURT: 48
helped stats (abs) min: 1 max: 12 x̄: 2.83 x̃: 3
helped stats (rel) min: 0.13% max: 4.29% x̄: 1.09% x̃: 0.93%
HURT stats (abs)   min: 1 max: 7 x̄: 1.12 x̃: 1
HURT stats (rel)   min: 0.03% max: 0.48% x̄: 0.12% x̃: 0.04%
95% mean confidence interval for instructions value: -2.26 -1.77
95% mean confidence interval for instructions %-change: -0.95% -0.73%
Instructions are helped.

total loops in shared programs: 5968 -> 5963 (-0.08%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.

total cycles in shared programs: 1000679489 -> 998592756 (-0.21%)
cycles in affected programs: 173421234 -> 171334501 (-1.20%)
helped: 993
HURT: 153
helped stats (abs) min: 1 max: 766608 x̄: 2118.49 x̃: 1080
helped stats (rel) min: <.01% max: 54.61% x̄: 2.61% x̃: 1.73%
HURT stats (abs)   min: 1 max: 2200 x̄: 110.61 x̃: 11
HURT stats (rel)   min: <.01% max: 5.68% x̄: 0.63% x̃: 0.06%
95% mean confidence interval for cycles value: -3191.23 -450.54
95% mean confidence interval for cycles %-change: -2.47% -1.89%
Cycles are helped.

total sends in shared programs: 996341 -> 996222 (-0.01%)
sends in affected programs: 2151 -> 2032 (-5.53%)
helped: 115
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.03 x̃: 1
helped stats (rel) min: 0.60% max: 14.29% x̄: 7.07% x̃: 6.67%
95% mean confidence interval for sends value: -1.09 -0.98
95% mean confidence interval for sends %-change: -7.55% -6.58%
Sends are helped.

Haswell
total instructions in shared programs: 16038375 -> 16038121 (<.01%)
instructions in affected programs: 216797 -> 216543 (-0.12%)
helped: 185
HURT: 217
helped stats (abs) min: 1 max: 12 x̄: 2.84 x̃: 3
helped stats (rel) min: 0.13% max: 4.23% x̄: 1.30% x̃: 1.20%
HURT stats (abs)   min: 1 max: 6 x̄: 1.25 x̃: 1
HURT stats (rel)   min: 0.03% max: 5.66% x̄: 0.61% x̃: 0.40%
95% mean confidence interval for instructions value: -0.85 -0.41
95% mean confidence interval for instructions %-change: -0.40% -0.14%
Instructions are helped.

total loops in shared programs: 5947 -> 5942 (-0.08%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.

total cycles in shared programs: 967655093 -> 965746713 (-0.20%)
cycles in affected programs: 197288924 -> 195380544 (-0.97%)
helped: 950
HURT: 195
helped stats (abs) min: 1 max: 782820 x̄: 2274.79 x̃: 1260
helped stats (rel) min: <.01% max: 54.26% x̄: 3.02% x̃: 1.71%
HURT stats (abs)   min: 1 max: 15790 x̄: 1295.73 x̃: 21
HURT stats (rel)   min: <.01% max: 119.85% x̄: 7.76% x̃: 0.11%
95% mean confidence interval for cycles value: -3014.22 -319.19
95% mean confidence interval for cycles %-change: -1.83% -0.55%
Cycles are helped.

total sends in shared programs: 934894 -> 934765 (-0.01%)
sends in affected programs: 2192 -> 2063 (-5.89%)
helped: 115
HURT: 2
helped stats (abs) min: 1 max: 4 x̄: 1.14 x̃: 1
helped stats (rel) min: 0.60% max: 28.57% x̄: 7.68% x̃: 6.67%
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 16.67% max: 16.67% x̄: 16.67% x̃: 16.67%
95% mean confidence interval for sends value: -1.23 -0.98
95% mean confidence interval for sends %-change: -8.28% -6.24%
Sends are helped.

LOST:   1
GAINED: 18

Ivy Bridge
total instructions in shared programs: 15269357 -> 15269398 (<.01%)
instructions in affected programs: 190484 -> 190525 (0.02%)
helped: 77
HURT: 206
helped stats (abs) min: 1 max: 6 x̄: 2.47 x̃: 3
helped stats (rel) min: 0.14% max: 5.31% x̄: 1.46% x̃: 1.65%
HURT stats (abs)   min: 1 max: 3 x̄: 1.12 x̃: 1
HURT stats (rel)   min: 0.03% max: 2.38% x̄: 0.42% x̃: 0.40%
95% mean confidence interval for instructions value: -0.06 0.35
95% mean confidence interval for instructions %-change: -0.21% 0.03%
Inconclusive result (value mean confidence interval includes 0).

total loops in shared programs: 4001 -> 3996 (-0.12%)
loops in affected programs: 10 -> 5 (-50.00%)
helped: 5
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.

total cycles in shared programs: 562045564 -> 561063543 (-0.17%)
cycles in affected programs: 200924872 -> 199942851 (-0.49%)
helped: 748
HURT: 160
helped stats (abs) min: 2 max: 14926 x̄: 1692.94 x̃: 1620
helped stats (rel) min: <.01% max: 53.29% x̄: 3.17% x̃: 1.87%
HURT stats (abs)   min: 2 max: 15726 x̄: 1776.86 x̃: 36
HURT stats (rel)   min: <.01% max: 114.43% x̄: 10.66% x̃: 0.21%
95% mean confidence interval for cycles value: -1237.33 -925.71
95% mean confidence interval for cycles %-change: -1.54% 0.08%
Inconclusive result (%-change mean confidence interval includes 0).

total sends in shared programs: 893348 -> 893330 (<.01%)
sends in affected programs: 187 -> 169 (-9.63%)
helped: 14
HURT: 0
helped stats (abs) min: 1 max: 2 x̄: 1.29 x̃: 1
helped stats (rel) min: 4.08% max: 22.22% x̄: 11.70% x̃: 10.10%
95% mean confidence interval for sends value: -1.56 -1.02
95% mean confidence interval for sends %-change: -14.92% -8.48%
Sends are helped.

LOST:   1
GAINED: 19

Sandy Bridge
total instructions in shared programs: 11785227 -> 11785774 (<.01%)
instructions in affected programs: 78403 -> 78950 (0.70%)
helped: 65
HURT: 505
helped stats (abs) min: 1 max: 4 x̄: 2.22 x̃: 3
helped stats (rel) min: 0.14% max: 4.17% x̄: 1.19% x̃: 1.38%
HURT stats (abs)   min: 1 max: 5 x̄: 1.37 x̃: 1
HURT stats (rel)   min: 0.24% max: 3.33% x̄: 1.57% x̃: 1.72%
95% mean confidence interval for instructions value: 0.85 1.07
95% mean confidence interval for instructions %-change: 1.16% 1.36%
Instructions are HURT.

total loops in shared programs: 2441 -> 2437 (-0.16%)
loops in affected programs: 8 -> 4 (-50.00%)
helped: 4
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00%
95% mean confidence interval for loops value: -1.00 -1.00
95% mean confidence interval for loops %-change: -50.00% -50.00%
Loops are helped.

total cycles in shared programs: 497178796 -> 496669298 (-0.10%)
cycles in affected programs: 51483322 -> 50973824 (-0.99%)
helped: 476
HURT: 137
helped stats (abs) min: 2 max: 7502 x̄: 1079.36 x̃: 1260
helped stats (rel) min: <.01% max: 42.50% x̄: 2.31% x̃: 0.86%
HURT stats (abs)   min: 2 max: 754 x̄: 31.23 x̃: 18
HURT stats (rel)   min: <.01% max: 3.01% x̄: 0.09% x̃: 0.02%
95% mean confidence interval for cycles value: -901.99 -760.32
95% mean confidence interval for cycles %-change: -2.20% -1.36%
Cycles are helped.

total sends in shared programs: 642919 -> 642915 (<.01%)
sends in affected programs: 32 -> 28 (-12.50%)
helped: 4
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 11.11% max: 14.29% x̄: 12.70% x̃: 12.70%
95% mean confidence interval for sends value: -1.00 -1.00
95% mean confidence interval for sends %-change: -15.61% -9.78%
Sends are helped.

Iron Lake
total instructions in shared programs: 8180061 -> 8180248 (<.01%)
instructions in affected programs: 65004 -> 65191 (0.29%)
helped: 59
HURT: 253
helped stats (abs) min: 1 max: 4 x̄: 2.24 x̃: 3
helped stats (rel) min: 0.16% max: 2.23% x̄: 1.04% x̃: 1.29%
HURT stats (abs)   min: 1 max: 5 x̄: 1.26 x̃: 1
HURT stats (rel)   min: 0.21% max: 3.85% x̄: 0.93% x̃: 0.60%
95% mean confidence interval for instructions value: 0.43 0.77
95% mean confidence interval for instructions %-change: 0.45% 0.68%
Instructions are HURT.

total loops in shared programs: 863 -> 861 (-0.23%)
loops in affected programs: 4 -> 2 (-50.00%)
helped: 2
HURT: 0

total cycles in shared programs: 239357490 -> 238907668 (-0.19%)
cycles in affected programs: 17314006 -> 16864184 (-2.60%)
helped: 176
HURT: 34
helped stats (abs) min: 4 max: 13400 x̄: 2558.05 x̃: 2920
helped stats (rel) min: 0.01% max: 35.58% x̄: 3.76% x̃: 2.69%
HURT stats (abs)   min: 2 max: 14 x̄: 11.59 x̃: 14
HURT stats (rel)   min: <.01% max: 0.06% x̄: 0.03% x̃: 0.03%
95% mean confidence interval for cycles value: -2440.68 -1843.34
95% mean confidence interval for cycles %-change: -3.78% -2.51%
Cycles are helped.

GM45
total instructions in shared programs: 4985293 -> 4985401 (<.01%)
instructions in affected programs: 58807 -> 58915 (0.18%)
helped: 57
HURT: 202
helped stats (abs) min: 1 max: 4 x̄: 2.26 x̃: 3
helped stats (rel) min: 0.15% max: 2.23% x̄: 1.06% x̃: 1.29%
HURT stats (abs)   min: 1 max: 5 x̄: 1.17 x̃: 1
HURT stats (rel)   min: 0.21% max: 3.85% x̄: 0.76% x̃: 0.48%
95% mean confidence interval for instructions value: 0.22 0.61
95% mean confidence interval for instructions %-change: 0.24% 0.48%
Instructions are HURT.

total loops in shared programs: 639 -> 638 (-0.16%)
loops in affected programs: 2 -> 1 (-50.00%)
helped: 1
HURT: 0

total cycles in shared programs: 153794236 -> 153546274 (-0.16%)
cycles in affected programs: 9947778 -> 9699816 (-2.49%)
helped: 110
HURT: 31
helped stats (abs) min: 4 max: 13400 x̄: 2257.51 x̃: 1796
helped stats (rel) min: 0.01% max: 35.58% x̄: 4.33% x̃: 2.45%
HURT stats (abs)   min: 2 max: 14 x̄: 11.74 x̃: 14
HURT stats (rel)   min: <.01% max: 0.06% x̄: 0.03% x̃: 0.03%
95% mean confidence interval for cycles value: -2113.77 -1403.42
95% mean confidence interval for cycles %-change: -4.27% -2.47%
Cycles are helped.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2899

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064>

2 years agonir: move nir_block_ends_in_break() to nir.h
Timothy Arceri [Thu, 29 Jul 2021 05:43:26 +0000 (15:43 +1000)]
nir: move nir_block_ends_in_break() to nir.h

Will be used in a following commit.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064>

2 years agonir: add indirect loop unrolling to compiler options
Timothy Arceri [Thu, 29 Jul 2021 09:34:26 +0000 (19:34 +1000)]
nir: add indirect loop unrolling to compiler options

This is where it should be rather than having to pass it into the
optimisation pass every time.

It also allows us to call the loop analysis pass without having to
duplicate these options which we will do later in this series.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064>

2 years agointel/compiler: make sure swizzle is applied to if condition
Timothy Arceri [Thu, 29 Jul 2021 02:14:16 +0000 (12:14 +1000)]
intel/compiler: make sure swizzle is applied to if condition

This fixes a hang in the following piglit test when GCM moves a
UBO load outside of the loop.

tests/shaders/ssa/fs-if-def-else-break.shader_test

The end NIR ends up looking like this:

vec2 32 ssa_3 = intrinsic load_ubo (ssa_2, ssa_0) (0, 1073741824, 0, 0, 8)
vec1 32 ssa_4 = mov ssa_3.x
vec1 32 ssa_5 = inot ssa_3.y
/* succs: block_1 */
loop {
           ...
           if ssa_5 { }
        }

Fixes: 1edf67fc3f6b ("intel/fs: Generate if instructions with inverted conditions")

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12064>