platform/upstream/mesa.git
2 years agointel/stub: Implement DRM_I915_QUERY_MEMORY_REGIONS
Ian Romanick [Mon, 6 Dec 2021 20:56:01 +0000 (12:56 -0800)]
intel/stub: Implement DRM_I915_QUERY_MEMORY_REGIONS

Borrowed from sim-drm.

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

2 years agointel/stub: Implement DRM_I915_QUERY_ENGINE_INFO
Ian Romanick [Mon, 6 Dec 2021 20:37:42 +0000 (12:37 -0800)]
intel/stub: Implement DRM_I915_QUERY_ENGINE_INFO

Borrowed from sim-drm.

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

2 years agointel/stub: Suppress warnings about DRM_I915_QUERY_PERF_CONFIG
Ian Romanick [Mon, 6 Dec 2021 20:23:55 +0000 (12:23 -0800)]
intel/stub: Suppress warnings about DRM_I915_QUERY_PERF_CONFIG

There's not a useful way to implement this, so just silence the warning
to cleanup shader-db runs.

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

2 years agoaco: don't create unnecessary addition in indirect get_sampler_desc()
Rhys Perry [Fri, 3 Dec 2021 13:42:25 +0000 (13:42 +0000)]
aco: don't create unnecessary addition in indirect get_sampler_desc()

I don't think this has any effect on GFX9+ because the addition is
combined into the load.

fossil-db (polaris10):
Totals from 12595 (9.29% of 135627) affected shaders:
SGPRs: 1054348 -> 1054860 (+0.05%); split: -0.02%, +0.07%
VGPRs: 667240 -> 667320 (+0.01%); split: -0.01%, +0.02%
CodeSize: 82761508 -> 82512816 (-0.30%); split: -0.30%, +0.00%
MaxWaves: 62182 -> 62181 (-0.00%)
Instrs: 16072934 -> 16010764 (-0.39%); split: -0.39%, +0.00%
Latency: 582819635 -> 582287964 (-0.09%); split: -0.13%, +0.04%
InvThroughput: 276460536 -> 276417613 (-0.02%); split: -0.06%, +0.05%
VClause: 261656 -> 261654 (-0.00%); split: -0.01%, +0.01%
SClause: 680952 -> 680854 (-0.01%); split: -0.05%, +0.04%
Copies: 1727202 -> 1727742 (+0.03%); split: -0.12%, +0.15%
Branches: 547050 -> 547033 (-0.00%); split: -0.01%, +0.00%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14043>

2 years agoaco: Clean up and fix quad group instructions with WQM.
Timur Kristóf [Tue, 23 Nov 2021 15:50:20 +0000 (16:50 +0100)]
aco: Clean up and fix quad group instructions with WQM.

According to the Vulkan spec chapter 9.25 Helper Invocations,
quad group operations have to be executed by helper invocations.

This commit cleans up the code for quad group instructions by
unifying the code path of quad broadcast with the others, and then
calling emit_wqm just once at the end.

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

2 years agoloader: Restore i915g support.
Emma Anholt [Thu, 9 Dec 2021 00:36:59 +0000 (16:36 -0800)]
loader: Restore i915g support.

The cleanup of i915c cleaned up our PCI ID list.

Fixes: 0cad451f007f ("classic/i915: Remove driver")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14131>

2 years agoglx: fix regression for drawable type detection
Qiang Yu [Wed, 8 Dec 2021 02:57:45 +0000 (10:57 +0800)]
glx: fix regression for drawable type detection

Newer version of XServer supporting GLX_DRAWABLE_TYPE query also
support query with raw X11 window ID besides GLXWindow ID. So we
should not limit the suppported type to GLXPbuffer when query
success.

Otherwise can't start GLX application on newer XServer with:

  libGL error: GLX drawable type is not supported
  libGL error: GLX drawable type is not supported
  X Error of failed request:  GLXBadContext
    Major opcode of failed request:  149 (GLX)
    Minor opcode of failed request:  5 (X_GLXMakeCurrent)
    Serial number of failed request:  35
    Current serial number in output stream:  35

Fixes: 6625c960c58 ("glx: check drawable type before create drawble")

Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14120>

2 years agointel/compiler: Don't store "scalar stage" bits on Gfx8 or Gfx9
Ian Romanick [Fri, 8 Oct 2021 19:09:04 +0000 (12:09 -0700)]
intel/compiler: Don't store "scalar stage" bits on Gfx8 or Gfx9

Since 1d71b1a311239, only Gfx7 and earlier have any vec4 stages ever.

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

2 years agointel/compiler: Don't predicate a WHILE if there is a CONT
Ian Romanick [Mon, 20 Sep 2021 23:21:45 +0000 (16:21 -0700)]
intel/compiler: Don't predicate a WHILE if there is a CONT

Previously a predicated BREAK that appeared immediately before the WHILE
would get merged into the WHILE.  This doesn't work if other flow
control (e.g., a CONT) can transfer directly to the WHILE.

On Intel platforms, this fixes the CTS test
dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.

No shader-db changes on any Intel platform.

When this commit was first created (over a month before it is going to
land), there were some regressions that were prevented by other commits
in MR !13095.  That does not appear to be the case now, so I don't know
what changed.  Basically, the treatment of discard as a combination of
demote and terminate causes additional continues in some loops, and
those continues trigger this bug.  The other commits from that MR
prevent those continues from being generated in the first place.

All Intel platforms had simlar fossil-db results. (Ice Lake shown)
Instructions in all programs: 144419989 -> 144419995 (+0.0%)
SENDs in all programs: 6947332 -> 6947332 (+0.0%)
Loops in all programs: 38277 -> 38277 (+0.0%)
Spills in all programs: 204075 -> 204075 (+0.0%)
Fills in all programs: 319480 -> 319480 (+0.0%)

A few shaders in Doom 2016 were hurt by one instruction each.  It seems
likely that these shaders would have experienced at least some
mis-rendering.

Closes: #4213
Fixes: d13bcdb3a9f ("i965/fs: Extend predicated break pass to predicate WHILE.")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14128>

2 years agotreewide: drop mtypes/macros includes from main
Dave Airlie [Tue, 7 Dec 2021 07:20:31 +0000 (17:20 +1000)]
treewide: drop mtypes/macros includes from main

These aren't required in lots of places, so remove them.

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

2 years agov3dv: Fix dEQP-VK.info#instance_extensions test
Roman Stratiienko [Fri, 3 Dec 2021 16:38:27 +0000 (18:38 +0200)]
v3dv: Fix dEQP-VK.info#instance_extensions test

When mesa3d is built without VK_USE_PLATFORM_DISPLAY_KHR definition,
dEQP test fails:

    dEQP    : Test case 'dEQP-VK.info.instance_extensions'..
    dEQP    :   Fail (Extension VK_KHR_get_display_properties2 is missing
                                                 dependency: VK_KHR_display)
    dEQP    : DONE!

Enable KHR_get_display_properties2 only if VK_USE_PLATFORM_DISPLAY_KHR
is enabled.

Fixes: f884c2e3be36 ("v3dv: implement VK_KHR_get_display_properties2")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14047>

2 years agovenus: prefer VIRTGPU_BLOB_MEM_HOST3D for shmems
Chia-I Wu [Tue, 7 Dec 2021 23:04:16 +0000 (15:04 -0800)]
venus: prefer VIRTGPU_BLOB_MEM_HOST3D for shmems

They are logically contiguously in the host.  More importantly, they
enable host process isolation.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13800>

2 years agod3d12: Use overall resource format + plane format to get format info
Jesse Natalie [Fri, 24 Sep 2021 15:47:32 +0000 (08:47 -0700)]
d3d12: Use overall resource format + plane format to get format info

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

2 years agod3d12: Allow creating planar resources
Jesse Natalie [Thu, 23 Sep 2021 15:37:59 +0000 (08:37 -0700)]
d3d12: Allow creating planar resources

Also handle opening planar resources with a single handle, instead
of per-plane handles.

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

2 years agod3d12: Handle opening planar resources
Jesse Natalie [Thu, 23 Sep 2021 14:42:04 +0000 (07:42 -0700)]
d3d12: Handle opening planar resources

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

2 years agod3d12: Force emulation of all YUV formats using per-plane formats
Jesse Natalie [Sun, 26 Sep 2021 15:24:10 +0000 (08:24 -0700)]
d3d12: Force emulation of all YUV formats using per-plane formats

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

2 years agoradv: Use the winsys 0 cmdbuffer submission support.
Bas Nieuwenhuizen [Mon, 6 Dec 2021 22:41:16 +0000 (23:41 +0100)]
radv: Use the winsys 0 cmdbuffer submission support.

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

2 years agoradv/amdgpu: Add support for submitting 0 commandbuffers.
Bas Nieuwenhuizen [Mon, 6 Dec 2021 22:40:10 +0000 (23:40 +0100)]
radv/amdgpu: Add support for submitting 0 commandbuffers.

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

2 years agoradv/winsys: Add queue family param to submit.
Bas Nieuwenhuizen [Mon, 6 Dec 2021 22:14:16 +0000 (23:14 +0100)]
radv/winsys: Add queue family param to submit.

Extracting it from the first CS will not go over well once we try
submitting 0 of them.

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

2 years agoradv/amdgpu: Add a syncobj per queue.
Bas Nieuwenhuizen [Mon, 6 Dec 2021 22:03:52 +0000 (23:03 +0100)]
radv/amdgpu: Add a syncobj per queue.

For merging our own dependencies in without submitting.

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

2 years agomesa/st: drop Draw from dd function table.
Dave Airlie [Tue, 7 Dec 2021 03:53:48 +0000 (13:53 +1000)]
mesa/st: drop Draw from dd function table.

Draw is only called in the feedback paths now, and the only thing
it is set to is the st feedback draw path.

So just always have the fallback call the draw feedback path and
get rid of the draw entry.

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

2 years agomesa/st: move draw indirect and xfb to direct calls.
Dave Airlie [Tue, 7 Dec 2021 03:47:07 +0000 (13:47 +1000)]
mesa/st: move draw indirect and xfb to direct calls.

These don't get used any other way.

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

2 years agomesa/st: move compute to direct call
Dave Airlie [Tue, 7 Dec 2021 03:01:37 +0000 (13:01 +1000)]
mesa/st: move compute to direct call

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

2 years agomesa/st: move msaa functions to direct call
Dave Airlie [Tue, 7 Dec 2021 02:55:27 +0000 (12:55 +1000)]
mesa/st: move msaa functions to direct call

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

2 years agomesa/st: convert DrawTex to direct call
Dave Airlie [Tue, 7 Dec 2021 02:52:42 +0000 (12:52 +1000)]
mesa/st: convert DrawTex to direct call

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

2 years agomesa/st: convert the non-optional egl image to direct calls
Dave Airlie [Tue, 7 Dec 2021 02:50:13 +0000 (12:50 +1000)]
mesa/st: convert the non-optional egl image to direct calls

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

2 years agomesa/st: move blit function to direct call
Dave Airlie [Tue, 7 Dec 2021 02:43:29 +0000 (12:43 +1000)]
mesa/st: move blit function to direct call

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

2 years agomesa/st: replace most of buffer funcs with direct calls.
Dave Airlie [Tue, 7 Dec 2021 02:39:50 +0000 (12:39 +1000)]
mesa/st: replace most of buffer funcs with direct calls.

This leaves invalidate buffer for later

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

2 years agomesa/st: move program calls to direct call
Dave Airlie [Tue, 7 Dec 2021 04:46:02 +0000 (14:46 +1000)]
mesa/st: move program calls to direct call

Can't move NewProgram yet as the GLSL standalone compiler relies
on it, can probably fix that up later.

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

2 years agomesa/st: move copy image sub data to direct call
Dave Airlie [Tue, 7 Dec 2021 01:52:47 +0000 (11:52 +1000)]
mesa/st: move copy image sub data to direct call

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

2 years agomesa/st: move viewport to direct call
Dave Airlie [Tue, 7 Dec 2021 01:48:58 +0000 (11:48 +1000)]
mesa/st: move viewport to direct call

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

2 years agomesa/st: move some context functions to direct calls
Dave Airlie [Tue, 7 Dec 2021 01:42:56 +0000 (11:42 +1000)]
mesa/st: move some context functions to direct calls

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

2 years agomesa/st: move clear/flush/finish to direct call
Dave Airlie [Tue, 7 Dec 2021 01:37:07 +0000 (11:37 +1000)]
mesa/st: move clear/flush/finish to direct call

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

2 years agomesa/st: move pixel/bitmap functions to direct call
Dave Airlie [Tue, 7 Dec 2021 01:20:39 +0000 (11:20 +1000)]
mesa/st: move pixel/bitmap functions to direct call

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

2 years agomesa/st: move Clear to new direct call
Dave Airlie [Tue, 7 Dec 2021 00:54:42 +0000 (10:54 +1000)]
mesa/st: move Clear to new direct call

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

2 years agomesa/st: move texture APIs to direct st calls
Dave Airlie [Tue, 7 Dec 2021 00:51:49 +0000 (10:51 +1000)]
mesa/st: move texture APIs to direct st calls

This is a bit more spreadout, but is still pretty straightforward

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

2 years agomesa/st: move fbo code to direct calling
Dave Airlie [Mon, 6 Dec 2021 23:39:05 +0000 (09:39 +1000)]
mesa/st: move fbo code to direct calling

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

2 years agomesa/dd: drop purgeable interface
Dave Airlie [Mon, 6 Dec 2021 07:58:45 +0000 (17:58 +1000)]
mesa/dd: drop purgeable interface

This whole extension can likely be dropped, just remove dd.h
bits for now.

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

2 years agomesa/st: move perfomance monitor to direct call
Dave Airlie [Mon, 6 Dec 2021 07:56:59 +0000 (17:56 +1000)]
mesa/st: move perfomance monitor to direct call

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

2 years agomesa/st: move perf query to direct call
Dave Airlie [Mon, 6 Dec 2021 07:48:53 +0000 (17:48 +1000)]
mesa/st: move perf query to direct call

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

2 years agomesa/st: move query memory info to direct call
Dave Airlie [Mon, 6 Dec 2021 07:41:07 +0000 (17:41 +1000)]
mesa/st: move query memory info to direct call

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

2 years agomesa/st: move Enable to direct call
Dave Airlie [Mon, 6 Dec 2021 07:39:39 +0000 (17:39 +1000)]
mesa/st: move Enable to direct call

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

2 years agomesa/st: move rendermode to direct call
Dave Airlie [Mon, 6 Dec 2021 07:36:11 +0000 (17:36 +1000)]
mesa/st: move rendermode to direct call

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

2 years agovirgl/drm: New optimization for uploading textures
mwezdeck [Fri, 5 Nov 2021 12:13:01 +0000 (13:13 +0100)]
virgl/drm: New optimization for uploading textures

1. We can create resource with size of "1" on drm, because size
   is not passed to the renderer.
2. We can't create resource with size of "1" on vtest, because shmem
   is created based on that.
3. If renderer supports copy_transfer_from_host, then use staging
   buffer for transfer in both ways to and from host.

This will allow to reduce memory consumption in the guest.

v2:
   - add inline function for checking if we can use this optimization
   - add check in readback path. If renderer doesn't support
     copy transfer from host, then we need to go with previous
     path in readback (through transfer_get ioctl)

v3:
   - fix logic for readback

v4:
   - refactor the implementation to integrate it more to
     existing code base

v5:
   - reuse COPY_TRANSFER3D in both directions

v6:
   - encode direction in COPY_TRANSFER3D if host supports it

v7:
   - renamed cap bit
   - introduced COPY_TRANSFER3D_SIZE_LEGACY define

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

2 years agoradv: initialize workgroup_size in radv_meta_init_shader
Rhys Perry [Tue, 7 Dec 2021 11:57:34 +0000 (11:57 +0000)]
radv: initialize workgroup_size in radv_meta_init_shader

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

2 years agoradv: clone shader in radv_shader_compile_to_nir
Rhys Perry [Mon, 6 Dec 2021 19:11:06 +0000 (19:11 +0000)]
radv: clone shader in radv_shader_compile_to_nir

This way, radv_shader_compile_to_nir doesn't alter the NIR.

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

2 years agoradv: include RT shaders in RADV_DEBUG=shaders,shaderstats
Rhys Perry [Mon, 6 Dec 2021 18:21:11 +0000 (18:21 +0000)]
radv: include RT shaders in RADV_DEBUG=shaders,shaderstats

Instead of using module->nir or nir->info->name to determine if it's a
meta shader, use nir->info->internal.

This also has an effect of disabling printing of meta shaders with
NIR_DEBUG=print.

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

2 years agoradv: add radv_meta_init_shader
Rhys Perry [Mon, 6 Dec 2021 18:21:11 +0000 (18:21 +0000)]
radv: add radv_meta_init_shader

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

2 years agogbm: Don't pass default usage flags on ABIs < 1
James Jones [Fri, 19 Nov 2021 19:50:18 +0000 (11:50 -0800)]
gbm: Don't pass default usage flags on ABIs < 1

Older drivers will not expect any flags from the
GBM front-end when modifiers are in use, and will
likely fail the allocation or handle them
incorrectly as a result. Only specify usage flags
when allocating from a backend with an ABI >= 1,
as that's the ABI version that added support for
specifying usage flags along with modifiers.

Fixes: ad50b47a14e9 ("gbm: assume USE_SCANOUT in create_with_modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5709
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14049>

2 years agoradv: mark GFX10.3 (aka RDNA2) as conformant products with CTS 1.2.7.1
Samuel Pitoiset [Mon, 6 Dec 2021 12:48:25 +0000 (13:48 +0100)]
radv: mark GFX10.3 (aka RDNA2) as conformant products with CTS 1.2.7.1

https://www.khronos.org/conformance/adopters/conformant-products#submission_599

Also bump the CTS version for GFX8, GFX9 and GFX10 because they also
pass 1.2.7.1.

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

2 years agoradv: fix resume/suspend render pass with depth/stencil attachment
Samuel Pitoiset [Tue, 7 Dec 2021 16:54:56 +0000 (17:54 +0100)]
radv: fix resume/suspend render pass with depth/stencil attachment

Shouldn't clear on resume.

This fixes dEQP-VK.dynamic_rendering.*resuming.

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

2 years agoradv: add initial SPM support on GFX10+
Samuel Pitoiset [Fri, 4 Jun 2021 14:58:33 +0000 (16:58 +0200)]
radv: add initial SPM support on GFX10+

RGP doesn't support previous generations. This can be enabled with
RADV_THREAD_TRACE_CACHE_COUNTERS=true.

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

2 years agoradv: add few helpers for configuring performance counters
Samuel Pitoiset [Mon, 31 May 2021 16:38:13 +0000 (18:38 +0200)]
radv: add few helpers for configuring performance counters

Only used for SPM but VK_KHR_performance_query will be added there.

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

2 years agoradv/sqtt: always dump pipelines and shaders ISA
Samuel Pitoiset [Wed, 3 Nov 2021 15:51:49 +0000 (16:51 +0100)]
radv/sqtt: always dump pipelines and shaders ISA

Even if instruction timing is disabled, both features are unrelated.

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

2 years agoFix TSD stubs for non-initial-exec case (fixes #5667).
Alex Xu (Hello71) [Tue, 23 Nov 2021 20:24:38 +0000 (15:24 -0500)]
Fix TSD stubs for non-initial-exec case (fixes #5667).

ppc64le TSD disabled for now since I am insufficiently familiar with ppc
asm. x86 pthread stubs deleted because adding USE_ELF_TLS to the #if is
isn't worth the effort since it only saves a single function call on
initial entry (TSD stubs are not used for read-only text now). also
potentially fix non-pthread TSD builds (_glapi_Dispatch was undefined),
but untested (could still be broken).

Tested-by: Jesse Natalie <jenatali@microsoft.com>
Tested-by: Jan Beich <jbeich@freebsd.org>
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13935>

2 years agoglapi: Remove remnants of EXT_paletted_texture and the imaging subset
Adam Jackson [Mon, 29 Nov 2021 19:05:49 +0000 (14:05 -0500)]
glapi: Remove remnants of EXT_paletted_texture and the imaging subset

The GLX code had to special case these for uninteresting reasons, but we
don't support them anymore in Mesa so all this would do is keep them
sorta-working over GLX protocol. Given that Mesa hasn't supported them
on the renderer side since ~2011 let's stop pretending they're real. If
we get around to modernizing the indirect GLX code (hah) we can revisit
these then.

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

2 years agoradeon/vcn: implement encoder dpb management
Thong Thai [Mon, 22 Nov 2021 00:51:16 +0000 (19:51 -0500)]
radeon/vcn: implement encoder dpb management

Previously, the number of previously encoded frames the encoder handled
was 1 - the encoder now supports many more encoded pictures, so the
encoder now has to keep track of multiple reconstructed pictures.

v2: Add a check to make sure an array index is not negative (Boyuan)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agoradeon: hardcode uvd/vce encoder not_referenced value to false
Thong Thai [Mon, 6 Dec 2021 16:47:31 +0000 (11:47 -0500)]
radeon: hardcode uvd/vce encoder not_referenced value to false

Sets the not_referenced parameter to be the same as the previously
hardcoded frontends/va value (false) to ensure UVD/VCE encoding
functionality remains unaffected by the change in frontends/va code.

This commit will eventually be reverted once more testing is completed.

Fixes: a90802ef644 ("frontends/va/enc: allow for frames to be marked as (not) referenced")
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agofrontends/va/enc: allow for frames to be marked as (not) referenced
Thong Thai [Mon, 22 Nov 2021 01:04:20 +0000 (20:04 -0500)]
frontends/va/enc: allow for frames to be marked as (not) referenced

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agoradeon/vcn: increase encoder dpb size
Thong Thai [Mon, 8 Nov 2021 19:09:10 +0000 (14:09 -0500)]
radeon/vcn: increase encoder dpb size

Base the number of reconstructed pictures the encoder allocates based on
the number of reference pictures to be used for encoding. Also move the
calculation and allocation of reconstructed pictures to VCN 1, from VCN
2.

v2: Add back the accidentally deleted
'two_pass_search_center_map_offset' (Boyuan)

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agofrontends/va/enc: hardcode h265 encoder ref pic list size
Thong Thai [Mon, 22 Nov 2021 16:47:43 +0000 (11:47 -0500)]
frontends/va/enc: hardcode h265 encoder ref pic list size

Set the size of the ref pic list0 for the h265 encoder to 1.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agofrontends/va: disable packed header support for h264 encoder
Thong Thai [Fri, 12 Nov 2021 23:19:23 +0000 (18:19 -0500)]
frontends/va: disable packed header support for h264 encoder

Packed headers for the H.264 encoder has not been implemented yet, so
don't report packed header support for the H.264 encoder

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13915>

2 years agoradv: handle VK_DESCRIPTOR_TYPE_SAMPLER in VK_VALVE_mutable_descriptor_type extension
Cherser-s [Tue, 16 Nov 2021 20:06:59 +0000 (23:06 +0300)]
radv: handle VK_DESCRIPTOR_TYPE_SAMPLER in VK_VALVE_mutable_descriptor_type extension

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13842>

2 years agointel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.
Francisco Jerez [Tue, 30 Nov 2021 07:45:50 +0000 (23:45 -0800)]
intel/fs/xehp: Teach SWSB pass about the exec pipeline of FS_OPCODE_PACK_HALF_2x16_SPLIT.

This virtual instruction is translated into multiple half float
physical instructions, even though its destination is typically of
integer type, which prevents the software scoreboard pass from
inferring the correct execution pipeline for the virtual instruction
on XeHP+ platforms.  Teach the SWSB lowering pass about this
inconsistency between the IR and physical instruction types.

Fixes among other tests:

dEQP-GLES31.functional.shaders.builtin_functions.pack_unpack.packhalf2x16_compute

Fixes: d4537770bbf ("intel/fs: Add helper functions inferring sync and exec pipeline of an instruction.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5685
Reported-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14002>

2 years agor300/ci: Update loop expectations
Emma Anholt [Tue, 7 Dec 2021 00:56:40 +0000 (16:56 -0800)]
r300/ci: Update loop expectations

from running "-t loops" which I hadn't totally covered before.

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

2 years agor300: Route shader stats output to ARB_debug_output.
Emma Anholt [Tue, 7 Dec 2021 18:18:03 +0000 (10:18 -0800)]
r300: Route shader stats output to ARB_debug_output.

This lets us use shader-db to compare stats on shaders, rather than having
to manually review the RADEON_DEBUG=pstat output.

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

2 years agor300: Precompile the FS at shader creation time.
Emma Anholt [Tue, 7 Dec 2021 17:51:35 +0000 (09:51 -0800)]
r300: Precompile the FS at shader creation time.

This should reduce jank at first draw, and is also good prep for doing
shader-db.

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

2 years agor300: Remove the non_normalized_coords from the shader key.
Emma Anholt [Tue, 7 Dec 2021 17:52:18 +0000 (09:52 -0800)]
r300: Remove the non_normalized_coords from the shader key.

TexSrcTarget has to be RECT when this is set, anyway.

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

2 years agor300: Also consider ALU condition modifiers for loop DCE.
Emma Anholt [Tue, 7 Dec 2021 00:43:45 +0000 (16:43 -0800)]
r300: Also consider ALU condition modifiers for loop DCE.

Since we typically use an ALU op to set the condition modifier for the
IF-BRK-ENDIF, we were particularly likely to remove the increment of the
loop counter!

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

2 years agor300: Ensure that immediates have matching negate flags too.
Emma Anholt [Mon, 6 Dec 2021 23:07:38 +0000 (15:07 -0800)]
r300: Ensure that immediates have matching negate flags too.

We only have one bit of negate, so we have to make sure that immediate
usage has matching negates on all used channels (or rewrite to do so).

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

2 years agor300: Cache the var list in the peephole_mul_omod() loop.
Emma Anholt [Tue, 7 Dec 2021 19:09:06 +0000 (11:09 -0800)]
r300: Cache the var list in the peephole_mul_omod() loop.

If we're not making progress (which the function was already giving us!),
then there's no need to recompute the list.  Reduces
pixmark-piano/7.shader_test compile time from 50 seconds to 10.

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

2 years agor300: Move the instruction filter for r500_transform_IF() to the top.
Emma Anholt [Tue, 7 Dec 2021 18:56:42 +0000 (10:56 -0800)]
r300: Move the instruction filter for r500_transform_IF() to the top.

rc_get_variables() is slow, don't call it if we're going to just exit
immediately anyway.

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

2 years agomeson: Fix dri.pc dridriverdir
Mike Lothian [Tue, 7 Dec 2021 15:40:38 +0000 (15:40 +0000)]
meson: Fix dri.pc dridriverdir

Change dridriversdir to dridriverdir

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/commit/3ae3569d822c2546c4c748090f8a6c8016f763ea
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5726

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14111>

2 years agofreedreno/ci/a306: increase concurrency
Ilia Mirkin [Sat, 4 Dec 2021 01:22:50 +0000 (20:22 -0500)]
freedreno/ci/a306: increase concurrency

No harm from using more threads, but not enough benefit to reduce
parallelism unfortunately.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14067>

2 years agofreedreno/ci/a306: add more skips
Ilia Mirkin [Fri, 3 Dec 2021 04:50:01 +0000 (23:50 -0500)]
freedreno/ci/a306: add more skips

These come up with increased concurrency.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14067>

2 years agointel/crocus: push main/macros.h out to the users
Dave Airlie [Tue, 7 Dec 2021 06:43:43 +0000 (16:43 +1000)]
intel/crocus: push main/macros.h out to the users

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>

2 years agointel/compiler: drop shader_info.h from compiler header
Dave Airlie [Tue, 7 Dec 2021 06:41:19 +0000 (16:41 +1000)]
intel/compiler: drop shader_info.h from compiler header

include it explicitly in the correct places

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>

2 years agobrw/compiler: drop mtypes.h from compiler
Dave Airlie [Tue, 7 Dec 2021 06:34:48 +0000 (16:34 +1000)]
brw/compiler: drop mtypes.h from compiler

This adds a bunch of other headers in, and adds mtypes.h to iris
for perf query object.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>

2 years agoanv: include futex.h explicitly in allocator.
Dave Airlie [Tue, 7 Dec 2021 06:25:34 +0000 (16:25 +1000)]
anv: include futex.h explicitly in allocator.

This file needs futexes so make an explicit include, so it doesn't
come via the compiler

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>

2 years agomesa: move _mesa_varying_slot_in_fs to shader_enums
Dave Airlie [Tue, 7 Dec 2021 06:24:29 +0000 (16:24 +1000)]
mesa: move _mesa_varying_slot_in_fs to shader_enums

This doesn't need anything from mtypes.h, just changes types
to non GL equivalents

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14104>

2 years agointel/isl: Drop extra devinfo checks for CCS support
Nanley Chery [Mon, 6 Dec 2021 15:27:55 +0000 (10:27 -0500)]
intel/isl: Drop extra devinfo checks for CCS support

These checks are done in isl_format_supports_ccs_*. Since
isl_surf_supports_ccs calls these functions, it doesn't need to check
them itself.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>

2 years agoiris: Drop the YCRCB cases in finish_aux_import
Nanley Chery [Mon, 6 Dec 2021 15:20:25 +0000 (10:20 -0500)]
iris: Drop the YCRCB cases in finish_aux_import

We recently added native support for these formats in gallium and ISL.

See commits:
* (gallium/dri) f57c074270ef53c03d4e1db1e13fac3f13300756
* (intel/isl) 3fa16b3025a38ee6614725d89e8cda500988d086

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>

2 years agointel/isl: Restore CCS_E support for YUYV and UYVY
Nanley Chery [Mon, 6 Dec 2021 14:00:32 +0000 (09:00 -0500)]
intel/isl: Restore CCS_E support for YUYV and UYVY

These formats are used when creating surfaces with the
I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS modifier.

Makes iris pass the out-of-tree piglit test,
ext_image_dma_buf_import-intel-modifiers.

Fixes: 1433fe7860a ("intel/isl: Unify fmt checks in isl_surf_supports_ccs")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14082>

2 years agodocs: remove stale notice about deleted dir
Erik Faye-Lund [Mon, 6 Dec 2021 11:48:44 +0000 (12:48 +0100)]
docs: remove stale notice about deleted dir

We're not going to move this directory like this comment suggests, as
the suggested target no longer exists. Let's just drop the mention.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14079>

2 years agodocs: remove mentions of deleted code
Erik Faye-Lund [Mon, 6 Dec 2021 11:46:46 +0000 (12:46 +0100)]
docs: remove mentions of deleted code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14079>

2 years agoci: remove testing of deleted code
Erik Faye-Lund [Mon, 6 Dec 2021 11:46:02 +0000 (12:46 +0100)]
ci: remove testing of deleted code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14079>

2 years agoCODEOWNERS: remove ownership of deleted code
Erik Faye-Lund [Mon, 6 Dec 2021 11:44:43 +0000 (12:44 +0100)]
CODEOWNERS: remove ownership of deleted code

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14079>

2 years agomeson: check -mtls if has_exe_wrapper
Michel Zou [Mon, 6 Dec 2021 19:16:19 +0000 (20:16 +0100)]
meson: check -mtls if has_exe_wrapper

Fixes: 60d95c5d (Auto-enable TLSDESC support)
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14086>

2 years agopanvk: Add check for null fence
Manas Chaudhary [Tue, 7 Dec 2021 13:46:08 +0000 (19:16 +0530)]
panvk: Add check for null fence

Signed-off-by: Manas Chaudhary <manas.chaudhary@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14108>

2 years agoir3,turnip: Add support for GL_KHR_shader_subgroup_quad
Danylo Piliaiev [Tue, 16 Nov 2021 14:27:26 +0000 (16:27 +0200)]
ir3,turnip: Add support for GL_KHR_shader_subgroup_quad

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

2 years agoir3,turnip: Enable subgroup ops support in all stages on gen4
Danylo Piliaiev [Tue, 16 Nov 2021 12:53:32 +0000 (14:53 +0200)]
ir3,turnip: Enable subgroup ops support in all stages on gen4

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

2 years agoir3: Use getfiberid for SubgroupInvocationID on gen4
Danylo Piliaiev [Mon, 15 Nov 2021 15:14:37 +0000 (17:14 +0200)]
ir3: Use getfiberid for SubgroupInvocationID on gen4

Since it requires (ss) categorize it as is_sfu() and not is_mem().

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

2 years agoir3: Add gen4 new subgroup instructions
Danylo Piliaiev [Mon, 15 Nov 2021 14:57:38 +0000 (16:57 +0200)]
ir3: Add gen4 new subgroup instructions

* getlast.w8 #4 - Perform jump for the first (CLUSTER_SIZE-1)
   fibers in a subgroup
* brcst.active.w8 - necessary to implement arithmetic subgroup
   operations with prefix sum.
* quad_shuffle.brcst - subgroupQuadBroadcast
* quad_shuffle.horiz - subgroupQuadSwapHorizontal
* quad_shuffle.vert - subgroupQuadSwapVertical
* quad_shuffle.diag - subgroupQuadSwapDiagonal
* getfiberid - gl_SubgroupID

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

2 years agoradv: avoid prefixing few VkXXX structures by struct
Samuel Pitoiset [Fri, 26 Nov 2021 16:19:51 +0000 (17:19 +0100)]
radv: avoid prefixing few VkXXX structures by struct

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

2 years agoutil/u_vector: prevent C++ warning on cast from void* to something else
Lionel Landwerlin [Sun, 28 Nov 2021 19:33:36 +0000 (21:33 +0200)]
util/u_vector: prevent C++ warning on cast from void* to something else

v2: fix windows build

v3: duplicate foreach macro for C/C++

v4: Extract casting macro

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> (v3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13997>

2 years agomesa/crocus/iris/blorp: drop minify macro in favour of u_minify
Dave Airlie [Tue, 7 Dec 2021 06:05:56 +0000 (16:05 +1000)]
mesa/crocus/iris/blorp: drop minify macro in favour of u_minify

This macro is duplicated, clean it up.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14103>

2 years agomesa: Make _mesa_generate_mipmap_level static
Adam Jackson [Tue, 7 Dec 2021 02:49:18 +0000 (21:49 -0500)]
mesa: Make _mesa_generate_mipmap_level static

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

2 years agomesa: Remove unused execmem code
Adam Jackson [Tue, 7 Dec 2021 02:45:54 +0000 (21:45 -0500)]
mesa: Remove unused execmem code

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

2 years agomesa/program: Dead code cleanup
Adam Jackson [Tue, 7 Dec 2021 02:18:45 +0000 (21:18 -0500)]
mesa/program: Dead code cleanup

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

2 years agomesa/vbo: Always use buffer objects for storage
Adam Jackson [Wed, 2 Jun 2021 04:07:36 +0000 (00:07 -0400)]
mesa/vbo: Always use buffer objects for storage

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