mesa.git
4 years agointel/tools: Add assembler tests for the cr0 register
Matt Turner [Wed, 17 Jun 2020 00:10:38 +0000 (17:10 -0700)]
intel/tools: Add assembler tests for the cr0 register

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5514>

4 years agointel/tools: Disallow control subregisters > 3
Matt Turner [Wed, 17 Jun 2020 00:07:15 +0000 (17:07 -0700)]
intel/tools: Disallow control subregisters > 3

> 4 was probably a typo, since the documentation says that there are 4
subregisters (0-3).

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5514>

4 years agointel/tools: Require explicit regions/types for special regs
Matt Turner [Tue, 16 Jun 2020 23:54:07 +0000 (16:54 -0700)]
intel/tools: Require explicit regions/types for special regs

The docs say that these registers should  only be read with a certain
type, and I'm inclined to believe that the hardware behaves that way,
but it makes the assembler a little more confusing and also confuses the
user of the assembler that some operands don't take types or regions.

Just always requiring regions and types seems like the sensible thing.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5514>

4 years agointel/tools: Drop srctype from ipreg
Matt Turner [Tue, 16 Jun 2020 23:53:05 +0000 (16:53 -0700)]
intel/tools: Drop srctype from ipreg

It's unused, and it would cause shift/reduce conflicts after the next
patch.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5514>

4 years agointel/tools: Remove unnecessary reg number checking
Matt Turner [Tue, 16 Jun 2020 23:53:57 +0000 (16:53 -0700)]
intel/tools: Remove unnecessary reg number checking

a0 is the only address register, and cr0 is the only control register,
so there's no need to return the register number, espcially since the
lexer explicitly consumes "a0" and "cr0".

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5514>

4 years agoturnip: move enum translation functions to a common header
Jonathan Marek [Wed, 17 Jun 2020 20:05:07 +0000 (16:05 -0400)]
turnip: move enum translation functions to a common header

Instead of having these functions sprinkled around the driver (and ending
with a duplicated tu6_compare_func for example), move everything to a
common header (using the previously unused tu_util.h).

Also applied some simplifications: using a cast when the HW enum matches
the VK enum, and using a lookup table when it makes sense (which is IMO
nicer than the switch case way).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5538>

4 years agoaco: use the same regclass as the definition for undef phi operands
Rhys Perry [Thu, 18 Jun 2020 12:52:28 +0000 (13:52 +0100)]
aco: use the same regclass as the definition for undef phi operands

Subdword phis can't have SGPR operands on GFX6-8.

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

4 years agoaco: fix edge check with sub-dword temporaries
Rhys Perry [Thu, 18 Jun 2020 12:30:50 +0000 (13:30 +0100)]
aco: fix edge check with sub-dword temporaries

Fixes RA failure for a parallel-rdp shader on pitcairn.

fossil-db (Navi):
Totals from 2 (0.00% of 128733) affected shaders:
CodeSize: 203656 -> 205724 (+1.02%)
Instrs: 32267 -> 32529 (+0.81%)

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

4 years agomesa/main: fix inverted condition
Erik Faye-Lund [Wed, 17 Jun 2020 21:50:06 +0000 (23:50 +0200)]
mesa/main: fix inverted condition

I accidentally got one of the conditions wrong here. Sorry for the
mixup.

See ttps://gitlab.freedesktop.org/mesa/mesa/-/issues/3134 for details.

Fixes: b112e62ba48 ("mesa/main: do not allow MESA_ycbcr_texture enums on gles")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5532>

4 years agonv50/ir/nir: remove image uniform hack
Karol Herbst [Mon, 15 Jun 2020 23:08:39 +0000 (01:08 +0200)]
nv50/ir/nir: remove image uniform hack

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agonv50/ir/nir: handle image atomic inc and dec
Karol Herbst [Mon, 15 Jun 2020 16:30:39 +0000 (18:30 +0200)]
nv50/ir/nir: handle image atomic inc and dec

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agonv50/ir/nir: move away from image_deref intrinsics
Karol Herbst [Mon, 15 Jun 2020 12:36:18 +0000 (14:36 +0200)]
nv50/ir/nir: move away from image_deref intrinsics

v2: fix lod source of image operation correctly

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agonir/lower_images: handle dec and inc
Karol Herbst [Mon, 15 Jun 2020 16:30:12 +0000 (18:30 +0200)]
nir/lower_images: handle dec and inc

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agonir/lower_images: fix for array of arrays
Karol Herbst [Mon, 15 Jun 2020 16:29:58 +0000 (18:29 +0200)]
nir/lower_images: fix for array of arrays

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agost/mesa: lower images when needed
Karol Herbst [Mon, 15 Jun 2020 13:14:58 +0000 (15:14 +0200)]
st/mesa: lower images when needed

The "st/pbo download FS" builtin shader uses image derefs, so even with
PIPE_CAP_NIR_IMAGES_AS_DEREF set to 0 drivers ended up with those.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5480>

4 years agoaco: shrink mad_info
Rhys Perry [Mon, 1 Jun 2020 15:19:56 +0000 (16:19 +0100)]
aco: shrink mad_info

From 24 bytes to 16 bytes.

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

4 years agoaco: make ssa_info::label 64-bit
Rhys Perry [Mon, 1 Jun 2020 10:27:53 +0000 (11:27 +0100)]
aco: make ssa_info::label 64-bit

We'll probably need these extra bits in the future.

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

4 years agoaco: shrink ssa_info
Rhys Perry [Mon, 1 Jun 2020 15:13:09 +0000 (16:13 +0100)]
aco: shrink ssa_info

Reorder members so that it's 16 bytes instead of 24.

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

4 years agoradeon/vcn: bump vcn3.0 encode major version to 1
Boyuan Zhang [Thu, 11 Jun 2020 23:22:51 +0000 (19:22 -0400)]
radeon/vcn: bump vcn3.0 encode major version to 1

And add quality params for this version

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoradeon/vcn/enc: Re-write PPS encoding for HEVC
Boyuan Zhang [Thu, 11 Jun 2020 23:17:03 +0000 (19:17 -0400)]
radeon/vcn/enc: Re-write PPS encoding for HEVC

Due to hardware change on VCN3

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoradeon/vcn: add vcn 3.0 encode support
Thong Thai [Thu, 11 Jun 2020 23:02:27 +0000 (19:02 -0400)]
radeon/vcn: add vcn 3.0 encode support

Signed-off-by: Thong Thai <thong.thai@amd.com>
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoradeon/vcn/dec: add db_aligned_height to message buffer
Leo Liu [Thu, 11 Jun 2020 23:27:57 +0000 (19:27 -0400)]
radeon/vcn/dec: add db_aligned_height to message buffer

This is required for Sienna

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoradeon/vcn: add Sienna to use internal register offset
Leo Liu [Thu, 11 Jun 2020 22:40:07 +0000 (18:40 -0400)]
radeon/vcn: add Sienna to use internal register offset

And re-group them explicitly

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoradeon/vcn: reset the decode flags from message buffer
Leo Liu [Thu, 11 Jun 2020 22:28:25 +0000 (18:28 -0400)]
radeon/vcn: reset the decode flags from message buffer

This flag was never used by VCN previously, and now
it's used for feature that is not applied to us.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5501>

4 years agoaco: fix WQM handling in nested loops
Daniel Schürmann [Wed, 17 Jun 2020 11:41:09 +0000 (12:41 +0100)]
aco: fix WQM handling in nested loops

If on a nested loop
- the outer loop needs WQM but
- the inner loop doesn't need WQM and
- the break condition of the inner loop is computed in the outer loop
then it could happen that we transitioned to Exact before entering the inner loop
which could create an empty exec mask and lead to an infinite loop.

Fixes a GPU hang with RDR2

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5518>

4 years agost/mesa: account for "loose", per-mipmap level textures in CopyImageSubData
Danylo Piliaiev [Fri, 12 Jun 2020 13:04:44 +0000 (16:04 +0300)]
st/mesa: account for "loose", per-mipmap level textures in CopyImageSubData

We may have "loose", per-image gallium resources. The src_image->Level
may not match the gallium resource texture level. In such case it is
prescribed (in st_AllocTextureImageBuffer) to specify mipmap level
as zero.

Fixes: f04f13622f3e71bee057d60a6be9c53b92b56cc9
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5477>

4 years agovirgl: apply bgra dest swizzle and add Portal 2
Gurchetan Singh [Mon, 15 Jun 2020 17:52:57 +0000 (10:52 -0700)]
virgl: apply bgra dest swizzle and add Portal 2

Apply the destination swizzle on GLES games based on HL2 engine.
Also add Portal 2 since some people are experiencing issues with
that.

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

4 years agoturnip: set the API version
Jonathan Marek [Wed, 17 Jun 2020 13:57:56 +0000 (09:57 -0400)]
turnip: set the API version

Some CTS tests don't run because of this.

Fixes: 91c757b7963f458 ("turnip: use the common code for generating extensions and dispatch tables")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5522>

4 years agoradv: only requires LLVM 9 for GFX10 if not using ACO
Samuel Pitoiset [Sat, 13 Jun 2020 12:23:17 +0000 (14:23 +0200)]
radv: only requires LLVM 9 for GFX10 if not using ACO

In case someone links RADV with LLVM 8 and wants to use ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5454>

4 years agoRevert "CI: Disable Panfrost Mali-T820 jobs"
Neil Armstrong [Fri, 24 Apr 2020 09:07:32 +0000 (11:07 +0200)]
Revert "CI: Disable Panfrost Mali-T820 jobs"

This reverts commit 46a32f0b6bf91279d001a4905babe4e50007696e.

The lab has recovered health, thus re-enable T820 Panfrost jobs.

Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4727>

4 years agoRevert "CI: Disable Lima jobs due to lab unhealthiness"
Neil Armstrong [Fri, 24 Apr 2020 09:07:31 +0000 (11:07 +0200)]
Revert "CI: Disable Lima jobs due to lab unhealthiness"

This reverts commit adeef43d15092a6910dceb3605f5ee3151dd2c47.

The lab has recovered health, thus re-enable Lima jobs.

Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4727>

4 years agoradv: compute CB_SHADER_MASK from the fragment shader outputs
Samuel Pitoiset [Thu, 11 Jun 2020 14:27:17 +0000 (16:27 +0200)]
radv: compute CB_SHADER_MASK from the fragment shader outputs

The fragment shader doesn't necessarily output the number of components
expected by the target format.

Fixes new dEQP-VK.draw.output_location.*.

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

4 years agoradv: make sure to set CB_SHADER_MASK correctly for internal CB operations
Samuel Pitoiset [Thu, 11 Jun 2020 13:39:46 +0000 (15:39 +0200)]
radv: make sure to set CB_SHADER_MASK correctly for internal CB operations

It should be always set to 0xf.

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

4 years agodocs/features: remove driver-list for forward-compatible context
Erik Faye-Lund [Thu, 18 Jun 2020 08:43:36 +0000 (10:43 +0200)]
docs/features: remove driver-list for forward-compatible context

This is something that's supported by the Gallium state-tracker, there's
nothing to be done per driver here.

4 years agodocs/features: update ARB_texture_buffer_object line
Erik Faye-Lund [Thu, 18 Jun 2020 08:41:43 +0000 (10:41 +0200)]
docs/features: update ARB_texture_buffer_object line

This extension isn't just exposed in OpenGL 3.1 contexts any longer, and
Zink supports it. Let's mark it as such.

4 years agodocs/features: mark GL3 as complete for zink
Erik Faye-Lund [Thu, 18 Jun 2020 08:40:27 +0000 (10:40 +0200)]
docs/features: mark GL3 as complete for zink

4 years agoradv: lower discards to demote to workaround a RDR2 game bug
Samuel Pitoiset [Wed, 17 Jun 2020 14:35:05 +0000 (16:35 +0200)]
radv: lower discards to demote to workaround a RDR2 game bug

This fixes some sort of LOD issue.

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5525>

4 years agoglsl_to_nir: fix vote_any/vote_all
Rob Clark [Wed, 17 Jun 2020 00:46:43 +0000 (17:46 -0700)]
glsl_to_nir: fix vote_any/vote_all

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

4 years agoglsl_to_nir: fix shader_clock
Rob Clark [Wed, 17 Jun 2020 00:45:59 +0000 (17:45 -0700)]
glsl_to_nir: fix shader_clock

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

4 years agoglsl_to_nir: fix is_helper_invocation
Rob Clark [Tue, 16 Jun 2020 23:36:32 +0000 (16:36 -0700)]
glsl_to_nir: fix is_helper_invocation

Reported-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

4 years agospirv: drop some dead code
Rob Clark [Tue, 16 Jun 2020 18:23:26 +0000 (11:23 -0700)]
spirv: drop some dead code

This case is never hit, we don't have a nir intrinsic for this spirv
opcode.  And when we do, I'm not sure if it would be vectorized or not.
So best just to drop this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

4 years agospirv: atomic_counter_read_deref is not vectorized
Rob Clark [Tue, 16 Jun 2020 18:21:29 +0000 (11:21 -0700)]
spirv: atomic_counter_read_deref is not vectorized

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3141
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5505>

4 years agoturnip: fix renderpass gmem configs when there are too many attachments
Jonathan Marek [Tue, 16 Jun 2020 14:45:58 +0000 (10:45 -0400)]
turnip: fix renderpass gmem configs when there are too many attachments

Since a value of at least "align" is used for nblocks, we might end up
with nblocks greater than the number of GMEM blocks remaining. Check for
this case and bail out, sysmem rendering will be used for such cases.

Fixes some of these tests:
dEQP-VK.pipeline.render_to_image.core.*.huge.*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>

4 years agoturnip: fix a sample shading case
Jonathan Marek [Tue, 16 Jun 2020 13:11:02 +0000 (09:11 -0400)]
turnip: fix a sample shading case

Check pipeline's sampleShadingEnable to enable sample shading.

Also fix behavior of gl_Fragcoord with sample shading.

Fixes at least:
dEQP-VK.pipeline.multisample.min_sample_shading.min_0_5.samples_4.primitive_triangle

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>

4 years agoturnip: fix a crash when rasterizerDiscardEnable is set
Jonathan Marek [Wed, 17 Jun 2020 18:23:37 +0000 (14:23 -0400)]
turnip: fix a crash when rasterizerDiscardEnable is set

pMultisampleState needs to be ignored when rasterizerDiscardEnable, so the
current code can crash when trying to load msaa_info->pNext.

At the same time this simplifies tu_pipeline_shader_key_init a bit, by not
calling it for the compute shader case (which doesn't need to set anything
in the key struct).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5499>

4 years agodocs: remind release maintainers to sign the tarballs and publish their key
Eric Engestrom [Fri, 22 Nov 2019 14:21:05 +0000 (14:21 +0000)]
docs: remind release maintainers to sign the tarballs and publish their key

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2857>

4 years agodocs: publish our release maintainers' keys
Eric Engestrom [Fri, 22 Nov 2019 14:10:50 +0000 (14:10 +0000)]
docs: publish our release maintainers' keys

They should be published to various key servers as well, but this
provides the authoritative source for their list.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2140
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2857>

4 years agofreedreno/ir3: update obsolete comment
Rob Clark [Sun, 14 Jun 2020 16:53:11 +0000 (09:53 -0700)]
freedreno/ir3: update obsolete comment

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

4 years agofreedreno/computerator: MERGEDREGS update
Rob Clark [Sat, 13 Jun 2020 17:43:00 +0000 (10:43 -0700)]
freedreno/computerator: MERGEDREGS update

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

4 years agoturnip: set .MERGEDREGS based on variant
Rob Clark [Sat, 13 Jun 2020 16:35:40 +0000 (09:35 -0700)]
turnip: set .MERGEDREGS based on variant

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

4 years agofreedreno/a6xx: set .MERGEREGS based on variant
Rob Clark [Sat, 13 Jun 2020 16:31:11 +0000 (09:31 -0700)]
freedreno/a6xx: set .MERGEREGS based on variant

Also set HALFREGFOOTPRINT, since in the non-mergeregs case this will be
non-zero.

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

4 years agofreedreno/ir3: make mergedregs a property of the variant
Rob Clark [Sat, 13 Jun 2020 03:48:36 +0000 (20:48 -0700)]
freedreno/ir3: make mergedregs a property of the variant

Rather than assuming a6xx+ means mergedregs.  We can actually (mostly?)
do splitregs on a6xx as well.  And GS/DS/HS currently require it, which
might be papering over a bug, or might be something to do with how
chaining shaders works.  At any rate, we should at least be consistent,
and not have the compiler thinking we are doing mergedregs when we are
actually doing splitregs.

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

4 years agofreedreno/ir3: re-work assembler API
Rob Clark [Sat, 13 Jun 2020 17:49:47 +0000 (10:49 -0700)]
freedreno/ir3: re-work assembler API

Just pass thru the variant, since it has everything we need.  And
will be needed in the next patch.

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

4 years agofreedreno/ir3: pass variant to postsched
Rob Clark [Sat, 13 Jun 2020 16:23:57 +0000 (09:23 -0700)]
freedreno/ir3: pass variant to postsched

Prep for the next patch.

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

4 years agofreedreno/ir3: decouple regset from gpu gen
Rob Clark [Sat, 13 Jun 2020 03:56:48 +0000 (20:56 -0700)]
freedreno/ir3: decouple regset from gpu gen

Allow different regset's to coexist, so we can make mergedregs vs split
reg file a variant property.

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

4 years agofreedreno/ir3: move mergedreg state out of reg
Rob Clark [Sat, 13 Jun 2020 03:42:36 +0000 (20:42 -0700)]
freedreno/ir3: move mergedreg state out of reg

It is only needed one place, let's move it there.

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

4 years agofreedreno/ir3: convert regmask_t to struct
Rob Clark [Sat, 13 Jun 2020 03:33:31 +0000 (20:33 -0700)]
freedreno/ir3: convert regmask_t to struct

Prep to make merged/split register file mode a property of the regmask,
rather than the ir3_register.

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

4 years agofreedreno/fdl6: rework layout code a bit (reduce linear align to 64 bytes)
Jonathan Marek [Tue, 9 Jun 2020 22:48:34 +0000 (18:48 -0400)]
freedreno/fdl6: rework layout code a bit (reduce linear align to 64 bytes)

Reduce linear alignment, and rework the layout code a bit.

This rework has a side effect of also increasing the alignment on linear
levels of tiled (non-ubwc) cpp=1 and cpp=2 layouts. Since we should be
UBWC for those cases anyway, its not a big loss.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5013>

4 years agofreedreno/a6xx: FETCHSIZE is PITCHALIGN
Jonathan Marek [Tue, 12 May 2020 16:34:37 +0000 (12:34 -0400)]
freedreno/a6xx: FETCHSIZE is PITCHALIGN

"FETCHSIZE" is actually a "minimum pitch" or "pitchalign" value that's
relevant for mipmaps. The 0 value means 64-bytes. Understanding this allows
some simplifications and will make it possible to use less alignment on
linear formats.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5013>

4 years agovirgl: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:55:41 +0000 (10:55 +0200)]
virgl: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agosvga: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:55:35 +0000 (10:55 +0200)]
svga: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agofreedreno: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:22:47 +0000 (10:22 +0200)]
freedreno: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoetnaviv: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:22:29 +0000 (10:22 +0200)]
etnaviv: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoegl: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:22:22 +0000 (10:22 +0200)]
egl: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoi965: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:55:03 +0000 (10:55 +0200)]
i965: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoiris: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:54:51 +0000 (10:54 +0200)]
iris: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoanv: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:54:43 +0000 (10:54 +0200)]
anv: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoradv: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:22:04 +0000 (10:22 +0200)]
radv: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agovulkan/wsi: replace all dup() with os_dupfd_cloexec()
Eric Engestrom [Fri, 5 Jun 2020 08:55:22 +0000 (10:55 +0200)]
vulkan/wsi: replace all dup() with os_dupfd_cloexec()

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoreplace all F_DUPFD_CLOEXEC with os_dupfd_cloexec()
Eric Engestrom [Thu, 4 Jun 2020 23:09:35 +0000 (01:09 +0200)]
replace all F_DUPFD_CLOEXEC with os_dupfd_cloexec()

All squashed into a single commit because it shouldn't have any
behaviour change, except that it might work now on platforms where it
was broken because F_DUPFD_CLOEXEC is not supported but FD_CLOEXEC is.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoutil: introduce os_dupfd_cloexec() helper
Eric Engestrom [Thu, 4 Jun 2020 23:08:33 +0000 (01:08 +0200)]
util: introduce os_dupfd_cloexec() helper

Adapted from wayland's wl_os_dupfd_cloexec().

Suggested-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoutil/os_file: replace broken windows-detection code with detect_os.h
Eric Engestrom [Fri, 5 Jun 2020 10:39:28 +0000 (12:39 +0200)]
util/os_file: replace broken windows-detection code with detect_os.h

The meson-windows-vs2019 job was going down the `!defined(WIN32)` path,
leading to a broken build once that path contained non-windows code.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

4 years agoci: disable the windows tests until the runner can be stabilized again
Eric Anholt [Wed, 17 Jun 2020 22:29:31 +0000 (15:29 -0700)]
ci: disable the windows tests until the runner can be stabilized again

I've been getting a stream of errors from Marge today like:

FAILED: src/gallium/drivers/llvmpipe/lp_test_conv.exe
link @src/gallium/drivers/llvmpipe/lp_test_conv.exe.rsp
LINK : fatal error LNK1102: out of memory
[1080/1141] Compiling C object src/gallium/frontends/wgl/945cc3d@@wgl@sta/stw_getprocaddress.c.obj

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

4 years agodocs: remove plain-text copy of versions.rst
Eric Engestrom [Fri, 22 May 2020 23:26:57 +0000 (01:26 +0200)]
docs: remove plain-text copy of versions.rst

There's no need to keep both, so let's clean things up a bit.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5178>

4 years agokhronos-update.py: add script to simplify update of Khronos headers & xml files
Eric Engestrom [Fri, 22 May 2020 22:28:23 +0000 (00:28 +0200)]
khronos-update.py: add script to simplify update of Khronos headers & xml files

The idea is to have the canonical source of each of those files
available without having to remember anything, and to be able to update
all the Vulkan files by simply running `bin/khronos-update.py vulkan`.

The script also handles the fact all the EGL/GL/GLES* headers depend on
the KHR header, and the former should not be updated without updating
the latter.

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

4 years agozink: enable xfb extension in screen creation
Mike Blumenkrantz [Mon, 1 Jun 2020 19:01:47 +0000 (15:01 -0400)]
zink: enable xfb extension in screen creation

switch around the feature enabling as well since extensions need the related
feature to also be enabled in order to function

fixes mesa/mesa#2868

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

4 years agozink: switch to passing VkPhysicalDeviceFeatures2 in VkDeviceCreateInfo
Mike Blumenkrantz [Wed, 3 Jun 2020 12:45:57 +0000 (08:45 -0400)]
zink: switch to passing VkPhysicalDeviceFeatures2 in VkDeviceCreateInfo

extensions need to have their feature structs passed in pNext to be enabled,
so switch to using the feature struct here in preparation for that

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

4 years agozink: set PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED and remove POS special casing
Mike Blumenkrantz [Wed, 17 Jun 2020 17:47:22 +0000 (13:47 -0400)]
zink: set PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED and remove POS special casing

this cap creates a different varying output which remains constant to be
emitted by xfb, allowing us to drop the special-casing code in ntv

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

4 years agozink: implement transform feedback support to finish off opengl 3.0
Mike Blumenkrantz [Mon, 1 Jun 2020 18:59:15 +0000 (14:59 -0400)]
zink: implement transform feedback support to finish off opengl 3.0

this adds:
* context hooks for gallium stream output methods
* handling for xfb-related queries
* barrier management for pausing and resuming xfb

loosely based on patches originally written by Dave Airlie <airlied@redhat.com>

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

4 years agozink: implement streamout and xfb handling in ntv
Mike Blumenkrantz [Mon, 1 Jun 2020 18:49:44 +0000 (14:49 -0400)]
zink: implement streamout and xfb handling in ntv

this translates streamout info into xfb decorations and adds some workaround
handling for spurious gl_PointSize values

partly based on patches originally written by Dave Airlie <airlied@redhat.com>

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

4 years agozink: add spirv_builder methods for OpVectorExtractDynamic and OpVectorInsertDynamic
Mike Blumenkrantz [Thu, 4 Jun 2020 21:01:58 +0000 (17:01 -0400)]
zink: add spirv_builder methods for OpVectorExtractDynamic and OpVectorInsertDynamic

based on spirv specs

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

4 years agozink: add spirv builder util functions for emitting xfb decorations
Mike Blumenkrantz [Mon, 1 Jun 2020 18:55:38 +0000 (14:55 -0400)]
zink: add spirv builder util functions for emitting xfb decorations

based on patches originally written by Dave Airlie <airlied@redhat.com>

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

4 years agozink: use '2' variants for device props/feats, check features for ext enabling
Mike Blumenkrantz [Wed, 20 May 2020 14:08:42 +0000 (10:08 -0400)]
zink: use '2' variants for device props/feats, check features for ext enabling

technically both the extension and feature should be checked when enabling
extensions, and some features cannot be properly enabled without using
the more descriptive versions of these APIs

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

4 years agoturnip: use u_format for packing gmem clear values
Jonathan Marek [Mon, 15 Jun 2020 20:31:33 +0000 (16:31 -0400)]
turnip: use u_format for packing gmem clear values

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5485>

4 years agodocs: fixup relnotes after rst-conversion
Erik Faye-Lund [Mon, 15 Jun 2020 09:52:42 +0000 (11:52 +0200)]
docs: fixup relnotes after rst-conversion

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

4 years agoradv/aco: enable FP16 features/extensions on GFX9+
Samuel Pitoiset [Fri, 5 Jun 2020 07:27:01 +0000 (09:27 +0200)]
radv/aco: enable FP16 features/extensions on GFX9+

This enables shaderFloat16, VK_AMD_gpu_shader_half_float and
VK_AMD_gpu_shader_int16.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5347>

4 years agoaco: fix validation of opsel when set for the definition
Rhys Perry [Wed, 17 Jun 2020 13:50:10 +0000 (14:50 +0100)]
aco: fix validation of opsel when set for the definition

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

4 years agoturnip: use draw states for input attachments
Jonathan Marek [Tue, 16 Jun 2020 16:34:57 +0000 (12:34 -0400)]
turnip: use draw states for input attachments

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: input attachment descriptor set rework
Jonathan Marek [Mon, 15 Jun 2020 03:10:01 +0000 (23:10 -0400)]
turnip: input attachment descriptor set rework

Implement GMEM input attachments by using non-bindless texture state which
is emitted at the start of every subpass.

This achieves two things:
* More vulkan-like CmdBindDescriptorSets
* Fixing secondary command buffer input attachments with GMEM

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: refactor draw states and dynamic states
Jonathan Marek [Sun, 14 Jun 2020 14:52:37 +0000 (10:52 -0400)]
turnip: refactor draw states and dynamic states

This reworks dynamic states to use draw states, and reworks draw states.

This moves towards doing as little as possible in bind_draw_states.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: delete dead dynamic state code
Jonathan Marek [Sun, 14 Jun 2020 14:34:25 +0000 (10:34 -0400)]
turnip: delete dead dynamic state code

Remove unused code, split this out to reduce the diff in the next patch.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: improve dirty bit handling a bit
Jonathan Marek [Sun, 14 Jun 2020 14:30:10 +0000 (10:30 -0400)]
turnip: improve dirty bit handling a bit

This moves some logic out of bind_draw_states, moving towards the eventual
goal of doing very little in bind_draw_states.

Split this out as a separate patch to make the DIRTY_INPUT_ATTACHMENTS more
visible: it can be safely removed because pipelines are subpass specific,
so there will always be a pipeline change to go with the CmdBeginRenderPass
and CmdNextSubpass (the CmdBindPipeline may not be in the subpass, but the
draw that flushes the pipeline update will be).

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: move descriptor set BO tracking to CmdBindDescriptorSets
Jonathan Marek [Sun, 14 Jun 2020 14:17:28 +0000 (10:17 -0400)]
turnip: move descriptor set BO tracking to CmdBindDescriptorSets

This avoids the duplicated code.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agoturnip: compute and graphics have completely separate state
Jonathan Marek [Sun, 14 Jun 2020 14:15:45 +0000 (10:15 -0400)]
turnip: compute and graphics have completely separate state

The comment about fragment shader state overwriting compute shader state
is wrong, if either path is overwriting the other's state then it is a
mistake.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>

4 years agotu: Actually remove dead variables after io lowering
Connor Abbott [Wed, 17 Jun 2020 13:39:18 +0000 (15:39 +0200)]
tu: Actually remove dead variables after io lowering

I forgot that their derefs would still be lying around, so we need to
eliminate them first.

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

4 years agoir3: Don't calculate num_samp ourselves
Connor Abbott [Wed, 17 Jun 2020 09:07:26 +0000 (11:07 +0200)]
ir3: Don't calculate num_samp ourselves

In addition to duplicating what core NIR does better, this was wrong for
Vulkan, where it should be 0 as there are no non-bindless samplers.

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

4 years agotu: Set num_components to 0 when building bindless intrinsics
Connor Abbott [Wed, 17 Jun 2020 13:47:29 +0000 (15:47 +0200)]
tu: Set num_components to 0 when building bindless intrinsics

Fixes: 167fa288 (" nir/validate: validate intr->num_components")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5520>

4 years agotu: Remove tu_shader_compile_options
Connor Abbott [Tue, 16 Jun 2020 15:00:31 +0000 (17:00 +0200)]
tu: Remove tu_shader_compile_options

The only two fields were always true, and I don't think we'd ever have
use for them. If we want to disable optimizations then we'd need a
different approach, and I don't even know what include_binning_pass was
for.

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

4 years agotu: Use the ir3 shader API
Connor Abbott [Tue, 16 Jun 2020 09:44:23 +0000 (11:44 +0200)]
tu: Use the ir3 shader API

This will be necessary once we start compiling multiple variants due to
different const size limits, and it will also be necessary for properly
implementing the pipeline cache.

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

4 years agotu: Remove num_samp hack
Connor Abbott [Wed, 17 Jun 2020 11:02:49 +0000 (13:02 +0200)]
tu: Remove num_samp hack

Delete the variables so that ir3 thinks there are no samplers and
images instead.

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