platform/upstream/mesa.git
14 months agoandroid: Add explanatory comment to u_gralloc
Chris Spencer [Tue, 29 Aug 2023 21:16:45 +0000 (22:16 +0100)]
android: Add explanatory comment to u_gralloc

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24941>

14 months agoutil/cache_test: Add test for get/put() with disabled cache
Dmitry Osipenko [Fri, 1 Sep 2023 00:36:15 +0000 (03:36 +0300)]
util/cache_test: Add test for get/put() with disabled cache

The disk_cache_create() now always returns valid cache even when disk
cache is disabled. In a case of disabled cache, the disk cache is NO-OP.
Test whether get/put() work as expected for the disabled cache.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

14 months agoutil/cache_test: Fix disabled cache test using SHADER_CACHE_DISABLE_BY_DEFAULT
Dmitry Osipenko [Fri, 1 Sep 2023 00:13:11 +0000 (03:13 +0300)]
util/cache_test: Fix disabled cache test using SHADER_CACHE_DISABLE_BY_DEFAULT

Previous commit decoupled EGL_ANDROID_blob_cache from the disk cache
and haven't updated the SHADER_CACHE_DISABLE_BY_DEFAULT test-case that
is failing because now cache is always created even if disk cache is
disabled, such cache is NO-OP in this case. Fix the failing test.

Fixes: 39f26642 ("util: Decouple disk cache from EGL_ANDROID_blob_cache")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

14 months agoutil/cache_test: Re-add test for disabled cache
Dmitry Osipenko [Fri, 1 Sep 2023 00:03:22 +0000 (03:03 +0300)]
util/cache_test: Re-add test for disabled cache

Test for disabled cache was removed when we decoupled
EGL_ANDROID_blob_cache from the disk cache because test was failing
since it became outdated. Add the updated test.

Fixes: 39f26642 ("util: Decouple disk cache from EGL_ANDROID_blob_cache")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24985>

14 months agollvmpipe/cs: further cleanups after tgsi removal.
Dave Airlie [Wed, 30 Aug 2023 01:56:56 +0000 (11:56 +1000)]
llvmpipe/cs: further cleanups after tgsi removal.

These was still a few more places that could be polished better.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25045>

14 months agozink: fix linear modifier dmabuf imports
Mike Blumenkrantz [Fri, 1 Sep 2023 17:23:32 +0000 (13:23 -0400)]
zink: fix linear modifier dmabuf imports

these are disguised as INVALID modifiers, but really they're LINEAR

cc: mesa-stable

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

14 months agonir/opt_if: Simplify if's with general conditions
Alyssa Rosenzweig [Wed, 30 Aug 2023 22:10:28 +0000 (18:10 -0400)]
nir/opt_if: Simplify if's with general conditions

Dolphin ubershaders have a pattern:

   if (x && y) {
   } else {
      discard;
   }

The current code to simplify if's will bail on this pattern, since the condition
is not a comparison. However, if that check is dropped and we allow NIR to
invert this, we get:

   if (!(x && y)) {
      discard;
   } else {
   }

which is now in a form for nir_opt_conditional_discard to turn into it

   discard_if(!(x && y))

which may be substantially cheaper than the original code.

In general, I see no reason to restrict to conditionals. Assuming the backend is
clever enough to delete empty else blocks (I think most are), then this patch is
a strict win as long as inot instructions are cheaper than empty else blocks.
This matches my intuition for typical GPUs, where simple ALU instructions are
cheaper than control flow. Furthermore, it may be possible in practice for
backends to fold the inot into a richer set of instructions. For example, most
GPUs have a NAND instructions which would fold in the inot in the above code.

So just drop the check, simplify the pass, get the win.

---

Also, to avoid inflating register pressure, make sure we put the inot right
before the if. Android shader-db on is uninspiring due to terrible
coalescing decisions in the current RA. But it does fix the Dolphin smell.

   total instructions in shared programs: 1756571 -> 1756568 (<.01%)
   instructions in affected programs: 1600 -> 1597 (-0.19%)
   helped: 1
   HURT: 4
   Inconclusive result (value mean confidence interval includes 0).

   total bytes in shared programs: 11521172 -> 11521156 (<.01%)
   bytes in affected programs: 10080 -> 10064 (-0.16%)
   helped: 1
   HURT: 4
   Inconclusive result (value mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24965>

14 months agolavapipe: fix pipeline stride propagation
Mike Blumenkrantz [Wed, 30 Aug 2023 13:49:30 +0000 (09:49 -0400)]
lavapipe: fix pipeline stride propagation

this is on the cso now

affects dEQP-VK.pipeline.fast_linked_library.extended_dynamic_state.before_good_static.large_stride

Fixes: 76725452239 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24954>

14 months agolavapipe: update vbo indices before propagating stride
Mike Blumenkrantz [Wed, 30 Aug 2023 13:38:54 +0000 (09:38 -0400)]
lavapipe: update vbo indices before propagating stride

the vbo index is used to set the stride, so it needs to be updated

affects dEQP-VK.pipeline.pipeline_library.bind_buffers_2.single.stride_0_4_offset_1_0.count_2

Fixes: 76725452239 ("gallium: move vertex stride to CSO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24954>

14 months agozink: don't block reordering during ref updates in unordered blits
Mike Blumenkrantz [Thu, 24 Aug 2023 12:26:10 +0000 (08:26 -0400)]
zink: don't block reordering during ref updates in unordered blits

unordered blits handle all the reorder mechanics already, so any changes
here end up unnecessarily blocking further reordering

test case KHR-GLES3.packed_pixels.varied_rectangle.rgb

ref #9016

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

14 months agozink: be more precise about flagging rp changes around unordered u_blitter
Mike Blumenkrantz [Wed, 30 Aug 2023 10:54:37 +0000 (06:54 -0400)]
zink: be more precise about flagging rp changes around unordered u_blitter

failing to update rp attachments as needed after unordered blits results in
broken (depth) rendering

Fixes: 3a9f7d70383 ("zink: implement unordered u_blitter calls")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24934>

14 months agoradeonsi/vcn: fix the incorrect dt_size
Leo Liu [Fri, 1 Sep 2023 22:26:43 +0000 (18:26 -0400)]
radeonsi/vcn: fix the incorrect dt_size

Issue: For texture with multiple planes, the planes will point to the
same BO with the total size, so current vcn dt_size is incorrect.

(gdb) p/x *((struct si_resource *)(((struct vl_video_buffer *)out_surf)->resources[0]))
...
  buf = 0x5555558daa30,
  gpu_address = 0xffff800101000000,
  bo_size = 0xa2000,
...
}
(gdb) p/x *((struct si_resource *)(((struct vl_video_buffer *)out_surf)->resources[1]))
...
  buf = 0x5555558daa30,
  gpu_address = 0xffff800101000000,
  bo_size = 0xa2000,
...
}

This is because: in function static struct si_texture *si_texture_create_object(),
   if (plane0) {
      /* The buffer is shared with the first plane. */
      resource->bo_size = plane0->buffer.bo_size;
      ...
      radeon_bo_reference(sscreen->ws, &resource->buf, plane0->buffer.buf);
      resource->gpu_address = plane0->buffer.gpu_address;
   }

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9728
Cc: mesa-stable
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25013>

14 months agoiris: implement Wa_14018912822
Tapani Pälli [Mon, 21 Aug 2023 10:29:43 +0000 (13:29 +0300)]
iris: implement Wa_14018912822

When MSAA is enabled, instead of using BLENDFACTOR_ZERO use CONST_COLOR,
CONST_ALPHA and supply zero by using blend constants.

We need info on blend state entries in the CSO so that we can set them
up properly.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24714>

14 months agoanv: implement Wa_14018912822
Tapani Pälli [Wed, 16 Aug 2023 05:20:12 +0000 (08:20 +0300)]
anv: implement Wa_14018912822

When MSAA is enabled, instead of using BLENDFACTOR_ZERO use CONST_COLOR,
CONST_ALPHA and supply zero by using blend constants.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24714>

14 months agoci: do not fail vkd3d-proton job when the expectations match
Samuel Pitoiset [Mon, 4 Sep 2023 08:34:06 +0000 (10:34 +0200)]
ci: do not fail vkd3d-proton job when the expectations match

When the list of expected failures match, the job shouldn't fail.
This also adjusts the first error check to catch segfaults.

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

14 months agoradv/ci: re-enable vkd3d-polaris10-valve
Samuel Pitoiset [Mon, 4 Sep 2023 06:44:51 +0000 (08:44 +0200)]
radv/ci: re-enable vkd3d-polaris10-valve

Like the vkcts job, this was disabled a while ago but it seems to be
working well again.

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

14 months agor300: use w channel for scalar opcodes if possible
Pavel Ondračka [Wed, 23 Aug 2023 11:55:48 +0000 (13:55 +0200)]
r300: use w channel for scalar opcodes if possible

The opcodes write to w by default so using anything else means we can't
schedule anything in the rbg slot anyway becasue we have to replicate the
result from w. We already attempt to do this during the scheduling, but
at that point it is more tricky, so doing it early leads to much better
code. Performance++

RV530 benchmarks:

Lightsmark, 1280x800, fullscreen
before:
    N           Min           Max        Median           Avg        Stddev
x   5         27.32         27.36         27.34         27.34   0.015811388
after:
    N           Min           Max        Median           Avg        Stddev
x   5         27.53         27.61         27.59        27.576   0.034351128

Unigine Sanctuary, 1280x800, fullscreen, medium shaders
before:
    N           Min           Max        Median           Avg        Stddev
x   5       10.1211       10.1238       10.1214      10.12192  0.0011211601
after:
    N           Min           Max        Median           Avg        Stddev
x   5       10.4607       10.4637       10.4619      10.46206  0.0012441865

RV530 shader-db:
total instructions in shared programs: 129643 -> 128038 (-1.24%)
instructions in affected programs: 45415 -> 43810 (-3.53%)
helped: 514
HURT: 43
total presub in shared programs: 4912 -> 5201 (5.88%)
presub in affected programs: 752 -> 1041 (38.43%)
helped: 40
HURT: 30
total omod in shared programs: 381 -> 383 (0.52%)
omod in affected programs: 6 -> 8 (33.33%)
helped: 1
HURT: 3
total temps in shared programs: 16904 -> 16841 (-0.37%)
temps in affected programs: 1377 -> 1314 (-4.58%)
helped: 81
HURT: 52
total lits in shared programs: 3555 -> 3550 (-0.14%)
lits in affected programs: 294 -> 289 (-1.70%)
helped: 13
HURT: 11
total cycles in shared programs: 194771 -> 193734 (-0.53%)
cycles in affected programs: 79079 -> 78042 (-1.31%)
helped: 452
HURT: 84
GAINED: shaders/glamor/82.shader_test FS

RV370 shader-db:
total instructions in shared programs: 82116 -> 81600 (-0.63%)
instructions in affected programs: 11888 -> 11372 (-4.34%)
helped: 273
HURT: 40
total temps in shared programs: 12438 -> 12441 (0.02%)
temps in affected programs: 692 -> 695 (0.43%)
helped: 36
HURT: 39
total cycles in shared programs: 128140 -> 127630 (-0.40%)
cycles in affected programs: 25838 -> 25328 (-1.97%)
helped: 266
HURT: 41
GAINED: shaders/0ad/12.shader_test FS
GAINED: shaders/CC3-tiberium-wars/314.shader_test FS
GAINED: shaders/lightsmark/16.shader_test FS
GAINED: shaders/sanctuary/159.shader_test FS
GAINED: shaders/sanctuary/162.shader_test FS
GAINED: shaders/sanctuary/51.shader_test FS
GAINED: shaders/sanctuary/54.shader_test FS
GAINED: shaders/trine/fp-422.shader_test FS

Partial fix for: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6661

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24889>

14 months agopvr: Add 'info' PVR_DEBUG flag
Vlad Schiller [Thu, 10 Aug 2023 07:39:17 +0000 (08:39 +0100)]
pvr: Add 'info' PVR_DEBUG flag

This commit will add a new PVR_DEBUG flag that, when used,
it will display information about the display and render
devices in the common code (without adding dependencies)

Signed-off-by: Vlad Schiller <vlad-radu.schiller@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24931>

14 months agokmsro: Add hdlcd DPU
Carsten Haitzler [Mon, 4 Sep 2023 08:55:34 +0000 (09:55 +0100)]
kmsro: Add hdlcd DPU

Arm hdlcd display units do exist on Juno SoC's. This is the
first time Mesa has had to deal with panfrost working on these SoC's,
thus have to add hdlcd support.

Signed-off-by: Carsten Haitzler <carsten.haitzler@foss.arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25027>

14 months agoci: disable Google Freedreno farm, currently timeouting on all jobs
David Heidelberg [Mon, 4 Sep 2023 10:55:24 +0000 (16:25 +0530)]
ci: disable Google Freedreno farm, currently timeouting on all jobs

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

14 months agov3dv/android: Skip swapchain binding
Roman Stratiienko [Sat, 2 Sep 2023 19:00:32 +0000 (22:00 +0300)]
v3dv/android: Skip swapchain binding

ANV functionality was used as a reference. As stated in anv_BindImageMemory2:

    Ignore this struct on Android, we cannot access swapchain
    structures there.

Fixes 2 failing VTS test:

    dEQP-VK.wsi.android.swapchain.create#image_swapchain_create_info
    dEQP-VK.wsi.android.swapchain.simulate_oom#image_swapchain_create_info

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

14 months agov3dv: Migrate to vk_device_memory
Roman Stratiienko [Sat, 2 Sep 2023 18:01:33 +0000 (21:01 +0300)]
v3dv: Migrate to vk_device_memory

It allows the reuse of some generic code, especially AHB logic.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

14 months agov3dv/android: Enable shared presentable image support
Roman Stratiienko [Sat, 2 Sep 2023 15:35:09 +0000 (18:35 +0300)]
v3dv/android: Enable shared presentable image support

Functionality ensures gralloc won't allocate compressed buffer
incompatible with shared presentable image support.

Broadcom does not support compressed buffers and we can just enable the
feature without additional logic. Despite that, we add the logic here
so it can be replaced with the generic code someday.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

14 months agov3dv/android: Use u_gralloc code
Roman Stratiienko [Sat, 2 Sep 2023 15:18:50 +0000 (18:18 +0300)]
v3dv/android: Use u_gralloc code

Use generic u_gralloc logic instead of custom.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25028>

14 months agoradv: fix capturing indirect dispatches with SQTT
Samuel Pitoiset [Fri, 1 Sep 2023 11:52:28 +0000 (13:52 +0200)]
radv: fix capturing indirect dispatches with SQTT

Looks like indirect dispatches require an event marker instead of an
event marker with dims. That makes sense somehow given the blocks size
is not known at record time with indirect dispatches.

This allows RGP to report correct block sizes.

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

14 months agoaco,radv,radeonsi: rename is_monolithic to merged_shader_compiled_separately
Qiang Yu [Fri, 1 Sep 2023 07:21:11 +0000 (15:21 +0800)]
aco,radv,radeonsi: rename is_monolithic to merged_shader_compiled_separately

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

14 months agoradeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts
Alexander Orzechowski [Sun, 3 Sep 2023 20:28:11 +0000 (16:28 -0400)]
radeonsi: Set PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET for auxiliary contexts

This fixes a regression with context loss hardened compositors such as
wlroots or kwin where instead of continuing execution in a reset
situation, the process would be aborted. Although these applications set
their notification strategy to lose context on reset, radeonsi also
creates auxiliary contexts for its own use observed when
`egl_init_display` and `gbm_create_device` are called from these
compositors. Fix this by allowing a context loss on reset for these
auxiliary contexts.

Note: It seems this has been attempted before for another call site
creating auxiliary contexts, but this location was missed, hence the
fixed commit hash below.

Fixes: #9672
Fixes: 591aaea6486fca44feb65e46ba09aaa708315b50

Signed-off-by: Alexander Orzechowski <alex@ozal.ski>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25023>

14 months agonir/gather: add support for fbfetch and bindless image loads.
Dave Airlie [Thu, 31 Aug 2023 02:07:33 +0000 (12:07 +1000)]
nir/gather: add support for fbfetch and bindless image loads.

If a driver calls gather after lowering the uses_fbfetch_output
needs to be set properly if we have bindless image loads.

Fixes a regression seen calling gather info later in some llvmpipe
work.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24987>

14 months agoac/nir/ngg: Extract nogs_export_vertex_params function.
Timur Kristóf [Mon, 7 Aug 2023 09:19:49 +0000 (11:19 +0200)]
ac/nir/ngg: Extract nogs_export_vertex_params function.

Just for better code readability. No functional changes.

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

14 months agoac/nir/ngg: Wait for attribute ring stores in mesh shaders.
Timur Kristóf [Tue, 22 Aug 2023 20:39:22 +0000 (22:39 +0200)]
ac/nir/ngg: Wait for attribute ring stores in mesh shaders.

Make sure that both per-vertex and per-primitive attribute
ring stores are finished before position or primitive export
instructions are executed.

This is necessary because we need to ensure that mesh shader
waves work correctly when they have either vertex-only or
primitive-only waves.

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

14 months agoac/nir/ngg: Refactor mesh shader primitive export.
Timur Kristóf [Tue, 22 Aug 2023 20:28:43 +0000 (22:28 +0200)]
ac/nir/ngg: Refactor mesh shader primitive export.

Cleanup the code that generates the two channels of the
primitive export instruction, and move storing the built-in
per-primitive outputs out to match how vertex attributes work.

Prepares the mesh shader lowering for a workaround that
affect export instructions.

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

14 months agoac/nir/ngg: Wait for attribute stores before VS/TES/GS pos0 export.
Timur Kristóf [Tue, 22 Aug 2023 19:51:43 +0000 (21:51 +0200)]
ac/nir/ngg: Wait for attribute stores before VS/TES/GS pos0 export.

This is a HW bug workaround for some (all?) GFX11 chips.

On these chips, rasterization can start before the attribute ring
stores are finished, which can cause issues.
As a workaround, wait for attribute ring stores to finish
before doing the position export.

Mesh shaders will be taken care of in another commit.

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

14 months agoac/nir: Slightly refactor how pos0 exports are added when missing.
Timur Kristóf [Tue, 22 Aug 2023 19:30:05 +0000 (21:30 +0200)]
ac/nir: Slightly refactor how pos0 exports are added when missing.

Prepares for a workaround. Makes it possible for this function
to not emit the pos0 export at all so that it can be emitted
by a subsequent call to the function later.

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

14 months agoac/nir: Add done arg to ac_nir_export_position.
Timur Kristóf [Tue, 22 Aug 2023 18:22:32 +0000 (20:22 +0200)]
ac/nir: Add done arg to ac_nir_export_position.

This prepares for a workaround where we won't need to add
the done flag to the last export in this function, because
it will be added in a subsequent call to the same function.

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

14 months agoisl/tilememcpy_test: add multiple tile testing
Lionel Landwerlin [Fri, 25 Aug 2023 07:48:19 +0000 (10:48 +0300)]
isl/tilememcpy_test: add multiple tile testing

Also verify that there is no out-of-bounds accesses.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Aditya Swarup <aditya.swarup@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agoRevert "iris: Disable tiled memcpy for Tile4"
Aditya Swarup [Thu, 28 Jul 2022 00:35:03 +0000 (17:35 -0700)]
Revert "iris: Disable tiled memcpy for Tile4"

This reverts commit 0022a11ff4fbbe89c2511d758f807b286ebb1bd7.

Enable path for Tile4 memcpy functions to be used.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agointel/isl: Linear to Tile-4 conversion unittest
Aditya Swarup [Mon, 18 Jul 2022 23:59:46 +0000 (16:59 -0700)]
intel/isl: Linear to Tile-4 conversion unittest

Add unittest to test conversion of data from linear to
Tile-4 format based on bit swizzling conversion info
mentioned in Bspec.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agointel/isl: Convert Tile4 texture to linear format
Aditya Swarup [Mon, 18 Jul 2022 21:22:12 +0000 (14:22 -0700)]
intel/isl: Convert Tile4 texture to linear format

Add memcpy function to convert Tile-4 4KB texture to linear
format.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agointel/isl: Convert linear texture to Tile4 format
Aditya Swarup [Mon, 18 Jul 2022 21:18:24 +0000 (14:18 -0700)]
intel/isl: Convert linear texture to Tile4 format

Add memcpy function to convert linear data to Tile 4 format.
Tile 4 format consists of 4KB block divided into chunks of 512B.
Each 512B chunk/block is comprised of 8 64B blocks arranged in
Y-tile format.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agointel/isl: Unittest for linear to Ytile conversion
Aditya Swarup [Mon, 1 Nov 2021 21:41:04 +0000 (14:41 -0700)]
intel/isl: Unittest for linear to Ytile conversion

Add unittests for linear to tiled and tiled to linear texture
conversions for Ytile. The test prints the source/output buffer
in hex format with debug flags to verify the result.

Linear to tile conversion fills the linear buffer with values
based on the OWORD index number i.e., OWORD3 will contain
all values filled as 0x03 and
OWORD3 = 0x03030303030303030303030303030303.

The Y-tile to Linear tile conversion uses a similar logic to place
the tiled values in a manner that will result in a linear buffer with
OWORDs filled according to index number as mentioned above.

Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13391>

14 months agoblorp: drop undefined macro
Rohan Garg [Fri, 1 Sep 2023 11:48:51 +0000 (13:48 +0200)]
blorp: drop undefined macro

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 97d6ceaf04 ("intel: Remove GEN_IS_HASWELL macro")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

14 months agocrocus: fix GFX_VERx10 macro
Rohan Garg [Fri, 1 Sep 2023 11:48:20 +0000 (13:48 +0200)]
crocus: fix GFX_VERx10 macro

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
cc: mesa-stable

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

14 months agocrocus: add a __gen_get_batch_address declaration
Rohan Garg [Fri, 1 Sep 2023 11:29:53 +0000 (13:29 +0200)]
crocus: add a __gen_get_batch_address declaration

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

14 months agoanv: use the lineage number for WA
Rohan Garg [Fri, 1 Sep 2023 10:39:13 +0000 (12:39 +0200)]
anv: use the lineage number for WA

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d0669f3ede ("intel/dev: switch defect identifiers to use lineage numbers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

14 months agoiris: use the correct WA macros and lineage numbers
Rohan Garg [Fri, 1 Sep 2023 10:38:35 +0000 (12:38 +0200)]
iris: use the correct WA macros and lineage numbers

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 0ce595a89a ("intel: use generated helpers for Wa_1508744258")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

14 months agoanv: drop dead ifdef
Rohan Garg [Fri, 1 Sep 2023 09:48:18 +0000 (11:48 +0200)]
anv: drop dead ifdef

The GFX_VERX10 macro doesn't exist and we no longer use
SCRATCH_SURFACE_STATE_POOL_SIZE.

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: b3f6e5dc702 ('anv: remove incorrect ifdef')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25011>

14 months agointel: Limit Intel Vulkan RT to x86_64
Matt Turner [Sat, 2 Sep 2023 12:22:53 +0000 (08:22 -0400)]
intel: Limit Intel Vulkan RT to x86_64

Note: passed CI repeatedly except for the timing out WHL jobs.

Fixes: 28c1053c07c ("intel: Allow using intel_clc from the system")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25009>

14 months agoci: Disable WHL jobs
Alyssa Rosenzweig [Sat, 2 Sep 2023 19:43:01 +0000 (15:43 -0400)]
ci: Disable WHL jobs

Timing out all day.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
14 months agoci: Disable known broken Bifrost Vulkan job
Alyssa Rosenzweig [Wed, 30 Aug 2023 00:56:53 +0000 (20:56 -0400)]
ci: Disable known broken Bifrost Vulkan job

Until someone does the work to eliminate faults, PanVK will be inherently flaky
and should not be in CI. deqp-runner can eat a lot of flakes, and then retrying
the whole job eats more flakes, but neither is a substitute for not testing
known broken (and hence flaky) code and both increase runtime unacceptably. the
g52-vk job earned 2 spots on the latest leaderboard for slowest jobs, I clicked
on https://gitlab.freedesktop.org/mesa/mesa/-/jobs/48142375 to see a jawdropping
54 flakes reported by deqp-runner.

If people insist on keeping the job, then panfrost-g52-vk needs to be demoted to
manual until after someone fixes all these bugs on the driver side. If that's
not going to happen, then there's no point in it being in CI at all. It's broken
code. After a buggy MR, it'll still be broken code. CI doesn't matter if we're
ok with it being broken.

Bottom line is, we can't be running known broken code in CI (bugs = faults =
flakes = unhappy developers), at least for non-robust stacks (panfrost.ko
included). This needs to be policy if it isn't already. Merging this single
character change deals with the hot problem without any fanfare or adverse
effects.

This turns the job into a nightly as David suggested to get it out of the
premerge path until someone is committed to supporting it and does the work to
make it happen.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9721
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24943>

14 months agoaco: implement some exclusive scans with inclusive scans
Georg Lehmann [Tue, 8 Aug 2023 11:35:18 +0000 (13:35 +0200)]
aco: implement some exclusive scans with inclusive scans

exclusive scan lowering uses full wave shift, for iadd/ixor it's faster
to do inclusive scans and subtract/xor the thread's source.

Foz-DB Navi21:
Totals from 21 (0.02% of 132657) affected shaders:
Instrs: 10925 -> 10727 (-1.81%)
CodeSize: 58064 -> 56488 (-2.71%)
Latency: 178471 -> 177928 (-0.30%)
InvThroughput: 24374 -> 24145 (-0.94%)

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

14 months agorusticl/memory: only specify PIPE_BIND_SHADER_IMAGE where supported
Karol Herbst [Tue, 29 Aug 2023 19:59:31 +0000 (21:59 +0200)]
rusticl/memory: only specify PIPE_BIND_SHADER_IMAGE where supported

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

14 months agonir: add nir_scalar_equal
Georg Lehmann [Sat, 12 Aug 2023 22:14:29 +0000 (00:14 +0200)]
nir: add nir_scalar_equal

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

14 months agonir: add nir_scalar intrinsic helpers
Georg Lehmann [Sat, 12 Aug 2023 22:03:03 +0000 (00:03 +0200)]
nir: add nir_scalar intrinsic helpers

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

14 months agodocs: add LAVA farm informations
David Heidelberg [Wed, 30 Aug 2023 19:11:26 +0000 (21:11 +0200)]
docs: add LAVA farm informations

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

14 months agoRevert "ci: disable a660 jobs"
David Heidelberg [Wed, 30 Aug 2023 17:49:20 +0000 (19:49 +0200)]
Revert "ci: disable a660 jobs"

This reverts commit 209ed8eace0ba9095e3ef956a10cd9196407047f.

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

14 months agoanv: enable standard Y tiles
Lionel Landwerlin [Wed, 14 Jun 2023 09:31:19 +0000 (12:31 +0300)]
anv: enable standard Y tiles

We kept those tilings disabled up to know. Now that ISL has proper
support for them, remove this.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoanv: Align memory VA to support for Ys, Tile64 tiled images
Jason Ekstrand [Thu, 11 Oct 2018 21:38:31 +0000 (16:38 -0500)]
anv: Align memory VA to support for Ys, Tile64 tiled images

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

14 months agoisl: enable Tile64 for 3D images
Aditya Swarup [Thu, 8 Jun 2023 22:22:11 +0000 (15:22 -0700)]
isl: enable Tile64 for 3D images

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

14 months agointel/isl: Allow Ys tiling
Jason Ekstrand [Thu, 22 Feb 2018 03:02:09 +0000 (19:02 -0800)]
intel/isl: Allow Ys tiling

Ys & Yf are both implemented in ISL now, we still have some Yf issues
to investigate. Instead of disabling them in ISL, we disable them in
the two drivers.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: reorder tiling selection
Lionel Landwerlin [Mon, 26 Jun 2023 10:03:23 +0000 (13:03 +0300)]
isl: reorder tiling selection

Select tilings in this order :
  - recommended Y tilings
  - Yf tilings
  - Ys/Tile64 tilings
  - legacy tilings (W, X) & Linear

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/aux_map: correctly program tiling mode for Ys
Lionel Landwerlin [Wed, 28 Jun 2023 06:32:54 +0000 (09:32 +0300)]
intel/aux_map: correctly program tiling mode for Ys

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoblorp: allow 3D blits/copies on Ys/Yf/Tile64 tiling
Lionel Landwerlin [Wed, 21 Jun 2023 15:44:27 +0000 (18:44 +0300)]
blorp: allow 3D blits/copies on Ys/Yf/Tile64 tiling

The data in Ys/Yf/Tile64 tiled images is arranged differently for 2D &
3D images. Therefore we cannot assume that we will use 2D images for
blits/copies.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: disable CCS on Ys/Yf
Lionel Landwerlin [Tue, 15 Aug 2023 13:24:59 +0000 (16:24 +0300)]
isl: disable CCS on Ys/Yf

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: disable miptails on gfx12 with yuv formats
Lionel Landwerlin [Tue, 27 Jun 2023 11:42:52 +0000 (14:42 +0300)]
isl: disable miptails on gfx12 with yuv formats

A number of CTS tests are failing, like :

   dEQP-VK.ycbcr.format.b8g8r8g8_422_unorm.vertex_optimal

Failures are reproduced on simulation.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: disallow miptails on planar formats
Lionel Landwerlin [Tue, 27 Jun 2023 11:06:43 +0000 (14:06 +0300)]
isl: disallow miptails on planar formats

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: add Gfx12/12.5 restriction on 3D surfaces & compression
Lionel Landwerlin [Wed, 28 Jun 2023 11:29:30 +0000 (14:29 +0300)]
isl: add Gfx12/12.5 restriction on 3D surfaces & compression

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Disallow CCS on 3D surfaces with miptails
Jason Ekstrand [Tue, 6 Mar 2018 01:42:11 +0000 (17:42 -0800)]
intel/isl: Disallow CCS on 3D surfaces with miptails

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Start using miptails
Jason Ekstrand [Sat, 3 Mar 2018 03:02:17 +0000 (19:02 -0800)]
intel/isl: Start using miptails

This commit adds the code for choosing where to start the miptail and
enables miptails by default unless the client driver passes
info->min_miptail_start_level >= info->levels.

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

14 months agointel/isl: Support miptails in isl_surf_get_uncompressed_surf
Jason Ekstrand [Sat, 3 Mar 2018 00:43:35 +0000 (16:43 -0800)]
intel/isl: Support miptails in isl_surf_get_uncompressed_surf

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: make isl_surf_get_uncompressed_surf robust to argument accesses
Lionel Landwerlin [Tue, 29 Aug 2023 08:54:47 +0000 (11:54 +0300)]
isl: make isl_surf_get_uncompressed_surf robust to argument accesses

Since the input & output arguments can point to the same location in
memory, if you ever access the input after writing the output you're
in trouble.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Add support for computing offsets with miptails
Jason Ekstrand [Fri, 2 Mar 2018 20:37:52 +0000 (12:37 -0800)]
intel/isl: Add support for computing offsets with miptails

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

14 months agointel/isl: Add a max_miptail_levels field to isl_tile_info
Lionel Landwerlin [Fri, 2 Mar 2018 23:30:24 +0000 (15:30 -0800)]
intel/isl: Add a max_miptail_levels field to isl_tile_info

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Add initial data-structure support for miptails
Jason Ekstrand [Sat, 3 Mar 2018 00:02:58 +0000 (16:02 -0800)]
intel/isl: Add initial data-structure support for miptails

This commit just adds a miptail start field to isl_surf and wires it up
in the RENDER_SURFACE_STATE and 3DSTATE_DEPTH code.  We also add a
minimum miptail LOD so that client drivers have a knob to control the
miptails a bit.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Support Yf/Ys tiling in emit_depth_stencil_hiz
Jason Ekstrand [Fri, 25 Aug 2017 18:23:23 +0000 (11:23 -0700)]
intel/isl: Support Yf/Ys tiling in emit_depth_stencil_hiz

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Support Yf/Ys tiling in surf_fill_state
Jason Ekstrand [Fri, 25 Aug 2017 04:16:03 +0000 (21:16 -0700)]
intel/isl: Support Yf/Ys tiling in surf_fill_state

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Support Ys, Yf & Tile64 in isl_surf_get_uncompressed_surf
Jason Ekstrand [Thu, 22 Feb 2018 21:53:03 +0000 (13:53 -0800)]
intel/isl: Support Ys, Yf & Tile64 in isl_surf_get_uncompressed_surf

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Indent uncompressed surface code
Jason Ekstrand [Wed, 7 Jul 2021 15:37:57 +0000 (10:37 -0500)]
intel/isl: Indent uncompressed surface code

We're about to add separate code for Yf/Ys and this helps keep the diff
reasonable.

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

14 months agointel/isl: Fill out the correct phys_total_extent for Ys/Yf/Tile64
Jason Ekstrand [Thu, 22 Feb 2018 02:12:30 +0000 (18:12 -0800)]
intel/isl: Fill out the correct phys_total_extent for Ys/Yf/Tile64

With these tilings, everything is aligned to a tile and the tiled
surface size calculations will handle the array stride for us.  We need
to provide an accurate 4D size so that 3D and multisampled images get
tiled correctly.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Use the depth field of phys_level0_sa for GFX4_2D 3D surfaces
Jason Ekstrand [Thu, 22 Feb 2018 02:05:15 +0000 (18:05 -0800)]
intel/isl: Use the depth field of phys_level0_sa for GFX4_2D 3D surfaces

This makes things a tiny bit stickier in isl_calc_phys_total_extent_el
but will be worth it when we enable Yf and Ys.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: disallow TileYs/Yf on 3D storage images on Gfx9/11
Lionel Landwerlin [Sun, 25 Jun 2023 20:31:39 +0000 (23:31 +0300)]
isl: disallow TileYs/Yf on 3D storage images on Gfx9/11

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: add a usage flag to request 2D/3D compatible views
Lionel Landwerlin [Fri, 23 Jun 2023 21:47:25 +0000 (00:47 +0300)]
isl: add a usage flag to request 2D/3D compatible views

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: disable Yf/Ys/Tile64 tilings for 1D images
Lionel Landwerlin [Tue, 8 Aug 2023 11:14:02 +0000 (14:14 +0300)]
isl: disable Yf/Ys/Tile64 tilings for 1D images

The ICL+ PRMs show that this is not a supported thing anymore for
Ys/Yf and there isn't really much use for it in Vulkan/Sparse.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Disallow Yf, Ys and Tile64 for 3D depth/stencil surfaces
Lionel Landwerlin [Fri, 12 Oct 2018 17:17:02 +0000 (12:17 -0500)]
intel/isl: Disallow Yf, Ys and Tile64 for 3D depth/stencil surfaces

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Implement correct tile size calculations for Ys/Yf
Jason Ekstrand [Thu, 22 Feb 2018 00:04:32 +0000 (16:04 -0800)]
intel/isl: Implement correct tile size calculations for Ys/Yf

The tile size calculations use a clever bit of math to make them short
and simple.  We add unit tests to assert that they identically match the
tables in the PRM.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Add ICL variants of Yf and Ys tiling
Jason Ekstrand [Wed, 7 Mar 2018 05:04:50 +0000 (21:04 -0800)]
intel/isl: Add ICL variants of Yf and Ys tiling

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel/isl: Rename ISL_TILING_Yf/s to ISL_TILING_SKL_Yf/s
Jason Ekstrand [Wed, 7 Mar 2018 04:50:44 +0000 (20:50 -0800)]
intel/isl: Rename ISL_TILING_Yf/s to ISL_TILING_SKL_Yf/s

The Yf and Ys tilings change a bit between SKL and later generations so
we have to be able to distinguish between them.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoisl: program 3DSTATE_HIER_DEPTH_BUFFER_BODY::TiledMode as documented
Lionel Landwerlin [Mon, 19 Jun 2023 13:38:24 +0000 (16:38 +0300)]
isl: program 3DSTATE_HIER_DEPTH_BUFFER_BODY::TiledMode as documented

Since this value is 0, it doesn't change anything, but it's just good
practice like we did for Gfx12.5 right above.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agogenxml/gfx12: rename Tiled Resource Mode
Lionel Landwerlin [Mon, 19 Jun 2023 13:37:42 +0000 (16:37 +0300)]
genxml/gfx12: rename Tiled Resource Mode

To match documentation.

BSpec 46965

TGL PRMs, Volume 2d: Command Reference: Structures, 3DSTATE_HIER_DEPTH_BUFFER_BODY

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agogenxml/gfx11: remove Tiled Resource Mode field from HIER_DEPTH_BUFFER
Lionel Landwerlin [Mon, 19 Jun 2023 13:36:58 +0000 (16:36 +0300)]
genxml/gfx11: remove Tiled Resource Mode field from HIER_DEPTH_BUFFER

This field doesn't exist according to documentation. Only a MBZ.

BSpec 6511

ICL PRMs, Volume 2a - Command Reference: Instructions (Command
Opcodes) 3DSTATE_HIER_DEPTH_BUFFER

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agoanv: add missing ISL storage usage
Lionel Landwerlin [Mon, 26 Jun 2023 07:09:50 +0000 (10:09 +0300)]
anv: add missing ISL storage usage

ISL makes a bunch of decision on programming (MOCS,
RENDER_SURFACE_STATE values) based on this flag. It's important to set
it if we're going to use an image as storage.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23620>

14 months agointel: Allow using intel_clc from the system
Matt Turner [Thu, 31 Aug 2023 17:16:29 +0000 (13:16 -0400)]
intel: Allow using intel_clc from the system

With -Dintel-clc=system, the build system will search for an `intel_clc`
binary and use it instead of building `intel_clc` itself.

This allows Intel Vulkan ray tracing support to be built when cross
compiling without terrible hacks (that would otherwise be necessary due
to `intel_clc`'s dependence on SPIRV-LLVM-Translator, libclc, clang, and
LLVM).

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

14 months agorusticl/memory: do not verify pitch for IMAGE1D_BUFFER
Karol Herbst [Fri, 1 Sep 2023 10:49:59 +0000 (12:49 +0200)]
rusticl/memory: do not verify pitch for IMAGE1D_BUFFER

Devices might report an image_pitch_alignment of 0 leading to a division
by 0 trap.

Fixes: 06daa03c5cd ("rusticl: Implement spec for cl_khr_image2d_from_buffer")
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24993>

14 months agoci/amd: split the polaris10 rules into one for each farm
Eric Engestrom [Fri, 1 Sep 2023 13:52:31 +0000 (14:52 +0100)]
ci/amd: split the polaris10 rules into one for each farm

There is now one polaris10 in each farm, so we need two rules for which
one to use.

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

14 months agointel: allow reduced memory usage for INTEL_MEASURE
Mark Janes [Thu, 24 Aug 2023 00:24:34 +0000 (17:24 -0700)]
intel: allow reduced memory usage for INTEL_MEASURE

The default batch size was increased to support large numbers of
INTEL_MEASURE snapshots for complex workloads.  Some titles create
large numbers of small secondary command buffers, and quickly exhaust
memory.  An example of this is Dota2, where INTEL_MEASURE increases
the memory usage by a factor of 20.

Allow the user to specify smaller batch sizes and buffer sizes.

Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24860>

14 months agoaco: use v_cvt_f32_ubyte for signed casts too
Georg Lehmann [Fri, 25 Aug 2023 17:23:14 +0000 (19:23 +0200)]
aco: use v_cvt_f32_ubyte for signed casts too

The extract is always positive, so signed vs unsigned conversion doesn't matter.

Foz-DB GFX11:
Totals from 167 (0.13% of 133461) affected shaders:
Instrs: 401631 -> 401225 (-0.10%)
CodeSize: 2107256 -> 2104344 (-0.14%)
VGPRs: 13320 -> 13332 (+0.09%)
Latency: 6468063 -> 6467241 (-0.01%)
InvThroughput: 801854 -> 801653 (-0.03%)
Copies: 13926 -> 13927 (+0.01%); split: -0.08%, +0.09%

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

14 months agoanv: Initialize the clear color more often for FCV
Nanley Chery [Wed, 23 Aug 2023 14:30:33 +0000 (10:30 -0400)]
anv: Initialize the clear color more often for FCV

Instead of only initializing the clear color when the first subresource
is accessed, initialize it for every FCV-enabled subresource. This is
needed because writes to any subresource may be converted to fast
clears.

Now that init_fast_clear_color is called for every subresource, we take
care not to stomp on the fast-clear-tracking state of the first
subresource by moving the code which updates it outside of
init_fast_clear_color.

Now init_fast_clear_color does just what it says: initializes the fast
clear color.

This fixes the regression introduced with commit 57445adc891,
("anv: Re-enable CCS_E on TGL+").

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8461
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24857>

14 months agoradv/ci: re-enable vkcts-polaris10-valve
Samuel Pitoiset [Thu, 31 Aug 2023 10:26:33 +0000 (12:26 +0200)]
radv/ci: re-enable vkcts-polaris10-valve

This was disabled a long time ago because of unknown GPU hangs during
boot but it seems stable again for some reasons.

This also bumps the job timeouts to make sure it will be able to finish.

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

14 months agorusticl/queue: properly implement clCreateCommandQueueWithProperties
Karol Herbst [Fri, 1 Sep 2023 09:10:28 +0000 (11:10 +0200)]
rusticl/queue: properly implement clCreateCommandQueueWithProperties

It didn't do any of the error checking, but it was supposed to be. Also
the error checking was slightly wrong and we should return
CL_INVALID_QUEUE_PROPERTIES instead of CL_INVALID_VALUE for unsupported
properties.

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

14 months agozink/ci: add zink-radv-polaris10-valve
Samuel Pitoiset [Thu, 31 Aug 2023 14:35:21 +0000 (16:35 +0200)]
zink/ci: add zink-radv-polaris10-valve

This introduces Zink/RADV testing on Polaris10!

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

14 months agomeson: Move video to separate section in meson configuration summary
Feng Jiang [Thu, 10 Aug 2023 02:53:47 +0000 (10:53 +0800)]
meson: Move video to separate section in meson configuration summary

Since the video configuration is shared by multiple video APIs, not
just vulkan, move it to a separate section.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24598>