mesa.git
5 years agointel/perf: enumerate query-based metrics in perf
Mark Janes [Wed, 29 May 2019 15:48:35 +0000 (08:48 -0700)]
intel/perf: enumerate query-based metrics in perf

Iris and i965 both need to enumerate the available metrics, so these
routines must be located in perf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: move perf-related constants to common location
Mark Janes [Wed, 29 May 2019 15:43:34 +0000 (08:43 -0700)]
intel/perf: move perf-related constants to common location

The perf subsystem needs several macro definitions that were
duplicated in Iris and i965 headers.  Place these macros within perf,
if the perf implementation contains the only references to the values.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: create a vtable entry for capture_frequency_stat_register
Mark Janes [Fri, 24 May 2019 22:35:34 +0000 (15:35 -0700)]
intel/perf: create a vtable entry for capture_frequency_stat_register

In preparation for calling both Iris and i965 implementions from perf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: create a vtable entry for batchbuffer_flush
Mark Janes [Fri, 24 May 2019 22:35:34 +0000 (15:35 -0700)]
intel/perf: create a vtable entry for batchbuffer_flush

In preparation for calling both Iris and i965 implementions from perf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: create a vtable entry for emit_report_count
Mark Janes [Fri, 2 Aug 2019 23:33:25 +0000 (16:33 -0700)]
intel/perf: create a vtable entry for emit_report_count

In preparation for calling both Iris and i965 implementions from perf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: create a vtable entry for bo_unreference
Mark Janes [Fri, 24 May 2019 21:31:27 +0000 (14:31 -0700)]
intel/perf: create a vtable entry for bo_unreference

In preparation for calling both Iris and i965 implementions from perf.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: create a vtable for low-level driver functions
Mark Janes [Tue, 2 Jul 2019 21:21:57 +0000 (14:21 -0700)]
intel/perf: create a vtable for low-level driver functions

Performance metrics collections requires several actions (eg bo_map())
that have different implementations for Iris and i965.  The perf
subsystem needs a vtable for each of these actions, so it can invoke
the corresponding implementation for each driver.

The first call to be added to the table is bo_alloc.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: use common ioctl wrapper
Mark Janes [Mon, 5 Aug 2019 21:40:29 +0000 (14:40 -0700)]
intel/perf: use common ioctl wrapper

There were multiple ioctl-wrapper functions, so a common
implementation was put in gen_gem.h.   With a common implementation,
perf no longer needs the caller to configure one for it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/perf: rename gen_perf to gen_perf_config
Mark Janes [Tue, 2 Jul 2019 21:11:04 +0000 (14:11 -0700)]
intel/perf: rename gen_perf to gen_perf_config

This structure contains the configurations of the metrics for the
current platform, and the settings needed for the perf subsystem to
query that configuration from the device.  This data is available
without a rendering context, and needed to support MDAPI metrics for
Vulkan.

A gen_perf_context struct will be added later, which holds additional
state from the rendering context necessary for metric data
collection.  The gen_perf struct needs a more precise name to reduce
confusion.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agonvc0: fix program dumping, use _debug_printf
Ilia Mirkin [Wed, 7 Aug 2019 03:00:06 +0000 (23:00 -0400)]
nvc0: fix program dumping, use _debug_printf

This debug situation is unforunate. debug_printf only does something
with DEBUG set, but in practice all that needs to be moved to !NDEBUG.
For now, use _debug_printf which always prints. However the whole
function is guarded by !NDEBUG.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
5 years agonvc0: add support for ATOMC_WRAP TGSI operations
Ilia Mirkin [Wed, 7 Aug 2019 03:02:53 +0000 (23:02 -0400)]
nvc0: add support for ATOMC_WRAP TGSI operations

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
5 years agogallium: redefine ATOMINC_WRAP to be more hardware-friendly
Ilia Mirkin [Wed, 7 Aug 2019 01:59:44 +0000 (21:59 -0400)]
gallium: redefine ATOMINC_WRAP to be more hardware-friendly

Both AMD and NVIDIA hardware define it this way. Instead of replicating
the logic everywhere, just fix it up in one place.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agost/mesa: relax EXT_shader_image_load_store enable
Ilia Mirkin [Wed, 7 Aug 2019 02:54:56 +0000 (22:54 -0400)]
st/mesa: relax EXT_shader_image_load_store enable

There's no reason to bring format-less load requirement into this
extension. It requires a size to be provided, and a compatible format is
computed from the size + data type. For example

  layout(size1x32) uniform iimage1D image;

becomes

  DCL IMAGE[0], 1D, PIPE_FORMAT_R32_SINT, WR

whereas PIPE_CAP_IMAGE_LOAD_FORMATTED is designed to allow
PIPE_FORMAT_NONE to be provided as a format and still enable LOAD
operations to be performed.

So the shader has all the information it needs about the format.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoi965/perf: restore mdapi statistics query metrics
Mark Janes [Sat, 3 Aug 2019 01:19:01 +0000 (18:19 -0700)]
i965/perf: restore mdapi statistics query metrics

Registration of mdapi metrics based on statistics query registers was
inadvertently removed in the commit that checks for OA kernel support.

The statistics queries are not dependent on OA.

Fixes: 96e1c945f2b ("i965: Move device info initialization to common code")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agoutil: add anon_file.h for all memfd/temp file usage
Greg V [Thu, 18 Jan 2018 20:29:14 +0000 (23:29 +0300)]
util: add anon_file.h for all memfd/temp file usage

Move the Weston os_create_anonymous_file code from egl/wayland into util,
add support for Linux memfd and FreeBSD SHM_ANON,
use that code in anv/aubinator instead of explicit memfd calls for portability.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoradeonsi: limit DPBB context_states_per_bin batches when using gfx9 workaround
Pierre-Eric Pelloux-Prayer [Mon, 5 Aug 2019 13:11:41 +0000 (15:11 +0200)]
radeonsi: limit DPBB context_states_per_bin batches when using gfx9 workaround

It seems that using 'context_states_per_bin = 1' for DPBB fixes the reported issue.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110214

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: reduce DPBB persistent_states_per_bin value for APUs
Pierre-Eric Pelloux-Prayer [Fri, 2 Aug 2019 10:06:59 +0000 (12:06 +0200)]
radeonsi: reduce DPBB persistent_states_per_bin value for APUs

Fixes some reported GPU hangs on RAVEN.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111231

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: fix typo in DPBB register field
Pierre-Eric Pelloux-Prayer [Fri, 2 Aug 2019 10:05:15 +0000 (12:05 +0200)]
radeonsi: fix typo in DPBB register field

Also only set FLUSH_ON_BINNING_TRANSITION for GPU families that needs it (matches
what si_emit_dpbb_disable is doing).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: fix S_028C48_MAX_ALLOC_COUNT value
Pierre-Eric Pelloux-Prayer [Fri, 2 Aug 2019 10:03:15 +0000 (12:03 +0200)]
radeonsi: fix S_028C48_MAX_ALLOC_COUNT value

This field uses "value minus 1" encoding.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoetnaviv: drop struct etna_3d_state
Christian Gmeiner [Tue, 6 Aug 2019 18:15:41 +0000 (20:15 +0200)]
etnaviv: drop struct etna_3d_state

Also drop #if 0 code block.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
5 years agomesa: Use _mesa_delete_transform_feedback_object in drivers
Yevhenii Kolesnikov [Thu, 1 Aug 2019 13:05:29 +0000 (16:05 +0300)]
mesa: Use _mesa_delete_transform_feedback_object in drivers

Function _mesa_delete_transform_feedback_object called from within
drivers once driver-specific clean-up has been done. Brings into
conformity with how other GL objects are handled.

CC: Eric Anholt <eric@anholt.net>
CC: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agomesa: use _mesa_delete_query in drivers
Yevhenii Kolesnikov [Thu, 1 Aug 2019 11:11:44 +0000 (14:11 +0300)]
mesa: use _mesa_delete_query in drivers

Now drivers can call _mesa_delete_query once driver-specific
clean-up has been done. Brings into conformity with how other GL
objects are handled.

CC: Eric Anholt <eric@anholt.net>
CC: Kenneth Graunke <kenneth@whitecape.org>
Suggested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agodocs: update calendar, add news item and link release notes for 19.1.4
Juan A. Suarez Romero [Wed, 7 Aug 2019 16:51:32 +0000 (18:51 +0200)]
docs: update calendar, add news item and link release notes for 19.1.4

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
5 years agodocs: add sha256 checksums for 19.1.4
Juan A. Suarez Romero [Wed, 7 Aug 2019 16:49:02 +0000 (18:49 +0200)]
docs: add sha256 checksums for 19.1.4

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit 7fcb69a33c6c6d1658de3e0fd9c40363584c8c7b)

5 years agodocs: add release notes for 19.1.4
Juan A. Suarez Romero [Wed, 7 Aug 2019 16:38:23 +0000 (18:38 +0200)]
docs: add release notes for 19.1.4

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit b84ffa028d09c1bba1add468fd68886ee243d428)

5 years agomeson,i965: Link with android deps when building for android.
Bas Nieuwenhuizen [Fri, 26 Jul 2019 11:49:59 +0000 (13:49 +0200)]
meson,i965: Link with android deps when building for android.

The DBG marco in brw_blorp.c ends up calling an android log function:

error: undefined reference to '__android_log_print'

v2: On suggestion from Lionel, hang the Android dependency onto a new
    libintel_common dependency.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agogallium/dump: add missing query-type to short-list
Erik Faye-Lund [Fri, 12 Jul 2019 08:39:46 +0000 (10:39 +0200)]
gallium/dump: add missing query-type to short-list

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 3f6b3d9db72 ("gallium: add PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agogallium/dump: add missing query-type to short-list
Erik Faye-Lund [Fri, 12 Jul 2019 08:38:20 +0000 (10:38 +0200)]
gallium/dump: add missing query-type to short-list

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: a677799e51a ("gallium: add PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE
                     and corresponding cap")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agogitlab-ci: don't install autotools deps
Eric Engestrom [Sat, 3 Aug 2019 11:31:19 +0000 (12:31 +0100)]
gitlab-ci: don't install autotools deps

These could've been deleted a long time ago, but apparent we forgot.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
5 years agoutil: fix mem leak of program path
Eric Engestrom [Sun, 7 Jul 2019 10:40:04 +0000 (11:40 +0100)]
util: fix mem leak of program path

Fixes: 759b94038987bb983398 ("util: Get program name based on path when possible")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
5 years agomeson: build intel-ui tools as part of `all` tools
Eric Engestrom [Sat, 3 Aug 2019 01:33:42 +0000 (02:33 +0100)]
meson: build intel-ui tools as part of `all` tools

Reported-by: Mark Janes <mark.a.janes@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111289
Cc: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agogitlab-ci: add gtk3 dev files for `-D tools=intel-ui`
Eric Engestrom [Sat, 3 Aug 2019 11:41:06 +0000 (12:41 +0100)]
gitlab-ci: add gtk3 dev files for `-D tools=intel-ui`

We also need to update wayland-protocols and libXrandr (and randrproto),
as they are too old for gdk3 (which gtk3 depends on).

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agoclover: Fix build after clang r367864
Jan Vesely [Tue, 6 Aug 2019 16:24:18 +0000 (12:24 -0400)]
clover: Fix build after clang r367864

v2: Drop special case of llvm-9
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Aaron Watry <awatry@gmail.com>
5 years agomesa: remove super old TODOs from shaderapi.c
Timothy Arceri [Wed, 7 Aug 2019 00:21:43 +0000 (10:21 +1000)]
mesa: remove super old TODOs from shaderapi.c

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: freedreno: Android.registers.mk: Fix up register xml.h file generation
John Stultz [Wed, 24 Jul 2019 23:32:54 +0000 (23:32 +0000)]
mesa: freedreno: Android.registers.mk: Fix up register xml.h file generation

The current Androdi.registers.mk file causes build failures that
look like:
 FAILED:
 external/mesa3d/src/freedreno/Android.registers.mk:49: error: implicit rules are obsolete: out/target/product/linaro_db845c/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/%.xml.h

Caused by the following Android build rule change:
https://android.googlesource.com/platform/build/+/HEAD/Changes.md#implicit_rules

I tried to replace this with something similar to the static
pattern suggested in the URL above, but ended up getting all the
xml.h files generated using only the first a2xx.xml source file.

So I've fallen back to explicitly defining the make rules for
each.

Additionally, we needed to provide the proper
LOCAL_EXPORT_C_INCLUDE_DIRS and add the defined static library
to the components that depend on the register headers.

Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: John Stultz <john.stultz@linaro.org>
5 years agomesa: Add ir3/ir3_nir_imul.c generation to Android.mk
John Stultz [Wed, 3 Jul 2019 22:37:45 +0000 (22:37 +0000)]
mesa: Add ir3/ir3_nir_imul.c generation to Android.mk

With current master we're seeing build failures with AOSP:
  error: undefined symbol: ir3_nir_lower_imul

This is due to the ir3_nir_imul.c file not being generated
in the Android.mk files.

This patch simply adds it to the Android build, after which
thigns build and book ok on db410c.

Cc: Rob Clark <robdclark@chromium.org>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Alistair Strachan <astrachan@google.com>
Cc: Greg Hartman <ghartman@google.com>
Cc: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: John Stultz <john.stultz@linaro.org>
5 years agopanfrost: Take into account a index_bias for glDrawElementsBaseVertex calls
Rohan Garg [Wed, 17 Jul 2019 16:50:13 +0000 (18:50 +0200)]
panfrost: Take into account a index_bias for glDrawElementsBaseVertex calls

Midgard does not accept a index_bias directly and relies instead on a
bias correction offset (offset_bias_correction) in order to calculate
the unbiased vertex index.

We need to make sure we adjust offset_start and vertex_count in order to
take into account the index_bias as required by a
glDrawElementsBaseVertex call and then supply a additional
offset_bias_correction to the hardware.

Signed-off-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoradv/gfx10: Enable DCC for storage images.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 23:39:23 +0000 (01:39 +0200)]
radv/gfx10: Enable DCC for storage images.

v2: Hide it behind a perftest flag.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Add device argument for dcc compression check.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 23:38:42 +0000 (01:38 +0200)]
radv: Add device argument for dcc compression check.

Because it is about to be generation dependent.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Disable compression for compute DCC decompress store.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 23:19:29 +0000 (01:19 +0200)]
radv: Disable compression for compute DCC decompress store.

Previously we relied on stores not using DCC but that is going to
change, so disable compression explicitly.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Add extra struct to image view creation.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 23:07:04 +0000 (01:07 +0200)]
radv: Add extra struct to image view creation.

For extra args. Unlike image creation, I'm not embedding the vk
struct in there, so all the inline structs can be kept.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Do not decompress on LAYOUT_GENERAL.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 23:24:45 +0000 (01:24 +0200)]
radv: Do not decompress on LAYOUT_GENERAL.

We handle render loops properly now and STORAGE still disables
DCC/TC-compat HTILE in general.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Pass through render loop detection to internal layout decisions.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 21:48:43 +0000 (23:48 +0200)]
radv: Pass through render loop detection to internal layout decisions.

And do nothing with it yet.

Everything outside a renderpass has no render loop.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agoradv: Add render loop detection in renderpass.
Bas Nieuwenhuizen [Sun, 4 Aug 2019 21:17:20 +0000 (23:17 +0200)]
radv: Add render loop detection in renderpass.

VK spec 7.3:

"Applications must ensure that all accesses to memory that backs
image subresources used as attachments in a given renderpass instance
either happen-before the load operations for those attachments, or
happen-after the store operations for those attachments."

So the only renderloops we can have is with input attachments. Detect
these.

Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agodrirc: Add vendor workaround for Divinity: Original Sin EE
Timothy Arceri [Fri, 2 Aug 2019 05:17:16 +0000 (15:17 +1000)]
drirc: Add vendor workaround for Divinity: Original Sin EE

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551

5 years agomesa/gallium: add dric option to allow overriding GL vendor string
Timothy Arceri [Fri, 2 Aug 2019 05:13:59 +0000 (15:13 +1000)]
mesa/gallium: add dric option to allow overriding GL vendor string

Will be used in the following patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551

5 years agorelnotes/19.2: document EXT_texture_dhadow_lod
Marek Olšák [Wed, 7 Aug 2019 00:09:46 +0000 (20:09 -0400)]
relnotes/19.2: document EXT_texture_dhadow_lod

5 years agoradv: Fix config reg assert.
Bas Nieuwenhuizen [Tue, 6 Aug 2019 09:50:37 +0000 (11:50 +0200)]
radv: Fix config reg assert.

Using the wrong bounds

Fixes: "219d6939df8 radv: add more assertions to make sure packets are correctly emitted"
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
5 years agotgsi_to_nir: add a few needed double opcodes
Marek Olšák [Fri, 2 Aug 2019 13:22:52 +0000 (15:22 +0200)]
tgsi_to_nir: add a few needed double opcodes

for internal radeonsi shaders

v2 (Connor):
- Split out prep work from adding opcodes, and rewrite the former

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agotgsi_to_nir: implement a few needed 64-bit integer opcodes
Marek Olšák [Fri, 2 Aug 2019 13:19:00 +0000 (15:19 +0200)]
tgsi_to_nir: implement a few needed 64-bit integer opcodes

for internal radeonsi shaders

v2 (Connor):
- Split this out from the prep work, and rework the former
- Add support for U64SNE

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agottn: Prepare for 64-bit sources and destinations
Connor Abbott [Fri, 2 Aug 2019 13:13:53 +0000 (15:13 +0200)]
ttn: Prepare for 64-bit sources and destinations

v2: Properly handle 32->64 bit conversions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agottn: Use 1-bit NIR comparison opcodes
Connor Abbott [Fri, 2 Aug 2019 13:00:30 +0000 (15:00 +0200)]
ttn: Use 1-bit NIR comparison opcodes

We shouldn't be using the versions that output a 32-bit boolean, since
nir_opt_algebraic won't optimize them as well. Drivers will lower these
to the 32-bit versions after optimizing, if appropriate. Also, this will
make implementing 64-bit comparisons easier.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agonir/builder: Add nir_b2i
Connor Abbott [Fri, 2 Aug 2019 12:56:20 +0000 (14:56 +0200)]
nir/builder: Add nir_b2i

Same as nir_b2f but for integers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: enable EXT_shader_image_load_store
Pierre-Eric Pelloux-Prayer [Thu, 1 Aug 2019 08:17:26 +0000 (10:17 +0200)]
radeonsi: enable EXT_shader_image_load_store

This depends on LLVM 10 because this needs https://reviews.llvm.org/D65283

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: add support for nir atomic_inc_wrap/atomic_dec_wrap
Pierre-Eric Pelloux-Prayer [Wed, 24 Jul 2019 10:07:50 +0000 (12:07 +0200)]
radeonsi: add support for nir atomic_inc_wrap/atomic_dec_wrap

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi: add support for tgsi ATOMDEC_WRAP / ATOMINC_WRAP opcodes
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 13:57:54 +0000 (15:57 +0200)]
radeonsi: add support for tgsi ATOMDEC_WRAP / ATOMINC_WRAP opcodes

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoac: add ac_atomic_inc_wrap / ac_atomic_dec_wrap support
Pierre-Eric Pelloux-Prayer [Wed, 24 Jul 2019 10:09:31 +0000 (12:09 +0200)]
ac: add ac_atomic_inc_wrap / ac_atomic_dec_wrap support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agonir: add atomic_inc_wrap/atomic_dec_wrap image intrinsics
Pierre-Eric Pelloux-Prayer [Wed, 24 Jul 2019 10:06:34 +0000 (12:06 +0200)]
nir: add atomic_inc_wrap/atomic_dec_wrap image intrinsics

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglsl: add EXT_shader_image_load_store new image functions
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 14:38:44 +0000 (16:38 +0200)]
glsl: add EXT_shader_image_load_store new image functions

This extension has 2 functions that are missing from the ARB versions:
- imageAtomicIncWrap
- imageAtomicDecWrap

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglsl: add EXT_shader_image_load_store keywords to lexer
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 14:26:45 +0000 (16:26 +0200)]
glsl: add EXT_shader_image_load_store keywords to lexer

All of them already existed for ARB_shader_image_load_store.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglsl: add size qualifiers from EXT_shader_image_load_store
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 14:33:46 +0000 (16:33 +0200)]
glsl: add size qualifiers from EXT_shader_image_load_store

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglsl: handle differences between ARB/EXT versions of shader_image_load_store
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 13:50:38 +0000 (15:50 +0200)]
glsl: handle differences between ARB/EXT versions of shader_image_load_store

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_shader_image_load_store glBindImageTextureEXT function
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 13:47:26 +0000 (15:47 +0200)]
mesa: add EXT_shader_image_load_store glBindImageTextureEXT function

The implementation is almost identical to glBindImageTexture except for error
checking.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoglapi: add EXT_shader_image_load_store
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 13:46:27 +0000 (15:46 +0200)]
glapi: add EXT_shader_image_load_store

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agogallium: add PIPE_CAP_TGSI_ATOMINC_WRAP to indicate support
Pierre-Eric Pelloux-Prayer [Wed, 17 Jul 2019 13:43:39 +0000 (15:43 +0200)]
gallium: add PIPE_CAP_TGSI_ATOMINC_WRAP to indicate support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agotgsi: add ATOMICINC_WRAP/ATOMICDEC_WRAP opcode
Pierre-Eric Pelloux-Prayer [Fri, 12 Jul 2019 13:54:17 +0000 (15:54 +0200)]
tgsi: add ATOMICINC_WRAP/ATOMICDEC_WRAP opcode

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoradeonsi/gfx10: enable all CUs for GS if NGG is never used
Marek Olšák [Wed, 31 Jul 2019 03:20:03 +0000 (23:20 -0400)]
radeonsi/gfx10: enable all CUs for GS if NGG is never used

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: add global use_ngg and use_ngg_streamout flags
Marek Olšák [Mon, 29 Jul 2019 21:43:55 +0000 (17:43 -0400)]
radeonsi/gfx10: add global use_ngg and use_ngg_streamout flags

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: remove an obsolete VGT_REUSE_OFF workaround
Marek Olšák [Wed, 31 Jul 2019 01:42:26 +0000 (21:42 -0400)]
radeonsi/gfx10: remove an obsolete VGT_REUSE_OFF workaround

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: disable LATE_ALLOC_GS on Navi14
Marek Olšák [Wed, 31 Jul 2019 01:39:03 +0000 (21:39 -0400)]
radeonsi/gfx10: disable LATE_ALLOC_GS on Navi14

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: implement a bug workaround for GE_PC_ALLOC
Marek Olšák [Wed, 31 Jul 2019 01:29:29 +0000 (21:29 -0400)]
radeonsi/gfx10: implement a bug workaround for GE_PC_ALLOC

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: implement a bug workaround for NGG -> legacy transitions
Marek Olšák [Tue, 30 Jul 2019 22:40:22 +0000 (18:40 -0400)]
radeonsi/gfx10: implement a bug workaround for NGG -> legacy transitions

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: implement a GE bug workaround
Marek Olšák [Tue, 30 Jul 2019 22:33:01 +0000 (18:33 -0400)]
radeonsi/gfx10: implement a GE bug workaround

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: set GE_CNTL for tessellation correctly
Marek Olšák [Tue, 30 Jul 2019 22:16:05 +0000 (18:16 -0400)]
radeonsi/gfx10: set GE_CNTL for tessellation correctly

to match PAL

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: simplify NGG code in si_update_shaders
Marek Olšák [Mon, 29 Jul 2019 21:45:22 +0000 (17:45 -0400)]
radeonsi/gfx10: simplify NGG code in si_update_shaders

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/gfx10: fix input VGPRs for legacy VS
Marek Olšák [Mon, 29 Jul 2019 21:44:52 +0000 (17:44 -0400)]
radeonsi/gfx10: fix input VGPRs for legacy VS

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: make sure that rasterizer state != NULL and remove all NULL checking
Marek Olšák [Tue, 30 Jul 2019 21:43:41 +0000 (17:43 -0400)]
radeonsi: make sure that rasterizer state != NULL and remove all NULL checking

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: make sure that DSA state != NULL and remove all NULL checking
Marek Olšák [Tue, 30 Jul 2019 21:43:41 +0000 (17:43 -0400)]
radeonsi: make sure that DSA state != NULL and remove all NULL checking

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: make sure that blend state != NULL and remove all NULL checking
Marek Olšák [Tue, 30 Jul 2019 21:43:41 +0000 (17:43 -0400)]
radeonsi: make sure that blend state != NULL and remove all NULL checking

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: DCC MSAA blending bug - include logic op, limit to Navi14 and older
Marek Olšák [Tue, 30 Jul 2019 21:28:50 +0000 (17:28 -0400)]
radeonsi: DCC MSAA blending bug - include logic op, limit to Navi14 and older

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: determine accurately whether logic op is enabled
Marek Olšák [Tue, 30 Jul 2019 21:25:06 +0000 (17:25 -0400)]
radeonsi: determine accurately whether logic op is enabled

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: skip draw calls with 0-sized index buffers
Marek Olšák [Tue, 30 Jul 2019 21:10:59 +0000 (17:10 -0400)]
radeonsi: skip draw calls with 0-sized index buffers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/nir: lower PS inputs before scanning the shader
Marek Olšák [Tue, 30 Jul 2019 03:01:01 +0000 (23:01 -0400)]
radeonsi/nir: lower PS inputs before scanning the shader

Lowering PS inputs can eliminate some of them, which messes up
persp/linear barycentric coord usage info.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi/nir: handle key.mono.u.ps.interpolate_at_sample_force_center
Marek Olšák [Tue, 30 Jul 2019 02:04:16 +0000 (22:04 -0400)]
radeonsi/nir: handle key.mono.u.ps.interpolate_at_sample_force_center

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: add missing prints into si_dump_shader_key
Marek Olšák [Mon, 29 Jul 2019 23:24:02 +0000 (19:24 -0400)]
radeonsi: add missing prints into si_dump_shader_key

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agoradeonsi: disable SDMA image copies on dGPUs to fix corruption in games
Marek Olšák [Tue, 30 Jul 2019 20:30:04 +0000 (16:30 -0400)]
radeonsi: disable SDMA image copies on dGPUs to fix corruption in games

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
5 years agomesa: add EXT_dsa glMultiTexCoordPointerEXT function
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 16:28:15 +0000 (18:28 +0200)]
mesa: add EXT_dsa glMultiTexCoordPointerEXT function

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glMultiTexGen* functions
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 15:52:01 +0000 (17:52 +0200)]
mesa: add EXT_dsa glMultiTexGen* functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glCopyMultiTexImage* and glCopyMultiTexSubImage*
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 13:42:39 +0000 (15:42 +0200)]
mesa: add EXT_dsa glCopyMultiTexImage* and glCopyMultiTexSubImage*

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 13:15:04 +0000 (15:15 +0200)]
mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXT

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glMultiTexSubImage1D/2D/3DEXT
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 12:47:31 +0000 (14:47 +0200)]
mesa: add EXT_dsa glMultiTexSubImage1D/2D/3DEXT

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glMultiTexImage1D/2D/3DEXT + glGetMultiTexImageEXT
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 11:45:15 +0000 (13:45 +0200)]
mesa: add EXT_dsa glMultiTexImage1D/2D/3DEXT + glGetMultiTexImageEXT

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add glBindMultiTextureEXT display list support
Pierre-Eric Pelloux-Prayer [Thu, 1 Aug 2019 12:50:26 +0000 (14:50 +0200)]
mesa: add glBindMultiTextureEXT display list support

Fixes: 0972b0b059d ("mesa: add support for glBindMultiTextureEXT")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa glMultiTexParameter* functions
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 11:44:57 +0000 (13:44 +0200)]
mesa: add EXT_dsa glMultiTexParameter* functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add EXT_dsa (Get)MultiTexEnv functions
Pierre-Eric Pelloux-Prayer [Mon, 29 Apr 2019 17:26:55 +0000 (19:26 +0200)]
mesa: add EXT_dsa (Get)MultiTexEnv functions

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add _mesa_(get)texenvi(f)v_indexed helpers
Pierre-Eric Pelloux-Prayer [Thu, 1 Aug 2019 10:05:52 +0000 (12:05 +0200)]
mesa: add _mesa_(get)texenvi(f)v_indexed helpers

They are exactly like _mesa_GetTexEnvfv/_mesa_GetTexEnviv except they take
a GLuint texunit parameter instead of relying of ctx->Texture.CurrentUnit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: add new helper _mesa_get_texobj_by_target_and_texunit
Pierre-Eric Pelloux-Prayer [Tue, 30 Apr 2019 11:37:12 +0000 (13:37 +0200)]
mesa: add new helper _mesa_get_texobj_by_target_and_texunit

Based on the 'static get_texobj_by_target' function from texparam.c,
but extended to also take the texunit as a parameter.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agomesa: replace _mesa_get_current_fixedfunc_tex_unit with _mesa_get_fixedfunc_tex_unit
Pierre-Eric Pelloux-Prayer [Mon, 29 Apr 2019 17:23:36 +0000 (19:23 +0200)]
mesa: replace _mesa_get_current_fixedfunc_tex_unit with _mesa_get_fixedfunc_tex_unit

The new function implements the same feature but doesn't depend
on ctx->Texture.CurrentUnit.
This change allows to use it from indexed functions.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
5 years agoiris: Handle vertex shader with window space position
Danylo Piliaiev [Thu, 25 Jul 2019 10:09:08 +0000 (13:09 +0300)]
iris: Handle vertex shader with window space position

Iris advertises support for PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION
so let's actually implement it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110657

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agolima: fix pipe_debug_callback warnings
Erico Nunes [Tue, 6 Aug 2019 17:51:44 +0000 (19:51 +0200)]
lima: fix pipe_debug_callback warnings

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>