platform/upstream/mesa.git
3 years agopan/bi: Add helper to extract a word from an index
Alyssa Rosenzweig [Mon, 14 Dec 2020 21:19:15 +0000 (16:19 -0500)]
pan/bi: Add helper to extract a word from an index

This pattern comes up surprisingly often due to the prevalance of
vectors.

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

3 years agopan/bi: Add nullity/equality helpers for bi_index
Alyssa Rosenzweig [Sat, 12 Dec 2020 01:01:38 +0000 (20:01 -0500)]
pan/bi: Add nullity/equality helpers for bi_index

We can no longer use the builtin equals, since they're structs now, but
these helpers are almost as convenient.

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

3 years agopan/bi: Add bi_index constructors
Alyssa Rosenzweig [Sat, 12 Dec 2020 01:00:28 +0000 (20:00 -0500)]
pan/bi: Add bi_index constructors

These add succinct helpers to generate well-formed references.

Note for semantic that bi_zero represents the immediate value #0, while
bi_null represents a value that does not exist ("undefined").

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

3 years agopan/bi: Add bi_index data structure
Alyssa Rosenzweig [Sat, 12 Dec 2020 00:57:39 +0000 (19:57 -0500)]
pan/bi: Add bi_index data structure

Rather than open-coding indices with manual bit packing flying around,
let's add a data structure corresponding to a reference to some data.
(Think nir_src, ibc_ref, etc). In particular this allows us to pack in
more metadata, like an offset, for properly supporting limited vectors
(for I/O) without bloating the IR with swizzle fields.

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

3 years agopan/bi: Add bi_swizzle enum
Alyssa Rosenzweig [Mon, 21 Dec 2020 22:10:10 +0000 (17:10 -0500)]
pan/bi: Add bi_swizzle enum

We need to represent subword swizzles at a somewhat higher level than
the hardware.

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

3 years agopan/bi: Make BIR_INDEX_ZERO less special
Alyssa Rosenzweig [Fri, 27 Nov 2020 20:43:14 +0000 (15:43 -0500)]
pan/bi: Make BIR_INDEX_ZERO less special

It can be implemented as a constant that just shifts beyond the 64-bits
available for the instruction, and then we can avoid special handling in
a bunch of places.

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

3 years agopan/bi: Remove BIR_INDEX_UNIFORM
Alyssa Rosenzweig [Fri, 27 Nov 2020 20:36:39 +0000 (15:36 -0500)]
pan/bi: Remove BIR_INDEX_UNIFORM

It too is a special case of BIR_INDEX_FAU, although its printing is
special-cased for readability.

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

3 years agopan/bi: Merge BIR_INDEX_FAU and BIR_INDEX_BLEND
Alyssa Rosenzweig [Fri, 27 Nov 2020 20:31:28 +0000 (15:31 -0500)]
pan/bi: Merge BIR_INDEX_FAU and BIR_INDEX_BLEND

There's no reason to separate these, and it's more convenient not to.

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

3 years agopan/bi: Generate bi_opcodes.c
Alyssa Rosenzweig [Wed, 23 Dec 2020 17:29:34 +0000 (12:29 -0500)]
pan/bi: Generate bi_opcodes.c

So we can lookup various properties rather than generating piles of
switch statements.

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

3 years agopan/bi: Use autogenerated modifiers
Alyssa Rosenzweig [Wed, 23 Dec 2020 17:29:08 +0000 (12:29 -0500)]
pan/bi: Use autogenerated modifiers

Step in the right direction to deduplicate.

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

3 years agopan/bi: Generate bi_opcodes.h
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:51:00 +0000 (13:51 -0500)]
pan/bi: Generate bi_opcodes.h

A header for enums for each opcode and each modifier.

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

3 years agopan/bi: Move modifier prints out of common code
Alyssa Rosenzweig [Fri, 27 Nov 2020 23:37:19 +0000 (18:37 -0500)]
pan/bi: Move modifier prints out of common code

These will get in the way of what we want and aren't used by the
disassembler.

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

3 years agopan/bi: Remove reference to 64-bit RA
Alyssa Rosenzweig [Wed, 9 Dec 2020 19:59:34 +0000 (14:59 -0500)]
pan/bi: Remove reference to 64-bit RA

Not something we plan to ever support on Bifrost. v7 needs 64-bit
lowered at the NIR level. The support for 64-bit clauses on v6 is iffy
and not worth worrying about at this point.

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

3 years agozink: document some more features for higher GL versions
Erik Faye-Lund [Wed, 23 Dec 2020 16:05:33 +0000 (17:05 +0100)]
zink: document some more features for higher GL versions

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

3 years agopan/bi: Add helpers for manipulating the ISA
Alyssa Rosenzweig [Wed, 23 Dec 2020 16:38:06 +0000 (11:38 -0500)]
pan/bi: Add helpers for manipulating the ISA

These will be used to generate various files for the IR.

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

3 years agopan/bi: Move copyright notice to common code
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:46:45 +0000 (13:46 -0500)]
pan/bi: Move copyright notice to common code

No reason to duplicate this all over the place.

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

3 years agopan/bi: Add explicit meson dependency on the ISA helpers
Alyssa Rosenzweig [Tue, 8 Dec 2020 00:58:22 +0000 (19:58 -0500)]
pan/bi: Add explicit meson dependency on the ISA helpers

This logic was slightly busted before.

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

3 years agopan/bi: Rename isa_parse to bifrost_isa
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:24:53 +0000 (13:24 -0500)]
pan/bi: Rename isa_parse to bifrost_isa

We use this for non-parsing code as well. Make the name clear.

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

3 years agopan/bi: Add pseudo register formats to XML
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:09:50 +0000 (13:09 -0500)]
pan/bi: Add pseudo register formats to XML

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

3 years agopan/bi: Add staging register counts to ISA.xml
Alyssa Rosenzweig [Wed, 23 Dec 2020 16:30:17 +0000 (11:30 -0500)]
pan/bi: Add staging register counts to ISA.xml

Message-passing instructions that read/write staging registers access
either:

* a fixed number of registers
* vecsize registers (/2 for LD/ST_CVT if register_format is 16-bit)
* a computed number for TEXC

This adds the fixed counts into the XML for the first type and space to
specify the latter types.

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

3 years agopan/bi: Fix rounding name for HADD in XML
Alyssa Rosenzweig [Thu, 10 Dec 2020 20:19:35 +0000 (15:19 -0500)]
pan/bi: Fix rounding name for HADD in XML

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

3 years agopan/bi: Mark message types in ISA.xml
Alyssa Rosenzweig [Wed, 9 Dec 2020 19:55:05 +0000 (14:55 -0500)]
pan/bi: Mark message types in ISA.xml

Message-passing instructions have an associated message type, which the
clause header needs to signal. Instead of open coding this, let's
annotate the XML. Instructions not otherwise marked do not generate
messages.

Three exceptions apply:

* UBO loads need to use the attribute message type.
* Tile buffer access to Z/S needs ZS message type
* LD_VAR_SPECIAL.fragz needs ZS message type

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

3 years agopan/bi: Use consistent neg naming
Alyssa Rosenzweig [Sat, 28 Nov 2020 00:16:17 +0000 (19:16 -0500)]
pan/bi: Use consistent neg naming

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

3 years agopan/bi: Use canonical inactive result
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:31:49 +0000 (13:31 -0500)]
pan/bi: Use canonical inactive result

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

3 years agopan/bi: Use canonical subgroup size
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:31:13 +0000 (13:31 -0500)]
pan/bi: Use canonical subgroup size

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

3 years agopan/bi: Use canonical lane ops
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:30:01 +0000 (13:30 -0500)]
pan/bi: Use canonical lane ops

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

3 years agopan/bi: Use canonical name for segments
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:28:33 +0000 (13:28 -0500)]
pan/bi: Use canonical name for segments

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

3 years agopan/bi: Use canonical min/max semantics
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:47:28 +0000 (10:47 -0500)]
pan/bi: Use canonical min/max semantics

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

3 years agopan/bi: Use canonical update modes
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:44:25 +0000 (10:44 -0500)]
pan/bi: Use canonical update modes

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

3 years agopan/bi: Use canonical sample names
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:43:06 +0000 (10:43 -0500)]
pan/bi: Use canonical sample names

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

3 years agopan/bi: Use canonical varying names
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:41:47 +0000 (10:41 -0500)]
pan/bi: Use canonical varying names

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

3 years agopan/bi: Use canonical names for rounding modes
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:37:33 +0000 (10:37 -0500)]
pan/bi: Use canonical names for rounding modes

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

3 years agopan/bi: Use canonical names for clamps
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:33:19 +0000 (10:33 -0500)]
pan/bi: Use canonical names for clamps

Prepare to generate this enum by correctly naming the open-coded
variant.

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

3 years agopan/bi: Don't treat extend as per-source
Alyssa Rosenzweig [Fri, 27 Nov 2020 19:59:12 +0000 (14:59 -0500)]
pan/bi: Don't treat extend as per-source

There is only one per instruction so it just complicates things.

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

3 years agopan/bi: Use consistent naming of lane/lane0
Alyssa Rosenzweig [Fri, 27 Nov 2020 19:48:44 +0000 (14:48 -0500)]
pan/bi: Use consistent naming of lane/lane0

It's always a source modifier.

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

3 years agopan/bi: Use consistent wls naming
Alyssa Rosenzweig [Fri, 27 Nov 2020 18:53:28 +0000 (13:53 -0500)]
pan/bi: Use consistent wls naming

Compare naming in the data structures.

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

3 years agopan/bi: Use consistent negX/absX naming
Alyssa Rosenzweig [Thu, 26 Nov 2020 23:07:52 +0000 (18:07 -0500)]
pan/bi: Use consistent negX/absX naming

We already use plain neg/abs for this, don't mix it. Will avoid weird
enums for abs/neg with a generated IR.

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

3 years agopan/bi: Defer newline printing in disassembler
Alyssa Rosenzweig [Mon, 7 Dec 2020 03:50:34 +0000 (22:50 -0500)]
pan/bi: Defer newline printing in disassembler

Easy reduction in generated code, while we're at it. Pretty obvious
change after working on similar fixes for the other generators.

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

3 years agopan/bi: Mark some instructions as unused
Alyssa Rosenzweig [Mon, 7 Dec 2020 03:44:06 +0000 (22:44 -0500)]
pan/bi: Mark some instructions as unused

Certain transcendental instructions are not even possible to generate
since these bits are lowered away before the Bifrost backend is touched,
as far as I know.

Job management instructions (most interestingly DOORBELL) do not
correspond to OpenGL/OpenCL/Vulkan.

Segment arithmetic seems mostly useless for real code, any actual use
case I can think of is already covered by indirect loads/stores which
does the segment arithmetic implicitly. I've never seen this in blob
code, probably just a future proofing thing.

Dropping these instructions corresponds to a 3% reduction in generated
lines of code for the printer, builder, and packer for the new IR. Not a
terrible yield for functionality we'll likely never need.

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

3 years agopan/bi: Add pseudo-instruction mechanism
Alyssa Rosenzweig [Tue, 8 Dec 2020 01:01:11 +0000 (20:01 -0500)]
pan/bi: Add pseudo-instruction mechanism

Useful for instructions that need to be modeled in the IR (with support
in the builder and printer) but will always be lowered away before
packing since they don't correspond to anything real.

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

3 years agopan/bi: Add unused instruction mechanism
Alyssa Rosenzweig [Mon, 7 Dec 2020 03:42:37 +0000 (22:42 -0500)]
pan/bi: Add unused instruction mechanism

Certain instructions are highly unlikely to ever be used in the Bifrost
compiler, due to differences in the Mesa stack versus the Arm compiler,
as well as hardware features added speculatively and that never became
API visible. It doesn't make sense to include these instructions in the
IR, so let's disable them, while retaining complete disassembly.

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

3 years agopan/bi: Remove bi_is_live_after
Alyssa Rosenzweig [Fri, 11 Dec 2020 15:59:48 +0000 (10:59 -0500)]
pan/bi: Remove bi_is_live_after

Unused on Bifrost, and only used on Midgard for something that doesn't
apply to Bifrost.

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

3 years agopan/bi: Label shader-db shaders
Alyssa Rosenzweig [Thu, 17 Dec 2020 01:39:58 +0000 (20:39 -0500)]
pan/bi: Label shader-db shaders

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

3 years agopan/bi: Drop on-board packing tests
Alyssa Rosenzweig [Fri, 27 Nov 2020 15:24:27 +0000 (10:24 -0500)]
pan/bi: Drop on-board packing tests

These tests were designed before having access to canonical information
about the hardware and thus had two purposes:

* Validating that our understanding of an instruction (as defined by IR
  semantics) matches hardware behaviour -- obsoleted by new information.

* Validating that the IR packing code is correct -- obsoleted by
  rewriting the IR and rewriting the packing.

I dislike removing tests as much as the next person, but the value of
these will be nil by the end of the series, and will prove burdensome.
Proper unit tests will be useful, however.

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

3 years agoegl/dri2: fix image loaderPrivate type mixup
David Stevens [Wed, 23 Dec 2020 14:38:32 +0000 (23:38 +0900)]
egl/dri2: fix image loaderPrivate type mixup

The first callback which uses an image's loaderPrivate data was recently
added. Prior to this, dri2_create_image_khr_texture had been setting the
unused loaderPrivate field on the image it creates. This caused a
pointer type mixup in platform_android when it started using the new
callback. Fix this by no longer unnecessarily setting loaderPrivate in
dri2_create_image_khr_texture.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4010
Fixes: a2fb87eea6d ("egl/android: implement image cleanup callback")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8211>

3 years agoradv: make sure FMASK compression is enabled for MSAA copies
Samuel Pitoiset [Fri, 4 Dec 2020 08:18:12 +0000 (09:18 +0100)]
radv: make sure FMASK compression is enabled for MSAA copies

Fixes dEQP-VK.api.copy_and_blit.*.4_bit. I think the MSAA2x and
MSAA8x just passed by luck.

Fixes: 7b21ce401f7 ("radv: disable FMASK compression when drawing with GENERAL layout")
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/7915>

3 years agofreedreno: Fix FD_MESA_DEBUG=flush debug option
Danylo Piliaiev [Tue, 22 Dec 2020 19:23:36 +0000 (21:23 +0200)]
freedreno: Fix FD_MESA_DEBUG=flush debug option

fd_batch_check_size() should be after fd_batch_unlock_submit(),
otherwise batch_flush() called from fd_batch_check_size()
would wait on mutex forever.

Fixes: 02298ed1 "freedreno: Add submit lock"

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

3 years agoradeonsi/gfx10: fix issue with multiple overflow queries on the same context
Indrajit Kumar Das [Mon, 14 Dec 2020 10:38:21 +0000 (16:08 +0530)]
radeonsi/gfx10: fix issue with multiple overflow queries on the same context

In gfx10_sh_query_end a new query buffer is being allocated if there are pending
shader queries. However since emit_shader_query is called only once per draw
command, this newly allocated buffer is not used subsequently.
So even though this newly allocated buffer is treated as the last query buffer,
it is never actually used by any of the queries. Essentially there is no need
to allocate a new query buffer on the same context i.e. draw command.
The existing query buffer can be used to provide the answers to multiple queries.
Allocating an extra buffer makes subsequent queries wait on a query buffer whose
fence will never be triggered since there are no subsequent draw commands to
trigger the same.

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

3 years agomicrosoft/compiler: Add spirv2dxil executable
Michael Tang [Tue, 22 Dec 2020 21:27:12 +0000 (13:27 -0800)]
microsoft/compiler: Add spirv2dxil executable

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

3 years agoutil: Implement os_read_file for Windows
Michael Tang [Mon, 21 Dec 2020 22:57:48 +0000 (14:57 -0800)]
util: Implement os_read_file for Windows

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

3 years agomicrosoft/compiler: Add dedicated spirv_to_dxil libraries
Michael Tang [Mon, 21 Dec 2020 22:58:47 +0000 (14:58 -0800)]
microsoft/compiler: Add dedicated spirv_to_dxil libraries

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

3 years agoci: remove all tracie remains
Andres Gomez [Tue, 8 Dec 2020 19:44:12 +0000 (21:44 +0200)]
ci: remove all tracie remains

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: add piglit job to baremetal and remove tracie ones
Andres Gomez [Sat, 14 Nov 2020 12:39:24 +0000 (14:39 +0200)]
ci: add piglit job to baremetal and remove tracie ones

v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Rename *-piglit-traces jobs with *-traces (Eric).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: refactor arm64 jobs in preparation for piglit addition
Andres Gomez [Sat, 14 Nov 2020 19:50:18 +0000 (21:50 +0200)]
ci: refactor arm64 jobs in preparation for piglit addition

v2:
  - Rename the ".arm64-deqp-test-vk" template as
    ".arm64-deqp-test-freedreno-vk" (Eric).

v3:
  - Rename the ".arm64-test" template as ".freedreno-test" (Eric).
  - Rename the ".arm64-deqp-test" template as
    ".baremetal-deqp-test" (Eric).
  - Rename the ".arm64-deqp-test-freedreno-vk" template as
    ".baremetal-deqp-test-freedreno-vk".

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: add piglit jobs to LAVA and remove tracie ones
Andres Gomez [Thu, 27 Aug 2020 19:18:00 +0000 (22:18 +0300)]
ci: add piglit jobs to LAVA and remove tracie ones

v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v2]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: build piglit inside baremetal and LAVA's rootfs
Andres Gomez [Thu, 27 Aug 2020 19:18:17 +0000 (22:18 +0300)]
ci: build piglit inside baremetal and LAVA's rootfs

v2:
  - Updated the ci-fairy commit to use.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: move API specification to driver instead of test suite
Andres Gomez [Thu, 27 Aug 2020 17:47:34 +0000 (20:47 +0300)]
ci: move API specification to driver instead of test suite

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: move general build commands to their own section
Andres Gomez [Wed, 11 Nov 2020 19:29:46 +0000 (21:29 +0200)]
ci: move general build commands to their own section

The STRIP_CMD env var is used in several build scripts, not just by
dEQP.

Also, we want to have the rootfs destination directory created so it
also exists for builds that only move directory trees in there.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: add Vulkan piglit traces jobs and remove tracie ones
Andres Gomez [Thu, 27 Aug 2020 17:33:10 +0000 (20:33 +0300)]
ci: add Vulkan piglit traces jobs and remove tracie ones

v2:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: only modify LD_LIBRARY_PATH when running the piglit cmd
Andres Gomez [Fri, 21 Aug 2020 08:51:47 +0000 (11:51 +0300)]
ci: only modify LD_LIBRARY_PATH when running the piglit cmd

Doing it earlier may interfere with the optional command wrapper.

v2:
  - Fixed typo (Eric).

Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: add piglit replay jobs and remove tracie ones
Andres Gomez [Wed, 19 Aug 2020 13:42:56 +0000 (16:42 +0300)]
ci: add piglit replay jobs and remove tracie ones

Along the way, modify the piglit run script and refactor the way
piglit jobs are generated.

v2:
  - Squashed the commit to remove tracie jobs (Eric).

v3:
  - Extend information in the comments about the need to use a
    running X server for replaying with Vulkan (Tomeu).
  - Do actually fail if the upload doesn't work (Tomeu).

v4:
  - Rename *-piglit-traces jobs with *-traces.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> [v3]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: specify MinIO's host URL in a global variable
Andres Gomez [Sun, 23 Aug 2020 20:32:40 +0000 (23:32 +0300)]
ci: specify MinIO's host URL in a global variable

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: build piglit in the Vulkan testing image
Andres Gomez [Mon, 24 Aug 2020 11:10:24 +0000 (14:10 +0300)]
ci: build piglit in the Vulkan testing image

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: update piglit's version so it features replayer
Andres Gomez [Mon, 17 Aug 2020 09:09:56 +0000 (12:09 +0300)]
ci: update piglit's version so it features replayer

We also need that summary's aggregate command can use JUnit as backend,
a cross-compilation fix for its CMakeList.txt, a fix for the JUnit
backend and a small change in replayer's compare output.

v2:
  - Updated the piglit commit so it features another couple of needed
    fixes.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> [v1]
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: spread the usage of the FDO_UPSTREAM_REPO variable
Andres Gomez [Wed, 9 Dec 2020 19:41:01 +0000 (21:41 +0200)]
ci: spread the usage of the FDO_UPSTREAM_REPO variable

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: install ci-fairy in the testing images
Andres Gomez [Mon, 24 Aug 2020 11:09:17 +0000 (14:09 +0300)]
ci: install ci-fairy in the testing images

v2:
  - Updated the ci-fairy commit to use.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: use ephemeral packages when building the build-base image
Andres Gomez [Mon, 24 Aug 2020 18:56:41 +0000 (21:56 +0300)]
ci: use ephemeral packages when building the build-base image

v2:
  - Update tag for the android_build image (Michel).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> [v1]
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agoci: specify source and build directories with CMake
Andres Gomez [Mon, 9 Nov 2020 15:35:46 +0000 (17:35 +0200)]
ci: specify source and build directories with CMake

The -S and -B flags were officially introduced in CMake 3.13.

Avoids the following warning:

"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.
"

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

3 years agospirv2nir: Add --opengl (-g) argument for OpenGL SPIR-V
Caio Marcelo de Oliveira Filho [Fri, 18 Dec 2020 06:01:06 +0000 (22:01 -0800)]
spirv2nir: Add --opengl (-g) argument for OpenGL SPIR-V

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

3 years agodocs/egl.rst: switch true→enabled
Trevor Woerner [Sat, 19 Dec 2020 05:56:33 +0000 (00:56 -0500)]
docs/egl.rst: switch true→enabled

The old "true/false" values for some of the configuration options have been
deprecated in favour of enabled/disabled.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8173>

3 years agoci: Bump deqp to current vulkan-cts-1.2.5.0 also in the Lava jobs
Andres Gomez [Tue, 22 Dec 2020 12:10:18 +0000 (14:10 +0200)]
ci: Bump deqp to current vulkan-cts-1.2.5.0 also in the Lava jobs

The tag update was forgotten after e384476d1e9 ("ci: Bump deqp to
current vulkan-cts-1.2.5.0").

Noticeably, this introduces 2 more failures in the panfrost-t860 job:
  - dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.lowp_mat2_float_vertex
  - dEQP-GLES3.functional.shaders.matrix.inverse.dynamic.mediump_mat2_float_vertex,Fail

Fixes: e384476d1e9 ("ci: Bump deqp to current vulkan-cts-1.2.5.0")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8198>

3 years agodoc/features: mark off tessellation for zink
Mike Blumenkrantz [Tue, 22 Dec 2020 13:58:16 +0000 (08:58 -0500)]
doc/features: mark off tessellation for zink

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

3 years agoaco: create VMEM clauses slightly more aggressive
Daniel Schürmann [Wed, 12 Aug 2020 16:19:11 +0000 (18:19 +0200)]
aco: create VMEM clauses slightly more aggressive

Totals from 3325 (2.39% of 139391) affected shaders (NAVI10):
SGPRs: 331528 -> 331056 (-0.14%); split: -0.14%, +0.00%
VGPRs: 306164 -> 337764 (+10.32%); split: -0.02%, +10.34%
CodeSize: 38843180 -> 38865388 (+0.06%); split: -0.04%, +0.10%
MaxWaves: 18908 -> 17028 (-9.94%); split: +0.01%, -9.95%
Instrs: 7423908 -> 7427934 (+0.05%); split: -0.06%, +0.12%
Cycles: 527411756 -> 526388408 (-0.19%); split: -0.21%, +0.02%
VMEM: 1148421 -> 992660 (-13.56%); split: +0.10%, -13.67%
SMEM: 227337 -> 232380 (+2.22%); split: +2.26%, -0.04%
VClause: 146416 -> 111171 (-24.07%); split: -24.10%, +0.03%
SClause: 243674 -> 243689 (+0.01%); split: -0.00%, +0.01%
Copies: 663496 -> 660333 (-0.48%); split: -0.85%, +0.37%
Branches: 223725 -> 223721 (-0.00%)

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

3 years agoaco: schedule position exports in the same pass as memory operations
Daniel Schürmann [Thu, 13 Aug 2020 14:54:57 +0000 (16:54 +0200)]
aco: schedule position exports in the same pass as memory operations

No fossil-db changes.

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

3 years agoaco: fix def-use distance calculation when scheduling.
Daniel Schürmann [Thu, 13 Aug 2020 08:13:49 +0000 (10:13 +0200)]
aco: fix def-use distance calculation when scheduling.

This change also increases the VMEM_MAX_MOVES
to mitigate some of the scheduling changes.

Totals from 34301 (24.61% of 139391) affected shaders:
SGPRs: 2515440 -> 2552304 (+1.47%); split: -1.25%, +2.71%
VGPRs: 1786676 -> 1794724 (+0.45%); split: -0.31%, +0.76%
CodeSize: 151079856 -> 151209828 (+0.09%); split: -0.06%, +0.15%
MaxWaves: 392454 -> 388966 (-0.89%); split: +0.39%, -1.28%
Instrs: 28870746 -> 28895907 (+0.09%); split: -0.09%, +0.17%
Cycles: 960450680 -> 961315796 (+0.09%); split: -0.09%, +0.18%
VMEM: 19027987 -> 19796223 (+4.04%); split: +7.49%, -3.45%
SMEM: 2434691 -> 2394829 (-1.64%); split: +2.80%, -4.43%
VClause: 551776 -> 543051 (-1.58%); split: -1.73%, +0.15%
SClause: 1230147 -> 1227637 (-0.20%); split: -1.40%, +1.20%
Copies: 1957640 -> 1963617 (+0.31%); split: -1.11%, +1.41%
Branches: 611747 -> 612504 (+0.12%); split: -0.11%, +0.23%

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

3 years agoaco: allow to schedule SALU/SMEM through exec changes
Daniel Schürmann [Wed, 12 Aug 2020 14:16:46 +0000 (16:16 +0200)]
aco: allow to schedule SALU/SMEM through exec changes

Totals from 16794 (12.05% of 139391) affected shaders (NAVI10):
SGPRs: 757760 -> 762048 (+0.57%); split: -0.39%, +0.95%
VGPRs: 402844 -> 402744 (-0.02%); split: -0.04%, +0.02%
CodeSize: 22290900 -> 22285068 (-0.03%); split: -0.06%, +0.04%
MaxWaves: 294163 -> 294222 (+0.02%); split: +0.03%, -0.01%
Instrs: 4190074 -> 4188513 (-0.04%); split: -0.08%, +0.04%
Cycles: 40685028 -> 40678640 (-0.02%); split: -0.03%, +0.02%
VMEM: 7711867 -> 7704315 (-0.10%); split: +0.28%, -0.38%
SMEM: 942472 -> 1007052 (+6.85%); split: +7.15%, -0.30%
VClause: 92990 -> 92974 (-0.02%); split: -0.03%, +0.01%
SClause: 263700 -> 263810 (+0.04%); split: -0.38%, +0.42%
Copies: 277467 -> 276988 (-0.17%); split: -0.37%, +0.20%
Branches: 45899 -> 45896 (-0.01%)

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

3 years agoaco: make pred_by_exec_mask() accessible in other files
Daniel Schürmann [Wed, 12 Aug 2020 14:58:35 +0000 (16:58 +0200)]
aco: make pred_by_exec_mask() accessible in other files

and rename to needs_exec_mask().

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

3 years agoaco: don't emit parallelcopy when switching to WQM.
Daniel Schürmann [Wed, 12 Aug 2020 12:52:04 +0000 (14:52 +0200)]
aco: don't emit parallelcopy when switching to WQM.

The reason was an RA bug which has been fixed a while ago.
This change fixes some register demand miscalculations.

Totals from 1013 (0.73% of 139391) affected shaders (NAVI10):
CodeSize: 6050408 -> 6047504 (-0.05%); split: -0.05%, +0.00%
Instrs: 1160533 -> 1159765 (-0.07%); split: -0.07%, +0.00%
Cycles: 8027212 -> 8024140 (-0.04%); split: -0.04%, +0.00%
VMEM: 296195 -> 296091 (-0.04%)
SMEM: 73003 -> 73011 (+0.01%); split: +0.05%, -0.04%
SClause: 37221 -> 37222 (+0.00%)
Copies: 70931 -> 70166 (-1.08%)

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

3 years agozink: export tess shader pipe caps
Mike Blumenkrantz [Fri, 18 Dec 2020 02:29:26 +0000 (21:29 -0500)]
zink: export tess shader pipe caps

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: handle partial writes to shader outputs
Mike Blumenkrantz [Thu, 23 Jul 2020 13:20:36 +0000 (09:20 -0400)]
zink: handle partial writes to shader outputs

this is super gross. spirv doesn't provide any facility for doing per-component
writes, which means all components of a value must be written every time

to this end, we need to manually split both the src and dst composites and
do per-component access for each store in order to accurately handle both
non-sequential wrmasks (which could be handled by nir_lower_wrmasks, yes, but
we aren't using it) as well as partial wrmasks

see also mesa/mesa#4006

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: implement passthrough tcs shader injection
Mike Blumenkrantz [Sun, 19 Jul 2020 13:12:40 +0000 (09:12 -0400)]
zink: implement passthrough tcs shader injection

GL allows the pipeline to "infer" a tcs shader if a tes shader is bound using
API-specified default values for gl_TessLevelOuter and gl_TessLevelInner,
but VK requires that both shaders be explicitly present

to handle this, create a generic tcs which translates all vs outputs to
invocation-based arrays and copy the appropriate value to the expected tes
input array location. also emit the default inner/outer values as push constants
so we don't have to recompile the shaders whenever the api calls occur

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

3 years agozink: add stubs for tess outer/inner level handling
Mike Blumenkrantz [Fri, 18 Dec 2020 02:27:37 +0000 (21:27 -0500)]
zink: add stubs for tess outer/inner level handling

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: add push constant handling to get_storage_class()
Mike Blumenkrantz [Fri, 18 Dec 2020 01:32:42 +0000 (20:32 -0500)]
zink: add push constant handling to get_storage_class()

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: only run nir_lower_clip_halfz for last vertex processing stage
Mike Blumenkrantz [Fri, 17 Jul 2020 14:48:45 +0000 (10:48 -0400)]
zink: only run nir_lower_clip_halfz for last vertex processing stage

this lets us remove the calcs to un-convert POS during load

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: add handling for tcs and tes shader states
Mike Blumenkrantz [Fri, 18 Dec 2020 02:29:08 +0000 (21:29 -0500)]
zink: add handling for tcs and tes shader states

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: support PIPE_PRIM_PATCHES
Mike Blumenkrantz [Fri, 18 Dec 2020 02:28:50 +0000 (21:28 -0500)]
zink: support PIPE_PRIM_PATCHES

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: set tess info in pipeline creation
Mike Blumenkrantz [Fri, 18 Dec 2020 02:28:22 +0000 (21:28 -0500)]
zink: set tess info in pipeline creation

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: pull xfb info from tess shader when applicable
Mike Blumenkrantz [Fri, 18 Dec 2020 02:26:34 +0000 (21:26 -0500)]
zink: pull xfb info from tess shader when applicable

if it's the last vertex stage then it does the xfb

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: set scoped barrier flag in nir options
Mike Blumenkrantz [Fri, 18 Dec 2020 02:24:43 +0000 (21:24 -0500)]
zink: set scoped barrier flag in nir options

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: set up ntv init for tess shaders
Mike Blumenkrantz [Fri, 18 Dec 2020 02:24:28 +0000 (21:24 -0500)]
zink: set up ntv init for tess shaders

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: add handling for tess shader intrinsics
Mike Blumenkrantz [Fri, 18 Dec 2020 02:23:54 +0000 (21:23 -0500)]
zink: add handling for tess shader intrinsics

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: add ntv handling for tess shader i/o variables
Mike Blumenkrantz [Fri, 18 Dec 2020 02:22:17 +0000 (21:22 -0500)]
zink: add ntv handling for tess shader i/o variables

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agozink: don't always run nir_lower_io_arrays_to_elements_no_indirects
Mike Blumenkrantz [Thu, 16 Jul 2020 13:50:59 +0000 (09:50 -0400)]
zink: don't always run nir_lower_io_arrays_to_elements_no_indirects

this is automatically run for fs and vs, which is the only place we really
want it

Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8152>

3 years agoradv: add code that checks if the extension table is sorted correctly
Samuel Pitoiset [Mon, 21 Dec 2020 21:53:01 +0000 (22:53 +0100)]
radv: add code that checks if the extension table is sorted correctly

Ported from ANV.

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

3 years agoradv: sort the extension table like Khronos
Samuel Pitoiset [Mon, 21 Dec 2020 21:51:37 +0000 (22:51 +0100)]
radv: sort the extension table like Khronos

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

3 years agocso: inline cso_construct_key
Marek Olšák [Fri, 4 Dec 2020 13:19:37 +0000 (08:19 -0500)]
cso: inline cso_construct_key

The x86 asm is a lot shorter and the loop is unrolled.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>

3 years agocso: remove context and delete_state pointers from all CSOs
Marek Olšák [Thu, 3 Dec 2020 20:52:20 +0000 (15:52 -0500)]
cso: remove context and delete_state pointers from all CSOs

We just need them per context, not per CSO. The new delete callback
replaces the per-CSO callbacks.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>

3 years agost/mesa: don't make a local copy of blend color
Marek Olšák [Thu, 3 Dec 2020 18:47:19 +0000 (13:47 -0500)]
st/mesa: don't make a local copy of blend color

This is perfectly safe and nothing bad can happen... and we have also CI.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>

3 years agocso: don't pass blend_color through cso_context
Marek Olšák [Thu, 3 Dec 2020 18:38:34 +0000 (13:38 -0500)]
cso: don't pass blend_color through cso_context

It's never saved or restored. Redundant state changes are already
filtered out by mesa/main.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>

3 years agogallium: inline pipe_depth_state to decrease DSA state size by 4 bytes
Marek Olšák [Fri, 4 Dec 2020 13:37:14 +0000 (08:37 -0500)]
gallium: inline pipe_depth_state to decrease DSA state size by 4 bytes

Depth and alpha states are now packed together, interleaved somewhat.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7940>