platform/upstream/mesa.git
2 years agovenus: Implement VK_EXT_extended_dynamic_state commands
Omar Akkila [Fri, 28 Jan 2022 06:21:49 +0000 (01:21 -0500)]
venus: Implement VK_EXT_extended_dynamic_state commands

This implements hooks for the following commands:

- vkCmdBindVertexBuffers2
- vkCmdSetCullMode
- vkCmdSetDepthBoundsTestEnable
- vkCmdSetDepthCompareOp
- vkCmdSetDepthTestEnable
- vkCmdSetDepthWriteEnable
- vkCmdSetFrontFace
- vkCmdSetPrimitiveTopology
- vkCmdSetScissorWithCount
- vkCmdSetStencilOp
- vkCmdSetStencilTestEnable
- vkCmdSetViewportWithCount

Signed-off-by: Omar Akkila <omar.akkila@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14866>

2 years agodocs: Update d3d12 features
Jesse Natalie [Wed, 2 Feb 2022 21:03:09 +0000 (13:03 -0800)]
docs: Update d3d12 features

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: ARB_gpu_shader_fp64
Jesse Natalie [Fri, 28 Jan 2022 19:54:15 +0000 (11:54 -0800)]
d3d12: ARB_gpu_shader_fp64

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Handle structs in TCS variants
Jesse Natalie [Wed, 2 Feb 2022 14:26:02 +0000 (06:26 -0800)]
d3d12: Handle structs in TCS variants

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Handle structs in GS variants
Jesse Natalie [Wed, 2 Feb 2022 14:23:47 +0000 (06:23 -0800)]
d3d12: Handle structs in GS variants

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Set lower full fp64 compiler options flag when needed
Jesse Natalie [Fri, 28 Jan 2022 20:55:29 +0000 (12:55 -0800)]
d3d12: Set lower full fp64 compiler options flag when needed

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Lower [de]construction of doubles via math ops into pack/unpack ops
Jesse Natalie [Fri, 28 Jan 2022 20:55:10 +0000 (12:55 -0800)]
d3d12: Lower [de]construction of doubles via math ops into pack/unpack ops

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Add int64 support
Jesse Natalie [Fri, 28 Jan 2022 23:14:04 +0000 (15:14 -0800)]
d3d12: Add int64 support

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Get OPTIONS1
Jesse Natalie [Fri, 28 Jan 2022 23:13:05 +0000 (15:13 -0800)]
d3d12: Get OPTIONS1

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Add a driver version to the screen to be used for workarounds
Jesse Natalie [Fri, 28 Jan 2022 23:12:35 +0000 (15:12 -0800)]
d3d12: Add a driver version to the screen to be used for workarounds

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Cache a modifyable copy of the nir options in d3d12_screen
Jesse Natalie [Fri, 28 Jan 2022 20:37:23 +0000 (12:37 -0800)]
d3d12: Cache a modifyable copy of the nir options in d3d12_screen

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Use the right constant for GS varying limits
Jesse Natalie [Sat, 29 Jan 2022 17:35:14 +0000 (09:35 -0800)]
d3d12: Use the right constant for GS varying limits

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Use a constant define for max anisotropy
Jesse Natalie [Tue, 1 Feb 2022 17:35:34 +0000 (09:35 -0800)]
d3d12: Use a constant define for max anisotropy

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agod3d12: Update max input, output, and varying caps
Jesse Natalie [Tue, 1 Feb 2022 17:30:11 +0000 (09:30 -0800)]
d3d12: Update max input, output, and varying caps

The simple-varyings piglit test attempts to use GL_MAX_VARYING_FLOATS
varyings, PLUS one additional vector for position (which is not used
as input to the PS). "Reserve" that additional position vector by
removing it from the max varyings and max PS inputs.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Handle structs in I/O signatures
Jesse Natalie [Wed, 2 Feb 2022 13:43:21 +0000 (05:43 -0800)]
microsoft/compiler: Handle structs in I/O signatures

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Map I/O base locations to input IDs
Jesse Natalie [Tue, 1 Feb 2022 22:37:29 +0000 (14:37 -0800)]
microsoft/compiler: Map I/O base locations to input IDs

When dealing with a vertex input that takes multiple rows, the value of
nir_intrinsic_base points to a driver-location-based index, but we need
to emit a location-based index (or more specifically, an index that
increments once per input, not once per register). Add a mapping to
the module of base -> ID.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Process signatures before the shader code
Jesse Natalie [Tue, 1 Feb 2022 22:36:32 +0000 (14:36 -0800)]
microsoft/compiler: Process signatures before the shader code

This lets us set up some metadata based on I/O vars without having
to do multiple passes over them.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Handle I/O vars larger than a vec4
Jesse Natalie [Tue, 1 Feb 2022 20:50:08 +0000 (12:50 -0800)]
microsoft/compiler: Handle I/O vars larger than a vec4

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Lower 64bit I/O to 32 and then run lower_pack
Jesse Natalie [Tue, 1 Feb 2022 20:44:38 +0000 (12:44 -0800)]
microsoft/compiler: Lower 64bit I/O to 32 and then run lower_pack

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Handle b2f64
Jesse Natalie [Fri, 28 Jan 2022 23:11:42 +0000 (15:11 -0800)]
microsoft/compiler: Handle b2f64

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Set dx11_1_double_extensions flag for dfma/ddiv
Jesse Natalie [Fri, 28 Jan 2022 21:46:58 +0000 (13:46 -0800)]
microsoft/compiler: Set dx11_1_double_extensions flag for dfma/ddiv

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Fix dxil_nir_lower_double_math_instr pass for vectors
Jesse Natalie [Fri, 28 Jan 2022 21:46:41 +0000 (13:46 -0800)]
microsoft/compiler: Fix dxil_nir_lower_double_math_instr pass for vectors

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Fix make_double and split_double to respect swizzles
Jesse Natalie [Tue, 1 Feb 2022 19:39:43 +0000 (11:39 -0800)]
microsoft/compiler: Fix make_double and split_double to respect swizzles

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Fix splitdouble struct name
Jesse Natalie [Fri, 28 Jan 2022 21:45:36 +0000 (13:45 -0800)]
microsoft/compiler: Fix splitdouble struct name

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: It's possible to have doubles without int64
Jesse Natalie [Fri, 28 Jan 2022 20:54:17 +0000 (12:54 -0800)]
microsoft/compiler: It's possible to have doubles without int64

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Add never-supported double ops to lower_doubles bitmask
Jesse Natalie [Fri, 28 Jan 2022 20:24:28 +0000 (12:24 -0800)]
microsoft/compiler: Add never-supported double ops to lower_doubles bitmask

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Only treat tess level location as special if it's a patch constant
Jesse Natalie [Wed, 2 Feb 2022 20:39:14 +0000 (12:39 -0800)]
microsoft/compiler: Only treat tess level location as special if it's a patch constant

Fixes: a550c059 ("microsoft/compiler: For load_input from DS, use loadPatchConstant")
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Only prep phis for the current function
Jesse Natalie [Wed, 2 Feb 2022 14:57:02 +0000 (06:57 -0800)]
microsoft/compiler: Only prep phis for the current function

Fixes: 41af9620 ("microsoft/compiler: Emit all NIR functions into the DXIL module")
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agomicrosoft/compiler: Lower mul_2x32_64
Jesse Natalie [Tue, 1 Feb 2022 16:23:38 +0000 (08:23 -0800)]
microsoft/compiler: Lower mul_2x32_64

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>

2 years agoci: Uprev vulkan-cts to 1.2.8.0
Emma Anholt [Fri, 12 Nov 2021 18:08:20 +0000 (10:08 -0800)]
ci: Uprev vulkan-cts to 1.2.8.0

This brings in some interesting new vulkan tests and fixes for the
spurious KHR-GL TF failures.  Also, reduces the runtime of
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36 so that it
should stop timing out.

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

2 years agollvmpipe: Disable an assertion that may not be quite right.
Emma Anholt [Wed, 17 Nov 2021 00:17:25 +0000 (16:17 -0800)]
llvmpipe: Disable an assertion that may not be quite right.

It triggered on uprevving VK-GL-CTS, and @airlied says it's tripped
apparently spuriously before.  There seems to be some interesting logic
behind it, so leave the big comment for whoever can revisit the issue some
day.

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

2 years agoci/i915: Update rendering hash for plot3d trace.
Emma Anholt [Wed, 2 Feb 2022 05:22:52 +0000 (21:22 -0800)]
ci/i915: Update rendering hash for plot3d trace.

Its rendering changed slightly at some point, but it's fine.

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

2 years agoci/freedreno: Reduce concurrency for a618 vk_full.
Emma Anholt [Thu, 3 Feb 2022 04:15:28 +0000 (20:15 -0800)]
ci/freedreno: Reduce concurrency for a618 vk_full.

This ran into OOM-kills with the CTS uprev.  Looking at caselists at the
time of fail, some had 500MB of system memory used by the CTS (mostly
spirv string codegen), plus whatever BOs were allocated, and the lazors
are only 4GB it looks like.

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

2 years agoci/turnip: Extend the full-vk-run job timeouts.
Emma Anholt [Wed, 2 Feb 2022 18:56:34 +0000 (10:56 -0800)]
ci/turnip: Extend the full-vk-run job timeouts.

Between adding features and increased test coverage, we're hitting the
1-hour job limit.  !13441 tried to increase the full run timeout for LAVA,
but by having not bumped the gitlab-ci timeout value it ended up just
letting the job keep running in LAVA after gitlab had given up on it.

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

2 years agoci/freereno: Reduce run-by-default a630-vk coverage.
Emma Anholt [Wed, 2 Feb 2022 17:51:30 +0000 (09:51 -0800)]
ci/freereno: Reduce run-by-default a630-vk coverage.

In the autotune merge, we added another 1/15th run of a configuration
knob, thinking that was small enough to be in the noise.  But actually the
main run is only 1/9th, so another 1/15th took us from nearly hitting the
job runtime target, to totally missing it.  Crank things back down to keep
MRs flowing.

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

2 years agor300: Simplify DCE by assuming all output writes are used.
Emma Anholt [Mon, 31 Jan 2022 19:45:36 +0000 (11:45 -0800)]
r300: Simplify DCE by assuming all output writes are used.

No change on shader-db.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14847>

2 years agor300: Set up shadow sampler lowering in precompiles.
Emma Anholt [Thu, 3 Feb 2022 05:08:13 +0000 (21:08 -0800)]
r300: Set up shadow sampler lowering in precompiles.

Otherwise you end up lowering all shadow samples to a MOV dst
temp[0].0000, which is pretty silly.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14847>

2 years agor300: Fix missing \n in an error message.
Emma Anholt [Mon, 31 Jan 2022 19:31:31 +0000 (11:31 -0800)]
r300: Fix missing \n in an error message.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14847>

2 years agozink: add synchronization for conditional render buffer
Mike Blumenkrantz [Thu, 27 Jan 2022 15:44:34 +0000 (10:44 -0500)]
zink: add synchronization for conditional render buffer

doesn't seem to do anything on any drivers I've tested, but maybe it's
needed somewhere

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14853>

2 years agozink: add VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT for query binds
Mike Blumenkrantz [Thu, 27 Jan 2022 15:43:33 +0000 (10:43 -0500)]
zink: add VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT for query binds

required by spec

cc: mesa-stable

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14853>

2 years agoaco: don't encode src2 for v_writelane_b32_e64
Rhys Perry [Wed, 2 Feb 2022 16:42:24 +0000 (16:42 +0000)]
aco: don't encode src2 for v_writelane_b32_e64

Encoding src2 doesn't cause issues for print_asm() because we have a
workaround there, but it does for RGP and it seems the developers are not
interested in fixing it.

https://github.com/GPUOpen-Tools/radeon_gpu_profiler/issues/61

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14832>

2 years agoaco: add test for optimizations with casts
Rhys Perry [Mon, 31 Jan 2022 18:13:07 +0000 (18:13 +0000)]
aco: add test for optimizations with casts

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

2 years agoaco: fix neg(mul)/abs(mul) optimization with different bit-size
Rhys Perry [Mon, 31 Jan 2022 18:28:59 +0000 (18:28 +0000)]
aco: fix neg(mul)/abs(mul) optimization with different bit-size

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

2 years agoaco: don't combine add/mul of different bit-size
Rhys Perry [Mon, 31 Jan 2022 18:22:58 +0000 (18:22 +0000)]
aco: don't combine add/mul of different bit-size

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

2 years agoaco: don't apply omod/clamp of different bit-size
Rhys Perry [Mon, 31 Jan 2022 18:12:59 +0000 (18:12 +0000)]
aco: don't apply omod/clamp of different bit-size

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

2 years agoaco: don't combine fneg/fabs of different bit-size
Rhys Perry [Mon, 31 Jan 2022 18:01:45 +0000 (18:01 +0000)]
aco: don't combine fneg/fabs of different bit-size

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

2 years agoaco/tests: implement sub-dword program inputs
Rhys Perry [Thu, 27 Jan 2022 14:18:04 +0000 (14:18 +0000)]
aco/tests: implement sub-dword program inputs

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

2 years agoaco/tests: add a bunch more building helpers
Rhys Perry [Thu, 27 Jan 2022 14:17:23 +0000 (14:17 +0000)]
aco/tests: add a bunch more building helpers

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

2 years agopanfrost: Fix texel interleave flag on Valhall
Alyssa Rosenzweig [Wed, 2 Feb 2022 22:20:16 +0000 (17:20 -0500)]
panfrost: Fix texel interleave flag on Valhall

Interleave mode specified per-plane on Valhall. The texture descriptor proper
merely has a flag specifying whether planes are somehow interleaved
(u-interleaved, AFBC, or block compressed formats) or whether they are all
linear (and uncompressed).

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

2 years agopanfrost: Add remaining ZS/CRC XML
Alyssa Rosenzweig [Wed, 2 Feb 2022 22:15:10 +0000 (17:15 -0500)]
panfrost: Add remaining ZS/CRC XML

Flesh out the ZS/CRC XML, adding fields required for AFBC. Valhall allows AFBC
compressing stencil buffers independent of depth buffers, which is a new feature
since Bifrost. That results in a shuffling of the descriptor.

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

2 years agopanfrost: Add Valhall Plane Descriptor XML
Alyssa Rosenzweig [Wed, 2 Feb 2022 22:13:20 +0000 (17:13 -0500)]
panfrost: Add Valhall Plane Descriptor XML

This looks superficially like the Bifrost "Surface" descriptor, but it
additionally specifies the in-memory representation of blocks (clumps). If I
understand correctly, decompression is controlled by the plane descriptor,
rather than the texture descriptor level. This is a bit more flexible than
Bifrost.

Once the new fields here are wired up to Mesa, my
dEQP-GLES2.functional.texture.* failures should go away... I hope!

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

2 years agopanfrost: Fix alignments on Valhall
Alyssa Rosenzweig [Sun, 9 Jan 2022 18:38:23 +0000 (13:38 -0500)]
panfrost: Fix alignments on Valhall

Otherwise we get DATA_INVALID_FAULT trying to run even trivial null jobs. For
each descriptor, set the correct alignment.

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

2 years agopanfrost: Remove blend shader return value on v9
Alyssa Rosenzweig [Fri, 28 Jan 2022 18:47:53 +0000 (13:47 -0500)]
panfrost: Remove blend shader return value on v9

Removed since there's a new ABI for blend shaders. Even if we always write 0,
it's better not to pack this at all, and to denoise the dumps.

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

2 years agov3d/drm-shim: remove drm-shim driver
Alejandro Piñeiro [Mon, 24 Jan 2022 13:13:00 +0000 (14:13 +0100)]
v3d/drm-shim: remove drm-shim driver

After starting to use a new version of the simulator, it got
outdated.

We made some initial effort to update it, but it was not
working. Taking into account that no one is using it, it is better to
just remove it.

We keep the noop drm drivers, as they could have some value for
developers that doesn't have access to the v3dv3 simulator.

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

2 years agoradeonsi: allocate protected buffer only if required
Shirish S [Mon, 31 Jan 2022 11:00:37 +0000 (16:30 +0530)]
radeonsi: allocate protected buffer only if required

protected buffer allocations need to be made if the context is secure

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14848>

2 years agoradeonsi: limit loop unrolling for LLVM < 13
Pierre-Eric Pelloux-Prayer [Thu, 3 Feb 2022 08:35:07 +0000 (09:35 +0100)]
radeonsi: limit loop unrolling for LLVM < 13

Without this change LLVM 12 hits this error:

"""
LLVM ERROR: Error while trying to spill SGPR0_SGPR1 from class SReg_64:
Cannot scavenge register without an emergency spill slot!
"""

when running glcts KHR-GL46.arrays_of_arrays_gl.AtomicUsage test.

Fixes: 9ff086052ab ("radeonsi: unroll loops of up to 128 iterations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14848>

2 years agoradv: stop setting streamout state when a new pipeline is bound
Samuel Pitoiset [Wed, 19 Jan 2022 09:08:43 +0000 (10:08 +0100)]
radv: stop setting streamout state when a new pipeline is bound

It's required to have a valid graphics bound pipeline with XFB when
vkCmdBeginTransformFeedbackKHR() is called. This removes extra work
when binding a pipeline.

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

2 years agobroadcom/compiler: allow ldunifa with read-only SSBOs
Iago Toral Quiroga [Wed, 2 Feb 2022 10:23:11 +0000 (11:23 +0100)]
broadcom/compiler: allow ldunifa with read-only SSBOs

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

2 years agobroadcom/compiler: fix offset alignment for ldunifa when skipping
Iago Toral Quiroga [Wed, 2 Feb 2022 10:39:53 +0000 (11:39 +0100)]
broadcom/compiler: fix offset alignment for ldunifa when skipping

The intention was to align the address to 4 bytes (32-bit), not
16 bytes.

Fixes: bdb6201ea1 ("broadcom/compiler: use ldunifa with unaligned constant offset")

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

2 years agodocs: update calendar for 22.0.0-rc1
Dylan Baker [Wed, 2 Feb 2022 23:49:12 +0000 (15:49 -0800)]
docs: update calendar for 22.0.0-rc1

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

2 years agodocs: reset new_features.txt
Dylan Baker [Wed, 2 Feb 2022 23:09:58 +0000 (15:09 -0800)]
docs: reset new_features.txt

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

2 years agollvmpipe: ci updates
Mike Blumenkrantz [Wed, 2 Feb 2022 23:00:20 +0000 (18:00 -0500)]
llvmpipe: ci updates

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

2 years agollvmpipe: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
Mike Blumenkrantz [Wed, 2 Feb 2022 20:54:45 +0000 (15:54 -0500)]
llvmpipe: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS

this cap is broken

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUnifor

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

2 years agozink: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS
Mike Blumenkrantz [Wed, 2 Feb 2022 19:53:45 +0000 (14:53 -0500)]
zink: disable PIPE_SHADER_CAP_FP16_CONST_BUFFERS

this cap is broken

cc: mesa-stable

fixes:
GTF-GL46.gtf21.GL2Tests.glGetUniform.glGetUniform

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

2 years agoVERSION: bump version for 22.0 release
Dylan Baker [Wed, 2 Feb 2022 22:43:00 +0000 (14:43 -0800)]
VERSION: bump version for 22.0 release

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

2 years agoradv: Handle SDMA for padding.
Bas Nieuwenhuizen [Fri, 28 Jan 2022 20:04:07 +0000 (21:04 +0100)]
radv: Handle SDMA for padding.

Also assert that nobody actually needs to chain an SDMA IB because we have
not implemented non-PKT3 chaining.

Fixes: ef40f2ccc29 ("radv/amdgpu: Fix handling of IB alignment > 4 words.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5923
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14781>

2 years agointel: Add missing dep of gen_*_header.py on utils.py.
Emma Anholt [Wed, 26 Jan 2022 00:00:59 +0000 (16:00 -0800)]
intel: Add missing dep of gen_*_header.py on utils.py.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14725>

2 years agofreedreno/isaspec: Add missing dep of encode.py/decode.py calls on isa.py
Emma Anholt [Tue, 25 Jan 2022 23:50:53 +0000 (15:50 -0800)]
freedreno/isaspec: Add missing dep of encode.py/decode.py calls on isa.py

Fixes: #5921
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14725>

2 years agoanv: Add experimental support for VK_NV_mesh_shader
Caio Oliveira [Wed, 19 May 2021 16:35:22 +0000 (09:35 -0700)]
anv: Add experimental support for VK_NV_mesh_shader

Enable setting ANV_EXPERIMENTAL_NV_MESH_SHADER=1 environment variable.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agointel/dev: Enable Mesh Shading for DG2
Caio Oliveira [Wed, 7 Jul 2021 19:47:15 +0000 (12:47 -0700)]
intel/dev: Enable Mesh Shading for DG2

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Put first few push constants directly into Task/Mesh InlineData
Marcin Ślusarz [Mon, 13 Dec 2021 13:14:04 +0000 (14:14 +0100)]
anv: Put first few push constants directly into Task/Mesh InlineData

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

2 years agoanv: include ClipDistance array in mesh shader per-vertex output
Marcin Ślusarz [Thu, 9 Dec 2021 15:50:24 +0000 (16:50 +0100)]
anv: include ClipDistance array in mesh shader per-vertex output

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: tell the hardware about gl_[Clip|Cull]Distance in mesh shaders
Marcin Ślusarz [Thu, 9 Dec 2021 15:48:03 +0000 (16:48 +0100)]
anv: tell the hardware about gl_[Clip|Cull]Distance in mesh shaders

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Implement indirect dispatch for Mesh pipeline
Marcin Ślusarz [Fri, 16 Jul 2021 13:06:44 +0000 (15:06 +0200)]
anv: Implement indirect dispatch for Mesh pipeline

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Add support for UBOs, SSBOs and push constants in Mesh pipeline
Marcin Ślusarz [Mon, 12 Jul 2021 11:46:31 +0000 (13:46 +0200)]
anv: Add support for UBOs, SSBOs and push constants in Mesh pipeline

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Add support for non-zero firstTask in vkCmdDrawMeshTasksNV
Marcin Ślusarz [Mon, 5 Jul 2021 13:48:03 +0000 (15:48 +0200)]
anv: Add support for non-zero firstTask in vkCmdDrawMeshTasksNV

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Enable conditional rendering in vkCmdDrawMeshTasksNV
Marcin Ślusarz [Fri, 16 Jul 2021 12:21:51 +0000 (14:21 +0200)]
anv: Enable conditional rendering in vkCmdDrawMeshTasksNV

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Implement Mesh Shading pipeline
Caio Oliveira [Thu, 20 May 2021 19:07:34 +0000 (12:07 -0700)]
anv: Implement Mesh Shading pipeline

The Mesh pipeline is implemented as a variant of the
regular (primitive) Graphics Pipeline.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agoanv: Add boilerplate for VK_NV_mesh_shader
Caio Oliveira [Tue, 18 May 2021 19:13:52 +0000 (12:13 -0700)]
anv: Add boilerplate for VK_NV_mesh_shader

Use minimum values for the properties.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agointel/common: Add helper for URB allocation in Mesh pipeline
Caio Oliveira [Fri, 17 Dec 2021 00:47:14 +0000 (16:47 -0800)]
intel/common: Add helper for URB allocation in Mesh pipeline

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

2 years agointel: Add INTEL_URB_DEREF_BLOCK_SIZE_MESH
Caio Marcelo de Oliveira Filho [Thu, 8 Jul 2021 19:20:38 +0000 (12:20 -0700)]
intel: Add INTEL_URB_DEREF_BLOCK_SIZE_MESH

And corresponding value in XML.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13662>

2 years agopan/va: Add ARM_shader_framebuffer_fetch asm test
Alyssa Rosenzweig [Sat, 29 Jan 2022 17:53:43 +0000 (12:53 -0500)]
pan/va: Add ARM_shader_framebuffer_fetch asm test

This is a nontrivial chunk of code that makes for a nice dis/assembler test
case (and caught a bug already...). Add it to the observatory.

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

2 years agopan/va: Handle shift lanes in assembler
Alyssa Rosenzweig [Sat, 29 Jan 2022 17:53:05 +0000 (12:53 -0500)]
pan/va: Handle shift lanes in assembler

Noticed in a program using ARM_shader_framebuffer_fetch.

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

2 years agopan/va: Add lots of swizzle assembler tests
Alyssa Rosenzweig [Sat, 29 Jan 2022 15:38:39 +0000 (10:38 -0500)]
pan/va: Add lots of swizzle assembler tests

The swizzle handling in ISA.xml was broken in a bunch of place. Now that
we've fixed these issues, let's add tons of tests to validate.

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

2 years agopan/va: Add 2-channel 8-bit swizzles for conversions
Alyssa Rosenzweig [Sat, 29 Jan 2022 16:52:02 +0000 (11:52 -0500)]
pan/va: Add 2-channel 8-bit swizzles for conversions

Instructions like V2S8_TO_V2S16 need a special 4-bit special selecting any two
bytes. The definition is the same as Bifrost. Let's call this a half-swizzle
since we need a name, and it is indeed half a swizzle...

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

2 years agopan/va: Vectorize 8->16-bit conversions
Alyssa Rosenzweig [Sat, 29 Jan 2022 16:20:49 +0000 (11:20 -0500)]
pan/va: Vectorize 8->16-bit conversions

Matches Bifrost, too.

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

2 years agopan/va: Fix lane select for [US]_TO_[USF]32
Alyssa Rosenzweig [Sat, 29 Jan 2022 16:08:25 +0000 (11:08 -0500)]
pan/va: Fix lane select for [US]_TO_[USF]32

The lane select is in bit 28, this is covered by the "16-bit swizzle" mode.
However, the source type isn't inferred from the name in valhall.py, so
explicitly annotate the source as 16-bit.

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

2 years agopan/va: Fix MKVEC.v2i16 lane select
Alyssa Rosenzweig [Sat, 29 Jan 2022 15:51:06 +0000 (10:51 -0500)]
pan/va: Fix MKVEC.v2i16 lane select

The lanes are at bit 28 and bit 26 respectively. This matches the 16-bit "swizzle" encoding. In general the handling of widens/swizzles/lane/lanes on Valhall is rather confused but... one problem at a time.

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

2 years agopan/va: Test LD_TILE assembly
Alyssa Rosenzweig [Fri, 28 Jan 2022 23:02:22 +0000 (18:02 -0500)]
pan/va: Test LD_TILE assembly

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

2 years agopan/va: Add missing fields to LD_TILE
Alyssa Rosenzweig [Fri, 28 Jan 2022 23:02:06 +0000 (18:02 -0500)]
pan/va: Add missing fields to LD_TILE

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

2 years agopan/va: Add missing <clamp/> to V2F32_TO_V2F16
Alyssa Rosenzweig [Fri, 28 Jan 2022 22:17:25 +0000 (17:17 -0500)]
pan/va: Add missing <clamp/> to V2F32_TO_V2F16

For parity with Bifrost.

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

2 years agopan/va: Add .absolute bit to BRANCHZI
Alyssa Rosenzweig [Wed, 2 Feb 2022 17:20:19 +0000 (12:20 -0500)]
pan/va: Add .absolute bit to BRANCHZI

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

2 years agoanv: Update VK_KHR_fragment_shading_rate for newer HW
Lionel Landwerlin [Fri, 5 Feb 2021 19:16:38 +0000 (21:16 +0200)]
anv: Update VK_KHR_fragment_shading_rate for newer HW

Per primitive & attachment shading rate support added.

v2: Rebase on KHR_dynamic_rendering

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agoanv/pass: rely on precomputed dynamic rendering pass/subpass more
Lionel Landwerlin [Tue, 1 Feb 2022 19:57:19 +0000 (21:57 +0200)]
anv/pass: rely on precomputed dynamic rendering pass/subpass more

For instance, the current code in genX_cmd_buffer.c assumes that the
depth/stencil attachments & resolves will be at the end of all
attachments, but that won't be the case anymore with fragment rate
shading.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agoanv: force primitive shading rate write in last geometry stage
Lionel Landwerlin [Wed, 17 Feb 2021 12:39:08 +0000 (14:39 +0200)]
anv: force primitive shading rate write in last geometry stage

v2: Use new helper to check if stage supports variable shading rate
    setting

v3: Update comment & iterate backward (Caio)
    Apply only to relevant platforms (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agointel/compiler: add primitive rate output support
Lionel Landwerlin [Tue, 10 Nov 2020 16:08:31 +0000 (18:08 +0200)]
intel/compiler: add primitive rate output support

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agointel/compiler: add a new pass to lower shading rate into HW format
Lionel Landwerlin [Wed, 17 Feb 2021 11:47:36 +0000 (13:47 +0200)]
intel/compiler: add a new pass to lower shading rate into HW format

Rework:
 * Jason: Modernize brw_nir_lower_shading_rate_output:
   1. Use nir_shader_instructions_pass()
   2. Use *_imm builder helpers.
   3. Use nir_intrinsic_base() instead of ->const_index[0]

v2: Also lower loads (Caio)

v3: Update stage check to trigger lowering (Caio)

v4: Assert on != MESH (Caio)

v5: Fixup instruction insertion (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agonir/builder: add ishl_imm helper
Lionel Landwerlin [Tue, 23 Nov 2021 08:13:42 +0000 (10:13 +0200)]
nir/builder: add ishl_imm helper

v2: add (y >= x->bit_size) condition (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13739>

2 years agoisl: disable CPB surface compression
Lionel Landwerlin [Thu, 27 Jan 2022 08:26:58 +0000 (10:26 +0200)]
isl: disable CPB surface 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/13739>

2 years agoisl: add support for coarse pixel control surfaces
Lionel Landwerlin [Fri, 6 Nov 2020 15:03:33 +0000 (17:03 +0200)]
isl: add support for coarse pixel control surfaces

Those surfaces are used as attachment to rendering passes and describe
the rate of coarse pixel shading for the pass.

v2: Move CPB_BIT tile filtering to isl_gfx125_filter_tiling() (Nanley)

v3: Drop unused macro (Nanley)
    s/isl_to_gen/isl_encode/ (Nanley)
    Remove pitch alignment 128B constraint already covered by tiling (Nanley)
    Move some asserts together (Nanley)

v4: Disable miptail for now (Nanley)

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