platform/upstream/mesa.git
18 months agotgsi: use locale independent float and double parsing
Thong Thai [Tue, 25 Apr 2023 20:05:34 +0000 (16:05 -0400)]
tgsi: use locale independent float and double parsing

The atof and strtod functions use the locale of the user when
determining if a decimal is a comma, ',' or a period, '.'. Thanks to
@fzwoch for helping find the cause of a shader-related issue.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5760
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22699>

18 months agoutil: check and initialize locale before using it
Thong Thai [Tue, 25 Apr 2023 20:12:53 +0000 (16:12 -0400)]
util: check and initialize locale before using it

Cc: mesa-stable
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22699>

18 months agomesa/main: rework locale setup/teardown
Thong Thai [Wed, 26 Apr 2023 18:57:43 +0000 (14:57 -0400)]
mesa/main: rework locale setup/teardown

Cc: mesa-stable
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22699>

18 months agofrontends/va: define va av1 encoding caps
Ruijing Dong [Wed, 19 Apr 2023 18:04:14 +0000 (14:04 -0400)]
frontends/va: define va av1 encoding caps

by having va av1 caps enabled, av1 vaapi encoding
is enabled.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: use PIPE_ENC_FEATURE enum
Ruijing Dong [Wed, 19 Apr 2023 01:44:07 +0000 (21:44 -0400)]
radeonsi/vcn: use PIPE_ENC_FEATURE enum

Merge PIPE_H265_ENC_FEATURE into PIPE_ENC_FEATURE enum
because those are common flags, and it will be
used in AV1 encoder as well.

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agofrontends/va: adding va av1 encoding functions
Ruijing Dong [Wed, 19 Apr 2023 18:01:50 +0000 (14:01 -0400)]
frontends/va: adding va av1 encoding functions

supported features:
- 8/10 bit encoding
- multi-layer (up to 4) encoding
- vbr/cbr rate control mode

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: add av1 encoding ib packages and get_info
Ruijing Dong [Wed, 19 Apr 2023 02:33:29 +0000 (22:33 -0400)]
radeonsi/vcn: add av1 encoding ib packages and get_info

add av1 encoding ib packages and enable the
get_info functions.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: add some av1 encoding function
Ruijing Dong [Wed, 19 Apr 2023 02:24:06 +0000 (22:24 -0400)]
radeonsi/vcn: add some av1 encoding function

preparation for enabling av1 encoding in radeonsi,
adding the entropy related functioin.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: add av1 enc data structure
Ruijing Dong [Wed, 19 Apr 2023 02:21:24 +0000 (22:21 -0400)]
radeonsi/vcn: add av1 enc data structure

add av1 encoding related data structure.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agogallium/pipe: add av1 encoding data structure in pipe
Ruijing Dong [Wed, 19 Apr 2023 02:28:38 +0000 (22:28 -0400)]
gallium/pipe: add av1 encoding data structure in pipe

add pipe av1 encoding data structure

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: add av1 dpb variables and cdf table
Ruijing Dong [Wed, 19 Apr 2023 02:06:43 +0000 (22:06 -0400)]
radeonsi/vcn: add av1 dpb variables and cdf table

add av1 dpb variables and cdf table.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: remove extra zero bytes from bitstream
Ruijing Dong [Wed, 19 Apr 2023 01:19:35 +0000 (21:19 -0400)]
radeonsi/vcn: remove extra zero bytes from bitstream

reason:
   extra bytes are not needed and not necessary
   in h264/h265 bitstreams, because they are in
   between NALs, the only problem is they consumed
   extra bits. And for av1 streams, that could be
   explained to something else, especially in
   multi-layer cases, that can cause syntax errors.

   ptr[6] represents the bitstream size,
   ptr[8] represents the extra zero bytes.

   The total number of bytes of the output
   should be ptr[6] - ptr[8]

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: merge get_output_format_param function
Ruijing Dong [Tue, 18 Apr 2023 20:39:23 +0000 (16:39 -0400)]
radeonsi/vcn: merge get_output_format_param function

reason:
so far, the output_format_param function can be shared
by different encoders, and just for h264 encoder, there
is no 10bit encoding supported. This is to reduce
the repeated code before having av1 encoder.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: enable swizzle mode in encoding ref frames.
Ruijing Dong [Tue, 18 Apr 2023 20:30:47 +0000 (16:30 -0400)]
radeonsi/vcn: enable swizzle mode in encoding ref frames.

swizzle mode in ref frames could potentially
improve encoding performance, the main reason
is just because linear mapping is the worst mode
for reference frames comparing to block level
mapping.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: enable 2 pass search center map
Ruijing Dong [Tue, 18 Apr 2023 20:04:26 +0000 (16:04 -0400)]
radeonsi/vcn: enable 2 pass search center map

2 pass search map is a feature supported by VCN,
the main purpose is to enlarge motion search
range that in pre-encoding path the center global
motion vectors could be obtained and used in the
final path as a block center base. When 2pass is
used, this feature will be automatically enabled.

2 pass feature can be enabled by ffmpeg command
line "-compression_level 1"

and also correct some typos and move quality
package from vcn3.0 to vcn2.0 since it is availabe
in vcn2.0 and vcn3.0 can use it directly. Correct
vcn3.0 hevc spec misc IB package.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoradeonsi/vcn: add macros used in av1 encoding
Ruijing Dong [Tue, 18 Apr 2023 21:01:40 +0000 (17:01 -0400)]
radeonsi/vcn: add macros used in av1 encoding

add macros used in av1 encoding.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22585>

18 months agoaco: don't move exec writes around exec writes
Rhys Perry [Wed, 26 Apr 2023 14:02:22 +0000 (15:02 +0100)]
aco: don't move exec writes around exec writes

Not sure if this is possible, but we should avoid it anyway.

No fossil-db changes.

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

18 months agoanv: Take into consideration physical device max heap size to set maxStorageBufferRange
José Roberto de Souza [Wed, 26 Apr 2023 17:32:12 +0000 (10:32 -0700)]
anv: Take into consideration physical device max heap size to set maxStorageBufferRange

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22721>

18 months agopvr: drop unused variable
David Heidelberg [Wed, 26 Apr 2023 09:43:56 +0000 (11:43 +0200)]
pvr: drop unused variable

Fixes: 71fe789d354d ("pvr: Support ipf_creq_pf in pvr_isp_ctrl_stream()")

Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22709>

18 months agomesa: remove unused bools
Pierre-Eric Pelloux-Prayer [Thu, 13 Apr 2023 08:43:07 +0000 (10:43 +0200)]
mesa: remove unused bools

ShareGroupReset and DisjointOperation where only set in the code
removed in the previous commit.

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

18 months agomesa: don't share reset status across contexts
Pierre-Eric Pelloux-Prayer [Fri, 7 Apr 2023 07:28:43 +0000 (09:28 +0200)]
mesa: don't share reset status across contexts

If Driver.GetGraphicsResetStatus exists for one context, other contexts
will be able to use it; so there's no need to inherit reset status from
the other contexts.

This also prevented implementing the spec correctly: we're supposed to
report GL_NO_ERROR when the reset is completed (after reporting GL_*_RESET
at least once):

    If a reset status other than NO_ERROR is returned and subsequent
    calls return NO_ERROR, the context reset was encountered and
    completed. If a reset status is repeatedly returned, the context may
    be in the process of resetting.

With the existing code, the contexts will report INNOCENT_CONTEXT_RESET
forever.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>

18 months agowinsys/amdgpu: use the no-op helper to detect if reset completion
Pierre-Eric Pelloux-Prayer [Fri, 7 Apr 2023 07:24:03 +0000 (09:24 +0200)]
winsys/amdgpu: use the no-op helper to detect if reset completion

On older kernel the completion of the reset isn't signalled to userspace,
yet we need it to implement the EXT_robustness extension correctly.

In this situation, try to create a new context and submit a no-op job. If
the reset isn't done the kernel will reject the submission (-ECANCELED);
otherwise the submission will go through and we'll know that the reset is
done.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>

18 months agowinsys/amdgpu: add a helper function to submit a no-op job
Pierre-Eric Pelloux-Prayer [Fri, 7 Apr 2023 07:23:04 +0000 (09:23 +0200)]
winsys/amdgpu: add a helper function to submit a no-op job

This will be used in the next commit.

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>

18 months agoradeonsi: stop reporting reset to app once gpu recovery is done
Pierre-Eric Pelloux-Prayer [Fri, 7 Apr 2023 07:48:02 +0000 (09:48 +0200)]
radeonsi: stop reporting reset to app once gpu recovery is done

This way apps know they can recreate their contexts when
the status go back to NO_ERROR.

This depends on new UAPI in the kernel; for older kernel, radeonsi
will stop reporting a reset after 3 seconds. Apps will be able to
create new contexts but they'll have to handle not being able to
submit tasks.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7460
Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>

18 months agoamd: update amdgpu_drm.h
Pierre-Eric Pelloux-Prayer [Fri, 7 Apr 2023 07:47:09 +0000 (09:47 +0200)]
amd: update amdgpu_drm.h

Reviewed-by: André Almeida <andrealmeid@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22290>

18 months agoac/rgp: update SQTT_FILE_CHUNK_TYPE_ASIC_INFO to minor version 5
Samuel Pitoiset [Tue, 25 Apr 2023 09:23:25 +0000 (11:23 +0200)]
ac/rgp: update SQTT_FILE_CHUNK_TYPE_ASIC_INFO to minor version 5

To match PAL. I don't know what the active_pixel_packer_mask field
is used for.

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

18 months agoac/rgp: update SQTT_FILE_CHUNK_TYPE_API_INFO to minor version 2
Samuel Pitoiset [Tue, 25 Apr 2023 09:22:23 +0000 (11:22 +0200)]
ac/rgp: update SQTT_FILE_CHUNK_TYPE_API_INFO to minor version 2

To match PAL.

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

18 months agoac/sqtt: add missing EventUnknown to rgp_sqtt_marker_event_type
Samuel Pitoiset [Tue, 25 Apr 2023 09:11:43 +0000 (11:11 +0200)]
ac/sqtt: add missing EventUnknown to rgp_sqtt_marker_event_type

To match XGL.

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

18 months agoac/sqtt: add new bits to rgp_sqtt_marker_barrier_end
Samuel Pitoiset [Tue, 25 Apr 2023 09:09:54 +0000 (11:09 +0200)]
ac/sqtt: add new bits to rgp_sqtt_marker_barrier_end

To match XGL.

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

18 months agoradv/sqtt: add support for queue info
Samuel Pitoiset [Thu, 20 Apr 2023 11:20:31 +0000 (13:20 +0200)]
radv/sqtt: add support for queue info

RGP uses that to report the various queue timings info.

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

18 months agoradv/sqtt: sample CPU/GPU clocks before starting the trace
Samuel Pitoiset [Thu, 20 Apr 2023 10:44:23 +0000 (12:44 +0200)]
radv/sqtt: sample CPU/GPU clocks before starting the trace

RGP seems to use that to calibrate timestamps. This also introduces
a new helper to reset thread data between captures.

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

18 months agoac/sqtt: initialize clock calibration/queue info/queue event records
Samuel Pitoiset [Mon, 24 Apr 2023 12:17:03 +0000 (14:17 +0200)]
ac/sqtt: initialize clock calibration/queue info/queue event records

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

18 months agoac/sqtt: add helpers for initializing ac_thread_trace_data
Samuel Pitoiset [Mon, 24 Apr 2023 12:13:40 +0000 (14:13 +0200)]
ac/sqtt: add helpers for initializing ac_thread_trace_data

This is common between RADV and RadeonSI.

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

18 months agoac/sqtt: add a helper for adding clock calibration records
Samuel Pitoiset [Thu, 20 Apr 2023 09:42:40 +0000 (11:42 +0200)]
ac/sqtt: add a helper for adding clock calibration records

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

18 months agowgl: Remove needless `if (1) { ... }`.
Jose Fonseca [Wed, 26 Apr 2023 09:08:58 +0000 (10:08 +0100)]
wgl: Remove needless `if (1) { ... }`.

Noticed by Craig Scott on https://gitlab.freedesktop.org/mesa/mesa/-/issues/4427#note_857876

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22706>

18 months agowgl: Fix unintentional assignment on assert.
Jose Fonseca [Wed, 26 Apr 2023 09:10:45 +0000 (10:10 +0100)]
wgl: Fix unintentional assignment on assert.

Spotted by Nanley Chery.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4427
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22706>

18 months agoanv: enable shaderUniformBufferArrayNonUniformIndexing
Lionel Landwerlin [Fri, 21 Apr 2023 10:20:39 +0000 (13:20 +0300)]
anv: enable shaderUniformBufferArrayNonUniformIndexing

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

18 months agoanv: fix anv_nir_lower_ubo_loads pass
Lionel Landwerlin [Fri, 21 Apr 2023 09:29:00 +0000 (12:29 +0300)]
anv: fix anv_nir_lower_ubo_loads pass

In order to use load_global_const_block_intel we need to ensure the
64bit address in src[0] is uniform. This is not the case in the
vkd3d-proton test_bindless_cbv tests for example.

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

18 months agonir/divergence: add missing load_global_constant_* intrinsics
Lionel Landwerlin [Fri, 21 Apr 2023 09:28:21 +0000 (12:28 +0300)]
nir/divergence: add missing load_global_constant_* intrinsics

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

18 months agobroadcom/compiler: try harder to merge thread switch earlier
Iago Toral Quiroga [Wed, 26 Apr 2023 07:45:03 +0000 (09:45 +0200)]
broadcom/compiler: try harder to merge thread switch earlier

We have been stopping as soon as we find a conflict but that doesn't
mean we can't merge it in an earlier slot, so keep going. Going by
shader-db, this sometimes allows us to merge the final thrsw a bit
earlier and avoid emitting NOP instructions at the program end to
make up for its delay slots. I have not observed cases where this
helps with regular thrsw though, but it doesn't hurt to try with
those too.

total instructions in shared programs: 11526876 -> 11526354 (<.01%)
instructions in affected programs: 10760 -> 10238 (-4.85%)
helped: 236
HURT: 0
Instructions are helped.

total max-temps in shared programs: 2231705 -> 2231677 (<.01%)
max-temps in affected programs: 276 -> 248 (-10.14%)
helped: 27
HURT: 0
Max-temps are helped.

total inst-and-stalls in shared programs: 11545177 -> 11544655 (<.01%)
inst-and-stalls in affected programs: 10777 -> 10255 (-4.84%)
helped: 236
HURT: 0
Inst-and-stalls are helped.

total nops in shared programs: 321624 -> 321152 (-0.15%)
nops in affected programs: 751 -> 279 (-62.85%)
helped: 236
HURT: 0
Nops are helped.

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

18 months agoradv/sqtt: Add RGP Markers for Mesh Shaders
Gregory Mitrano [Wed, 26 Apr 2023 01:51:29 +0000 (21:51 -0400)]
radv/sqtt: Add RGP Markers for Mesh Shaders

This change updates the sqtt layer to add mesh shader specific RGP
instrumentation logic. This should allow RGP to correctly identify GPU
work derived from vkCmdDrawMeshTasksEXT, vkCmdDrawMeshTasksIndirectEXT,
and vkCmdDrawMeshTasksIndirectCountEXT API calls.

This change also updates the mesa-to-RGP shader stage translation logic
to handle the mesh & task stages.

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

18 months agoac/sqtt: Add RGP Definitions for Mesh Shaders
Gregory Mitrano [Wed, 26 Apr 2023 01:44:03 +0000 (21:44 -0400)]
ac/sqtt: Add RGP Definitions for Mesh Shaders

This commit adds RGP marker definitions for the following mesh shader
functions:

- vkCmdDrawMeshTasksEXT
- vkCmdDrawMeshTasksIndirectCountEXT
- vkCmdDrawMeshTasksIndirectEXT

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

18 months agoac/spm: rename ac_spm_trace_data to ac_spm
Samuel Pitoiset [Wed, 26 Apr 2023 09:06:14 +0000 (11:06 +0200)]
ac/spm: rename ac_spm_trace_data to ac_spm

This is shorter and it's the main struct that controls SPM, while
ac_spm_trace contains the generated data only.

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

18 months agoac/spm: introduce ac_spm_trace and ac_spm_get_trace()
Samuel Pitoiset [Wed, 26 Apr 2023 08:55:28 +0000 (10:55 +0200)]
ac/spm: introduce ac_spm_trace and ac_spm_get_trace()

For more code isolation.

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

18 months agoradv: only enable extendedDynamicState3ConservativeRasterizationMode on GFX9+
Samuel Pitoiset [Tue, 25 Apr 2023 13:47:38 +0000 (15:47 +0200)]
radv: only enable extendedDynamicState3ConservativeRasterizationMode on GFX9+

If extendedDynamicState3ConservativeRasterizationMode is enabled,
VK_EXT_conservative_rasterization is mandatory.

Fixes recent updates in dEQP-VK.info.device_mandatory_features.

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

18 months agonir: clean up white-space in deref-printing
Erik Faye-Lund [Fri, 14 Apr 2023 11:07:32 +0000 (13:07 +0200)]
nir: clean up white-space in deref-printing

Without this, we get some trailing spaces in some cases, and some
double space in some other cases. Let's clean that up a bit.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22550>

18 months agoradv/video: start adding gfx11 vcn decoder
Dave Airlie [Thu, 16 Mar 2023 03:24:45 +0000 (13:24 +1000)]
radv/video: start adding gfx11 vcn decoder

On gfx11 the vcn decoder moved into the vcn encoder ring,
now known as the unified vcn ring.

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

18 months agoradv/video: fix dpb surface programming
Dave Airlie [Wed, 26 Apr 2023 06:43:38 +0000 (16:43 +1000)]
radv/video: fix dpb surface programming

This just programs the dpb fields directly from the image surface.

Makes things happier on navi33

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

18 months agoradv/video: add a video addr gfx mode
Dave Airlie [Wed, 26 Apr 2023 06:53:26 +0000 (16:53 +1000)]
radv/video: add a video addr gfx mode

This will be different on gfx11+ so add a settable field for it

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

18 months agoradv/winsys: handle encoder queue padding/submits.
Dave Airlie [Fri, 17 Mar 2023 04:13:06 +0000 (14:13 +1000)]
radv/winsys: handle encoder queue padding/submits.

The encoder queue doesn't like padding at all, don't pad in the sysmem
paths for encoder queue.

The encoder queue will be using on gfx11 for decoding.

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

18 months agoradv: set a video decode ip block in physical device.
Dave Airlie [Thu, 16 Mar 2023 03:24:23 +0000 (13:24 +1000)]
radv: set a video decode ip block in physical device.

This makes it easier to add navi 3x

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

18 months agoradv/video: add missing gfx family
Dave Airlie [Thu, 16 Mar 2023 03:11:29 +0000 (13:11 +1000)]
radv/video: add missing gfx family

This is compatible with rdna2 but was just missing.

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

18 months agoradeonsi/ac: move some vcn defines to common
Dave Airlie [Thu, 16 Mar 2023 03:31:56 +0000 (13:31 +1000)]
radeonsi/ac: move some vcn defines to common

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21980>

18 months agozink: enable EXT_shader_object for generic precompiles
Mike Blumenkrantz [Mon, 3 Apr 2023 20:35:40 +0000 (16:35 -0400)]
zink: enable EXT_shader_object for generic precompiles

this should match the functionality of GPL, but it should also (theoretically)
have significantly less CPU overhead, so I've enabled this to be the new
default when available

currently I'm not changing any of the requirements for shader object enablement,
so this is probably only be usable on desktops

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

18 months agozink: make zink_shader_spirv_compile public
Mike Blumenkrantz [Mon, 3 Apr 2023 20:21:44 +0000 (16:21 -0400)]
zink: make zink_shader_spirv_compile public

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

18 months agozink: use zink_shader_object for pipeline compiles from zink_gfx_program
Mike Blumenkrantz [Mon, 3 Apr 2023 20:14:23 +0000 (16:14 -0400)]
zink: use zink_shader_object for pipeline compiles from zink_gfx_program

this matches up the rest of the codebase using zink_shader_object

zink_gfx_program::objects is left in place for shader binding so that
the entire array can always be bound in one call

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

18 months agozink: add a union to zink_gfx_pipeline_cache_entry for gpl
Mike Blumenkrantz [Mon, 3 Apr 2023 19:58:40 +0000 (15:58 -0400)]
zink: add a union to zink_gfx_pipeline_cache_entry for gpl

just code motion for now

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

18 months agozink: avoid accessing zink_gfx_program::modules during pipeline compile
Mike Blumenkrantz [Mon, 3 Apr 2023 19:45:20 +0000 (15:45 -0400)]
zink: avoid accessing zink_gfx_program::modules during pipeline compile

this allows a different array of modules to be passed in

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

18 months agozink: allow zink_shader_module to be either a shobj or a mod using a bool
Mike Blumenkrantz [Mon, 3 Apr 2023 19:43:33 +0000 (15:43 -0400)]
zink: allow zink_shader_module to be either a shobj or a mod using a bool

this allows shader modules to more accurately represent the contents of
the zink_shader_object for which they are containers

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

18 months agozink: store spirv onto zink_shader_object structs
Mike Blumenkrantz [Mon, 3 Apr 2023 19:42:08 +0000 (15:42 -0400)]
zink: store spirv onto zink_shader_object structs

this makes it convenient for reuse

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

18 months agozink: use zink_destroy_shader_module() for compute to deduplicate code
Mike Blumenkrantz [Mon, 3 Apr 2023 19:39:59 +0000 (15:39 -0400)]
zink: use zink_destroy_shader_module() for compute to deduplicate code

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

18 months agozink: use zink_shader_object for zink_shader_module
Mike Blumenkrantz [Mon, 3 Apr 2023 19:38:45 +0000 (15:38 -0400)]
zink: use zink_shader_object for zink_shader_module

this streamlines a bit more code, though nothing changes functionally

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

18 months agozink: delete redundant conditional
Mike Blumenkrantz [Mon, 3 Apr 2023 18:18:18 +0000 (14:18 -0400)]
zink: delete redundant conditional

this is checked literally 2 lines above

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

18 months agozink: deduplicate separable program replacement handling
Mike Blumenkrantz [Mon, 3 Apr 2023 18:16:56 +0000 (14:16 -0400)]
zink: deduplicate separable program replacement handling

no functional changes

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

18 months agozink: use local screen var in zink_gfx_program_update_optimal()
Mike Blumenkrantz [Mon, 3 Apr 2023 18:14:20 +0000 (14:14 -0400)]
zink: use local screen var in zink_gfx_program_update_optimal()

no functional changes

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

18 months agozink: add zink_program::uses_shobj for managing shader object binds
Mike Blumenkrantz [Mon, 3 Apr 2023 18:06:52 +0000 (14:06 -0400)]
zink: add zink_program::uses_shobj for managing shader object binds

this is going to be more flexible than just checking for separable+EXT

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

18 months agozink: explicitly block sample shading in the GPL precompile path
Mike Blumenkrantz [Mon, 3 Apr 2023 17:58:49 +0000 (13:58 -0400)]
zink: explicitly block sample shading in the GPL precompile path

this can't be precompiled, so don't bother trying

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

18 months agozink: rename 'separate' param in shader compilation to 'can_shobj'
Mike Blumenkrantz [Mon, 3 Apr 2023 17:20:30 +0000 (13:20 -0400)]
zink: rename 'separate' param in shader compilation to 'can_shobj'

this will better reflect the usage of the param

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

18 months agozink: add ZINK_DEBUG=noshobj to disable EXT_shader_object
Mike Blumenkrantz [Mon, 3 Apr 2023 16:52:32 +0000 (12:52 -0400)]
zink: add ZINK_DEBUG=noshobj to disable EXT_shader_object

for debugging/testing

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

18 months agozink: don't run update_so_info if shader has no outputs
Mike Blumenkrantz [Fri, 7 Apr 2023 13:18:00 +0000 (09:18 -0400)]
zink: don't run update_so_info if shader has no outputs

this probably means all outputs were eliminated by the linker,
but in any case it's not going to do anything

fixes spec@glsl-1.50@execution@interface-blocks-api-access-members

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

18 months agozink: add a workaround for a nir_assign_io_var_locations bug
Mike Blumenkrantz [Fri, 7 Apr 2023 12:12:42 +0000 (08:12 -0400)]
zink: add a workaround for a nir_assign_io_var_locations bug

drivers that use nir_assign_io_var_locations() with EXT_shader_object all
have the same bug with a shader interface that looks like this:

shader output block:
* PSIZ
* VAR0
* VAR8

shader input block:
* VAR0
* VAR8

in this case, output driver locations will be assigned like:
* PSIZ=0
* VAR0=1
* VAR8=2

and input driver locations will be:
* VAR0=0
* VAR8=1

which breaks the shaders even though this is a totally legitimate thing
to do

thus, a second set of shaders have to be created without PSIZ to work around
the bug since I've already spent 18+ hours trying to fix it and have only succeeded
in breaking every driver that uses it

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

18 months agoanv: Improve image/view usage bits verification
Sviatoslav Peleshko [Wed, 8 Feb 2023 08:50:21 +0000 (10:50 +0200)]
anv: Improve image/view usage bits verification

This change makes usage bits verification closer to the Vulkan spec.
i.e. VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT does not always require all formats
to support all the requested usage bits.
Also, VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, when combined with
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT can relax the requirements for the
usage supported by the original image format.

v2: Removed strict verification of the format_list_info formats usage
    per chadversary's suggestion. Other minor style/comments tweaks.

v3: Added checking of all compatible formats when
    VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and VK_IMAGE_CREATE_EXTENDED_USAGE_BIT
    are specified, but no list of possible formats was given.

v4: Add VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT handling.

Cc: 22.2 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6031
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agoanv: Handle UNDEFINED format in image format list
Sviatoslav Peleshko [Wed, 8 Feb 2023 08:48:40 +0000 (10:48 +0200)]
anv: Handle UNDEFINED format in image format list

It's not invalid to have this value in the list, but the only case it
is actually valid as format in the creation of an image or image view
is with Android Hardware Buffers which have their format specified
externally.

So we can just ignore all entries with VK_FORMAT_UNDEFINED.

Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agoisl: Check all channels in isl_formats_have_same_bits_per_channel
Sviatoslav Peleshko [Wed, 10 Aug 2022 13:20:48 +0000 (16:20 +0300)]
isl: Check all channels in isl_formats_have_same_bits_per_channel

Cc: 22.2 <mesa-stable>
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17182>

18 months agor600: remove TGSI code path
Gert Wollny [Fri, 24 Feb 2023 11:32:56 +0000 (12:32 +0100)]
r600: remove TGSI code path

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7780
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7342

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

18 months agoglx: fix typos
Harri Nieminen [Mon, 24 Apr 2023 11:32:29 +0000 (14:32 +0300)]
glx: fix typos

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

18 months agoegl: fix typos
Harri Nieminen [Mon, 24 Apr 2023 11:24:02 +0000 (14:24 +0300)]
egl: fix typos

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

18 months agodocs: use custom html theme
Erik Faye-Lund [Thu, 21 Jan 2021 14:11:24 +0000 (15:11 +0100)]
docs: use custom html theme

This uses the new custom HTML theme for Sphinx, so our documentation
looks similar to our website.

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

18 months agodocs: remove support for old sphinx-versions
Erik Faye-Lund [Tue, 25 Apr 2023 06:46:07 +0000 (08:46 +0200)]
docs: remove support for old sphinx-versions

We're not using them, so no point in keeping support around.

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

18 months agodocs: translate admonitions into bootstrap alerts
Erik Faye-Lund [Fri, 17 Mar 2023 14:02:46 +0000 (15:02 +0100)]
docs: translate admonitions into bootstrap alerts

Sphinx and Bootstraps disagree on what these are called. Let's try to
bridge that gap, by rewriting things a bit.

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

18 months agodocs: add bootstrap extension
Erik Faye-Lund [Wed, 6 Jan 2021 13:00:52 +0000 (14:00 +0100)]
docs: add bootstrap extension

To get Sphinx and Bootstrap to work well together, we need to massage
the output from Sphinx a bit. This adds an extension to do such changes,
based on work from here:

https://github.com/pydata/pydata-sphinx-theme

...However, because we don't ship as an external theme, we can't just do
things as a part of __init__.py, so instead we register an extension
that does the heavy lifting for us.

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

18 months agodocs: add custom html theme
Erik Faye-Lund [Wed, 6 Jan 2021 13:00:52 +0000 (14:00 +0100)]
docs: add custom html theme

This custom theme will make the docs look more like the main website,
which makes it slightly less confusing to navigate around when crossing
between the two.

The icon link.svg is from Feathericons:
https://feathericons.com/?query=link

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

18 months agodocs: sort extensions
Erik Faye-Lund [Fri, 10 Mar 2023 15:06:55 +0000 (16:06 +0100)]
docs: sort extensions

It's easier to keep this sorted if we have each element on a separate
line. Let's do that for long-term ease of maintainability.

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

18 months agofrontend/nine: Fix num_textures count
Axel Davy [Sun, 23 Apr 2023 11:49:36 +0000 (13:49 +0200)]
frontend/nine: Fix num_textures count

util_last_bit already included the +1

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11865?commit_id=9205a45da50ebc6159169ba42b02d8475b09bfd7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8894

cc: mesa-stable

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22645>

18 months agozink: reapply VkImageViewUsageCreateInfo when rebinding a surface
Mike Blumenkrantz [Wed, 26 Apr 2023 13:52:56 +0000 (09:52 -0400)]
zink: reapply VkImageViewUsageCreateInfo when rebinding a surface

attachment bits must always be removed if they are not supported

fixes (ANV):
KHR-GL46.texture_view.view_classes

cc: mesa-stable

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

18 months agozink: break out VkImageViewUsageCreateInfo applying for reuse
Mike Blumenkrantz [Wed, 26 Apr 2023 13:52:23 +0000 (09:52 -0400)]
zink: break out VkImageViewUsageCreateInfo applying for reuse

no functional changes

cc: mesa-stable

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

18 months agocrocus: fix refcnt imbalance related to framebuffer
Patrick Lerda [Wed, 15 Mar 2023 12:21:05 +0000 (13:21 +0100)]
crocus: fix refcnt imbalance related to framebuffer

Indeed, the hardcoded framebuffer cleanup doesn't handle "resolve".

For instance, this issue is triggered with "piglit/bin/glx-copy-sub-buffer -samples=2 -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: f5bde99cbdd2 ("gallium: plumb resolve attachments through from frontends -> pipe_framebuffer_state")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22554>

18 months agorusticl/program: use if let to get rid of an unwrap in build
Karol Herbst [Wed, 26 Apr 2023 10:39:45 +0000 (12:39 +0200)]
rusticl/program: use if let to get rid of an unwrap in build

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>

18 months agorusticl/program: rework dynamic Program state
Karol Herbst [Wed, 26 Apr 2023 10:39:39 +0000 (12:39 +0200)]
rusticl/program: rework dynamic Program state

We had a lot of implicit locks going on even though there was strictly no
need in doing so. This makes the compilation APIs more atomic while also
providing a cleaner interface.

Not in the mood of splitting it up without deadlocking in the middle. So
it's one big commit sadly.

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22434>

18 months agorusticl: Move nir compilation to Program
Antonio Gomes [Mon, 10 Apr 2023 23:57:07 +0000 (20:57 -0300)]
rusticl: Move nir compilation to Program

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

18 months agozink: prune some validation errors from ci
Mike Blumenkrantz [Wed, 26 Apr 2023 14:22:36 +0000 (10:22 -0400)]
zink: prune some validation errors from ci

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

18 months agopan/bi: Don't set has_fsub
Alyssa Rosenzweig [Tue, 25 Apr 2023 14:12:00 +0000 (10:12 -0400)]
pan/bi: Don't set has_fsub

All this option controls is fusing fadd(x, fneg(y)) into a single instruction,
but our modifier propagation can already do that without the special cases.

shader-db changes are mostly noise.

total instructions in shared programs: 2698039 -> 2697812 (<.01%)
instructions in affected programs: 156742 -> 156515 (-0.14%)
helped: 280
HURT: 109
helped stats (abs) min: 1.0 max: 12.0 x̄: 1.69 x̃: 1
helped stats (rel) min: 0.08% max: 10.71% x̄: 0.65% x̃: 0.32%
HURT stats (abs)   min: 1.0 max: 8.0 x̄: 2.26 x̃: 2
HURT stats (rel)   min: 0.15% max: 5.77% x̄: 2.08% x̃: 2.22%
95% mean confidence interval for instructions value: -0.80 -0.36
95% mean confidence interval for instructions %-change: -0.05% 0.28%
Inconclusive result (%-change mean confidence interval includes 0).

total cycles in shared programs: 143679.94 -> 143676.33 (<.01%)
cycles in affected programs: 617.98 -> 614.38 (-0.58%)
helped: 148
HURT: 3
helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.02 x̃: 0
helped stats (rel) min: 0.17% max: 3.33% x̄: 0.71% x̃: 0.57%
HURT stats (abs)   min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.66% max: 2.27% x̄: 1.46% x̃: 1.45%
95% mean confidence interval for cycles value: -0.03 -0.02
95% mean confidence interval for cycles %-change: -0.77% -0.56%
Cycles are helped.

total fma in shared programs: 22102.44 -> 22098.33 (-0.02%)
fma in affected programs: 395.98 -> 391.88 (-1.04%)
helped: 123
HURT: 3
helped stats (abs) min: 0.015625 max: 0.1875 x̄: 0.03 x̃: 0
helped stats (rel) min: 0.43% max: 18.75% x̄: 1.81% x̃: 0.89%
HURT stats (abs)   min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.66% max: 4.17% x̄: 2.09% x̃: 1.45%
95% mean confidence interval for fma value: -0.04 -0.03
95% mean confidence interval for fma %-change: -2.17% -1.27%
Fma are helped.

total cvt in shared programs: 14735.23 -> 14735.80 (<.01%)
cvt in affected programs: 969.64 -> 970.20 (0.06%)
helped: 179
HURT: 121
helped stats (abs) min: 0.015625 max: 0.09375 x̄: 0.02 x̃: 0
helped stats (rel) min: 0.17% max: 46.15% x̄: 1.13% x̃: 0.31%
HURT stats (abs)   min: 0.015625 max: 0.125 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.42% max: 28.57% x̄: 6.62% x̃: 6.25%
95% mean confidence interval for cvt value: -0.00 0.01
95% mean confidence interval for cvt %-change: 1.32% 2.68%
Inconclusive result (value mean confidence interval includes 0).

total quadwords in shared programs: 1460952 -> 1460680 (-0.02%)
quadwords in affected programs: 10216 -> 9944 (-2.66%)
helped: 39
HURT: 5
helped stats (abs) min: 8.0 max: 8.0 x̄: 8.00 x̃: 8
helped stats (rel) min: 0.97% max: 11.11% x̄: 4.53% x̃: 3.45%
HURT stats (abs)   min: 8.0 max: 8.0 x̄: 8.00 x̃: 8
HURT stats (rel)   min: 12.50% max: 25.00% x̄: 15.71% x̃: 14.29%
95% mean confidence interval for quadwords value: -7.74 -4.62
95% mean confidence interval for quadwords %-change: -4.43% -0.04%
Quadwords are helped.

total threads in shared programs: 53538 -> 53537 (<.01%)
threads in affected programs: 2 -> 1 (-50.00%)
helped: 0
HURT: 1

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

18 months agodocs: add missing ACO_DEBUG=force-waitdeps
Samuel Pitoiset [Tue, 25 Apr 2023 14:54:45 +0000 (16:54 +0200)]
docs: add missing ACO_DEBUG=force-waitdeps

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

18 months agodocs: rename ACO_DEBUG=noscheduling to ACO_DEBUG=nosched
Samuel Pitoiset [Tue, 25 Apr 2023 14:52:06 +0000 (16:52 +0200)]
docs: rename ACO_DEBUG=noscheduling to ACO_DEBUG=nosched

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

18 months agoegl: Clear EGL_WINDOW_BIT for non-double-buffered EGLConfigs
Adam Jackson [Thu, 10 Sep 2020 21:55:50 +0000 (17:55 -0400)]
egl: Clear EGL_WINDOW_BIT for non-double-buffered EGLConfigs

EGL windows are not required to support single-buffered rendering,
and it's awful, so let's not.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22685>

18 months agoradv: reserve command buffer index for SQTT
Samuel Pitoiset [Mon, 24 Apr 2023 15:33:41 +0000 (17:33 +0200)]
radv: reserve command buffer index for SQTT

These indexes are used to match command buffers with queue events.

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

18 months agoac/sqtt: add a helper to get cmdbuf IDs per queue
Samuel Pitoiset [Mon, 24 Apr 2023 15:15:15 +0000 (17:15 +0200)]
ac/sqtt: add a helper to get cmdbuf IDs per queue

These will be used by RADV to implement queue event timings.

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

18 months agoac/sqtt: add rgp_sqtt_marker_cb_id definition
Samuel Pitoiset [Mon, 24 Apr 2023 14:42:56 +0000 (16:42 +0200)]
ac/sqtt: add rgp_sqtt_marker_cb_id definition

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

18 months agoaco: don't move exec reads around exec writes
Rhys Perry [Fri, 11 Feb 2022 19:19:45 +0000 (19:19 +0000)]
aco: don't move exec reads around exec writes

Fixes flickering and blocky plants in Jedi: Fallen Order.

Also fixes flickering squares in The Last of Us Part 1.

fossil-db (navi21):
Totals from 92 (0.07% of 135636) affected shaders:
Instrs: 35324 -> 35354 (+0.08%); split: -0.03%, +0.11%
CodeSize: 189568 -> 189668 (+0.05%); split: -0.03%, +0.08%
Latency: 345305 -> 346529 (+0.35%); split: -0.02%, +0.37%
InvThroughput: 78632 -> 78625 (-0.01%)
SClause: 1955 -> 1972 (+0.87%); split: -0.61%, +1.48%
Copies: 1311 -> 1304 (-0.53%); split: -0.69%, +0.15%

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

18 months agobump VVL to 1.3.248
Mike Blumenkrantz [Mon, 24 Apr 2023 20:07:30 +0000 (16:07 -0400)]
bump VVL to 1.3.248

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