platform/upstream/mesa.git
2 years agozink: add RADV to list of broken drivers for EXT_color_write_enable
Mike Blumenkrantz [Tue, 22 Mar 2022 19:55:28 +0000 (15:55 -0400)]
zink: add RADV to list of broken drivers for EXT_color_write_enable

ref #6185

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

2 years agopanfrost: Process scissor state earlier
Alyssa Rosenzweig [Sat, 15 Jan 2022 15:29:11 +0000 (10:29 -0500)]
panfrost: Process scissor state earlier

Otherwise, if batch->scissor_culls_everything is set for a single draw,
every draw after it in the batch will be skipped because the new
scissor/viewport state will never be processed. Process scissor state
early in draw_vbo to fix this interaction.

We do need to be careful: setting something on the batch can only happen when
we've decided on a batch. If we have to select a fresh batch due to too many
draws, that must happen first. This is pretty clear in the code but worth noting
for the diff.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95 <ixn@disroot.org>
Reviewed-by: Icecream95 <ixn@disroot.org>
Fixes: 79356b2e ("panfrost: Skip rasterizer discard draws without side effects")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5839
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6136
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15365>

2 years agointel/fs: handle interpolation modes for at_sample and at_offset too
Iván Briano [Thu, 17 Mar 2022 02:26:54 +0000 (19:26 -0700)]
intel/fs: handle interpolation modes for at_sample and at_offset too

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

2 years agovirgl/ci: Add jobs for running trace tests on LAVA
Cristian Ciocaltea [Fri, 18 Feb 2022 11:38:29 +0000 (13:38 +0200)]
virgl/ci: Add jobs for running trace tests on LAVA

Provide new jobs virgl-lava-traces and virgl-lava-traces-performance to
run piglit trace tests on Intel based LAVA runners.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Dynamically adjust LIBGL_ALWAYS_SOFTWARE for crosvm
Cristian Ciocaltea [Thu, 3 Mar 2022 11:43:54 +0000 (13:43 +0200)]
ci: Dynamically adjust LIBGL_ALWAYS_SOFTWARE for crosvm

For an increased flexibility in operation, do not set
'CROSVM_LIBGL_ALWAYS_SOFTWARE=true' when *not* using llvmpipe
Gallium driver.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Allow specifying any shell command via HWCI_TEST_SCRIPT
Cristian Ciocaltea [Wed, 23 Feb 2022 18:29:24 +0000 (20:29 +0200)]
ci: Allow specifying any shell command via HWCI_TEST_SCRIPT

Interpret the value of HWCI_TEST_SCRIPT environment variable as a shell
command. This allows, for example, to provide additional environment
variables: HWCI_TEST_SCRIPT="VAR1=VAL1 VAR2=VAL2 /path/to/script"

Additionally, add the missing execute permission flags to
gtest-runner.sh script.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Provide consistent results location in LAVA
Cristian Ciocaltea [Thu, 4 Nov 2021 18:49:05 +0000 (20:49 +0200)]
ci: Provide consistent results location in LAVA

There is an out-of-sync approach regarding the location of the results
folder: some scripts refer to it via $CI_PROJECT_DIR/results, while
others just assume it is located in the current working directory.

Usually $PWD points to $CI_PROJECT_DIR, but in some cases this is not
the case, hence let's ensure the 'results' folder can always be found
in the current working directory.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Remove obsolete CROSVM_TEST_SCRIPT env var
Cristian Ciocaltea [Thu, 24 Feb 2022 20:51:06 +0000 (22:51 +0200)]
ci: Remove obsolete CROSVM_TEST_SCRIPT env var

This was used in the past for passing the path to a script to be
executed inside a crosvm instance. Currently, setting this variable
has no effect, hence remove it from generate-env.sh.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Add PIGLIT_REPLAY_LOOP_TIMES to generate-env.sh
Cristian Ciocaltea [Thu, 24 Feb 2022 20:41:53 +0000 (22:41 +0200)]
ci: Add PIGLIT_REPLAY_LOOP_TIMES to generate-env.sh

PIGLIT_REPLAY_LOOP_TIMES is currently used to override the default
configuration when running virgl trace performance tests in LAVA.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Use script relative paths in crosvm-runner
Cristian Ciocaltea [Tue, 22 Feb 2022 17:09:02 +0000 (19:09 +0200)]
ci: Use script relative paths in crosvm-runner

For an increased portability, do not rely on 'CI_PROJECT_DIR' to
reference script relative resources and, instead, compute their
paths based on the crosvm-runner.sh invocation file path as
indicated by $0.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Make kernel image available in LAVA for KVM use cases
Cristian Ciocaltea [Tue, 22 Feb 2022 14:58:47 +0000 (16:58 +0200)]
ci: Make kernel image available in LAVA for KVM use cases

In order to run a VM (e.g. crosvm) through HWCI_TEST_SCRIPT on a LAVA
target, it's necessary to download a kernel image on the target device.

When HWCI_KVM is set to 'true', we can safely assume HWCI_TEST_SCRIPT
contains a command or the path to a script which expects the kernel
image to be available under /lava-files/${KERNEL_IMAGE_NAME}.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Load KVM kernel module for LAVA runners
Cristian Ciocaltea [Tue, 22 Feb 2022 14:49:28 +0000 (16:49 +0200)]
ci: Load KVM kernel module for LAVA runners

If 'HWCI_KVM' enviroment variable is set, load the KVM kernel module
specific to the detected CPU virtualisation extensions: vmx for Intel
VT and svm for AMD-V.

As an additional optimization, handle HWCI_KERNEL_MODULES probing in the
main shell process instead of creating an unnecessary subshell.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Enable KVM_AMD and KVM_INTEL kernel modules
Cristian Ciocaltea [Mon, 1 Nov 2021 11:27:42 +0000 (13:27 +0200)]
ci: Enable KVM_AMD and KVM_INTEL kernel modules

Build and deploy KVM kernel modules in rootfs image to be used for
running crossvm in LAVA environment.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Add crosvm runtime dependencies for LAVA
Cristian Ciocaltea [Thu, 28 Oct 2021 19:25:09 +0000 (22:25 +0300)]
ci: Add crosvm runtime dependencies for LAVA

Provide the required packages in the rootfs image in order to allow
running crosvm inside LAVA environment.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Build crosvm for LAVA runners
Cristian Ciocaltea [Fri, 18 Feb 2022 11:35:51 +0000 (13:35 +0200)]
ci: Build crosvm for LAVA runners

This is the first step to add support for running crosvm inside LAVA.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Set CI_JOB_JWT_FILE to a fixed path outside /tmp
Cristian Ciocaltea [Wed, 23 Feb 2022 15:44:33 +0000 (17:44 +0200)]
ci: Set CI_JOB_JWT_FILE to a fixed path outside /tmp

Having CI_JOB_JWT_FILE pointing to path on /tmp makes it difficult to be
managed in VM contexts (e.g. crosvm) because the /tmp mountpoint usually
refers to a local filesystem rather than the host one.

Additionally, there is another restriction for 'piglit-traces-test' job
to have the file available on the root filesystem.

To avoid amending all the jobs that might be affected, let's just set
the variable to a fixed path '/minio_jwt'. Note we also need to do this
in the 'variables:' section instead of 'before_script:' in order to be
able to reference it in CI job variables, e.g. PIGLIT_REPLAY_EXTRA_ARGS

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Convert generate-env.sh to a POSIX compliant script
Cristian Ciocaltea [Wed, 23 Feb 2022 11:43:48 +0000 (13:43 +0200)]
ci: Convert generate-env.sh to a POSIX compliant script

This shell script will be used in environments (e.g. LAVA) where bash
is not available, hence let's make sure it is POSIX compliant in order
to be able to execute on any modern shell interpreter.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoci: Avoid altering EXTRA_CARGO_ARGS environment variable
Cristian Ciocaltea [Mon, 21 Feb 2022 14:30:13 +0000 (16:30 +0200)]
ci: Avoid altering EXTRA_CARGO_ARGS environment variable

Use a dedicated DEQP_RUNNER_CARGO_ARGS variable instead of
EXTRA_CARGO_ARGS in build-deqp-runner.sh to pass custom arguments when
invoking 'cargo install'.

This is to avoid modifications of EXTRA_CARGO_ARGS which might have
negative side-effects in the scripts which rely on this variable and
import build-deqp-runner.sh instead of executing it in a subshell.

Fixes: 8729c6e9818 ("ci: Support building and installing deqp-runner from source")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15208>

2 years agoradv,aco: lower image descriptor loads in NIR
Rhys Perry [Wed, 21 Oct 2020 17:12:35 +0000 (18:12 +0100)]
radv,aco: lower image descriptor loads in NIR

fossil-db (Sienna Cichlid):
Totals from 2926 (1.80% of 162293) affected shaders:
Instrs: 2315110 -> 2306644 (-0.37%); split: -0.37%, +0.00%
CodeSize: 12581592 -> 12546588 (-0.28%); split: -0.28%, +0.00%
VGPRs: 130216 -> 130208 (-0.01%)
SpillSGPRs: 477 -> 474 (-0.63%); split: -5.03%, +4.40%
Latency: 29686188 -> 29678804 (-0.02%); split: -0.05%, +0.02%
InvThroughput: 6926545 -> 6926286 (-0.00%); split: -0.02%, +0.02%
SClause: 73761 -> 72996 (-1.04%); split: -1.16%, +0.12%
Copies: 144068 -> 137279 (-4.71%); split: -4.78%, +0.07%
Branches: 47466 -> 47483 (+0.04%); split: -0.01%, +0.04%
PreSGPRs: 118042 -> 117377 (-0.56%); split: -1.34%, +0.77%

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

2 years agoradv,aco: lower texture descriptor loads in NIR
Rhys Perry [Thu, 12 Aug 2021 14:36:56 +0000 (15:36 +0100)]
radv,aco: lower texture descriptor loads in NIR

fossil-db (Sienna Cichlid):
Totals from 39445 (24.30% of 162293) affected shaders:
MaxWaves: 875988 -> 875972 (-0.00%)
Instrs: 35372561 -> 35234909 (-0.39%); split: -0.41%, +0.03%
CodeSize: 190237480 -> 189379240 (-0.45%); split: -0.47%, +0.02%
VGPRs: 1889856 -> 1889928 (+0.00%); split: -0.00%, +0.01%
SpillSGPRs: 10764 -> 10857 (+0.86%); split: -2.04%, +2.91%
SpillVGPRs: 1891 -> 1907 (+0.85%); split: -0.32%, +1.16%
Scratch: 260096 -> 261120 (+0.39%)
Latency: 477701150 -> 477578466 (-0.03%); split: -0.06%, +0.03%
InvThroughput: 87819847 -> 87830346 (+0.01%); split: -0.03%, +0.04%
VClause: 673353 -> 673829 (+0.07%); split: -0.04%, +0.11%
SClause: 1385396 -> 1366478 (-1.37%); split: -1.65%, +0.29%
Copies: 2327965 -> 2229134 (-4.25%); split: -4.58%, +0.34%
Branches: 906707 -> 906434 (-0.03%); split: -0.13%, +0.10%
PreSGPRs: 1874153 -> 1862698 (-0.61%); split: -1.34%, +0.73%
PreVGPRs: 1691382 -> 1691383 (+0.00%); split: -0.00%, +0.00%

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

2 years agoradv,aco: lower buffer descriptor loads in NIR
Rhys Perry [Wed, 4 Aug 2021 13:06:47 +0000 (14:06 +0100)]
radv,aco: lower buffer descriptor loads in NIR

fossil-db (Sienna Cichlid):
Totals from 75420 (46.47% of 162293) affected shaders:
MaxWaves: 1878200 -> 1879228 (+0.05%); split: +0.06%, -0.00%
Instrs: 54021103 -> 54141370 (+0.22%); split: -0.04%, +0.26%
CodeSize: 287813520 -> 288293352 (+0.17%); split: -0.04%, +0.21%
VGPRs: 3267576 -> 3266296 (-0.04%); split: -0.04%, +0.00%
SpillSGPRs: 10445 -> 10904 (+4.39%); split: -0.31%, +4.70%
SpillVGPRs: 1818 -> 1811 (-0.39%); split: -1.05%, +0.66%
Scratch: 955392 -> 954368 (-0.11%)
Latency: 563477854 -> 562131282 (-0.24%); split: -0.31%, +0.08%
InvThroughput: 111860104 -> 111553968 (-0.27%); split: -0.30%, +0.02%
VClause: 958432 -> 961415 (+0.31%); split: -0.34%, +0.65%
SClause: 1917415 -> 1926952 (+0.50%); split: -0.69%, +1.19%
Copies: 3812945 -> 3916758 (+2.72%); split: -0.27%, +2.99%
Branches: 1611235 -> 1612022 (+0.05%); split: -0.04%, +0.08%
PreSGPRs: 3095505 -> 3126580 (+1.00%); split: -0.06%, +1.07%
PreVGPRs: 2773011 -> 2773013 (+0.00%)

Most regressions seem to be because ACO's convert_pointer_to_64_bit()
can't be CSE'd with radv_nir_apply_pipeline_layout()'s
convert_pointer_to_64_bit(). This should be improved by later commits.

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

2 years agoradv,aco: lower vulkan_resource_index in NIR
Rhys Perry [Wed, 4 Aug 2021 11:59:26 +0000 (12:59 +0100)]
radv,aco: lower vulkan_resource_index in NIR

fossil-db (Sienna Cichlid):
Totals from 31338 (19.31% of 162293) affected shaders:
MaxWaves: 758634 -> 758616 (-0.00%)
Instrs: 26398289 -> 26378282 (-0.08%); split: -0.09%, +0.01%
CodeSize: 141048208 -> 140971060 (-0.05%); split: -0.07%, +0.01%
VGPRs: 1373656 -> 1373736 (+0.01%)
SpillSGPRs: 9944 -> 9924 (-0.20%); split: -0.24%, +0.04%
SpillVGPRs: 1892 -> 1898 (+0.32%); split: -0.95%, +1.27%
Latency: 308570144 -> 308528462 (-0.01%); split: -0.03%, +0.02%
InvThroughput: 57698072 -> 57684901 (-0.02%); split: -0.07%, +0.04%
VClause: 440357 -> 440602 (+0.06%); split: -0.02%, +0.08%
SClause: 974724 -> 973315 (-0.14%); split: -0.18%, +0.04%
Copies: 1944925 -> 1945103 (+0.01%); split: -0.11%, +0.12%
Branches: 799444 -> 799461 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1619860 -> 1619233 (-0.04%); split: -0.05%, +0.02%
PreVGPRs: 1252813 -> 1252863 (+0.00%); split: -0.00%, +0.00%

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

2 years agoac/llvm: implement nir_tex_src_{texture,sampler}_handle
Rhys Perry [Wed, 21 Oct 2020 16:36:12 +0000 (17:36 +0100)]
ac/llvm: implement nir_tex_src_{texture,sampler}_handle

nir_tex_src_{texture,sampler}_handle is either the actual descriptor as a
vec4/vec8 or a pointer passed to load_sampler_desc.

The sample index isn't adjusted using FMASK when these are used.

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

2 years agoac/llvm: remove deref chasing for tg4 integer workaround
Rhys Perry [Thu, 17 Mar 2022 12:56:18 +0000 (12:56 +0000)]
ac/llvm: remove deref chasing for tg4 integer workaround

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

2 years agoac/llvm: implement nir_intrinsic_bindless_image_sparse_load
Rhys Perry [Thu, 17 Mar 2022 13:09:23 +0000 (13:09 +0000)]
ac/llvm: implement nir_intrinsic_bindless_image_sparse_load

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

2 years agoac/llvm: remove deref requirement for image fmask loads
Rhys Perry [Thu, 17 Mar 2022 13:03:30 +0000 (13:03 +0000)]
ac/llvm: remove deref requirement for image fmask loads

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

2 years agonir: allow bindless image/texture/sampler handles to be vectors
Rhys Perry [Fri, 25 Sep 2020 10:42:30 +0000 (11:42 +0100)]
nir: allow bindless image/texture/sampler handles to be vectors

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

2 years agoradv: move radv_declare_shader_args() out of shader_variant_compile()
Rhys Perry [Thu, 24 Sep 2020 13:50:54 +0000 (14:50 +0100)]
radv: move radv_declare_shader_args() out of shader_variant_compile()

Declaring them earlier will allow us to access them in NIR.

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

2 years agoac/llvm: implement implement load_{scalar,vector}_arg_amd and load_smem_amd
Rhys Perry [Wed, 21 Oct 2020 17:57:53 +0000 (18:57 +0100)]
ac/llvm: implement implement load_{scalar,vector}_arg_amd and load_smem_amd

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

2 years agoaco: implement load_{scalar,vector}_arg_amd and load_smem_amd
Rhys Perry [Tue, 22 Sep 2020 14:27:26 +0000 (15:27 +0100)]
aco: implement load_{scalar,vector}_arg_amd and load_smem_amd

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

2 years agonir: add load_{scalar,vector}_arg_amd and load_smem_amd intrinsics
Rhys Perry [Mon, 21 Sep 2020 12:54:54 +0000 (13:54 +0100)]
nir: add load_{scalar,vector}_arg_amd and load_smem_amd intrinsics

load_smem_gcn is similar to load_global/load_global_constant, but it's
guaranteed to use SMEM and it's much easier to utilize the format's 32-bit
offset source.

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

2 years agopvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs
Frank Binns [Fri, 25 Feb 2022 10:28:39 +0000 (10:28 +0000)]
pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs

Co-authored-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Co-authored-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243>

2 years agoturnip: Disallow non-linear tiling when casting R8G8 to other fmts
Danylo Piliaiev [Fri, 18 Mar 2022 19:13:07 +0000 (21:13 +0200)]
turnip: Disallow non-linear tiling when casting R8G8 to other fmts

R8G8 have a different block width/height and height alignment from other
formats that would normally be compatible (like R16), and so if we are
trying to, for example, sample R16 as R8G8 we need to demote to linear.

Follows the fix in Freedreno: b97e3bb2e1ffef2dbdb843411c222a7654c0c7a0

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

2 years agoturnip: Force linear mode for non-ubwc R8G8 formats
Danylo Piliaiev [Fri, 18 Mar 2022 17:48:40 +0000 (19:48 +0200)]
turnip: Force linear mode for non-ubwc R8G8 formats

Non-UBWC tiled R8G8 is probably buggy since media formats are always
either linear or UBWC. There is no simple test to reproduce the bug.
However it was observed in the wild leading to an unrecoverable hang
on a650/a660.

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

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

2 years agofrontends/va: fix coredump as creating surface with VAConfigAttrib
shansheng.wang [Mon, 21 Mar 2022 04:08:56 +0000 (12:08 +0800)]
frontends/va: fix coredump as creating surface with VAConfigAttrib

As creating surface with VAConfigAttrib, checking if modifier from attrib list is null

Signed-off-by: shanshengwang <shansheng.wang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15483>

2 years agozink: use the current compute shader, not the base one
Mike Blumenkrantz [Mon, 21 Mar 2022 20:21:16 +0000 (16:21 -0400)]
zink: use the current compute shader, not the base one

this is the current variant and the one that should be used

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

2 years agozink: create compute pipeline after updating shader variants
Mike Blumenkrantz [Mon, 21 Mar 2022 20:20:21 +0000 (16:20 -0400)]
zink: create compute pipeline after updating shader variants

it turns out shader variants don't work if you generate them after you
determine which variant to use

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

2 years agoradeonsi: NIR equivalent of si_create_clear_buffer_rmw_cs()
Ganesh Belgur Ramachandra [Fri, 11 Mar 2022 18:27:34 +0000 (12:27 -0600)]
radeonsi: NIR equivalent of si_create_clear_buffer_rmw_cs()

Replaced the existing internal TGSI compute shader, which clears
a read-modify-write buffer, with its NIR equivalent. The disassembly
shader generated by the new NIR variant is identical to the previous
implementation. These changes remove the additional conversion step
from TGSI to NIR for the shader at runtime. Tested on a Navi 23 card.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15356>

2 years agoamd/ac_gpu_info: fix warning on fread unused result
Mihai Preda [Mon, 14 Mar 2022 09:25:40 +0000 (11:25 +0200)]
amd/ac_gpu_info: fix warning on fread unused result

fixes this warning:
ignoring return value of 'fread' declared with attribute 'warn_unused_result' [-Wunused-result]

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

2 years agointel: Add INTEL_DEBUG=noccs alias for INTEL_DEBUG=norbc
Kenneth Graunke [Fri, 18 Mar 2022 08:31:39 +0000 (01:31 -0700)]
intel: Add INTEL_DEBUG=noccs alias for INTEL_DEBUG=norbc

When CCS compression first came out on Skylake, we referred to it as
"renderbuffer compression", or RBC for short.  However, that name has
long since fallen out of favor, and we refer to it as CCS nearly
everywhere.

This patch renames DEBUG_NO_RBC to DEBUG_NO_CCS inside the codebase
for clarity, and adds INTEL_DEBUG=noccs.  The legacy INTEL_DEBUG=norbc
name continues to work, because it's one line of code and having both
names makes our lives easier in the interim.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15447>

2 years agonir: Print divergence status of SSA values if analysis was ever run.
Kenneth Graunke [Thu, 10 Sep 2020 04:08:49 +0000 (21:08 -0700)]
nir: Print divergence status of SSA values if analysis was ever run.

After running divergence analysis, we include "div" or "con" for each
SSA def's divergence/convergence status:

vec1 32 div ssa_35 = fddy ssa_34
vec1 32 con ssa_36 = fddy ssa_6.x

We omit this before the first time divergence analysis has been run.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15445>

2 years agozink: ci updates
Mike Blumenkrantz [Tue, 22 Mar 2022 03:13:21 +0000 (23:13 -0400)]
zink: ci updates

these should be properly disabled now

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

2 years agozink: ci updates
Mike Blumenkrantz [Tue, 22 Mar 2022 03:00:56 +0000 (23:00 -0400)]
zink: ci updates

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

2 years agozink: use the right query type for primitives generated
Mike Blumenkrantz [Mon, 7 Mar 2022 19:40:12 +0000 (14:40 -0500)]
zink: use the right query type for primitives generated

this should've always been clipping invocations, but I got scared because
then tests with rasterization_discard=1 fail and I didn't handle that instead

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

2 years agozink: use EXT_color_write_enable to mask out primgen+rasterizer_discard output
Mike Blumenkrantz [Mon, 7 Mar 2022 20:51:54 +0000 (15:51 -0500)]
zink: use EXT_color_write_enable to mask out primgen+rasterizer_discard output

by disabling color and depth write, the side effects of force-disabling discard can
be mitigated

fixes:
KHR-GL46.tessellation_shader.single.isolines_tessellation
KHR-GL46.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through
KHR-GL46.tessellation_shader.tessellation_invariance.invariance_rule3
KHR-GL46.tessellation_shader.tessellation_shader_point_mode.points_verification
KHR-GL46.tessellation_shader.tessellation_shader_quads_tessellation.degenerate_case
KHR-GL46.tessellation_shader.tessellation_shader_quads_tessellation.inner_tessellation_level_rounding
KHR-GL46.tessellation_shader.tessellation_shader_tessellation.gl_InvocationID_PatchVerticesIn_PrimitiveID
KHR-GL46.tessellation_shader.vertex.vertex_spacing

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

2 years agozink: add an alternate path for EXT_color_write_enable usage
Mike Blumenkrantz [Sun, 13 Mar 2022 16:46:25 +0000 (12:46 -0400)]
zink: add an alternate path for EXT_color_write_enable usage

for drivers where this is broken/missing, the same effect can be achieved
by feeding the renderpass a framebuffer with null/dummy attachments

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

2 years agozink: use EXT_color_write_enable when possible
Mike Blumenkrantz [Sun, 13 Mar 2022 16:14:13 +0000 (12:14 -0400)]
zink: use EXT_color_write_enable when possible

this should only verify that drivers aren't completely broken by
enabling it and have no other changes

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

2 years agozink: disable color_write_enable on ANV
Mike Blumenkrantz [Wed, 16 Mar 2022 18:05:03 +0000 (14:05 -0400)]
zink: disable color_write_enable on ANV

this breaks the driver

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

2 years agozink: start a unified driver workarounds struct
Mike Blumenkrantz [Sun, 13 Mar 2022 16:11:33 +0000 (12:11 -0400)]
zink: start a unified driver workarounds struct

eventually anything that checks driverID should be moved here for ease of
reference/updating

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

2 years agozink: force disable rasterization discard if primgen query is active
Mike Blumenkrantz [Mon, 7 Mar 2022 20:32:40 +0000 (15:32 -0500)]
zink: force disable rasterization discard if primgen query is active

this query requires rasterization to pass the clipping invocations stage,
which means discard is impossible

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

2 years agozink: hook up EXT_color_write_enable
Mike Blumenkrantz [Sun, 13 Mar 2022 16:11:10 +0000 (12:11 -0400)]
zink: hook up EXT_color_write_enable

no functional changes

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

2 years agonir/linker: set varying from uniform as flat
Qiang Yu [Fri, 11 Mar 2022 10:14:57 +0000 (18:14 +0800)]
nir/linker: set varying from uniform as flat

Flat varying can save some rasterization compute cost
and register needed by shader.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>

2 years agolima: enable nir lower_varying_from_uniform
Qiang Yu [Fri, 11 Mar 2022 06:04:31 +0000 (14:04 +0800)]
lima: enable nir lower_varying_from_uniform

Mali GPU pass varying by memory, so enable this optimization.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>

2 years agonir/linker: disable varying from uniform lowering by default
Qiang Yu [Fri, 11 Mar 2022 05:55:02 +0000 (13:55 +0800)]
nir/linker: disable varying from uniform lowering by default

This fixes performance regression for Specviewperf/Energy
on AMD GPU. Other GPUs passing varying by memory may choose
to re-enable it as need.

Fixes: 26046250437 ("nir/linker: support uniform when optimizing varying")
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15341>

2 years agoasahi: Port driver to macOS 12.x ABI
Alyssa Rosenzweig [Mon, 21 Mar 2022 01:03:00 +0000 (21:03 -0400)]
asahi: Port driver to macOS 12.x ABI

There's lots of reshuffling required. Nothing "interesting", though.

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

2 years agoasahi: Don't clobber clear colours
Alyssa Rosenzweig [Tue, 22 Feb 2022 01:22:49 +0000 (20:22 -0500)]
asahi: Don't clobber clear colours

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

2 years agoasahi: Handle flushes of depth-only rendering
Alyssa Rosenzweig [Tue, 22 Feb 2022 01:19:44 +0000 (20:19 -0500)]
asahi: Handle flushes of depth-only rendering

Not totally right but this should be a start.

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

2 years agoasahi: Wire in u_transfer_helper
Alyssa Rosenzweig [Tue, 22 Feb 2022 00:51:51 +0000 (19:51 -0500)]
asahi: Wire in u_transfer_helper

We need it for emulating packed depth/stencil as separate depth/stencil
resources, populating separate_stencil for us as required.

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

2 years agoasahi: Generate IOGPU attachments dynamically
Alyssa Rosenzweig [Tue, 22 Feb 2022 00:29:16 +0000 (19:29 -0500)]
asahi: Generate IOGPU attachments dynamically

Take a pipe_framebuffer_state and go from there. We need some care to
handle separate stencil, but the logic is largely routine.

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

2 years agoasahi: Add separate_stencil, internal_format fields
Alyssa Rosenzweig [Tue, 22 Feb 2022 00:28:43 +0000 (19:28 -0500)]
asahi: Add separate_stencil, internal_format fields

Currently unused, but will be set when u_transfer_helper is integrated
for emulating packed depth/stencil.

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

2 years agoasahi: Add size field to slices
Alyssa Rosenzweig [Tue, 22 Feb 2022 00:28:13 +0000 (19:28 -0500)]
asahi: Add size field to slices

Needed to size attachments for the kernel... for some reason. We already
compute this; just save it.

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

2 years agoasahi: Identify IOGPU_MISC data structure
Alyssa Rosenzweig [Mon, 21 Feb 2022 18:09:36 +0000 (13:09 -0500)]
asahi: Identify IOGPU_MISC data structure

This will be elaborated upon soon.

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

2 years agoasahi: Add stencil buffer attachment type
Alyssa Rosenzweig [Mon, 21 Feb 2022 17:45:41 +0000 (12:45 -0500)]
asahi: Add stencil buffer attachment type

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

2 years agoasahi: Identify IOGPU Internal Pipelines structure
Alyssa Rosenzweig [Mon, 21 Feb 2022 17:22:11 +0000 (12:22 -0500)]
asahi: Identify IOGPU Internal Pipelines structure

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

2 years agoasahi: Identify aux framebuffer data structure
Alyssa Rosenzweig [Mon, 21 Feb 2022 17:05:00 +0000 (12:05 -0500)]
asahi: Identify aux framebuffer data structure

Total guess at the name.

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

2 years agoasahi: Identify IOGPU Clear Z/S structure
Alyssa Rosenzweig [Mon, 21 Feb 2022 16:41:39 +0000 (11:41 -0500)]
asahi: Identify IOGPU Clear Z/S structure

Not sure on the details yet but identify and dump the data structure to start.

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

2 years agoutil: trim trailing space for files src/util/**/*
Yonggang Luo [Fri, 18 Mar 2022 05:14:55 +0000 (13:14 +0800)]
util: trim trailing space for files src/util/**/*

Using the following bash script doing that
```
cd src/util
find . -type f -print0 | xargs -0 -n1 sed -i 's/[ \t]*$//'
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15093>

2 years agoci/anv: Changes from enabling 8/16bpp CCS more
Nanley Chery [Fri, 18 Mar 2022 22:06:44 +0000 (15:06 -0700)]
ci/anv: Changes from enabling 8/16bpp CCS more

- Fixes in dEQP-VK.dynamic_rendering.suballocation.multisample_resolve.*
- Fails in dEQP-VK.drm_format_modifiers.export_import.*

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

2 years agoRevert "anv: Disable CCS_E for some 8/16bpp copies on TGL+"
Nanley Chery [Wed, 16 Mar 2022 21:25:28 +0000 (14:25 -0700)]
Revert "anv: Disable CCS_E for some 8/16bpp copies on TGL+"

This reverts commit d68b2db89ca38f3f6c0d3ebd65945c471d864d58.

With this change, no regressions have been observed with the
dEQP-VK.synchronization* test group. There are regressions with
dEQP-VK.drm_format_modifiers.export_import.*, but those have been
root-caused to be test issues (see 3575).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6125
Fixes: 57445adc891 ("anv: Re-enable CCS_E on TGL+")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15420>

2 years agogallium/opencl: set OCL_ICD_FILENAMES with devenv
Dylan Baker [Fri, 18 Mar 2022 21:05:05 +0000 (14:05 -0700)]
gallium/opencl: set OCL_ICD_FILENAMES with devenv

So that `meson devenv` also sets up OpenCL.

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

2 years agor300: set PVS_LAST_VTX_SRC_INST properly to last input read
Pavel Ondračka [Fri, 4 Mar 2022 09:27:54 +0000 (10:27 +0100)]
r300: set PVS_LAST_VTX_SRC_INST properly to last input read

From docs:
The PVS Instruction which uses the Input Vertex Memory for the last
time. This value is used to free up the Input Vertex Slots ASAP.
This field must be set to a valid instruction.

Right now it is set to the last instruction. When the last read is
inside a loop, set it on the outhermost ENDLOOP. This could in theory
help performance, but none of my usual benchmarks including GLmark,
Unigine Sanctuary or Lightsmark show any measurable performance difference.

Suggested in: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6045

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15252>

2 years agonir: fix nir_sweep for printf
Karol Herbst [Sat, 19 Mar 2022 15:36:46 +0000 (16:36 +0100)]
nir: fix nir_sweep for printf

I hit a memory corruption trying to implement printf for Rusticl

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15474>

2 years agoci: enable intel-clc on some platforms
Lionel Landwerlin [Thu, 18 Nov 2021 11:32:31 +0000 (13:32 +0200)]
ci: enable intel-clc on some platforms

We'll have to figure out the cross compiling strategy, in particular
for Android. But as it stands we can't have the target & host llvm
packages installed at the same time so we can't really compile it.

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

2 years agoci: enable llvm on debian-release build
Lionel Landwerlin [Thu, 18 Nov 2021 13:04:50 +0000 (15:04 +0200)]
ci: enable llvm on debian-release build

Needed for intel-clc.

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

2 years agoci: add clang/spirv-tools/llvm-spirv packages to fedora container
Lionel Landwerlin [Thu, 18 Nov 2021 13:04:31 +0000 (15:04 +0200)]
ci: add clang/spirv-tools/llvm-spirv packages to fedora container

Needed for intel-clc.

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

2 years agointel/clc: disable tool prior to Gfx12.5 platforms
Lionel Landwerlin [Fri, 30 Jul 2021 13:25:23 +0000 (16:25 +0300)]
intel/clc: disable tool prior to Gfx12.5 platforms

This tool is currently only aimed at Gfx version 12.5+ with
COMPUTE_WALKER. We could make it work on earlier platforms but they
require pushing gl_SubgroupInvocation and the CLC code is missing the
back-end compiler set-up bits for that.

v2: Commit description by Jason

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

2 years agointel/clc: specify supported extensions
Lionel Landwerlin [Fri, 30 Jul 2021 11:06:05 +0000 (14:06 +0300)]
intel/clc: specify supported extensions

Having everything ever known to man is confusing our SPIRV parser.

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

2 years agointel/clc: allow producing SPIRV files
Lionel Landwerlin [Thu, 6 May 2021 19:22:44 +0000 (22:22 +0300)]
intel/clc: allow producing SPIRV files

Useful to debug the parser.

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

2 years agointel/clc: allow multiple CL files to be compiled together
Lionel Landwerlin [Thu, 6 May 2021 14:10:27 +0000 (17:10 +0300)]
intel/clc: allow multiple CL files to be compiled together

v2: use util_dynarray_append() (Jason)
    identation fixes (Jason)

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

2 years agointel: Add a little OpenCL C compiler binary
Jason Ekstrand [Fri, 19 Feb 2021 16:34:49 +0000 (10:34 -0600)]
intel: Add a little OpenCL C compiler binary

v2: Fix up indentation (Marcin)
    s/gen/gfx/ (Marcin)
    Deal with fd closing in success/fail cases (Marin)

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

2 years agomeson: try to find clang-cpp before going through each module
Lionel Landwerlin [Thu, 18 Nov 2021 15:24:46 +0000 (17:24 +0200)]
meson: try to find clang-cpp before going through each module

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

2 years agointel/fs: handle inline data on OpenCL style kernels
Lionel Landwerlin [Mon, 4 Oct 2021 10:58:07 +0000 (13:58 +0300)]
intel/fs: handle inline data on OpenCL style kernels

This is for Gfx12.5 with the COMPUTE_WALKER::Inline Data payload. We
do this in a similar way to the compute kernels.

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

2 years agointel/kernel: Implement some Intel built-in functions
Jason Ekstrand [Tue, 2 Mar 2021 21:06:40 +0000 (15:06 -0600)]
intel/kernel: Implement some Intel built-in functions

v2: Document mangled function names (Marcin)
    Fixup progress & metadata (Marcin)

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

2 years agointel/compiler: Add code for compiling CL-style SPIR-V kernels
Jason Ekstrand [Thu, 18 Feb 2021 22:09:31 +0000 (16:09 -0600)]
intel/compiler: Add code for compiling CL-style SPIR-V kernels

v2: simplify INTEL_DEBUG expressions (Marcin)

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

2 years agointel/debug: Dump KERNEL source when INTEL_DEBUG=cs
Jason Ekstrand [Thu, 29 Oct 2020 14:44:30 +0000 (09:44 -0500)]
intel/debug: Dump KERNEL source when INTEL_DEBUG=cs

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

2 years agointel/nir: Add optimizations to help OpenCL-style kernels
Jason Ekstrand [Mon, 28 Sep 2020 14:11:39 +0000 (09:11 -0500)]
intel/nir: Add optimizations to help OpenCL-style kernels

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

2 years agointel/nir/fs: replace COMPUTE || KERNEL by gl_shader_stage_is_compute()
Lionel Landwerlin [Mon, 18 Oct 2021 12:24:23 +0000 (15:24 +0300)]
intel/nir/fs: replace COMPUTE || KERNEL by gl_shader_stage_is_compute()

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

2 years agonir/print: Add support for generic pointers
Jason Ekstrand [Sat, 15 Aug 2020 05:28:55 +0000 (00:28 -0500)]
nir/print: Add support for generic pointers

The way they're handled is that deref->modes is treated as a bitfield of
possible modes.  Variables are required to have a specific mode and
derefs with deref_type_var are as well.

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

2 years agoglx/egl: improve dri null screen related error messages.
Yonggang Luo [Sun, 20 Mar 2022 00:01:24 +0000 (08:01 +0800)]
glx/egl: improve dri null screen related error messages.

Convert from `failed to create dri screen` to more exact error message
for easier debugging

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15480>

2 years agocrocus: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:46 +0000 (11:56 +0100)]
crocus: replace opencoded slab_zalloc

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

2 years agod3d12: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:31 +0000 (11:56 +0100)]
d3d12: replace opencoded slab_zalloc

Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agoetnaviv: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:13 +0000 (11:56 +0100)]
etnaviv: replace opencoded slab_zalloc

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agofreedreno: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:56:00 +0000 (11:56 +0100)]
freedreno: replace opencoded slab_zalloc

Reviewed-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agolima: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:45 +0000 (11:55 +0100)]
lima: replace opencoded slab_zalloc

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

2 years agoiris: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:33 +0000 (11:55 +0100)]
iris: replace opencoded slab_zalloc

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

2 years agov3d: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:28 +0000 (11:47 +0100)]
v3d: replace opencoded slab_zalloc

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agovc4: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:17 +0000 (11:47 +0100)]
vc4: replace opencoded slab_zalloc

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agovirgl: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:47:01 +0000 (11:47 +0100)]
virgl: replace opencoded slab_zalloc

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

2 years agozink: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:46:38 +0000 (11:46 +0100)]
zink: replace opencoded slab_zalloc

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15277>

2 years agor600: replace opencoded slab_zalloc
Pierre-Eric Pelloux-Prayer [Tue, 8 Mar 2022 10:55:10 +0000 (11:55 +0100)]
r600: replace opencoded slab_zalloc

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