platform/upstream/mesa.git
22 months agozink: add precompilation for compute shaders
Mike Blumenkrantz [Fri, 12 Aug 2022 15:23:22 +0000 (11:23 -0400)]
zink: add precompilation for compute shaders

for compute shaders that don't need spec constants or cube lowering,
precompiles are possible and can be performed immediately after disk
cache lookup completes

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

22 months agozink: move compute descriptor binds down in execution
Mike Blumenkrantz [Mon, 15 Aug 2022 17:18:58 +0000 (13:18 -0400)]
zink: move compute descriptor binds down in execution

this has to occur after the pipeline has been updated to account for
async compile

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

22 months agozink: add a param to allow zink_screen_update_pipeline_cache to run directly
Mike Blumenkrantz [Fri, 12 Aug 2022 15:30:08 +0000 (11:30 -0400)]
zink: add a param to allow zink_screen_update_pipeline_cache to run directly

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

22 months agozink: move compute pipeline cache update to caller
Mike Blumenkrantz [Fri, 12 Aug 2022 15:29:15 +0000 (11:29 -0400)]
zink: move compute pipeline cache update to caller

this is more flexible

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

22 months agozink: track whether shader has cube samplers
Mike Blumenkrantz [Fri, 12 Aug 2022 15:20:18 +0000 (11:20 -0400)]
zink: track whether shader has cube samplers

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

22 months agozink: use different key comparison for local_size-using compute pipelines
Mike Blumenkrantz [Fri, 12 Aug 2022 15:11:11 +0000 (11:11 -0400)]
zink: use different key comparison for local_size-using compute pipelines

this should be more correct

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

22 months agozink: stop zeroing local size if current compute doesn't use it
Mike Blumenkrantz [Fri, 12 Aug 2022 15:09:06 +0000 (11:09 -0400)]
zink: stop zeroing local size if current compute doesn't use it

this just complicates things for later compute updates

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

22 months agozink: remove use_local_size from compute pipeline state
Mike Blumenkrantz [Fri, 12 Aug 2022 14:25:08 +0000 (10:25 -0400)]
zink: remove use_local_size from compute pipeline state

this is redundant since pipeline state gets flagged on bind

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

22 months agozink: don't add compute base pipeline to hash table
Mike Blumenkrantz [Fri, 12 Aug 2022 15:00:02 +0000 (11:00 -0400)]
zink: don't add compute base pipeline to hash table

this is pointless since it has no lookup data

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

22 months agozink: merge compute program hash table onto program struct
Mike Blumenkrantz [Fri, 12 Aug 2022 14:57:05 +0000 (10:57 -0400)]
zink: merge compute program hash table onto program struct

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

22 months agozink: add a pipeline shortcut for basic compute programs
Mike Blumenkrantz [Fri, 12 Aug 2022 14:49:07 +0000 (10:49 -0400)]
zink: add a pipeline shortcut for basic compute programs

if there are no inline uniforms, nonseamless cubes, or local size use,
then this is the "base" pipeline object that can be reused without checking
the hash table

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

22 months agozink: add param to allow cache_get jobs to run directly
Mike Blumenkrantz [Fri, 12 Aug 2022 14:34:14 +0000 (10:34 -0400)]
zink: add param to allow cache_get jobs to run directly

this will be useful for precompiles

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

22 months agozink: don't call util_queue_fence_init in zink_screen_get_pipeline_cache()
Mike Blumenkrantz [Fri, 12 Aug 2022 14:33:01 +0000 (10:33 -0400)]
zink: don't call util_queue_fence_init in zink_screen_get_pipeline_cache()

this might accidentally clobber existing jobs

cc: mesa-stable

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

22 months agozink: add use_local_size flag to compute programs
Mike Blumenkrantz [Fri, 12 Aug 2022 14:23:09 +0000 (10:23 -0400)]
zink: add use_local_size flag to compute programs

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

22 months agozink: initialize cache_get_thread unconditionally
Mike Blumenkrantz [Thu, 11 Aug 2022 21:07:10 +0000 (17:07 -0400)]
zink: initialize cache_get_thread unconditionally

this can also be used for precompiles

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

22 months agozink: create compute programs from compute shaders directly
Mike Blumenkrantz [Thu, 11 Aug 2022 20:50:54 +0000 (16:50 -0400)]
zink: create compute programs from compute shaders directly

this simplifies the whole compute shader/program architecture and
also compiles compute shaders when apps maybe expect them to be compiled

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

22 months agozink: allow programs to solely manage descriptor deinit
Mike Blumenkrantz [Thu, 11 Aug 2022 20:45:23 +0000 (16:45 -0400)]
zink: allow programs to solely manage descriptor deinit

now that there's no context access, this is perfectly safe and also much simpler

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

22 months agozink: use screen param for zink_descriptor_program_deinit
Mike Blumenkrantz [Thu, 11 Aug 2022 20:44:50 +0000 (16:44 -0400)]
zink: use screen param for zink_descriptor_program_deinit

this better enables late destruction of programs

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

22 months agoci: disable the freedreno farm.
Marek Olšák [Tue, 30 Aug 2022 03:53:38 +0000 (23:53 -0400)]
ci: disable the freedreno farm.

It's busted.

Pushing directly. There are 6 MRs in the Marge queue and we don't have that
kind of time to wait for them to time out.

Acked-by: Rob Clark on IRC
22 months agoradv,lvp,anv: Delete pre-common dispatch leftover.
Tatsuyuki Ishi [Sun, 28 Aug 2022 13:13:04 +0000 (22:13 +0900)]
radv,lvp,anv: Delete pre-common dispatch leftover.

These functions are no longer used since the introduction of common
dispatch.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>

22 months agoradv: Remove unused radv_deferred_queue_submission.
Tatsuyuki Ishi [Sun, 28 Aug 2022 13:06:36 +0000 (22:06 +0900)]
radv: Remove unused radv_deferred_queue_submission.

Has been stale since the common sync migration.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>

22 months agoradv: Remove unused functions.
Tatsuyuki Ishi [Sat, 27 Aug 2022 09:27:42 +0000 (18:27 +0900)]
radv: Remove unused functions.

Grep shows no usage.
Found by manual inspection.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18284>

22 months agowinsys/amdgpu: use cached GTT for command buffers and don't set the 32BIT flag
Marek Olšák [Wed, 17 Aug 2022 15:56:21 +0000 (11:56 -0400)]
winsys/amdgpu: use cached GTT for command buffers and don't set the 32BIT flag

This improves performance a lot in a few viewperf tests.

The 32-bit flag was unnecessary.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18170>

22 months agoegl: Remove some can't-happen supported API checks
Adam Jackson [Tue, 16 Aug 2022 01:46:19 +0000 (21:46 -0400)]
egl: Remove some can't-happen supported API checks

The only other thing this could be is OpenVG, which we never create.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18128>

22 months agod3d12: Implement cap PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
Sil Vilerino [Mon, 29 Aug 2022 16:43:03 +0000 (12:43 -0400)]
d3d12: Implement cap PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP

Reports d3d12 support for mapping all the contiguous planes.
This will be used by vaDeriveImage in the VA frontend

Fixes: a585d95803ca38d42b893603a85bf6442a54838a ("radeonsi/vcn: WA 10bit encoding crash in vaapi")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>

22 months agogallium/va: vaDeriveImage to check PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP
Sil Vilerino [Mon, 29 Aug 2022 16:42:41 +0000 (12:42 -0400)]
gallium/va: vaDeriveImage to check PIPE_VIDEO_SUPPORTS_CONTIGUOUS_PLANES_MAP

vaDeriveImage should check if the underlying gallium driver can map contiguous planes
before skipping with disallowlist.

Fixes: a585d95803ca38d42b893603a85bf6442a54838a ("radeonsi/vcn: WA 10bit encoding crash in vaapi")

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18300>

22 months agoradv: emit the guardband state separately from the scissor state
Samuel Pitoiset [Thu, 25 Aug 2022 09:01:43 +0000 (11:01 +0200)]
radv: emit the guardband state separately from the scissor state

Only re-emit the scissor state if viewports or scissors change, and
only re-emit the guardband state if viewports, line width or the
current rasterized primitive change.

This should reduce the number of emitted packets when only the line
width or the rasterized primitive change.

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

22 months agoradv: rework dirtying scissors when the line width changes
Samuel Pitoiset [Thu, 25 Aug 2022 08:46:51 +0000 (10:46 +0200)]
radv: rework dirtying scissors when the line width changes

The guardband state (part of scissors) needs to be re-emitted when
the line width changes. Given this is a dynamic state, it's not
necessary to look at the pipeline line width.

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

22 months agoradv: split emitting guardband into a separate helper
Samuel Pitoiset [Thu, 25 Aug 2022 07:47:24 +0000 (09:47 +0200)]
radv: split emitting guardband into a separate helper

This will be used to emit guardband separately from scissor.

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

22 months agoradv: remove useless parameter in si_write_scissors()
Samuel Pitoiset [Thu, 25 Aug 2022 07:41:14 +0000 (09:41 +0200)]
radv: remove useless parameter in si_write_scissors()

It always starts from 0.

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

22 months agoradv: make sure to emit BREAK_BATCH when color write enable is dynamic
Samuel Pitoiset [Thu, 25 Aug 2022 06:50:37 +0000 (08:50 +0200)]
radv: make sure to emit BREAK_BATCH when color write enable is dynamic

Color write enable can change CB_TARGET_MASK and emitting a BREAK_BATCH
seems needed for binning. Though, this was broken if this enable bit
changed dynamically for the same pipeline. Split the function to not
increase CPU overhead.

Found by inspection.

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

22 months agoradv: store binning settings into the physical device
Samuel Pitoiset [Thu, 25 Aug 2022 06:41:05 +0000 (08:41 +0200)]
radv: store binning settings into the physical device

To avoid re-computing this every time.

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

22 months agoturnip: Fix enabling of IB2 skipping.
Emma Anholt [Mon, 22 Aug 2022 16:37:25 +0000 (09:37 -0700)]
turnip: Fix enabling of IB2 skipping.

We weren't setting LOCAL, so unless freedreno GL had set it since the GPU
woke up, we wouldn't get it.

This requires moving the GLOBAL unsetting out of tile_store's IB, since it
would never be executed when it mattered, anyway.

No perf difference detected on gfxbench vk-5-normal, or ANGLE minecraft,
genshin, and pubg.

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

22 months agofreedreno/regs: Add a bit of documentation of what SKIP_IB2 does.
Emma Anholt [Mon, 22 Aug 2022 16:35:13 +0000 (09:35 -0700)]
freedreno/regs: Add a bit of documentation of what SKIP_IB2 does.

Based on @cwabbott's research.

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

22 months agoutil: Move detect_done out of struct util_cpu_caps_t
Yonggang Luo [Sat, 30 Jul 2022 04:40:55 +0000 (12:40 +0800)]
util: Move detect_done out of struct util_cpu_caps_t

Also util_cpu_caps are hided, not accessed directly now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Use environment variable GALLIUM_OVERRIDE_CPU_CAPS to remove usage of util_cpu_...
Yonggang Luo [Thu, 25 Aug 2022 01:49:21 +0000 (09:49 +0800)]
util: Use environment variable GALLIUM_OVERRIDE_CPU_CAPS to remove usage of util_cpu_caps in translate_test.c

It's use extern struct util_cpu_caps_t util_cpu_caps that's violate the
restriction that we can not directly access util_cpu_caps

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agogallium: Fixes memory leak of translate_test.c
Yonggang Luo [Thu, 25 Aug 2022 15:04:59 +0000 (23:04 +0800)]
gallium: Fixes memory leak of translate_test.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agollvmpipe: Remove the hack for LLVM4 in lp_bld_init.c
Yonggang Luo [Tue, 23 Aug 2022 16:20:02 +0000 (00:20 +0800)]
llvmpipe: Remove the hack for LLVM4 in lp_bld_init.c

The main intention is remove usage of extern struct util_cpu_caps_t util_cpu_caps
so we can mark util_cpu_caps to be static latter

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Handling LP_FORCE_SSE2 in u_cpu_detect.c
Yonggang Luo [Tue, 23 Aug 2022 16:20:52 +0000 (00:20 +0800)]
util: Handling LP_FORCE_SSE2 in u_cpu_detect.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Handling GALLIUM_NOSSE in u_cpu_detect.c
Yonggang Luo [Sun, 7 Aug 2022 07:31:33 +0000 (15:31 +0800)]
util: Handling GALLIUM_NOSSE in u_cpu_detect.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Improve has_sse has_sse2 has_sse3 has_sse4_1 has_avx disable handling
Yonggang Luo [Sun, 7 Aug 2022 07:20:43 +0000 (15:20 +0800)]
util: Improve has_sse has_sse2 has_sse3 has_sse4_1 has_avx disable handling

This is the prepare for following changes:

* Handling GALLIUM_NOSSE in u_cpu_detect.c
* Handling LP_FORCE_SSE2 and LP_NATIVE_VECTOR_WIDTH in u_cpu_detect.c

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Rename util_cpu_detect to _util_cpu_detect_local
Yonggang Luo [Sat, 30 Jul 2022 04:36:45 +0000 (12:36 +0800)]
util: Rename util_cpu_detect to _util_cpu_detect_local

Add comment about _util_cpu_detect_local that it's can only be called by util_get_cpu_caps
Add comment about util_cpu_caps that it's can only by accessed by util_get_cpu_caps

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoutil: Remove unused rtasm_cpu_has_sse2
Yonggang Luo [Sun, 7 Aug 2022 06:32:49 +0000 (14:32 +0800)]
util: Remove unused rtasm_cpu_has_sse2

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17803>

22 months agoanv: disable task redistribution
Marcin Ślusarz [Thu, 21 Apr 2022 17:28:55 +0000 (19:28 +0200)]
anv: disable task redistribution

If task redistribution is enabled, then some mesh shaders read
garbage from task payload.

It may be a hardware bug, or it may be our bug. Who knows :(

This change will probably negatively affect performance of task
shader-enabled workloads on multi-slice GPUs, because mesh shaders
will be executed only on the slice where task shader was spawned.

Fixes: ef04caea9b8 ("anv: Implement Mesh Shading pipeline")

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16197>

22 months agoci: bump cross compilation to LLVM 13 where possible
David Heidelberg [Sat, 16 Jul 2022 14:59:54 +0000 (16:59 +0200)]
ci: bump cross compilation to LLVM 13 where possible

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17575>

22 months agolima/ci: There is no need to redefine HWCI_TEST_SCRIPT
Christian Gmeiner [Fri, 26 Aug 2022 13:06:49 +0000 (15:06 +0200)]
lima/ci: There is no need to redefine HWCI_TEST_SCRIPT

.piglit-test defines it already.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18276>

22 months agoRevert "nir/lower_task_shader: don't use base index for shared memory intrinsics"
Marcin Ślusarz [Fri, 15 Jul 2022 11:43:21 +0000 (13:43 +0200)]
Revert "nir/lower_task_shader: don't use base index for shared memory intrinsics"

This reverts commit e5970fe22a66bf1727d8b677f4e3c93fe2172a71.

Intel backend has implemented the missing functionality.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17618>

22 months agointel/compiler: add support for non-zero base in [load|store]_shared intrins
Marcin Ślusarz [Fri, 15 Jul 2022 12:05:34 +0000 (14:05 +0200)]
intel/compiler: add support for non-zero base in [load|store]_shared intrins

Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17618>

22 months agonir/lower_task_shader: print shader after each step
Marcin Ślusarz [Mon, 18 Jul 2022 16:36:19 +0000 (18:36 +0200)]
nir/lower_task_shader: print shader after each step

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

22 months agovulkan/cmd_queue: Do not generate unreachable vk_free_* calls.
Kostiantyn Lazukin [Wed, 23 Mar 2022 22:52:22 +0000 (00:52 +0200)]
vulkan/cmd_queue: Do not generate unreachable vk_free_* calls.

CID: 1503117
CID: 1503118
CID: 1503119
CID: 1503120
CID: 1503121
CID: 1503122
CID: 1503123
CID: 1503124
CID: 1503125
CID: 1503126
CID: 1503127
CID: 1503128
CID: 1503129
CID: 1503130
CID: 1503131
CID: 1503132
CID: 1503133
CID: 1503134
CID: 1503135
CID: 1503136
CID: 1503137
CID: 1503138
CID: 1503139
CID: 1503140
CID: 1503141
CID: 1503142
CID: 1503143
CID: 1503144
CID: 1503145
CID: 1503146
CID: 1503147
CID: 1503148
CID: 1503149
CID: 1503150
CID: 1503151
CID: 1503152
CID: 1503153
CID: 1503154
CID: 1503155
CID: 1503156
CID: 1503157
CID: 1503158
CID: 1503159
CID: 1503160
CID: 1503161
CID: 1503162
CID: 1503163
CID: 1503164
CID: 1503165
CID: 1503166
CID: 1503167
CID: 1503168
CID: 1503169
CID: 1503170
CID: 1503171
CID: 1503172
CID: 1503173
CID: 1503174
CID: 1503175
CID: 1503176
CID: 1503177
CID: 1503178
CID: 1503179
CID: 1503180
CID: 1503181
CID: 1503182
CID: 1503183
CID: 1503184
CID: 1503185
CID: 1503186
CID: 1503187
CID: 1503188
CID: 1503189
CID: 1503190

Signed-off-by: Kostiantyn Lazukin <kostiantyn.lazukin@globallogic.com>
Signed-off-by: Oleksii Bozhenko <oleksii.bozhenko@globallogic.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15549>

22 months agointel/compiler: Change dg2_plus check to devinfo->verx10 >= 125
Kenneth Graunke [Tue, 9 Aug 2022 21:02:16 +0000 (14:02 -0700)]
intel/compiler: Change dg2_plus check to devinfo->verx10 >= 125

Less special casing and possibly more future-proof.

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

22 months agozink: fixup indent in caps-check
Erik Faye-Lund [Fri, 26 Aug 2022 12:42:18 +0000 (14:42 +0200)]
zink: fixup indent in caps-check

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18275>

22 months agozink: fix conditions for draw-parameters
Erik Faye-Lund [Fri, 26 Aug 2022 12:41:19 +0000 (14:41 +0200)]
zink: fix conditions for draw-parameters

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18275>

22 months agov3dv: implement VK_EXT_texel_buffer_alignment
Iago Toral Quiroga [Mon, 29 Aug 2022 08:22:31 +0000 (10:22 +0200)]
v3dv: implement VK_EXT_texel_buffer_alignment

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18291>

22 months agov3d,v3dv: lower texel buffer aligment requirements
Iago Toral Quiroga [Mon, 29 Aug 2022 08:10:26 +0000 (10:10 +0200)]
v3d,v3dv: lower texel buffer aligment requirements

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18291>

22 months agovirgl: Fix ubsan warnings:
Gert Wollny [Wed, 24 Aug 2022 13:23:12 +0000 (15:23 +0200)]
virgl: Fix ubsan warnings:

virgl_screen.c:313:55: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
virgl_screen.c:682:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
virgl_encode.c:481:7: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

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

22 months agovirgl: Fix buffer overflow warning:
Gert Wollny [Wed, 24 Aug 2022 13:00:51 +0000 (15:00 +0200)]
virgl: Fix buffer overflow warning:

./src/gallium/winsys/virgl/drm/virgl_drm_winsys.c: In function ‘virgl_drm_winsys_resource_set_type’:
../src/gallium/winsys/virgl/drm/virgl_drm_winsys.c:607:10: warning: array subscript 14 is above array bounds of ‘uint32_t[14]’ {aka ‘unsigned int[14]’} [-Warray-bounds]
  607 |       cmd[VIRGL_PIPE_RES_SET_TYPE_PLANE_OFFSET(i)] = plane_offsets[i];
      |       ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/gallium/winsys/virgl/drm/virgl_drm_winsys.c:582:13: note: while referencing ‘cmd’
  582 |    uint32_t cmd[VIRGL_PIPE_RES_SET_TYPE_SIZE(VIRGL_MAX_PLANE_COUNT)];
      |             ^~~

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

22 months agoci: drop last bits of wine32
David Heidelberg [Tue, 23 Aug 2022 23:38:07 +0000 (01:38 +0200)]
ci: drop last bits of wine32

This allows us droping i386 subarchitecture, which leads to saving about
100 MiB from the base image.

v2:
 - dropped DEBIAN_BUILD_TAG and DEBIAN_BUILD_MINGW_TAG change, since
   DEBIAN_BASE_TAG is enough

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18222>

22 months agodocs: Add d3d10umd and lavapipe to the doc for the gallium frontends.
Ming Li [Sat, 25 Jun 2022 20:38:54 +0000 (20:38 +0000)]
docs: Add d3d10umd and lavapipe to the doc for the gallium frontends.

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

22 months agovenus: add support for VK_EXT_primitive_topology_list_restart
Juston Li [Fri, 26 Aug 2022 22:50:10 +0000 (15:50 -0700)]
venus: add support for VK_EXT_primitive_topology_list_restart

See:
virgl/virglrenderer!902
olv/venus-protocol!46

Test:
./deqp-vk -n dEQP-VK.pipeline.monolithic.input_assembly.primitive_restart.*

Test run totals:
  Passed:        55/55 (100.0%)
  Failed:        0/55 (0.0%)
  Not supported: 0/55 (0.0%)
  Warnings:      0/55 (0.0%)
  Waived:        0/55 (0.0%)

Signed-off-by: Juston Li <justonli@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18283>

22 months agovenus: sync venus protocol headers for VK_EXT_primitive_topology_list_restart
Juston Li [Fri, 26 Aug 2022 22:00:11 +0000 (15:00 -0700)]
venus: sync venus protocol headers for VK_EXT_primitive_topology_list_restart

Signed-off-by: Juston Li <justonli@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18283>

22 months agodocs: update perfetto with the latest status
Chia-I Wu [Fri, 26 Aug 2022 18:14:47 +0000 (11:14 -0700)]
docs: update perfetto with the latest status

intel and turnip support renderstages.  EGL supports track events.

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

22 months agopps: enable track_event in system.cfg
Chia-I Wu [Fri, 26 Aug 2022 20:04:59 +0000 (13:04 -0700)]
pps: enable track_event in system.cfg

This enables MESA_TRACE_* tracepoints.

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

22 months agovenus: use MESA_TRACE_*
Chia-I Wu [Thu, 25 Aug 2022 22:49:37 +0000 (15:49 -0700)]
venus: use MESA_TRACE_*

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoutil/perf: support and prefer perfetto for cpu trace
Chia-I Wu [Thu, 25 Aug 2022 21:55:44 +0000 (14:55 -0700)]
util/perf: support and prefer perfetto for cpu trace

To keep tracing working, this also adds util_perfetto_init to
eglGet*Display.

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoutil/perfetto: add a simple C wrapper for track events
Chia-I Wu [Mon, 17 May 2021 04:29:49 +0000 (21:29 -0700)]
util/perfetto: add a simple C wrapper for track events

The C wrapper only uses public APIs from the C++ SDK.  For efficient
tracepoint skipping, it copies the states of categories (there is one
category in this commit) to a util_perfetto_category_states array.

Other options are to use percetto, or wait for an official C SDK.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoutil/perf: fix multiple tracepoints in a scope
Chia-I Wu [Thu, 25 Aug 2022 21:22:19 +0000 (14:22 -0700)]
util/perf: fix multiple tracepoints in a scope

Fixes

 "../src/util/perf/cpu_trace.h:32:8: error: redefinition of ‘_mesa_trace_scope___LINE__’"

This should work until someone wants multiple MESA_TRACE_SCOPE on the
same line :)

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoutil/perf: add cpu_trace.h
Chia-I Wu [Thu, 25 Aug 2022 21:10:20 +0000 (14:10 -0700)]
util/perf: add cpu_trace.h

Move MESA_TRACE_* to the new file.

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoutil/perf: move u_perfetto to here
Chia-I Wu [Thu, 25 Aug 2022 21:26:58 +0000 (14:26 -0700)]
util/perf: move u_perfetto to here

Acked-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18260>

22 months agoci: use shellcheck for .gitlab-ci/container/ directory
David Heidelberg [Wed, 10 Aug 2022 13:27:31 +0000 (15:27 +0200)]
ci: use shellcheck for .gitlab-ci/container/ directory

It checks our CI shell code in `debian-build-testing` job.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574>

22 months agoci: make shellcheck happy about .gitlab-ci/container/ directory
David Heidelberg [Sat, 16 Jul 2022 14:40:04 +0000 (16:40 +0200)]
ci: make shellcheck happy about .gitlab-ci/container/ directory

Makes easier do changes, when shellcheck is warning-free.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574>

22 months agoci: move lava-test into debian-build-testing
David Heidelberg [Thu, 11 Aug 2022 13:14:45 +0000 (15:14 +0200)]
ci: move lava-test into debian-build-testing

Should speed up the debian-testing job by a few seconds.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574>

22 months agoci: rename debian-gallium to debian-build-testing
David Heidelberg [Thu, 11 Aug 2022 13:12:02 +0000 (15:12 +0200)]
ci: rename debian-gallium to debian-build-testing

This should provide a more accurate description of the task
and allow us to offload some minor checks into it.

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17574>

22 months agofreedreno: Add support for upload transfers
Rob Clark [Thu, 25 Aug 2022 20:45:44 +0000 (13:45 -0700)]
freedreno: Add support for upload transfers

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

22 months agofreedreno/drm: Add offset param for fd_bo_upload()
Rob Clark [Thu, 25 Aug 2022 20:27:22 +0000 (13:27 -0700)]
freedreno/drm: Add offset param for fd_bo_upload()

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

22 months agofreedreno/drm: Let backend hint about upload vs map
Rob Clark [Thu, 25 Aug 2022 20:14:24 +0000 (13:14 -0700)]
freedreno/drm: Let backend hint about upload vs map

For the virtgpu backend, immediately mmap'ing a buffer can be expensive
(ie. require a sync with host), so for small transfers we'd prefer to go
the upload path.

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

22 months agofreedreno/a6xx: Random indent fixes
Rob Clark [Fri, 5 Aug 2022 20:12:26 +0000 (13:12 -0700)]
freedreno/a6xx: Random indent fixes

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

22 months agonv50: fix code heap after pipe_shader_enum change
Karol Herbst [Wed, 24 Aug 2022 17:39:54 +0000 (19:39 +0200)]
nv50: fix code heap after pipe_shader_enum change

Instead of keying the shader heaps with the TGSI enum, do it with our nv50
one, so we won't run into issues like this in the future.

Fixes: 27f46465c7a ("gallium/tgsi: reorder pipe shader type defines.")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18236>

22 months agoir3: fix predicate splitting in scheduler
Chia-I Wu [Tue, 16 Aug 2022 22:10:23 +0000 (15:10 -0700)]
ir3: fix predicate splitting in scheduler

Fix up src->def->instr, not src->instr.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7014
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18096>

22 months agolavapipe: delete some code
Mike Blumenkrantz [Mon, 25 Jul 2022 19:36:01 +0000 (15:36 -0400)]
lavapipe: delete some code

now that the descriptor structs are flattened, more code can be deleted

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: create gallium descriptor image/sampler view types for views
Mike Blumenkrantz [Mon, 25 Jul 2022 15:23:30 +0000 (11:23 -0400)]
lavapipe: create gallium descriptor image/sampler view types for views

this simplifies handling pipe_sampler_view and pipe_image_view by creating
them at the time the view is created, thus enabling the lifetime of samplerview
objects to be managed by the object that owns them instead of everywhere

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: apply VK_WHOLE_SIZE to bufferviews at creation
Mike Blumenkrantz [Mon, 25 Jul 2022 16:20:21 +0000 (12:20 -0400)]
lavapipe: apply VK_WHOLE_SIZE to bufferviews at creation

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: use gallium buffer descriptor types directly
Mike Blumenkrantz [Mon, 25 Jul 2022 14:38:53 +0000 (10:38 -0400)]
lavapipe: use gallium buffer descriptor types directly

this cleans up a bit of code

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: delete lvp_buffer::offset
Mike Blumenkrantz [Mon, 25 Jul 2022 14:27:10 +0000 (10:27 -0400)]
lavapipe: delete lvp_buffer::offset

this was always 0

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: use pipe_sampler_state directly in descriptor info
Mike Blumenkrantz [Fri, 22 Jul 2022 18:18:44 +0000 (14:18 -0400)]
lavapipe: use pipe_sampler_state directly in descriptor info

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: replace lvp_sampler internals with pipe_sampler_state
Mike Blumenkrantz [Fri, 22 Jul 2022 18:12:37 +0000 (14:12 -0400)]
lavapipe: replace lvp_sampler internals with pipe_sampler_state

less indirection, less code

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: remove lvp_sampler::state
Mike Blumenkrantz [Fri, 22 Jul 2022 18:04:32 +0000 (14:04 -0400)]
lavapipe: remove lvp_sampler::state

I don't know what this was for but it's not doing anything now

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: use cso for compute samplers too
Mike Blumenkrantz [Mon, 8 Aug 2022 18:12:11 +0000 (14:12 -0400)]
lavapipe: use cso for compute samplers too

somehow I missed this?

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agolavapipe: stop tracking descriptor image layout
Mike Blumenkrantz [Fri, 22 Jul 2022 17:55:29 +0000 (13:55 -0400)]
lavapipe: stop tracking descriptor image layout

this is unused

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17740>

22 months agoaco: allow direct_fetch=true for vec4 VS input loads
Rhys Perry [Wed, 10 Aug 2022 13:45:06 +0000 (14:45 +0100)]
aco: allow direct_fetch=true for vec4 VS input loads

This seems to be a (mostly harmless) mistake from 369b8cffea2.

fossil-db (navi21):
Totals from 15 (0.01% of 135636) affected shaders:
Instrs: 1992 -> 1999 (+0.35%)
Latency: 13557 -> 13567 (+0.07%); split: -0.24%, +0.31%
InvThroughput: 4059 -> 4065 (+0.15%); split: -0.20%, +0.34%
Copies: 186 -> 193 (+3.76%)

fossil-db (polaris10):
Totals from 5 (0.00% of 135610) affected shaders:

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

22 months agoaco: don't expand vec3 VS input load to vec4 on GFX6
Rhys Perry [Wed, 10 Aug 2022 13:44:20 +0000 (14:44 +0100)]
aco: don't expand vec3 VS input load to vec4 on GFX6

Removes the (small) possibility of invalid memory access.

fossil-db (pitcairn):
Totals from 35456 (26.15% of 135610) affected shaders:
MaxWaves: 259508 -> 260642 (+0.44%); split: +0.44%, -0.01%
Instrs: 7915383 -> 7965774 (+0.64%); split: -0.09%, +0.72%
CodeSize: 37163748 -> 37524804 (+0.97%); split: -0.04%, +1.01%
SGPRs: 1515128 -> 1513576 (-0.10%); split: -0.27%, +0.17%
VGPRs: 1218376 -> 1211160 (-0.59%); split: -0.71%, +0.12%
SpillSGPRs: 1152 -> 1144 (-0.69%)
Latency: 83777626 -> 83867137 (+0.11%); split: -0.61%, +0.72%
InvThroughput: 25722445 -> 25727745 (+0.02%); split: -0.23%, +0.25%
VClause: 232058 -> 230464 (-0.69%); split: -2.53%, +1.84%
SClause: 322579 -> 322108 (-0.15%); split: -0.76%, +0.61%
Copies: 547032 -> 547954 (+0.17%); split: -1.83%, +2.00%
Branches: 72538 -> 72542 (+0.01%)
PreVGPRs: 898453 -> 897584 (-0.10%); split: -0.13%, +0.03%

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

22 months agoradv/llvm: fix packed VS inputs on GFX6/GFX10+
Rhys Perry [Thu, 4 Aug 2022 19:44:47 +0000 (20:44 +0100)]
radv/llvm: fix packed VS inputs on GFX6/GFX10+

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

22 months agoaco: fix 16-bit VS inputs
Rhys Perry [Thu, 4 Aug 2022 16:56:20 +0000 (17:56 +0100)]
aco: fix 16-bit VS inputs

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 3fba5bb9cc4 ("aco: implement 16-bit vertex fetches with tbuffer_load_format_d16_*")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225>

22 months agoradv: fix 16-bit support in radv_lower_vs_input
Rhys Perry [Thu, 4 Aug 2022 16:54:56 +0000 (17:54 +0100)]
radv: fix 16-bit support in radv_lower_vs_input

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: b366fef091d ("radv: optimize the number of loaded components for VS inputs in NIR")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18225>

22 months agoradv: remove claimed support for sRGB vertex buffer formats
Rhys Perry [Fri, 29 Jul 2022 14:47:13 +0000 (15:47 +0100)]
radv: remove claimed support for sRGB vertex buffer formats

These probably don't work.

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

22 months agoRevert "ci: disable the freedreno farm."
Rob Clark [Fri, 26 Aug 2022 14:41:42 +0000 (07:41 -0700)]
Revert "ci: disable the freedreno farm."

Should be back now

This reverts commit bc2e1a3ed67fb4cca88229e547f6b95be05c4d5e.

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

22 months agost_pbo/compute: fix memset() warning
Brian Paul [Thu, 25 Aug 2022 17:34:03 +0000 (11:34 -0600)]
st_pbo/compute: fix memset() warning

Using memset() to zero a few sequential fields in gl_pixelstore_attrib
is a bit dodgy (what if someone were to add/reorder fields?).  And gcc
emits a warning in optimized builds:

In function ‘memset’,
    inlined from ‘copy_converted_buffer’ at ../src/mesa/state_tracker/st_pbo_compute.c:1038:7,
    inlined from ‘st_GetTexSubImage_shader’ at ../src/mesa/state_tracker/st_pbo_compute.c:1146:7:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: warning: ‘__builtin_memset’ offset [9, 24] from the object at ‘packing’ is out of the bounds of referenced subobject ‘RowLength’ with type ‘int’ at offset 4 [-Warray-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just replace the memset with ordinary assignments.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18261>

22 months agoradv: move determining NGG shader info to radv_fill_shader_info()
Samuel Pitoiset [Tue, 23 Aug 2022 11:06:12 +0000 (13:06 +0200)]
radv: move determining NGG shader info to radv_fill_shader_info()

Signed-off-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/18210>

22 months agoradv: move more MS info to gather_shader_info_ms()
Samuel Pitoiset [Tue, 23 Aug 2022 09:42:49 +0000 (11:42 +0200)]
radv: move more MS info to gather_shader_info_ms()

Only the workgroup size computation remains at the same place, but I
think it should be computed in a separate helper later.

Signed-off-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/18210>

22 months agoradv: move more CS info to gather_shader_info_cs()
Samuel Pitoiset [Tue, 23 Aug 2022 09:29:26 +0000 (11:29 +0200)]
radv: move more CS info to gather_shader_info_cs()

Signed-off-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/18210>