platform/upstream/mesa.git
3 years agointel/genxml: Make BindingTablePoolEnable a bool
Jason Ekstrand [Mon, 11 May 2020 17:47:59 +0000 (12:47 -0500)]
intel/genxml: Make BindingTablePoolEnable a bool

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

3 years agointel/tools: Handle GT_MODE in the batch decoder
Jason Ekstrand [Mon, 11 May 2020 20:31:57 +0000 (15:31 -0500)]
intel/tools: Handle GT_MODE in the batch decoder

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

3 years agointel/tools: Handle milti-LRI in the batch decoder
Jason Ekstrand [Mon, 11 May 2020 20:54:43 +0000 (15:54 -0500)]
intel/tools: Handle milti-LRI in the batch decoder

Context batches tend to have a lot of multi-LRI and, if we want to be
able to parse those registers nicely, we really handle it.

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

3 years agointel/genxml: Binding table pointers are 15 bits on GFX version 12.5+
Jason Ekstrand [Sat, 20 Mar 2021 15:11:00 +0000 (10:11 -0500)]
intel/genxml: Binding table pointers are 15 bits on GFX version 12.5+

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

3 years agointel/genxml: Add a partial GT_MODE definition for Gen11+.
Kenneth Graunke [Tue, 25 Jun 2019 20:15:47 +0000 (13:15 -0700)]
intel/genxml: Add a partial GT_MODE definition for Gen11+.

I chose to drop "HW" from the name of this field because on Gen11
it applies to both HW and SW binding tables, so it's a bit of a
misnomer.

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

3 years agoscons: Remove.
Jose Fonseca [Fri, 19 Mar 2021 20:08:54 +0000 (20:08 +0000)]
scons: Remove.

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

3 years agoappveyor: Remove integration.
Jose Fonseca [Fri, 19 Mar 2021 20:00:31 +0000 (20:00 +0000)]
appveyor: Remove integration.

It's only testing SCons w/ MSVC at this moment.

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

3 years agoetnaviv: rename struct members
Christian Gmeiner [Mon, 14 Dec 2020 14:44:15 +0000 (15:44 +0100)]
etnaviv: rename struct members

As the structs are used for TE and NTE change the naming of the
struct members to be more generic.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>

3 years agoetnaviv: add support for NTE
Christian Gmeiner [Sat, 12 Dec 2020 14:28:48 +0000 (15:28 +0100)]
etnaviv: add support for NTE

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>

3 years agoetnaviv: factor out TS state emitting
Christian Gmeiner [Sat, 12 Dec 2020 14:24:21 +0000 (15:24 +0100)]
etnaviv: factor out TS state emitting

Will be reused in NTE path.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>

3 years agoetnaviv: etnaviv: put sampler limit determination into own function
Christian Gmeiner [Mon, 21 Dec 2020 09:02:34 +0000 (10:02 +0100)]
etnaviv: etnaviv: put sampler limit determination into own function

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8103>

3 years agoclover: Add constructor for sampler_argument.
Vinson Lee [Fri, 22 Jan 2021 21:18:55 +0000 (13:18 -0800)]
clover: Add constructor for sampler_argument.

Fix defects reported by Coverity Scan.

member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize s.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8657>

3 years agoradv: Dedupe winsyses per device.
Bas Nieuwenhuizen [Wed, 17 Mar 2021 13:25:58 +0000 (14:25 +0100)]
radv: Dedupe winsyses per device.

The heap usage/budget needs to be tracked per process instead
of per device.

Fixes: 7bef1920182 ("radv: add support for VK_EXT_memory_budget")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9651>

3 years agovirgl: Use atomic operation directly.
Lepton Wu [Fri, 19 Mar 2021 20:57:13 +0000 (13:57 -0700)]
virgl: Use atomic operation directly.

This make sure we don't trigger assert in pipe_reference

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: John Bates <jbates@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9722>

3 years agoci/freedreno: Mark glx-swap-copy as a flake on a630.
Eric Anholt [Fri, 19 Mar 2021 16:59:01 +0000 (09:59 -0700)]
ci/freedreno: Mark glx-swap-copy as a flake on a630.

Just flaked on a post-merge pipeline.

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

3 years agoci/bare-metal: Move the db820c lockup detect to the right boot script.
Eric Anholt [Fri, 19 Mar 2021 16:38:47 +0000 (09:38 -0700)]
ci/bare-metal: Move the db820c lockup detect to the right boot script.

Fixes: 2407952ec99a ("ci/bare-metal: Restart a run on intermittent kernel lockups.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9715>

3 years agoci/freedreno: Mark all of dEQP TF as flaky.
Eric Anholt [Fri, 19 Mar 2021 16:34:59 +0000 (09:34 -0700)]
ci/freedreno: Mark all of dEQP TF as flaky.

I keep working on stabilizing it, but no luck yet.  Stop blocking CI on
our flakes.

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

3 years agozink: rewrite queue dispatch to use monotonic batch ids instead of hardcoded ones
Mike Blumenkrantz [Thu, 5 Nov 2020 17:39:50 +0000 (12:39 -0500)]
zink: rewrite queue dispatch to use monotonic batch ids instead of hardcoded ones

historically zink has been bound to 4 gfx batches and then a separate compute batch
was added. this is not ideal for a number of reasons, the primary one being that if
an application performs 5 glFlush commands, the fifth one will force a gpu stall

this patch aims to do the following, all of which are necessarily done in the same patch
because they can't be added incrementally and still have the same function:
* rewrite batch tracking for resources/views/queries/descriptors/...
  |originally this was done with a single uint32_t as a bitmask, but that becomes cumbersome
   to track as batch counts increase, not to mention it becomes doubly-annoying
   when factoring in separate compute batches with their own ids. zink_batch_usage gives
   us separate tracking for gfx and compute batches along with a standardized api for
   managing usage
* flatten batch objects to a gfx batch and a compute batch
  |these are separate queues, so we can use an enum to choose between an array[2] of
   all batch-related objects
* switch to monotonic batch ids with batch "states"
  |with the flattened queues, we can just use monotonic uints to represent batch ids,
   thus freeing us from constantly using bitfield operations here and also enabling
   batch counts to scale dynamically by allocating/caching "states" that represent a batch
   for a given queue

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

3 years agozink: split off a bunch of batch struct members to new batch state struct
Mike Blumenkrantz [Fri, 19 Mar 2021 15:06:56 +0000 (11:06 -0400)]
zink: split off a bunch of batch struct members to new batch state struct

this is just a cosmetic patch intended for review, skip this in bisects

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

3 years agollvmpipe/setup: use bigger hammer to force fs constant updating correctly
Mike Blumenkrantz [Fri, 19 Mar 2021 14:10:58 +0000 (10:10 -0400)]
llvmpipe/setup: use bigger hammer to force fs constant updating correctly

this race condition between destroying ubo backing memory in lavapipe and
performing descriptor updates can be triggered from more than just queries,
so forcing the update just before the Problem Area seems like the best way to
permanently resolve the issue

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

3 years agomeson, util: Make zlib optional again
Jesse Natalie [Thu, 18 Mar 2021 16:12:46 +0000 (09:12 -0700)]
meson, util: Make zlib optional again

This adds a HAVE_COMPRESSION macro, which is undefined if neither zlib
nor zstd are present, and is used to no-op compress.h/c. This also has
a side effect of fixing SCons, since it won't define this macro.

Fixes: d7ecbd5bf837 ("util: create some standalone compression helpers")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9689>

3 years agopanfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler
Jesse Natalie [Fri, 19 Mar 2021 18:17:54 +0000 (11:17 -0700)]
panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler

Fixes: 2d4597de ("pan/bi: Use autogenerated modifiers")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9719>

3 years agovirgl: Don't destroy resource while it's in use.
Lepton Wu [Fri, 19 Mar 2021 06:05:19 +0000 (23:05 -0700)]
virgl: Don't destroy resource while it's in use.

This is the race condition: thread 1 check reference count of resource
and then find out out it's zero and then it begin to destroy it. Around
the same time, thread 2 gets the lock and get the resource from the hash
table and plan to use it. Then this resource gets destroyed while it's
still in use.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9701>

3 years agolavapipe: Fix type narrowing
Michel Zou [Fri, 19 Mar 2021 09:28:27 +0000 (10:28 +0100)]
lavapipe: Fix type narrowing

On win32 long size is 4 and narrows down pointer size on i686

Fixes: a986d1ed (lavapipe: add support for KHR_buffer_device_address.)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9706>

3 years agoradv: lower variables to ssa before nir_propagate_invariant
Rhys Perry [Wed, 13 Jan 2021 16:57:13 +0000 (16:57 +0000)]
radv: lower variables to ssa before nir_propagate_invariant

Variables make the propagation more conservative than it needs to be.

fossil-db (GFX10.3, based on !8056):
Totals from 22102 (15.86% of 139391) affected shaders:
SGPRs: 1103833 -> 1104265 (+0.04%); split: -0.06%, +0.10%
VGPRs: 851316 -> 849396 (-0.23%); split: -0.58%, +0.35%
CodeSize: 34422452 -> 34206052 (-0.63%); split: -0.72%, +0.09%
MaxWaves: 291050 -> 291186 (+0.05%); split: +0.23%, -0.18%
Instrs: 6749188 -> 6662804 (-1.28%); split: -1.37%, +0.09%
Cycles: 63456312 -> 62995828 (-0.73%); split: -0.92%, +0.20%

fossil-db (GFX10.3):
Totals from 841 (0.60% of 139391) affected shaders:
VGPRs: 44444 -> 44500 (+0.13%)
CodeSize: 3985604 -> 3987188 (+0.04%); split: -0.11%, +0.15%
Instrs: 748847 -> 749174 (+0.04%); split: -0.13%, +0.18%
Cycles: 35801628 -> 35825676 (+0.07%); split: -0.23%, +0.30%

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

3 years agoir3: disallow .sat on SEL instructions
Danylo Piliaiev [Wed, 17 Mar 2021 19:39:47 +0000 (21:39 +0200)]
ir3: disallow .sat on SEL instructions

Saturation is unsupported on SEL instructions.

Fixes main menu rendering in Genshin Impact.

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

3 years agoci/lavapipe: split out lavapipe ci into lavapipe dir
Mike Blumenkrantz [Thu, 18 Mar 2021 19:58:04 +0000 (15:58 -0400)]
ci/lavapipe: split out lavapipe ci into lavapipe dir

there's no need to run llvmpipe jobs if only lavapipe has changed

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9695>

3 years agoradeonsi: add a fast path for MSAA resolving with RGB -> BGR swizzling
Marek Olšák [Mon, 8 Mar 2021 11:26:23 +0000 (06:26 -0500)]
radeonsi: add a fast path for MSAA resolving with RGB -> BGR swizzling

When we encounter a situation when we need to swizzle, which the CB can't
resolve in one pass, swap the channel order on the next clear, so that we
don't have to swizzle.

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

3 years agoradeonsi: select the optimal micro tile mode at clear regardless of fast clear
Marek Olšák [Wed, 17 Mar 2021 18:42:44 +0000 (14:42 -0400)]
radeonsi: select the optimal micro tile mode at clear regardless of fast clear

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

3 years agoutil: add new helper util_format_rgb_to_bgr
Marek Olšák [Mon, 15 Mar 2021 23:55:35 +0000 (19:55 -0400)]
util: add new helper util_format_rgb_to_bgr

We have BGR formats for all RGB formats where it matters except
USCALED/SSCALED. radeonsi will use it.

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

3 years agoutil: fail assertion in util_format_linear if it can't translate SRGB format
Marek Olšák [Mon, 15 Mar 2021 23:54:40 +0000 (19:54 -0400)]
util: fail assertion in util_format_linear if it can't translate SRGB format

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

3 years agoutil: add most missing formats with reversed RGB channel order
Marek Olšák [Mon, 15 Mar 2021 23:51:42 +0000 (19:51 -0400)]
util: add most missing formats with reversed RGB channel order

This will be used for RGB->BGR enum translation.

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

3 years agoglx/drisw: Implement WaitX and WaitGL
Adam Jackson [Thu, 18 Mar 2021 17:50:02 +0000 (13:50 -0400)]
glx/drisw: Implement WaitX and WaitGL

My goodness.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9696>

3 years agozink: correctly clamp samplerview surface types
Mike Blumenkrantz [Thu, 18 Mar 2021 14:45:49 +0000 (10:45 -0400)]
zink: correctly clamp samplerview surface types

this fixes a bunch of cube stuff, e.g., spec@oes_texture_view@sampling-2d-array-as-cubemap-array

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>

3 years agozink: improve surface viewtype clamping
Mike Blumenkrantz [Thu, 18 Mar 2021 14:48:26 +0000 (10:48 -0400)]
zink: improve surface viewtype clamping

a cube array can still work with a nonzero first layer

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>

3 years agozink: break out surface viewtype clamping into util function
Mike Blumenkrantz [Thu, 18 Mar 2021 14:45:16 +0000 (10:45 -0400)]
zink: break out surface viewtype clamping into util function

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9685>

3 years agoglx: Remove windows' stub {bind,release}_text_image context hooks
Adam Jackson [Thu, 18 Mar 2021 15:42:38 +0000 (11:42 -0400)]
glx: Remove windows' stub {bind,release}_text_image context hooks

All this could have done is make GLX_EXT_texture_from_pixmap appear to
be supported when it won't work.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>

3 years agoglx: Pull get_proc_address out of the context vtable
Adam Jackson [Thu, 18 Mar 2021 15:36:12 +0000 (11:36 -0400)]
glx: Pull get_proc_address out of the context vtable

One, only applegl needs this. Two, this isn't a function of the context
in any way so it doesn't belong in the context vtable. Just special-case
applegl for now, we can revisit applegl's dispatch later.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>

3 years agoglx: Pull use_x_font out of the context vtable
Adam Jackson [Thu, 11 Mar 2021 18:41:40 +0000 (13:41 -0500)]
glx: Pull use_x_font out of the context vtable

The client-side implementation of this operates entirely in terms of the
GL and X client APIs. There's nothing DRI-specific about it, evidenced
by apple and windows using it unchanged. Save a little code size by
handling the direct/indirect difference directly.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9690>

3 years agoegl/wayland: avoid unnecessary roundtrip when authenticated
Simon Ser [Fri, 19 Mar 2021 08:17:44 +0000 (09:17 +0100)]
egl/wayland: avoid unnecessary roundtrip when authenticated

When the compositor advertises a render node, we don't need to
perform DRM authentication. Skip the unnecessary roundtrip in this
case.

Signed-off-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9704>

3 years agodocs: simplify format requirements
Erik Faye-Lund [Tue, 16 Mar 2021 09:44:27 +0000 (10:44 +0100)]
docs: simplify format requirements

When I initially started writing these lists, I expected the lists to be
much less uniform in what bits were required. Turns out I was wrong, and
this ended up really neat and orderly.

I'm sure we're missing some defacto requirements here and there,
especially for the early versions. This list is based on what we check
for in version.c, and it's better than nothing.

Suggested by Mike Blumenkrantz.

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

3 years agodocs: document zink GL 4.6 requirements
Erik Faye-Lund [Mon, 15 Mar 2021 16:44:13 +0000 (17:44 +0100)]
docs: document zink GL 4.6 requirements

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

3 years agodocs: document zink GL 4.5 requirements
Erik Faye-Lund [Mon, 15 Mar 2021 16:38:28 +0000 (17:38 +0100)]
docs: document zink GL 4.5 requirements

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

3 years agodocs: document zink GL 4.4 requirements
Erik Faye-Lund [Mon, 15 Mar 2021 16:27:04 +0000 (17:27 +0100)]
docs: document zink GL 4.4 requirements

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

3 years agodocs: document zink GL 4.3 requirements
Erik Faye-Lund [Mon, 15 Mar 2021 16:21:38 +0000 (17:21 +0100)]
docs: document zink GL 4.3 requirements

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

3 years agodocs: remove excessive quoting
Erik Faye-Lund [Tue, 16 Mar 2021 09:32:49 +0000 (10:32 +0100)]
docs: remove excessive quoting

Triple backticks doesn't mean anything in RST, so this becomes quoted
strings containing backticks. That's not what I meant here...

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

3 years agodocs: remove excessive wrapping
Erik Faye-Lund [Mon, 15 Mar 2021 16:34:02 +0000 (17:34 +0100)]
docs: remove excessive wrapping

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

3 years agodocs: remove stray newline
Erik Faye-Lund [Mon, 15 Mar 2021 16:21:25 +0000 (17:21 +0100)]
docs: remove stray newline

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

3 years agoaco: add ACO_DEBUG=liveinfo
Rhys Perry [Mon, 15 Mar 2021 14:17:14 +0000 (14:17 +0000)]
aco: add ACO_DEBUG=liveinfo

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

3 years agodocs: document ACO_DEBUG=perfinfo
Rhys Perry [Mon, 15 Mar 2021 14:17:57 +0000 (14:17 +0000)]
docs: document ACO_DEBUG=perfinfo

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

3 years agoaco: add aco_print_program() flags to print live_out and register demand
Rhys Perry [Mon, 15 Mar 2021 14:15:29 +0000 (14:15 +0000)]
aco: add aco_print_program() flags to print live_out and register demand

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

3 years agoaco: add aco_print_program() flag to print kill flags
Rhys Perry [Mon, 15 Mar 2021 14:08:33 +0000 (14:08 +0000)]
aco: add aco_print_program() flag to print kill flags

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

3 years agoaco: implement image_deref_samples
Rhys Perry [Thu, 18 Mar 2021 15:02:30 +0000 (15:02 +0000)]
aco: implement image_deref_samples

It used to be that this intrinsic was never created and texture
instructions were always used.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 50881d59e66 ("compiler/spirv: fix image sample queries")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9686>

3 years agogenxml/gen12: 3D_MODE bits 31:16 are no longer must-be-one
Jordan Justen [Wed, 10 Mar 2021 17:54:15 +0000 (09:54 -0800)]
genxml/gen12: 3D_MODE bits 31:16 are no longer must-be-one

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505>

3 years agoi965/gen11: Fix must-be-ones bit positions in 3D_MODE
Jordan Justen [Wed, 10 Mar 2021 17:26:13 +0000 (09:26 -0800)]
i965/gen11: Fix must-be-ones bit positions in 3D_MODE

Fixes: f0d29238df3 ("i965/gen11: Emit SLICE_HASH_TABLE when pipes are unbalanced.")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9505>

3 years agoRevert "glsl/test: Don't run whitespace tests in parallel"
Michel Dänzer [Fri, 19 Feb 2021 16:59:56 +0000 (17:59 +0100)]
Revert "glsl/test: Don't run whitespace tests in parallel"

This reverts commit c60cea0daa2b140547088188d90bce6f09bb1517.

Didn't have the intended effect, and slowed down the meson test run.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoRevert "meson: add enable-glcpp-tests option"
Michel Dänzer [Thu, 11 Mar 2021 17:23:56 +0000 (18:23 +0100)]
Revert "meson: add enable-glcpp-tests option"

This reverts commit f9ae947e7272897bc31b0ec9dca3be0d7ab33119.

Not needed anymore.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoRevert "ci: disable glcpp tests for now"
Michel Dänzer [Fri, 12 Feb 2021 14:41:30 +0000 (15:41 +0100)]
Revert "ci: disable glcpp tests for now"

This reverts commit e25a3e21f83390342a1de5f13d41caa0ea076dfa.

The test timeouts should be fixed now.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoglsl/tests: Use exit code 126 to detect valgrind errors
Michel Dänzer [Fri, 5 Mar 2021 23:24:09 +0000 (00:24 +0100)]
glsl/tests: Use exit code 126 to detect valgrind errors

valgrind returns exit code 126 if it can't write to the file passed to
--log-file. Hopefully it'll be the same for any other invalid valgrind
command line parameters or internal errors as well.

Using a different exit code (31) for this was hiding the fact that the
valgrind test wasn't actually working.

v2:
* Use exit code 126; can't treat any non-0 exit code as failure because
  glcpp is expected to exit with non-0 for some of the input we feed it

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoglsl/tests: Don't use tempfiles
Michel Dänzer [Fri, 5 Mar 2021 22:05:51 +0000 (23:05 +0100)]
glsl/tests: Don't use tempfiles

Use pipes for direct communication between child & parent process.

Using tempfiles sometimes resulted in hitting the meson timeout if there
was high filesystem pressure (I saw a single unlink system call take as
long as 4 seconds; attempts to re-use a single tempfile just shifted the
delays to truncate/close systems calls).

As a bonus, this gets the valgrind test actually working as intended.
It wasn't working because the tempfile passed to --log-file didn't exist
(due to the earlier os.close(fd)?).

v2:
* Wrap .read() in "with open()" (Dylan Baker)

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoglsl/tests: Bump glcpp valgrind test timeout to 240 seconds
Michel Dänzer [Thu, 11 Mar 2021 17:04:30 +0000 (18:04 +0100)]
glsl/tests: Bump glcpp valgrind test timeout to 240 seconds

Once it's actually working as intended again, it may need that much
time.

v2:
* Bump to 240 seconds, still hit timeouts with 180.
* Don't change test priority.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoci: Disable valgrind in some build jobs
Michel Dänzer [Thu, 11 Mar 2021 17:17:52 +0000 (18:17 +0100)]
ci: Disable valgrind in some build jobs

Once the glcpp valgrind test works as intended again, it would delay
the dependent test jobs by ~1-4 minutes.

The meson-clover job would run the glcpp valgrind test multiple times
and take more than 10 minutes to finish.

valgrind can't work in the meson-android job, would need an ARM backend.

v2:
* Disable in meson-clover as well.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoglcpp: Fully initialize struct gl_context
Michel Dänzer [Fri, 5 Mar 2021 22:48:00 +0000 (23:48 +0100)]
glcpp: Fully initialize struct gl_context

valgrind flagged members of gl_ctx->Extensions being used uninitialized:

==23417== Conditional jump or move depends on uninitialised value(s)
==23417==    at 0x112642: _glcpp_parser_handle_version_declaration.part.0 (glcpp-parse.y:2493)
==23417==    by 0x11A515: glcpp_lex_update_state_per_token (glcpp-lex.l:132)
==23417==    by 0x11A515: glcpp_lex (glcpp-lex.l:547)
==23417==    by 0x114D46: glcpp_parser_lex (glcpp-parse.y:2302)
==23417==    by 0x114D46: glcpp_parser_parse (glcpp-parse.c:1871)
==23417==    by 0x11ADC6: glcpp_preprocess (pp.c:238)
==23417==    by 0x111384: main (glcpp.c:174)
==23417==  Uninitialised value was created by a stack allocation
==23417==    at 0x111295: main (glcpp.c:136)

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agoRevert "ci: Restrict meson-gallium job to gstreamer runners"
Michel Dänzer [Thu, 11 Mar 2021 11:53:15 +0000 (12:53 +0100)]
Revert "ci: Restrict meson-gallium job to gstreamer runners"

This reverts commit 4b4bddcd99e7e98dc3e738f113cf6fa5d2225e6f.

Not needed anymore with the previous fix.

Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agointel/tools: Use subprocess.Popen to read output directly from a pipe
Michel Dänzer [Fri, 5 Mar 2021 16:49:03 +0000 (17:49 +0100)]
intel/tools: Use subprocess.Popen to read output directly from a pipe

Instead of using tempfiles to communicate between child & parent
process. The latter sometimes resulted in hitting the meson timeout if
there was high filesystem pressure.

Fixes: ccaa5b034f48 "intel/tools: rewrite run-test.sh in python"
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9528>

3 years agollvmpipe/setup: force fs constant updating upon beginning queries
Mike Blumenkrantz [Thu, 18 Mar 2021 17:31:01 +0000 (13:31 -0400)]
llvmpipe/setup: force fs constant updating upon beginning queries

this flushes any pending updates and avoids trying to access constant buffers
which have been unset (and are also potentially deleted)

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

3 years agolavapipe: force state updates when beginning queries
Mike Blumenkrantz [Thu, 18 Mar 2021 17:36:49 +0000 (13:36 -0400)]
lavapipe: force state updates when beginning queries

the full state update is maybe not entirely necessary since this is just
to address descriptor use, but probably it won't hurt

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

3 years agolavapipe: rewrite cmdbufs to always do descriptor binds/pushes first
Mike Blumenkrantz [Thu, 18 Mar 2021 17:34:32 +0000 (13:34 -0400)]
lavapipe: rewrite cmdbufs to always do descriptor binds/pushes first

llvmpipe has some crazy dependency ordering with constant buffers that
I don't want to mess with, so instead this ensures that descriptors are
always updated as early in the command stream as possible, avoiding any
use-after-free scenarios which might result from lavapipe freeing memory
in a still-bound descriptor that's pending an update

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

3 years agoglsl: add compilation errors for attribute and varying qualifiers
Timothy Arceri [Fri, 12 Mar 2021 07:25:15 +0000 (18:25 +1100)]
glsl: add compilation errors for attribute and varying qualifiers

These qualifiers were removed in GLSL 4.20 and GLSL ES 3.00. For
desktop GL they are now only allowed if the shader is declared as
a compatibility shader.

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

3 years agolavapipe: support VK_KHR_copy_commands2
Mike Blumenkrantz [Thu, 18 Mar 2021 18:13:21 +0000 (14:13 -0400)]
lavapipe: support VK_KHR_copy_commands2

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

3 years agozink: flatten 2d_array surfaces when necessary
Mike Blumenkrantz [Thu, 18 Mar 2021 14:17:25 +0000 (10:17 -0400)]
zink: flatten 2d_array surfaces when necessary

same as cube types, if this is a single layer then it's not an array

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

3 years agopanfrost: Disable early-z when alpha test is used
Icecream95 [Thu, 18 Mar 2021 07:02:22 +0000 (20:02 +1300)]
panfrost: Disable early-z when alpha test is used

Fixes rendering artefacts in Minetest on Midgard.

Fixes: 275277a2b48 ("panfrost: Implement alpha testing natively")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9676>

3 years agoanv: use the device size of CS prefetch to pad secondary buffer calls
Lionel Landwerlin [Thu, 18 Mar 2021 09:05:17 +0000 (11:05 +0200)]
anv: use the device size of CS prefetch to pad secondary buffer calls

Signed-off-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/9679>

3 years agointel/mi_builder: use device info to use the right CS prefetch size
Lionel Landwerlin [Thu, 18 Mar 2021 09:04:49 +0000 (11:04 +0200)]
intel/mi_builder: use device info to use the right CS prefetch size

Signed-off-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/9679>

3 years agointel/dev: store size of CS prefetch
Lionel Landwerlin [Thu, 18 Mar 2021 09:03:35 +0000 (11:03 +0200)]
intel/dev: store size of CS prefetch

Signed-off-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/9679>

3 years agolavapipe: fix templated descriptor updates
Dave Airlie [Thu, 18 Mar 2021 04:09:50 +0000 (14:09 +1000)]
lavapipe: fix templated descriptor updates

The template path was buggy but CTS only tested it with Vulkan 1.1 enabled.

It was just missing the dstArrayElement offset.

Fixes: 41f7fa273d21 ("lavapipe: add support for VK_KHR_descriptor_update_template")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9675>

3 years agolavapipe: drop unused vk_format in image struct
Dave Airlie [Sun, 14 Mar 2021 20:14:14 +0000 (06:14 +1000)]
lavapipe: drop unused vk_format in image struct

This wasn't used at all.

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

3 years agolavapipe: add missing device group api
Dave Airlie [Tue, 9 Mar 2021 05:25:48 +0000 (15:25 +1000)]
lavapipe: add missing device group api

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

3 years agolavapipe: add missing sampler minmax properties
Dave Airlie [Wed, 17 Mar 2021 05:31:33 +0000 (15:31 +1000)]
lavapipe: add missing sampler minmax properties

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

3 years agolavapipe: fix image format properties
Dave Airlie [Tue, 22 Dec 2020 07:24:19 +0000 (17:24 +1000)]
lavapipe: fix image format properties

Fix the sample counts for compressed + non-renderable + cube compatible

Fix the mip levels max calcs

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

3 years agofreedreno/ir3: Demote centroid usage to pixel on non-msaa.
Eric Anholt [Tue, 16 Mar 2021 19:00:01 +0000 (12:00 -0700)]
freedreno/ir3: Demote centroid usage to pixel on non-msaa.

Like with the sample qualifier on all GPUs, use pixel on older HW when
MSAA rasterization is disabled to get reliable results.  Since I ran many
CI jobs on this, this updates the A530 TF flakes list, though I don't
think that this MR necessarily made it flakier (we were already struggling
on a5xx TF, which was what was motivating me to look at this!)

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

3 years agoac/llvm: Fix alignment of shared load intrinsics.
Timur Kristóf [Thu, 18 Mar 2021 15:53:26 +0000 (16:53 +0100)]
ac/llvm: Fix alignment of shared load intrinsics.

After some research, I found out that the alignment needs to be set
on the return value of the load, rather than on the pointer.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Fixes: 14ad82b4e98345214973d76b7395498b4a65292e "ac/llvm: Emit more efficient code for load_shared."
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9688>

3 years agoaco/ra: allow VCC on SMEM sbase operand on GFX10+
Daniel Schürmann [Thu, 11 Mar 2021 12:45:45 +0000 (13:45 +0100)]
aco/ra: allow VCC on SMEM sbase operand on GFX10+

Totals from 26 (0.02% of 146267) affected shaders (Navi10):
CodeSize: 324764 -> 324560 (-0.06%)
Instrs: 61090 -> 61039 (-0.08%)
Cycles: 2681952 -> 2668872 (-0.49%)
VMEM: 5773 -> 5769 (-0.07%)
SMEM: 1621 -> 1611 (-0.62%)
SClause: 2546 -> 2543 (-0.12%)
Copies: 4671 -> 4620 (-1.09%)

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

3 years agoaco/optimizer: set VCC hint on new v_cmp_* definitions
Daniel Schürmann [Thu, 11 Mar 2021 12:42:50 +0000 (13:42 +0100)]
aco/optimizer: set VCC hint on new v_cmp_* definitions

Totals from 11692 (7.99% of 146267) affected shaders (Navi10):
CodeSize: 97419384 -> 97352560 (-0.07%); split: -0.07%, +0.00%
Instrs: 18571138 -> 18570969 (-0.00%); split: -0.00%, +0.00%
Cycles: 1431348400 -> 1431346296 (-0.00%); split: -0.00%, +0.00%
SMEM: 696646 -> 696650 (+0.00%)
SClause: 668511 -> 668490 (-0.00%); split: -0.00%, +0.00%
Copies: 1279475 -> 1279474 (-0.00%)

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

3 years agoci/broadcom: use new piglit runner
Juan A. Suarez Romero [Wed, 17 Mar 2021 12:29:37 +0000 (13:29 +0100)]
ci/broadcom: use new piglit runner

Switch from the old piglit to the new piglit-runner executor.

Acked-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9680>

3 years agolima: update dEQP fails and skips lists
Vasily Khoruzhick [Sun, 14 Mar 2021 17:10:54 +0000 (10:10 -0700)]
lima: update dEQP fails and skips lists

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9586>

3 years agofreedreno/a5xx: Fix stream-output binning handling.
Eric Anholt [Tue, 16 Feb 2021 22:57:40 +0000 (14:57 -0800)]
freedreno/a5xx: Fix stream-output binning handling.

This makes it match (to the best I was able) a6xx's behavior, with the
exception of the XXX note in fd5_gmem.c highlighting what I think is an
issue on both a5xx and a6xx.

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

3 years agou_format: Add restrict to fn pointer and manual format pack/unpack/fetch
Jesse Natalie [Wed, 17 Mar 2021 22:05:35 +0000 (15:05 -0700)]
u_format: Add restrict to fn pointer and manual format pack/unpack/fetch

MSVC warns (loudly) about a mismatch between the generated functions in
u_format_table.c and the definition of util_format_[un]pack_description,
specifically having 'restrict' in the function but not in the pointer
type in the struct.

So, add 'restrict' everywhere - to the function types, and to the rest
of the implementations that are assigned to those structs.

v2: util_format_unpack_description is used in gallium/auxiliary/translate

Fixes: 5785fdac ("u_format: Mark the generated pack/unpack src/dst args as restrict.")
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9670>

3 years agozink: handle nir_intrinsic_image_deref_samples
Mike Blumenkrantz [Thu, 18 Mar 2021 13:49:13 +0000 (09:49 -0400)]
zink: handle nir_intrinsic_image_deref_samples

same as the texop but for images

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>

3 years agocompiler/spirv: fix image sample queries
Mike Blumenkrantz [Thu, 18 Mar 2021 13:47:54 +0000 (09:47 -0400)]
compiler/spirv: fix image sample queries

this was only implemented for textures (I assume because drivers which implement
the corresponding intrinsic don't support multisampled images), but it's also
used for shader images

Fixes: 22fdb2f8551 ("nir/spirv: Update to the latest revision")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9682>

3 years agozink: enable spirv extension for post depth coverage
Mike Blumenkrantz [Thu, 18 Mar 2021 14:00:30 +0000 (10:00 -0400)]
zink: enable spirv extension for post depth coverage

Fixes: 3c72c867422 ("zink: Wire up ARB_post_depth_coverage")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9683>

3 years agoaco: Fix constant address offset calculation for ds_read2 instructions.
Timur Kristóf [Thu, 18 Mar 2021 09:15:14 +0000 (10:15 +0100)]
aco: Fix constant address offset calculation for ds_read2 instructions.

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

3 years agogallium/st: reserve space in default uniform block for lowered constants
Erik Faye-Lund [Tue, 16 Mar 2021 17:40:01 +0000 (18:40 +0100)]
gallium/st: reserve space in default uniform block for lowered constants

If we don't reserve these, we risk these lowering passes eating up more
uniforms than we have available.

This fixes a crash due to an assert in Zink, because we end up trying to
use a too large UBO after lowering.

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

3 years agogallium/st: fix shader_has_one_variant
Erik Faye-Lund [Tue, 16 Mar 2021 18:04:08 +0000 (19:04 +0100)]
gallium/st: fix shader_has_one_variant

I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: 7eb5fd98fd1 ("mesa/st: handle running nir lower passes for ucp and psiz in tess stage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>

3 years agogallium/st: fix shader_has_one_variant
Erik Faye-Lund [Tue, 16 Mar 2021 17:43:37 +0000 (18:43 +0100)]
gallium/st: fix shader_has_one_variant

I think we need to care about this here as well, otherwise the variant
logic might be short-circuited.

Fixes: ad0037fcfe1 ("mesa/st: set lower_point_size for tes/gs during program update")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9631>

3 years agonir_to_tgsi: Fix indices for CMP in nir_to_tgsi for nir_op_fcsel
Neha Bhende [Tue, 16 Mar 2021 22:45:26 +0000 (15:45 -0700)]
nir_to_tgsi: Fix indices for CMP in nir_to_tgsi for nir_op_fcsel

nir_to_tgsi utiliy was using wrong src for nir_op_fcsel.

Fixes regression with solidworks2012_viewport.trace and mudbox-2010sp1-basic-head.trace

v2: as per suggested by Brian, instead of relying assumption that
value will be 0.0 or 1.0 all the time, use -abs(src) to make any non-zero
value as negative.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9658>

3 years agonir_to_tgsi: Respect PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED.
Eric Anholt [Wed, 17 Mar 2021 17:39:35 +0000 (10:39 -0700)]
nir_to_tgsi: Respect PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED.

If the driver can't do it, we shouldn't be putting it in the TGSI,
regardless of what the NIR compiler above us decided.

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

3 years agozink: clear framebuffer state on context destroy
Mike Blumenkrantz [Wed, 17 Mar 2021 18:40:40 +0000 (14:40 -0400)]
zink: clear framebuffer state on context destroy

ensure we don't leak surface references

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

3 years agozink: move fence reset to zink_fence_init()
Mike Blumenkrantz [Tue, 16 Mar 2021 18:38:27 +0000 (14:38 -0400)]
zink: move fence reset to zink_fence_init()

fence stuff goes in fence file

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

3 years agozink: remove query batch-tracking init from begin_query()
Mike Blumenkrantz [Tue, 16 Mar 2021 18:34:46 +0000 (14:34 -0400)]
zink: remove query batch-tracking init from begin_query()

this is always created on startup now

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