platform/upstream/mesa.git
2 years agod3d12: Support SSBOs in root signatures
Jesse Natalie [Wed, 22 Dec 2021 00:14:41 +0000 (16:14 -0800)]
d3d12: Support SSBOs in root signatures

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294>

2 years agomicrosoft/compiler: Handle write masks in SSBO lowering pass
Jesse Natalie [Wed, 22 Dec 2021 19:51:49 +0000 (11:51 -0800)]
microsoft/compiler: Handle write masks in SSBO lowering pass

Previously, the lowering was for 8/16/64-bit values, or 8/16-component
vectors. Now, it also handles write masks on 32-bit 1/2/3/4-component
vectors.

DXIL looks like it supports putting an interesting write mask in the
buffer store intrinsic, but DXC never generates stores with write
masks, and multiple drivers completely ignore the write mask.

Also, set the write mask properly on the output intrinsic.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294>

2 years agomicrosoft/compiler: Hook up uavs-at-every-stage flag
Jesse Natalie [Wed, 22 Dec 2021 02:15:29 +0000 (18:15 -0800)]
microsoft/compiler: Hook up uavs-at-every-stage flag

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294>

2 years agomicrosoft/compiler: Emit SSBOs from 0 -> count for GL (non-kernel, non-Vulkan) shaders
Jesse Natalie [Wed, 22 Dec 2021 00:13:45 +0000 (16:13 -0800)]
microsoft/compiler: Emit SSBOs from 0 -> count for GL (non-kernel, non-Vulkan) shaders

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294>

2 years agogitlab-ci: disable radv-fossils
Lionel Landwerlin [Mon, 27 Dec 2021 21:59:08 +0000 (23:59 +0200)]
gitlab-ci: disable radv-fossils

For some reason CI is unable to pull a git repo needed to run this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312>

2 years agoCI: Trigger Windows build on softpipe changes
Jesse Natalie [Mon, 27 Dec 2021 19:10:26 +0000 (11:10 -0800)]
CI: Trigger Windows build on softpipe changes

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312>

2 years agosoftpipe: Add a dummy field to sp_fragment_shader_variant_key
Jesse Natalie [Mon, 27 Dec 2021 19:09:05 +0000 (11:09 -0800)]
softpipe: Add a dummy field to sp_fragment_shader_variant_key

MSVC doesn't support 0-size structs in C.

Fixes: 0b7a0d1a ("softpipe: Use the draw module's poly stipple handling, like llvmpipe.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14312>

2 years agosoftpipe: Drop duplicate decl of softpipe_find_fs_variant
Emma Anholt [Sun, 26 Dec 2021 19:44:05 +0000 (11:44 -0800)]
softpipe: Drop duplicate decl of softpipe_find_fs_variant

Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731>

2 years agosoftpipe: Use the draw module's poly stipple handling, like llvmpipe.
Emma Anholt [Tue, 21 Dec 2021 23:31:36 +0000 (15:31 -0800)]
softpipe: Use the draw module's poly stipple handling, like llvmpipe.

softpipe was using the draw helper module as a testbed for the draw helper
module long ago, but we can just use the finished product.

Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731>

2 years agosoftpipe: Drop the quad pstipple stage.
Emma Anholt [Tue, 21 Dec 2021 23:25:23 +0000 (15:25 -0800)]
softpipe: Drop the quad pstipple stage.

It's unused, and it doesn't have the information it needs ("what is the
prim type after poly fill mode but without considering
wide point/line-to-triangle conversion) to stipple correctly.

Reviewed-by: Zoltán Böszőrményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13731>

2 years agoradv: Fix memory leak on error path.
Vinson Lee [Mon, 20 Dec 2021 03:10:21 +0000 (19:10 -0800)]
radv: Fix memory leak on error path.

Fix defects reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable signal_semaphore_infos going out of scope leaks the storage it points to
leaked_storage: Variable wait_semaphore_infos going out of scope leaks the storage it points to.

Fixes: 3da7d10d9bb ("radv: implement vkQueueSubmit2KHR()")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14260>

2 years agomesa/st: remove conditionals for driver state bits that are always set.
Dave Airlie [Mon, 20 Dec 2021 03:23:41 +0000 (13:23 +1000)]
mesa/st: remove conditionals for driver state bits that are always set.

Just removes some conditional checks that never work out now.

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

2 years agomesa/st: drop multisample mask/locations state drivers bits
Dave Airlie [Mon, 20 Dec 2021 03:11:52 +0000 (13:11 +1000)]
mesa/st: drop multisample mask/locations state drivers bits

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

2 years agomesa/st: drop new framebuffer srgb driver state bit
Dave Airlie [Mon, 20 Dec 2021 03:08:16 +0000 (13:08 +1000)]
mesa/st: drop new framebuffer srgb driver state bit

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

2 years agomesa/st: drop clip plane driver state bits
Dave Airlie [Mon, 20 Dec 2021 03:07:08 +0000 (13:07 +1000)]
mesa/st: drop clip plane driver state bits

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

2 years agomesa/st: drop scissor/window rect driver state bits
Dave Airlie [Mon, 20 Dec 2021 03:03:42 +0000 (13:03 +1000)]
mesa/st: drop scissor/window rect driver state bits

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

2 years agomesa/st: drop ssbo, image and sampler driver state flags bits
Dave Airlie [Mon, 20 Dec 2021 02:56:03 +0000 (12:56 +1000)]
mesa/st: drop ssbo, image and sampler driver state flags bits

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

2 years agomesa: drop unused transform feedback state driver flags
Dave Airlie [Mon, 20 Dec 2021 02:49:47 +0000 (12:49 +1000)]
mesa: drop unused transform feedback state driver flags

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

2 years agomesa/st: drop new uniform driver state bit
Dave Airlie [Mon, 20 Dec 2021 02:47:12 +0000 (12:47 +1000)]
mesa/st: drop new uniform driver state bit

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

2 years agomesa/st: drop new tess state driver bit
Dave Airlie [Mon, 20 Dec 2021 02:44:59 +0000 (12:44 +1000)]
mesa/st: drop new tess state driver bit

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

2 years agomesa/st: drop poly stipple driver state bit
Dave Airlie [Mon, 20 Dec 2021 02:43:37 +0000 (12:43 +1000)]
mesa/st: drop poly stipple driver state bit

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

2 years agomesa/st: drop new depth/stencil state bits
Dave Airlie [Mon, 20 Dec 2021 02:38:18 +0000 (12:38 +1000)]
mesa/st: drop new depth/stencil state bits

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

2 years agomesa/st: drop NewBlend driver state flags
Dave Airlie [Mon, 20 Dec 2021 02:34:46 +0000 (12:34 +1000)]
mesa/st: drop NewBlend driver state flags

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

2 years agomesa/st: remove the viewport driver state flags
Dave Airlie [Mon, 20 Dec 2021 02:23:04 +0000 (12:23 +1000)]
mesa/st: remove the viewport driver state flags

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

2 years agomesa/st: drop the rasterizer driver flags
Dave Airlie [Mon, 20 Dec 2021 02:20:42 +0000 (12:20 +1000)]
mesa/st: drop the rasterizer driver flags

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

2 years agomesa/st: drop the new array driver state bit
Dave Airlie [Mon, 20 Dec 2021 02:16:34 +0000 (12:16 +1000)]
mesa/st: drop the new array driver state bit

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

2 years agomesa/st: merge NewDepthClamp state flag
Dave Airlie [Mon, 20 Dec 2021 02:13:40 +0000 (12:13 +1000)]
mesa/st: merge NewDepthClamp state flag

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

2 years agomesa: drop optional tex/tnl maintains mode.
Dave Airlie [Mon, 20 Dec 2021 01:31:31 +0000 (11:31 +1000)]
mesa: drop optional tex/tnl maintains mode.

These are always going to be on with gallium

v2: drop call, tidy up switch (kwg)

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

2 years agomesa/st: move default enabled extensions into mesa.
Dave Airlie [Mon, 20 Dec 2021 01:27:23 +0000 (11:27 +1000)]
mesa/st: move default enabled extensions into mesa.

This just moves a bunch of true assignments into the core

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

2 years agomesa/draw: drop the multi draw with indices fallback.
Dave Airlie [Mon, 20 Dec 2021 01:21:33 +0000 (11:21 +1000)]
mesa/draw: drop the multi draw with indices fallback.

Gallium drivers don't need this.

v2: drop some more code

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

2 years agomesa: remove StripTextureBorder option.
Dave Airlie [Mon, 20 Dec 2021 00:55:57 +0000 (10:55 +1000)]
mesa: remove StripTextureBorder option.

Always make this true.

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

2 years agoci: debian-clang: build more drivers
Thomas H.P. Andersen [Wed, 22 Dec 2021 10:28:46 +0000 (11:28 +0100)]
ci: debian-clang: build more drivers

Add gallium drivers: i915 + asahi
Add vulkan drivers: swrast + panfrost

These can now compile with the current no-error list

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

2 years agopanvk: cast negative value to unint8_t
Thomas H.P. Andersen [Thu, 23 Dec 2021 15:15:00 +0000 (16:15 +0100)]
panvk: cast negative value to unint8_t

The index is a uint8_t but can be assigned a negative 1
value in panvk_pipeline_builder_parse_color_blend()
The comparison to ~0 thus makes sense but clang will complain:

"result of comparison of constant -1 with expression of type
'const uint8_t' (aka 'const unsigned char') is always true
[-Wtautological-constant-out-of-range-compare]"

Fix this by casting to a uint8_t before comparison.

Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>

2 years agopanvk: use FALLTHROUGH to stop a warning
Thomas H.P. Andersen [Wed, 22 Dec 2021 01:07:02 +0000 (02:07 +0100)]
panvk: use FALLTHROUGH to stop a warning

Fixes a warning with clang

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

2 years agoi915g: avoid left shifting a negative number
Thomas H.P. Andersen [Wed, 22 Dec 2021 01:08:08 +0000 (02:08 +0100)]
i915g: avoid left shifting a negative number

Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>

2 years agolavapipe: fix string-plus-int warning
Thomas H.P. Andersen [Wed, 22 Dec 2021 10:29:40 +0000 (11:29 +0100)]
lavapipe: fix string-plus-int warning

Fixes a warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14289>

2 years agopan/bi: Don't call useless NIR passes
Alyssa Rosenzweig [Wed, 16 Jun 2021 20:27:04 +0000 (16:27 -0400)]
pan/bi: Don't call useless NIR passes

Cargo culted from the Midgard compiler.

nir_move_vec_src_uses_to_dest is intended for vec4 backends, which does
not apply to Bifrost. nir_lower_locals_to_regs runs much earlier in the
compiler and is a no-op here.

total instructions in shared programs: 107252 -> 107242 (<.01%)
instructions in affected programs: 2403 -> 2393 (-0.42%)
helped: 10
HURT: 0
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.33% max: 0.57% x̄: 0.43% x̃: 0.42%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -0.49% -0.37%
Instructions are helped.

total tuples in shared programs: 89664 -> 89664 (0.00%)
tuples in affected programs: 333 -> 333 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.52% max: 0.52% x̄: 0.52% x̃: 0.52%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.70% max: 0.70% x̄: 0.70% x̃: 0.70%

total cycles in shared programs: 8103.88 -> 8103.79 (<.01%)
cycles in affected programs: 29.42 -> 29.33 (-0.28%)
helped: 3
HURT: 1
helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
0.04 x̃: 0
helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
0.04 x̃: 0
HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for cycles value: -0.09 0.05
95% mean confidence interval for cycles %-change: -1.22% 0.80%
Inconclusive result (value mean confidence interval includes 0).

total arith in shared programs: 3376.42 -> 3376.33 (<.01%)
arith in affected programs: 29.42 -> 29.33 (-0.28%)
helped: 3
HURT: 1
helped stats (abs) min: 0.041665999999999315 max: 0.04166700000000034 x̄:
0.04 x̃: 0
helped stats (rel) min: 0.49% max: 0.55% x̄: 0.53% x̃: 0.54%
HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄:
0.04 x̃: 0
HURT stats (rel)   min: 0.74% max: 0.74% x̄: 0.74% x̃: 0.74%
95% mean confidence interval for arith value: -0.09 0.05
95% mean confidence interval for arith %-change: -1.22% 0.80%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 79681 -> 79681 (0.00%)
quadwords in affected programs: 283 -> 283 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.82% max: 0.82% x̄: 0.82% x̃: 0.82%

total threads in shared programs: 2226 -> 2227 (0.04%)
threads in affected programs: 1 -> 2 (100.00%)
helped: 1
HURT: 0

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

2 years agoglcpp: Disable the valgrind tests.
Emma Anholt [Wed, 15 Dec 2021 23:01:17 +0000 (15:01 -0800)]
glcpp: Disable the valgrind tests.

We have the glcpp unit tests covered with ASan and MSan in CI, no need to
make everyone doing a "meson test" suffer through valgrind slowly churning
through these.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14236>

2 years agoci: Enable a build with MSan.
Emma Anholt [Fri, 17 Dec 2021 18:25:36 +0000 (10:25 -0800)]
ci: Enable a build with MSan.

This will catch uninitialized data usage (such as 37855fd59d18 ("glcpp:
Fully initialize struct gl_context")) much faster than valgrind does.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14236>

2 years agoisaspec: Sort field names to generate deterministic output.
Vinson Lee [Mon, 20 Dec 2021 02:25:33 +0000 (18:25 -0800)]
isaspec: Sort field names to generate deterministic output.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14259>

2 years agomicrosoft/compiler: dxil_nir_opt_alu_deref_srcs: return progress
Thomas H.P. Andersen [Wed, 22 Dec 2021 13:16:31 +0000 (14:16 +0100)]
microsoft/compiler: dxil_nir_opt_alu_deref_srcs: return progress

dxil_nir_opt_alu_deref_srcs will always return false because
the progress variable is declared both for the function and also
inside the loop.

Spotted by a unused-but-set-variable warning from clang

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

2 years agopan/va: Generalize LD_VAR_IMM_* to support flat varyings
Alyssa Rosenzweig [Wed, 22 Dec 2021 17:47:19 +0000 (12:47 -0500)]
pan/va: Generalize LD_VAR_IMM_* to support flat varyings

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

2 years agopan/va: Add .signed bit to right shift instructions
Alyssa Rosenzweig [Wed, 22 Dec 2021 17:14:59 +0000 (12:14 -0500)]
pan/va: Add .signed bit to right shift instructions

This makes the RSHIFT_* family of instructions act like ARSHIFT.* on
Bifrost.

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

2 years agopan/va: Rename LEA_ATTR to LEA_VARY
Alyssa Rosenzweig [Wed, 8 Dec 2021 00:02:50 +0000 (19:02 -0500)]
pan/va: Rename LEA_ATTR to LEA_VARY

This more accurately reflects the function of the instruction. Unlike
earlier Malis, there don't seem to be attribute records for varyings.

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

2 years agopan/va: Remove extra LD_VAR_IMM_F32 source
Alyssa Rosenzweig [Tue, 7 Dec 2021 23:56:49 +0000 (18:56 -0500)]
pan/va: Remove extra LD_VAR_IMM_F32 source

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

2 years agointel/compiler: drop unused decleration
Dave Airlie [Wed, 15 Dec 2021 00:29:31 +0000 (10:29 +1000)]
intel/compiler: drop unused decleration

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14202>

2 years agointel/compiler: don't lower swizzles in backend.
Dave Airlie [Wed, 15 Dec 2021 00:22:50 +0000 (10:22 +1000)]
intel/compiler: don't lower swizzles in backend.

These are lowered by crocus in the frontend, the key
entries are still used.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14202>

2 years agointel/compiler: remove gfx6 gather wa from backend.
Dave Airlie [Wed, 15 Dec 2021 00:21:46 +0000 (10:21 +1000)]
intel/compiler: remove gfx6 gather wa from backend.

Crocus lowers this in the frontend, they key member is still used
but reset prior to backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14202>

2 years agomesa/dd: drop unused InvalidateBufferSubData entry.
Dave Airlie [Wed, 22 Dec 2021 07:08:12 +0000 (17:08 +1000)]
mesa/dd: drop unused InvalidateBufferSubData entry.

I already removed the users of this, but forgot the entry.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>

2 years agomesa: drop unused _mesa_new_program.
Dave Airlie [Wed, 22 Dec 2021 07:07:28 +0000 (17:07 +1000)]
mesa: drop unused _mesa_new_program.

This isn't used since classic removal.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>

2 years agomesa: drop unused new renderbuffer code.
Dave Airlie [Wed, 22 Dec 2021 07:06:12 +0000 (17:06 +1000)]
mesa: drop unused new renderbuffer code.

This isn't used anywhere currently

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>

2 years agomesa/st: use has_stencil_export instead of querying screen cap.
Dave Airlie [Wed, 22 Dec 2021 07:05:09 +0000 (17:05 +1000)]
mesa/st: use has_stencil_export instead of querying screen cap.

We already query at context setup, just use that value.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>

2 years agomesa: drop texformat code this isn't used.
Dave Airlie [Wed, 22 Dec 2021 06:58:45 +0000 (16:58 +1000)]
mesa: drop texformat code this isn't used.

v2: dropped comment (Tapani)

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14286>

2 years agospirv: Allow VRS with mesh shaders.
Timur Kristóf [Thu, 16 Dec 2021 17:46:40 +0000 (18:46 +0100)]
spirv: Allow VRS with mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14291>

2 years agodraw: drop unused function
Thomas H.P. Andersen [Sat, 18 Dec 2021 20:10:06 +0000 (21:10 +0100)]
draw: drop unused function

Introduced in 381e9fe6. Never used.

Fixes a compile warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agogallium/tgsi_exec: drop unused function
Thomas H.P. Andersen [Sat, 18 Dec 2021 19:35:23 +0000 (20:35 +0100)]
gallium/tgsi_exec: drop unused function

Introduced in 9ca6cf0f and last usage
dropped in 31369987

Fixes a compile warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agogallium/u_threaded: drop unused function
Thomas H.P. Andersen [Sat, 18 Dec 2021 19:26:30 +0000 (20:26 +0100)]
gallium/u_threaded: drop unused function

tc_drop_sampler_view_reference is unused. It was introduced
in 340703e0 and its last usage was dropped in bb89cf4bf39

Fixes a compile warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agoglx: remove a set but not used variable
Thomas H.P. Andersen [Sat, 18 Dec 2021 00:54:59 +0000 (01:54 +0100)]
glx: remove a set but not used variable

total_sent was never used. It was introduced in
fdb07636f2e6324c5250cd5ee97778b7f5933bea

Fixes a warning in clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agor600: remove a set but not used variable
Thomas H.P. Andersen [Sat, 18 Dec 2021 00:46:43 +0000 (01:46 +0100)]
r600: remove a set but not used variable

grid_size was never used. Not even when introduced
in 6a829a1b724ca0d960decee217d260b4de8a5463

Fixes a warning on clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agor300: remove a set but not used variable
Thomas H.P. Andersen [Sat, 18 Dec 2021 00:23:37 +0000 (01:23 +0100)]
r300: remove a set but not used variable

The use of phase_refmask was removed 12 years ago
in b7cf887ca74561469c144f1d12227e1bcf277e7e

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agoi915g: fix implicit-fallthrough warning
Thomas H.P. Andersen [Fri, 17 Dec 2021 16:11:51 +0000 (17:11 +0100)]
i915g: fix implicit-fallthrough warning

Fixes a warning on clang.

Uses FALLTHROUGH like the surrounding code.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agolavapipe: fix implicit-fallthrough warning
Thomas H.P. Andersen [Fri, 17 Dec 2021 16:09:57 +0000 (17:09 +0100)]
lavapipe: fix implicit-fallthrough warning

Fixes a warning on clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14252>

2 years agointel/compiler: disable workaround not applicable to gfx >= 11
Marcin Ślusarz [Tue, 21 Dec 2021 11:16:21 +0000 (12:16 +0100)]
intel/compiler: disable workaround not applicable to gfx >= 11

There's nothing in bspec that would suggest this is still needed.
It only affected gfx 9 and 10.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14280>

2 years agoetnaviv: Use mesa_log*
Guido Günther [Wed, 15 Dec 2021 14:14:36 +0000 (15:14 +0100)]
etnaviv: Use mesa_log*

Makes it consistent with the DRM bits

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoentaviv/drm: Use same log format as gallium bits
Guido Günther [Wed, 15 Dec 2021 14:11:44 +0000 (15:11 +0100)]
entaviv/drm: Use same log format as gallium bits

We prefix with __func__:__LINE__ there.

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoetnaviv/drm: Use mesa_log* for debugging
Guido Günther [Wed, 15 Dec 2021 13:43:05 +0000 (14:43 +0100)]
etnaviv/drm: Use mesa_log* for debugging

This makes sure errors, warnings and info messages don't get
compiled out in non debug builds.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoetnaviv/drm: Print gpu model at debug verbosity
Guido Günther [Wed, 15 Dec 2021 13:34:53 +0000 (14:34 +0100)]
etnaviv/drm: Print gpu model at debug verbosity

Otherwise we print it at every application start.

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoetnaviv/drm: Add some bo debug output
Guido Günther [Tue, 27 Apr 2021 09:43:11 +0000 (11:43 +0200)]
etnaviv/drm: Add some bo debug output

This makes it simpler to trace BO usage.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoetnaviv/drm: Use etna_mesa_debug for debugging messages
Guido Günther [Tue, 27 Apr 2021 09:21:32 +0000 (11:21 +0200)]
etnaviv/drm: Use etna_mesa_debug for debugging messages

We use the variable from gallium but fall back to a weak symbol
in case there's usage out of galllium in the future.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10546>

2 years agoglsl: fix invariant qualifer usage and matching rule for GLSL 4.20
Tapani Pälli [Thu, 16 Dec 2021 17:01:34 +0000 (19:01 +0200)]
glsl: fix invariant qualifer usage and matching rule for GLSL 4.20

I noticed that GLSL version referenced here was wrong, version 4.20 is
first spec that does not allow invariant keyword for inputs.

v2: fix all comments (Timothy Arceri)

Fixes: f9f462936ad ("glsl: Fix invariant matching in GLSL 4.30 and GLSL ES 1.00.")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14241>

2 years agoci: debian-clang: drop -Wno-error for self-assign
Thomas H.P. Andersen [Mon, 20 Dec 2021 21:31:58 +0000 (22:31 +0100)]
ci: debian-clang: drop -Wno-error for self-assign

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14272>

2 years agogallivm: avoid a self-assign warning
Thomas H.P. Andersen [Mon, 20 Dec 2021 21:25:53 +0000 (22:25 +0100)]
gallivm: avoid a self-assign warning

Fixes a clang warning

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14272>

2 years agopanfrost: Avoid double unlock.
Vinson Lee [Mon, 20 Dec 2021 04:08:37 +0000 (20:08 -0800)]
panfrost: Avoid double unlock.

Fix defect reported by Coverity Scan.

Double unlock (LOCK)
double_unlock: pthread_mutex_unlock unlocks dev->indirect_draw_shaders.lock while it is unlocked.

Fixes: 2e6d94c198e ("panfrost: Add helpers to support indirect draws")
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14262>

2 years agoir3: Make shift operand 64-bit.
Vinson Lee [Sun, 19 Dec 2021 23:41:51 +0000 (15:41 -0800)]
ir3: Make shift operand 64-bit.

Fix defect reported by Coverity Scan.

Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression 2 << W
with type int (32 bits, signed) is evaluated using 32-bit
arithmetic, and then used in a context that expects an expression
of type uint64_t (64 bits, unsigned).

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14258>

2 years agoaco/optimizer_postRA: Fix applying VCC to branches.
Timur Kristóf [Tue, 21 Dec 2021 14:24:21 +0000 (15:24 +0100)]
aco/optimizer_postRA: Fix applying VCC to branches.

Fixes: a93092d0edc92eea8e8e96709ad9857f05c45cef
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14281>

2 years agoaco/optimizer_postRA: Fix combining DPP into VALU.
Timur Kristóf [Tue, 21 Dec 2021 14:21:32 +0000 (15:21 +0100)]
aco/optimizer_postRA: Fix combining DPP into VALU.

Fixes: 4ac47ad1cd7976d7effbbfae37fa69e26a288ad2
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14281>

2 years agoci: clean up debian-clang no-error list
Thomas H.P. Andersen [Mon, 20 Dec 2021 19:09:15 +0000 (20:09 +0100)]
ci: clean up debian-clang no-error list

I see no warnings for these on a local build

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14269>

2 years agoanv: Simplify assertions related to graphics stages
Caio Oliveira [Mon, 20 Dec 2021 23:19:35 +0000 (15:19 -0800)]
anv: Simplify assertions related to graphics stages

In all three cases, COMPUTE was on the table but with an invalid
value (zero).  Drop it from the tables and the extra assertion, so if
a COMPUTE is passed it will just fail the ARRAY_SIZE assertion.

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

2 years agoaco/ra: fix get_reg_for_operand() in case of stride mismatches
Daniel Schürmann [Tue, 21 Dec 2021 11:17:24 +0000 (12:17 +0100)]
aco/ra: fix get_reg_for_operand() in case of stride mismatches

We have to clear the register file from the previous operand
as otherwise, there might be no space left.

Totals from 5 (0.00% of 134572) affected shaders: (GFX10.3)
CodeSize: 21144 -> 21000 (-0.68%); split: -0.72%, +0.04%
Instrs: 3738 -> 3720 (-0.48%); split: -0.51%, +0.03%
Latency: 517229 -> 516319 (-0.18%); split: -0.18%, +0.00%
InvThroughput: 49068 -> 48902 (-0.34%); split: -0.38%, +0.04%
Copies: 501 -> 483 (-3.59%); split: -3.79%, +0.20%

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14279>

2 years agod3d12: Fix NV12 resource importing
Jesse Natalie [Mon, 20 Dec 2021 23:29:57 +0000 (15:29 -0800)]
d3d12: Fix NV12 resource importing

Fixes: a6db8054 ("d3d12: Handle opening planar resources")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14276>

2 years agonir/opt_algebraic: lower fneg_hi/lo to fmul
Daniel Schürmann [Thu, 7 Oct 2021 18:21:24 +0000 (20:21 +0200)]
nir/opt_algebraic: lower fneg_hi/lo to fmul

This pattern, found in the FSR upscaling shader,
helps the vectorization efforts by keeping the
chain of vectorized instructions intact.
Radeon can optimize it to per-component fneg modifiers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13688>

2 years agoaco/optimizer: propagate and fold inline constants on VOP3P instructions
Daniel Schürmann [Mon, 13 Dec 2021 18:58:46 +0000 (19:58 +0100)]
aco/optimizer: propagate and fold inline constants on VOP3P instructions

This patch aims to propagate and fold constants on VOP3P instructions
by using omod selection and the fneg modifier.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13688>

2 years agoaco: change fneg for VOP3P to use fmul with +1.0
Daniel Schürmann [Thu, 4 Nov 2021 17:40:44 +0000 (18:40 +0100)]
aco: change fneg for VOP3P to use fmul with +1.0

This will be useful to be able to also apply
fneg_lo and fneg_hi.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13688>

2 years agoaco/optimizer: fix fneg modifier propagation on VOP3P
Daniel Schürmann [Thu, 4 Nov 2021 17:37:03 +0000 (18:37 +0100)]
aco/optimizer: fix fneg modifier propagation on VOP3P

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13688>

2 years agoanv: Refactor dirty masking in cmd_buffer_flush_state
Caio Oliveira [Tue, 21 Dec 2021 08:40:53 +0000 (00:40 -0800)]
anv: Refactor dirty masking in cmd_buffer_flush_state

Instead of masking the dirty variable itself, use an appropriate mask
in the users of dirty.  This will avoid extra tracking when dealing
with Task/Mesh later.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14275>

2 years agoanv/blorp: Split blorp_exec into a render and compute
Caio Oliveira [Tue, 21 Dec 2021 08:36:10 +0000 (00:36 -0800)]
anv/blorp: Split blorp_exec into a render and compute

And set the relevant push_constants_dirty for each case.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14275>

2 years agov3dv: add Android support
Roman Stratiienko [Wed, 8 Dec 2021 10:15:38 +0000 (12:15 +0200)]
v3dv: add Android support

Acknowledgements to android-rpi team and lineage-rpi maintainer (KonstaT)
for creating/testing initial vulkan support. Their experience was used as
a baseline for this work.

Most of the code is a copy of turnip and anv.
Improved by cleaning dEQP failures:

 - Improved gralloc support (use allocation time stride, size, modifier).
 - Fixed some dEQP crashes due to memory allocation issues.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14016>

2 years agor300/vs: Fix flow control processing just after an endloop.
Emma Anholt [Mon, 20 Dec 2021 20:48:15 +0000 (12:48 -0800)]
r300/vs: Fix flow control processing just after an endloop.

We tried to step over the instruction we just generated, except we didn't
always just generate one.  In the sequence_vertex tests, that meant we
skipped processing the next BGNLOOP and then underflowed our stack.

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

2 years agor300/vs: Reuse rc_match_bgnloop().
Emma Anholt [Mon, 20 Dec 2021 19:28:36 +0000 (11:28 -0800)]
r300/vs: Reuse rc_match_bgnloop().

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

2 years agor300/vs: Allocate temps we see a use as a source, too.
Emma Anholt [Mon, 20 Dec 2021 20:09:28 +0000 (12:09 -0800)]
r300/vs: Allocate temps we see a use as a source, too.

This is a quick hack for a bunch of the fail in #5766.

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

2 years agoci/r300: Add another xfail on the main branch.
Emma Anholt [Mon, 20 Dec 2021 20:27:01 +0000 (12:27 -0800)]
ci/r300: Add another xfail on the main branch.

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

2 years agointel/fs: Add physical fall-through CFG edge for unconditional BREAK instruction.
Francisco Jerez [Tue, 14 Dec 2021 21:40:49 +0000 (13:40 -0800)]
intel/fs: Add physical fall-through CFG edge for unconditional BREAK instruction.

This adds a missing CFG edge that represents a possible physical
control flow path the EU might take under some conditions which isn't
part of the logical CFG of the program.  This possibility shouldn't
have led to problems on platforms prior to Gfx12, since the missing
control flow edge cannot possibly influence liveness intervals.
However on Gfx12+ it becomes the compiler's responsibility to resolve
data dependencies across instructions, and the missing physical
control flow paths may lead to a WaR data hazard currently not visible
to the software scoreboard pass, which could lead to data corruption.

Worse, the possibility for this path to be taken by the EU increases
on Gfx12+ due to a hardware bug affecting EU fusion -- However the
same physical path can be potentially taken on earlier platforms as
well, so this patch extends the CFG on all platforms for consistency,
even though the lack of this edge shouldn't lead to any functional
issues on platforms earlier than Gfx12.  There are no shader-db
changes on earlier platforms, so there seems to be no disadvantage
from using the same CFG representation as on later platforms.

This issue has ben reported on TGL with the following conformance
test, thanks to Ian for bringing the FULSIM dependency check warning
to my attention:

   dEQP-VK.graphicsfuzz.spv-stable-pillars-volatile-nontemporal-store

Fixes: 4d1959e69328cf ("intel/cfg: Represent divergent control flow paths caused by non-uniform loop execution.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4940
Reported-by: Tapani Pälli <tapani.palli@intel.com>
Reported-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14248>

2 years agoglsl: Retire unused modes for lower_64bit_integer_instructions.
Emma Anholt [Fri, 17 Dec 2021 21:33:08 +0000 (13:33 -0800)]
glsl: Retire unused modes for lower_64bit_integer_instructions.

Unused since 424ac809bfac ("i965: Do int64 lowering in NIR")

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

2 years agoglsl: Remove comment about non-existing DFREXP_TO_ARITH
Emma Anholt [Fri, 17 Dec 2021 21:11:49 +0000 (13:11 -0800)]
glsl: Remove comment about non-existing DFREXP_TO_ARITH

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

2 years agoglsl: Remove dead prototype for old do_discard_simplification().
Emma Anholt [Fri, 17 Dec 2021 21:00:41 +0000 (13:00 -0800)]
glsl: Remove dead prototype for old do_discard_simplification().

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

2 years agoglsl: Delete the optimize_redundant_jumps pass.
Emma Anholt [Fri, 17 Dec 2021 20:56:51 +0000 (12:56 -0800)]
glsl: Delete the optimize_redundant_jumps pass.

Nothing here that NIR doesn't do.  No effect on shader-db of hsw or
softpipe.

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

2 years agoglsl: Delete the vectorization opt pass.
Emma Anholt [Fri, 17 Dec 2021 20:41:10 +0000 (12:41 -0800)]
glsl: Delete the vectorization opt pass.

Nothing uses it, and i965 was the last thing to.  Even if I enable it for
softpipe or crocus, it quickly causes NIR validation failures in shader-db
from swizzles outside the bounds of vectors.  Retire it in favor of
nir_opt_vectorize().

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

2 years agofreedreno/ir3: Dump const state with shader disasm
Rob Clark [Sat, 4 Dec 2021 00:29:13 +0000 (16:29 -0800)]
freedreno/ir3: Dump const state with shader disasm

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>

2 years agofreedreno/computerator: Mark shader bo for dumping
Rob Clark [Fri, 3 Dec 2021 00:23:13 +0000 (16:23 -0800)]
freedreno/computerator: Mark shader bo for dumping

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>

2 years agofreedreno/computerator: Fix @buf header
Rob Clark [Fri, 3 Dec 2021 00:10:39 +0000 (16:10 -0800)]
freedreno/computerator: Fix @buf header

Order is important in the grammar, the more specific match needs to go
first.

Fixes: ba1c989348d ("freedreno/computerator: pass iova of buffer to const register")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>