platform/upstream/mesa.git
2 years agov3dv: rework Vulkan 1.2 feature queries
Iago Toral Quiroga [Tue, 25 Jan 2022 11:49:44 +0000 (12:49 +0100)]
v3dv: rework Vulkan 1.2 feature queries

Fill them into a VkPhysicalDeviceVulkan12Features struct like we
do for Vulkan 1.1, and then read them from there.

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

2 years agov3dv: implement VK_KHR_imageless_framebuffer
Iago Toral Quiroga [Mon, 24 Jan 2022 12:38:08 +0000 (13:38 +0100)]
v3dv: implement VK_KHR_imageless_framebuffer

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14704>

2 years agov3dv: drop signature of undefined function
Iago Toral Quiroga [Mon, 24 Jan 2022 13:26:28 +0000 (14:26 +0100)]
v3dv: drop signature of undefined function

This is a left over from when we added multi-version support in the
driver, where we turned this helper into a versioned scheme.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14704>

2 years agoci/traces: Always generate the junit XML.
Emma Anholt [Wed, 12 Jan 2022 19:27:03 +0000 (11:27 -0800)]
ci/traces: Always generate the junit XML.

While it's not the primary interface to interpreting trace job failures,
it was set in all the traces jobs it looks like and it's low cost anyway.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/traces: Drop PIGLIT_REPLAY_UPLOAD_TO_MINIO.
Emma Anholt [Wed, 12 Jan 2022 19:24:44 +0000 (11:24 -0800)]
ci/traces: Drop PIGLIT_REPLAY_UPLOAD_TO_MINIO.

You have to do this as part of the traces workflow, otherwise there are no
baseline images for your driver to compare to in the HTML summary.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/traces: Drop the baseline file creation for trace results.
Emma Anholt [Wed, 12 Jan 2022 19:19:39 +0000 (11:19 -0800)]
ci/traces: Drop the baseline file creation for trace results.

It's always empty for traces.  This reduces more noise in the job logs so
people are more likely to see the link to the HTML.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/traces: Clean up the failure report message.
Emma Anholt [Wed, 12 Jan 2022 19:13:12 +0000 (11:13 -0800)]
ci/traces: Clean up the failure report message.

You really want to be reviewing the HTML summary with image diffs, not the
junit XML (though we do still generate it so you get the results in the
gitlab UI if that's how you like to interact with it).

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/traces: Drop the PIGLIT_PROFILES setting for traces replay.
Emma Anholt [Wed, 12 Jan 2022 19:06:08 +0000 (11:06 -0800)]
ci/traces: Drop the PIGLIT_PROFILES setting for traces replay.

Now that the script just does traces, no need to conditionalize this
stuff.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/traces: Rename the piglit/run.sh script to piglit-traces.sh.
Emma Anholt [Wed, 12 Jan 2022 18:59:08 +0000 (10:59 -0800)]
ci/traces: Rename the piglit/run.sh script to piglit-traces.sh.

That's the only use of this script that's left.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/llvmpipe,softpipe: Switch piglit testing to piglit-runner.
Emma Anholt [Wed, 12 Jan 2022 17:54:44 +0000 (09:54 -0800)]
ci/llvmpipe,softpipe: Switch piglit testing to piglit-runner.

The new runner reduces the runtime by about 1/3 thanks to using rust
instead of python, and includes automatic flake handling so you don't just
have to skip flaky tests.  The wrapper script also includes IRC flake
reporting (so one can track and update the flakes list to improve CI
reliability), always uploading results to CI for review (so you can
diagnose flakes and look at timings), has a prettier regressions report
and a helpful timing report, and is the same as what's used by all the HW
runners as well.

The downside is that by dropping the massive list of skips, you no longer
get flagged if Mesa refactors end up accidentally disabling extensions and
thus making tests skip.  For that, I've started on
https://gitlab.freedesktop.org/anholt/deqp-runner/-/merge_requests/33 so
that hardware drivers get extension checking coverage too.

Thanks to the perf improvement, we get to drop one of the jobs for
llvmpipe.

xfail lists were mostly sed-jobs from the prior expectations lists.  The
exceptions to that you'll find in the form of whitespace around the
affected test group (usually changes of capitalization or
special-characters), or an explanation for the more interesting changes
(which thankfully we can now record in the xfails lists!).

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoci/llvmpipe: Drop the skip of piglit edgeflag test.
Emma Anholt [Wed, 12 Jan 2022 18:35:45 +0000 (10:35 -0800)]
ci/llvmpipe: Drop the skip of piglit edgeflag test.

I think the fail was fixed by 39ea95330fb5 ("mesa: ensure parameter list
capacity before associating uniform storage"), it doesn't reproduce for me
any more.

Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14604>

2 years agoRevert "ci: freedreno: Update a530 dEQP fail expectation list"
Emma Anholt [Wed, 26 Jan 2022 16:52:14 +0000 (08:52 -0800)]
Revert "ci: freedreno: Update a530 dEQP fail expectation list"

This reverts commit a35c5540e4241cb4473f5cc9cb1a53bdeee85ada.  Another
patch doing so had already landed, so 530 was now failing all its (manual)
tests.

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

2 years agofreedreno: Add missing generated header dependency
Rob Clark [Wed, 26 Jan 2022 17:34:48 +0000 (09:34 -0800)]
freedreno: Add missing generated header dependency

Fixes:

  In file included from ../mesa-freedreno-22.0.0_pre/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c:45:
  In file included from ../mesa-freedreno-22.0.0_pre/src/gallium/drivers/freedreno/ir3/ir3_gallium.h:34:
  In file included from ../mesa-freedreno-22.0.0_pre/src/gallium/drivers/freedreno/freedreno_util.h:31:
  ../mesa-freedreno-22.0.0_pre/src/freedreno/drm/freedreno_ringbuffer.h:35:10: fatal error: 'adreno_common.xml.h' file not found
  #include "adreno_common.xml.h"
           ^~~~~~~~~~~~~~~~~~~~~
  1 error generated.

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

2 years agodri_interface: Remove the remaining DRI1 API definitions
Adam Jackson [Wed, 26 Jan 2022 19:10:34 +0000 (14:10 -0500)]
dri_interface: Remove the remaining DRI1 API definitions

None of these are used anymore, and as a bonus we can drop the dance
around the libdrm headers.

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

2 years agoanv: Re-enable CCS_E on TGL+
Nanley Chery [Tue, 25 Jan 2022 17:19:33 +0000 (12:19 -0500)]
anv: Re-enable CCS_E on TGL+

Commit e6147895885 ("anv: Also disallow CCS_E for multi-LOD images")
accidentally disabled CCS_E on TGL+ because it checked for
image->vk.mip_levels > 0 instead of image->vk.mip_levels > 1.

Instead of reverting it, we remove the code which disables CCS_E for
mipmapped or arrayed images now that we've sufficiently handled the
clear color issue in other ways.

Fixes: e6147895885 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>

2 years agoanv: Use ANV_FAST_CLEAR_DEFAULT_VALUE for CCS on TGL+
Nanley Chery [Tue, 25 Jan 2022 21:33:26 +0000 (16:33 -0500)]
anv: Use ANV_FAST_CLEAR_DEFAULT_VALUE for CCS on TGL+

On TGL, if a block of fragment shader outputs match the surface's clear
color, the HW may convert them to fast-clears (see HSD 14010672564).
This can lead to rendering corruptions if not handled properly. We
restrict the clear color to zero to avoid issues that can occur with:

   - Texture view rendering (including blorp_copy calls)
   - Images with multiple levels or array layers

Fixes: e6147895885 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>

2 years agoanv: Disable CCS_E for some 8/16bpp copies on TGL+
Nanley Chery [Mon, 24 Jan 2022 23:53:37 +0000 (18:53 -0500)]
anv: Disable CCS_E for some 8/16bpp copies on TGL+

CCS_E is currently disabled on TGL+, but we'll enable it soon. We choose
to explicitly disable it for certain copy operations to avoid CTS
failures in the following groups:

- dEQP-VK.drm_format_modifiers.export_import.*
- dEQP-VK.synchronization*

Fixes: e6147895885 ("anv: Also disallow CCS_E for multi-LOD images")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14723>

2 years agoanv: Drop assert against modifier with aux on gfx12
Nanley Chery [Mon, 24 Jan 2022 23:54:17 +0000 (18:54 -0500)]
anv: Drop assert against modifier with aux on gfx12

Commit b664349973b ("anv: Enable implicit CCS for external images")
introduced support for implicit CCS with I915_FORMAT_MOD_Y_TILED.

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

2 years agodocs: use http-redirect when possible
Erik Faye-Lund [Sat, 1 Jan 2022 13:03:53 +0000 (14:03 +0100)]
docs: use http-redirect when possible

GitLab Pages has added a feature to do proper HTTP redirects, which
are genreally better than the HTML redirects we currently use.

Unfortunately, it doesn't support redirecting to other domains, all
paths must start with a slash. So there's sadly *one* redirect this
doesn't work for. So let's leave that one using a HTML redirect, and
use HTTP redirects when we can.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14369>

2 years agosoftpipe: Dispatch 4 CS invocations per tgsi_exec thread.
Emma Anholt [Wed, 26 Jan 2022 05:31:06 +0000 (21:31 -0800)]
softpipe: Dispatch 4 CS invocations per tgsi_exec thread.

We were executing 1 non-helper invocation and 3 helpers per CS tgsi_exec
machine, which was a total waste of the CPU when we could trivially have
all 4 invocations do real work (at least in the common case of a
gl_WorkGroupSize.x >= 4).

This didn't have the effect on dEQP that I was hoping for, as it turns out
that its shaders are almost all 1x1x1 workgroups.  However, it does reduce
the runtime of piglit arb_compute_shader-local-id from 2:10 to 47 seconds
on my system.

Part of #4097

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

2 years agosoftpipe: Initialize the CS dispatch mask at machine setup time.
Emma Anholt [Wed, 26 Jan 2022 05:29:40 +0000 (21:29 -0800)]
softpipe: Initialize the CS dispatch mask at machine setup time.

It's not modified later, so no need to reset it per barrier or per
workgroup.

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

2 years agosoftpipe: Improve some local var naming in compute shaders.
Emma Anholt [Wed, 26 Jan 2022 05:19:05 +0000 (21:19 -0800)]
softpipe: Improve some local var naming in compute shaders.

These aren't dimensions, they're gl_LocalInvocationID.xyz.

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

2 years agotgsi_exec: Fix shared var stores for >1 real invocation, and overflow checks.
Emma Anholt [Wed, 26 Jan 2022 05:48:44 +0000 (21:48 -0800)]
tgsi_exec: Fix shared var stores for >1 real invocation, and overflow checks.

The shared var store overflow checks left a lot of overflowing
opportunities available, while the buffer storage path did proper
checking.  But, more importantly for this branch, it always used the first
invocation's offset for each invocation in the quad (which only worked so
far because softpipe only dispatched a single non-helper invocation
per quad).

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

2 years agoturnip: fix leaks of submit requests.
Hyunjun Ko [Wed, 26 Jan 2022 03:04:40 +0000 (03:04 +0000)]
turnip: fix leaks of submit requests.

Fixes: 479a1c40 ("turnip: Porting to common vulkan implementation for synchronization.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14727>

2 years agozink: return 256 for PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT
Mike Blumenkrantz [Tue, 25 Jan 2022 18:47:12 +0000 (13:47 -0500)]
zink: return 256 for PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT

this isn't the minimum allowed by the driver, but zink doesn't return
the minimum allowed by the driver anyway and hasn't in a very long time

instead, it suballocates using a minimum alignment of 256 bytes, so use
that instead

fixes (in caselists):
KHR-GL46.map_buffer_alignment.functional

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

2 years agozink: fix unused variable warning
Michel Zou [Wed, 26 Jan 2022 19:54:28 +0000 (20:54 +0100)]
zink: fix unused variable warning

fixes: 4ed30be3

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

2 years agodocs/release-calendar: add another 21.3.x since 22.0 has been delayed a bit
Eric Engestrom [Wed, 26 Jan 2022 18:47:30 +0000 (18:47 +0000)]
docs/release-calendar: add another 21.3.x since 22.0 has been delayed a bit

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

2 years agodocs: update calendar and link releases notes for 21.3.5
Eric Engestrom [Wed, 26 Jan 2022 18:39:08 +0000 (18:39 +0000)]
docs: update calendar and link releases notes for 21.3.5

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

2 years agodocs: add release notes for 21.3.5
Eric Engestrom [Wed, 26 Jan 2022 18:36:17 +0000 (18:36 +0000)]
docs: add release notes for 21.3.5

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

2 years ago.mailmap: Switch Jason Ekstrand to @collabora.com
Jason Ekstrand [Mon, 17 Jan 2022 15:42:50 +0000 (09:42 -0600)]
.mailmap: Switch Jason Ekstrand to @collabora.com

Jason is starting at Collabora on the 24th.  More details at
https://www.jlekstrand.net/jason/blog/2022/01/hello-collabora/

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14586>

2 years agotu: VkExternalImageFormatProperties is optional
Yiwei Zhang [Wed, 26 Jan 2022 07:53:59 +0000 (07:53 +0000)]
tu: VkExternalImageFormatProperties is optional

..even if external image info has valid external handles.

Fixes: 26380b3a9f8 ("turnip: Add driver skeleton (v2)")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14730>

2 years agoradeon/vcn: Updating render_pic_list for correction
Ruijing Dong [Mon, 24 Jan 2022 18:00:32 +0000 (13:00 -0500)]
radeon/vcn: Updating render_pic_list for correction

In order to keep track of reference frame buffer address changing,
using past_ref to compare with render_pic_list, once the one in
past_ref is valid and if render_pic_list has that entry, it will
need to update it to the latest one in ref[i].

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

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

2 years agofrontend/va: Keep surface buf addr before reallocation
Ruijing Dong [Mon, 24 Jan 2022 17:42:58 +0000 (12:42 -0500)]
frontend/va: Keep surface buf addr before reallocation

The reference buffer address is used as the indication in h264 DPB
Tier2, when reference buffer was reallocated, h264 DPB would lose
track of that reference picture. Adding a pointer obsolete_buf in
vlVaSurface data structure for tracking this released buffer, also
in h264_picture_desc adding a private field, which contains
past_ref[16] for tracking previously released buffer vs current
buffer for reference frames.

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

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

2 years agozink: reorder fbfetch flag-setting to avoid null deref
Mike Blumenkrantz [Tue, 25 Jan 2022 16:25:24 +0000 (11:25 -0500)]
zink: reorder fbfetch flag-setting to avoid null deref

this avoids dereferencing pg->dd which is allocated a few lines later

Fixes: 417477f60ed ("zink: always use lazy (non-push) updating for fbfetch descriptors")

fixes (radv):
dEQP-GLES31.functional.blend_equation_advanced.basic.multiply

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

2 years agoradv: fix optimized MSAA copies with suballocated images
Rhys Perry [Mon, 24 Jan 2022 20:05:37 +0000 (20:05 +0000)]
radv: fix optimized MSAA copies with suballocated images

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: deb4685df39 ("radv: implement optimized MSAA copies using FMASK")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5829
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14705>

2 years agozink: handle bogus xfb draws
Mike Blumenkrantz [Tue, 18 Jan 2022 22:39:05 +0000 (17:39 -0500)]
zink: handle bogus xfb draws

drawing unpopulated xfb data is legal(?) and tested in cts, and the correct
operation is to just drop the draw, so do that here

fixes (nvidia):
GTF-GL46.gtf40.GL3Tests.transform_feedback2.transform_feedback2_api

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

2 years agoanv: Enable VK_KHR_dynamic_rendering
IvƔn Briano [Thu, 4 Nov 2021 19:19:07 +0000 (12:19 -0700)]
anv: Enable VK_KHR_dynamic_rendering

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

2 years agoanv: implement the meat of VK_KHR_dynamic_rendering
IvƔn Briano [Thu, 4 Nov 2021 19:33:05 +0000 (12:33 -0700)]
anv: implement the meat of VK_KHR_dynamic_rendering

Includes a fake framebuffer allocation that's necessary for the code we
still use from the regular render passes.

v3: (Lionel)
- Reuse the attachment count from the faux render pass, remove now
  unused function
- Add a cmd_buffer_end_rendering function to match begin_rendering,
  making use of the split stuff from end_subpass

v4: (Lionel)
- Don't bother with mark_images_writen or resolves on suspend case
- Remove flush at the end of end_rendering, it's not needed

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

2 years agoanv: split end_subpass into more discrete components
IvƔn Briano [Mon, 8 Nov 2021 21:10:00 +0000 (13:10 -0800)]
anv: split end_subpass into more discrete components

v3: Split cmd_buffer_end_subpass instead of doing parts conditionally (Lionel)

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

2 years agoanv: Split attachment clearing code into their own functions
IvƔn Briano [Tue, 9 Nov 2021 00:32:31 +0000 (16:32 -0800)]
anv: Split attachment clearing code into their own functions

v3: Avoid recalculating parameters the caller already had (Lionel)

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

2 years agoanv: allocate fake render pass for continuation command buffers
IvƔn Briano [Thu, 4 Nov 2021 19:30:20 +0000 (12:30 -0700)]
anv: allocate fake render pass for continuation command buffers

v4: Assert if there's no VkCommandBufferInheritanceRenderingInfoKHR (Lionel)

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

2 years agoanv: Split out state attachments allocation
IvƔn Briano [Mon, 8 Nov 2021 19:32:37 +0000 (11:32 -0800)]
anv: Split out state attachments allocation

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

2 years agoanv: allocate fake render pass on pipeline creation
IvƔn Briano [Thu, 4 Nov 2021 19:29:09 +0000 (12:29 -0700)]
anv: allocate fake render pass on pipeline creation

v3: (Lionel)
- Handle VkPipelineRenderingCreateInfoKHR not being present
- Rename dynamic_pass and set it for regular render passes too

v4: C99 is good (Lionel)

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

2 years agoanv: add functions to set up fake render passes
IvƔn Briano [Thu, 4 Nov 2021 19:26:26 +0000 (12:26 -0700)]
anv: add functions to set up fake render passes

There's two of them because they can be created from three points in the
code that provide different details and this is the least ugly way I
could think of for now.

v2: Avoid allocations (Lionel)

v3: Move definition closer to its usage (Lionel)

v4: (Lionel)
 - Simplify anv_dynamic_pass_init_full
 - Zero out pass/subpass to avoid stall pointers

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

2 years agoanv: Remove unused struct member
IvƔn Briano [Tue, 9 Nov 2021 00:00:11 +0000 (16:00 -0800)]
anv: Remove unused struct member

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

2 years agoanv/pass: Don't set first_subpass_layout for stencil-only attachments
Jason Ekstrand [Tue, 26 Oct 2021 17:38:18 +0000 (12:38 -0500)]
anv/pass: Don't set first_subpass_layout for stencil-only attachments

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

2 years agopanfrost: Remove NO_BLEND_PACKS quirk
Alyssa Rosenzweig [Tue, 25 Jan 2022 23:10:10 +0000 (18:10 -0500)]
panfrost: Remove NO_BLEND_PACKS quirk

Now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Simplify format class selection
Alyssa Rosenzweig [Tue, 25 Jan 2022 23:08:55 +0000 (18:08 -0500)]
panfrost: Simplify format class selection

This was made way more complicated than it needs to be for a Midgard-only pass.
The only caller doesn't care about the class, only if it's native or not.
Simplify it appropriately.

It really isn't that hard.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Don't set NO_BLEND_PACKS on Bifrost
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:58:14 +0000 (17:58 -0500)]
panfrost: Don't set NO_BLEND_PACKS on Bifrost

It doesn't make sense on Bifrost -- the only consumer of the quirk is
pan_lower_framebuffer, a Midgard-only pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Remove MIDGARD_{NO_TYPED_BLEND_STORES,MISSING_LOADS}
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:56:33 +0000 (17:56 -0500)]
panfrost: Remove MIDGARD_{NO_TYPED_BLEND_STORES,MISSING_LOADS}

These "quirks" are common for Midgard, yet are only consumed by
pan_lower_framebuffer -- a Midgard-only pass. So the quirks should be removed
and inlined into their users. Thid removes MIDGARD_QUIRKS altogether.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Remove NO_TILE_ENABLE_MAP quirk
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:51:48 +0000 (17:51 -0500)]
panfrost: Remove NO_TILE_ENABLE_MAP quirk

Function of architecture. Add a comment to the sole consumer of the quirk bit
about why it's used.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Remove MIDGARD_BROKEN_FP16 quirk
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:49:54 +0000 (17:49 -0500)]
panfrost: Remove MIDGARD_BROKEN_FP16 quirk

Unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Remove MIDGARD_SFBD quirk
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:49:08 +0000 (17:49 -0500)]
panfrost: Remove MIDGARD_SFBD quirk

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agopanfrost: Remove HAS_SWIZZLES quirk
Alyssa Rosenzweig [Tue, 25 Jan 2022 22:46:40 +0000 (17:46 -0500)]
panfrost: Remove HAS_SWIZZLES quirk

It's a function of the major arch.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14724>

2 years agod3d12: Set caps for tesselation
Jesse Natalie [Sat, 1 Jan 2022 22:49:40 +0000 (14:49 -0800)]
d3d12: Set caps for tesselation

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Handle input clip array size in the shader key
Jesse Natalie [Thu, 6 Jan 2022 15:42:22 +0000 (07:42 -0800)]
d3d12: Handle input clip array size in the shader key

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Update varying creation logic to handle location_frac
Jesse Natalie [Wed, 5 Jan 2022 15:38:38 +0000 (07:38 -0800)]
d3d12: Update varying creation logic to handle location_frac

When multiple variables are packed into the same location, we need
to re-construct variables that read/write the same components of that
register so that the DXIL signature is correct. We could try to
merge these variables, but getting the types right sounds harder than
just preserving the multiple individual variables.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Add a state variable for patch_vertices_in
Jesse Natalie [Thu, 6 Jan 2022 00:07:51 +0000 (16:07 -0800)]
d3d12: Add a state variable for patch_vertices_in

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Handle passthrough TCS in the case where eval is bound
Jesse Natalie [Mon, 3 Jan 2022 20:49:28 +0000 (12:49 -0800)]
d3d12: Handle passthrough TCS in the case where eval is bound

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Handle patch_vertices and patch topology
Jesse Natalie [Sun, 2 Jan 2022 23:21:55 +0000 (15:21 -0800)]
d3d12: Handle patch_vertices and patch topology

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Link tesselation control and eval shaders
Jesse Natalie [Sun, 2 Jan 2022 21:03:32 +0000 (13:03 -0800)]
d3d12: Link tesselation control and eval shaders

GLSL puts a bunch of tessellation info in the eval shaders, because
passthrough control shaders can exist. D3D12 puts it in the control
(hull) shader instead. So, when specializing, copy info from domain
to hull. For initial compiles (no domain shader), just make something
up.

D3D12 also requires the domain and hull shaders to have identical
patch constant signatures. Use the existing infrastructure and extend
it to also propagate patch constants. Notably, patch constant locations
are outside of the 64-bit range value so they require a separate pass
to avoid shifts larger than 64.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Initial plumbing for tesselation
Jesse Natalie [Sat, 1 Jan 2022 22:49:28 +0000 (14:49 -0800)]
d3d12: Initial plumbing for tesselation

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agod3d12: Enable PIPE_CAP_TGSI_TEXCOORD
Jesse Natalie [Thu, 6 Jan 2022 17:03:18 +0000 (09:03 -0800)]
d3d12: Enable PIPE_CAP_TGSI_TEXCOORD

This is required to be able to use the necessary number of varyings,
otherwise we hit asserts because mesa/st starts assigning varyings
locations above 64 due to the +9 reserving these texcoords.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Handle clip/cull distance as an input to tess shaders
Jesse Natalie [Thu, 6 Jan 2022 15:40:24 +0000 (07:40 -0800)]
microsoft/compiler: Handle clip/cull distance as an input to tess shaders

In order to get the semantics right, we need to know how many of the clip/
cull fields are designated for which purpose. In the case of a shader that
can receive these fields as both input and output, the shader_info property
is reserved to store the output info. We could add a dedicated input field
to shader_info, but since it'd probably only be useful for us, just send
it through a side channel during shader linking.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Location_frac needs to be included in sort order
Jesse Natalie [Wed, 5 Jan 2022 15:40:49 +0000 (07:40 -0800)]
microsoft/compiler: Location_frac needs to be included in sort order

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Primitive ID should only be added as a sysval in geometry shaders
Jesse Natalie [Mon, 3 Jan 2022 22:47:35 +0000 (14:47 -0800)]
microsoft/compiler: Primitive ID should only be added as a sysval in geometry shaders

Docs say that its presence in signatures as a "shadow" element (meaning it's not
accessed via load/store, but with a dedicated opcode) is legacy. It seems it
wasn't carried forward when HS/DS were added in D3D11.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Emit DS PSV validation and entrypoint metadata
Jesse Natalie [Mon, 3 Jan 2022 17:04:03 +0000 (09:04 -0800)]
microsoft/compiler: Emit DS PSV validation and entrypoint metadata

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Handle domain location intrinsic
Jesse Natalie [Sun, 2 Jan 2022 23:23:06 +0000 (15:23 -0800)]
microsoft/compiler: Handle domain location intrinsic

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Handle load_output in the HS stage as reading a previously writte...
Jesse Natalie [Tue, 4 Jan 2022 16:39:26 +0000 (08:39 -0800)]
microsoft/compiler: Handle load_output in the HS stage as reading a previously written patch constant

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Handle load_per_vertex_output as LoadOutputControlPoint
Jesse Natalie [Tue, 4 Jan 2022 00:15:12 +0000 (16:15 -0800)]
microsoft/compiler: Handle load_per_vertex_output as LoadOutputControlPoint

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: For load_input from DS, use loadPatchConstant
Jesse Natalie [Mon, 3 Jan 2022 21:35:39 +0000 (13:35 -0800)]
microsoft/compiler: For load_input from DS, use loadPatchConstant

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: For store_output from HS, use storePatchConstant
Jesse Natalie [Sun, 2 Jan 2022 17:56:08 +0000 (09:56 -0800)]
microsoft/compiler: For store_output from HS, use storePatchConstant

In HS, store_per_vertex_output maps to storeOutput in DXIL. The data
that isn't per-vertex is patch constants.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Add a pass for hull and domain shaders to shrink tess level vars
Jesse Natalie [Mon, 3 Jan 2022 13:51:36 +0000 (05:51 -0800)]
microsoft/compiler: Add a pass for hull and domain shaders to shrink tess level vars

DXIL validation will complain if the tess factor signature entries have the
wrong number of components for the shader's domain. Make sure that both
hull and domain shaders have the right number, and drop loads and stores
from the removed components.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Add patch constant signature into PSV and as container blob
Jesse Natalie [Mon, 3 Jan 2022 14:08:35 +0000 (06:08 -0800)]
microsoft/compiler: Add patch constant signature into PSV and as container blob

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Gather patch const signature and handle tess factor in it
Jesse Natalie [Mon, 3 Jan 2022 14:01:14 +0000 (06:01 -0800)]
microsoft/compiler: Gather patch const signature and handle tess factor in it

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: When sorting patch varyings, adjust location to be in normal...
Jesse Natalie [Mon, 3 Jan 2022 21:33:53 +0000 (13:33 -0800)]
microsoft/compiler: When sorting patch varyings, adjust location to be in normal varying range

This way, patch varyings come before the patch sysvals (tess levels).

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Overlap patch and non-patch varyings so both are separately 0...
Jesse Natalie [Sun, 2 Jan 2022 18:15:58 +0000 (10:15 -0800)]
microsoft/compiler: Overlap patch and non-patch varyings so both are separately 0-indexed

Also add tess factors to the list of sysvals that can cause vars to be sorted last.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Fix I/O signatures for tess shaders
Jesse Natalie [Mon, 3 Jan 2022 13:45:48 +0000 (05:45 -0800)]
microsoft/compiler: Fix I/O signatures for tess shaders

- Skip patch variables, those go into a separate patch constant signature
- Use nir_is_arrayed_io and only strip one level of array when it's true

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Emit HS PSV validation and entrypoint metadata
Jesse Natalie [Mon, 3 Jan 2022 14:20:25 +0000 (06:20 -0800)]
microsoft/compiler: Emit HS PSV validation and entrypoint metadata

Note that this requires the shader info "tess" data to be correct.
For GLSL tess control shaders, only the output primitive count is
automatically available. The rest will need to be either guessed
or filled in from a matching tess eval (domain) shader. This is handled
by the d3d12 driver in a later patch.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Delete misleading TODO comments about semantic table
Jesse Natalie [Sun, 2 Jan 2022 19:56:09 +0000 (11:56 -0800)]
microsoft/compiler: Delete misleading TODO comments about semantic table

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
We've been writing a valid semantic table for a while now.

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

2 years agomicrosoft/compiler: Split hull (tess ctrl) shaders into main and patch constant funcs
Jesse Natalie [Sat, 1 Jan 2022 21:14:05 +0000 (13:14 -0800)]
microsoft/compiler: Split hull (tess ctrl) shaders into main and patch constant funcs

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Handle store_per_vertex_output for HS outputs
Jesse Natalie [Mon, 3 Jan 2022 13:23:48 +0000 (05:23 -0800)]
microsoft/compiler: Handle store_per_vertex_output for HS outputs

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Emit all NIR functions into the DXIL module
Jesse Natalie [Mon, 3 Jan 2022 13:17:25 +0000 (05:17 -0800)]
microsoft/compiler: Emit all NIR functions into the DXIL module

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Emit functions with actual function names
Jesse Natalie [Sun, 2 Jan 2022 00:04:47 +0000 (16:04 -0800)]
microsoft/compiler: Emit functions with actual function names

Once we start writing multiple functions, we can't keep calling all
of them "main"

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Support emitting multiple functions into a DXIL module
Jesse Natalie [Mon, 3 Jan 2022 13:13:39 +0000 (05:13 -0800)]
microsoft/compiler: Support emitting multiple functions into a DXIL module

The instruction and block lists are moved into a new "function definition"
struct, and the DXIL module tracks one at a time for adding instructions
into. The NIR side still only emits the main function here though.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Emit statically-indexed resource handles and scratch later
Jesse Natalie [Tue, 25 Jan 2022 23:20:23 +0000 (15:20 -0800)]
microsoft/compiler: Emit statically-indexed resource handles and scratch later

The resource declarations are module-wide, but the resource handles
are function-local. A future change will add multi-function support,
but requires these handles to be potentially emitted multiple times.
The alloca used for scratch is also function-local.

This is the same pattern that the DXBC to DXIL converter uses.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Fix typo in enum entry
Jesse Natalie [Tue, 25 Jan 2022 23:20:31 +0000 (15:20 -0800)]
microsoft/compiler: Fix typo in enum entry

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Add mapping from MESA_SHADER_* to DXIL_*_SHADER for tessellation
Jesse Natalie [Mon, 3 Jan 2022 12:59:36 +0000 (04:59 -0800)]
microsoft/compiler: Add mapping from MESA_SHADER_* to DXIL_*_SHADER for tessellation

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Getting a builtin function with an undeclared signature should...
Jesse Natalie [Mon, 3 Jan 2022 12:59:03 +0000 (04:59 -0800)]
microsoft/compiler: Getting a builtin function with an undeclared signature should be unreachable

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Multi-row output semantics need to write multiple never_writes_masks
Jesse Natalie [Sun, 2 Jan 2022 19:58:00 +0000 (11:58 -0800)]
microsoft/compiler: Multi-row output semantics need to write multiple never_writes_masks

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Semantic table should be de-duped for multi-row semantics too
Jesse Natalie [Sun, 2 Jan 2022 19:57:34 +0000 (11:57 -0800)]
microsoft/compiler: Semantic table should be de-duped for multi-row semantics too

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Use driver_location instead of location for inter-stage varying...
Jesse Natalie [Mon, 3 Jan 2022 17:48:12 +0000 (09:48 -0800)]
microsoft/compiler: Use driver_location instead of location for inter-stage varying index in GL

In the case of two vars being packed into the same register / location,
they'll still get unique driver_location, which is what we need.

This does require some tweaks to stream output handling, which also needs to
produce the varying index.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomicrosoft/compiler: Force integer I/O vars to use flat/constant interpolation
Jesse Natalie [Mon, 3 Jan 2022 17:47:36 +0000 (09:47 -0800)]
microsoft/compiler: Force integer I/O vars to use flat/constant interpolation

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14399>

2 years agomesa/st: refactor program translation into one file.
Dave Airlie [Tue, 25 Jan 2022 03:39:02 +0000 (13:39 +1000)]
mesa/st: refactor program translation into one file.

This moves the notify callback into the file where it's all called
from.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>

2 years agomesa/st: move program new/delete into mesa
Dave Airlie [Mon, 20 Dec 2021 06:20:48 +0000 (16:20 +1000)]
mesa/st: move program new/delete into mesa

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>

2 years agomesa/st: move st_vertex_program to gl_vertex_program in mesa
Dave Airlie [Mon, 20 Dec 2021 06:15:22 +0000 (16:15 +1000)]
mesa/st: move st_vertex_program to gl_vertex_program in mesa

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>

2 years agomesa/st: move new ati fragment shader to mesa
Dave Airlie [Mon, 20 Dec 2021 06:00:43 +0000 (16:00 +1000)]
mesa/st: move new ati fragment shader to mesa

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>

2 years agomesa/st: collapse st_program into gl_program object.
Dave Airlie [Mon, 20 Dec 2021 05:54:08 +0000 (15:54 +1000)]
mesa/st: collapse st_program into gl_program object.

Remove the subclass for this.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14700>

2 years agointel/genxml: Extend length of 3DSTATE_DEPTH_BUFFER for gfx12.5
Jordan Justen [Tue, 25 Jan 2022 07:40:07 +0000 (23:40 -0800)]
intel/genxml: Extend length of 3DSTATE_DEPTH_BUFFER for gfx12.5

The two added dwords are MBZ.

Ref: bspec 46935
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14702>

2 years agointel/genxml: Extend length of 3DSTATE_WM_HZ_OP for gfx12.5
Jordan Justen [Wed, 9 Oct 2019 10:59:16 +0000 (03:59 -0700)]
intel/genxml: Extend length of 3DSTATE_WM_HZ_OP for gfx12.5

The added dword is MBZ.

Ref: bspec 46981
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14702>