mesa.git
3 years agoradeonsi: increase minimum NGG vertex count requirement per workgroup on gfx 10.3
Marek Olšák [Wed, 29 Jul 2020 23:04:38 +0000 (19:04 -0400)]
radeonsi: increase minimum NGG vertex count requirement per workgroup on gfx 10.3

Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

3 years agoradeonsi: use the same units for esgs_ring_size and ngg_emit_size
Marek Olšák [Thu, 30 Jul 2020 12:04:28 +0000 (08:04 -0400)]
radeonsi: use the same units for esgs_ring_size and ngg_emit_size

for consistency

Fixes: a23802bcb9a - ac,radeonsi: start adding support for gfx10.3
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

3 years agoradeonsi: use correct wave size in gfx10_ngg_calculate_subgroup_info
Marek Olšák [Thu, 30 Jul 2020 11:47:42 +0000 (07:47 -0400)]
radeonsi: use correct wave size in gfx10_ngg_calculate_subgroup_info

Fixes: 88efb63cafc ("radeonsi/gfx10: implement Wave32")
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

3 years agoRevert "radeonsi: honor a user-specified pitch on gfx10.3"
Marek Olšák [Wed, 29 Jul 2020 23:06:44 +0000 (19:06 -0400)]
Revert "radeonsi: honor a user-specified pitch on gfx10.3"

This reverts commit c4b5fd9ab096a0bb5106b93191b13c81cc32243b.

It breaks mipmapping. This is only meant to be used by OpenCL, which allows
setting a user pitch for linear images. In all other cases, don't support
a custom pitch.

Fixes: c4b5fd9ab096a0bb51 "radeonsi: honor a user-specified pitch on gfx10.3"
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

3 years agoac/gpu_info: set num_tiles_pipes on gfx10+ too
Marek Olšák [Thu, 30 Jul 2020 01:43:04 +0000 (21:43 -0400)]
ac/gpu_info: set num_tiles_pipes on gfx10+ too

Based on PAL.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6137>

3 years agoradeonsi: enable ETC2 hw acceleration on Raven2
Marek Olšák [Wed, 5 Aug 2020 17:12:06 +0000 (13:12 -0400)]
radeonsi: enable ETC2 hw acceleration on Raven2

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6213>

3 years agozink: pre-hash gfx-pipeline-state
Antonio Caggiano [Fri, 24 Jul 2020 14:50:15 +0000 (16:50 +0200)]
zink: pre-hash gfx-pipeline-state

Store a hash in `zink_gfx_pipeline_state` to keep track of state
changes and avoid to recompute it when the state has not changed.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6061>

3 years agozink: rename zink_gfx_program::stages to 'modules'
Mike Blumenkrantz [Tue, 30 Jun 2020 17:01:09 +0000 (13:01 -0400)]
zink: rename zink_gfx_program::stages to 'modules'

we've been confusing 'stages' and 'shaders' over and over for a long time,
so maybe having a totally different name will help here

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

3 years agozink: always compile shaders in pipeline order
Mike Blumenkrantz [Tue, 30 Jun 2020 13:59:57 +0000 (09:59 -0400)]
zink: always compile shaders in pipeline order

in order to accurately perform slot/location mapping that's consistent across
stages, we need to go through the stages in order so that we can pass each successive
slot map allocation along to the next compiled stage

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

3 years agozink: start using per-stage flags for new shaders, refcount shader modules
Mike Blumenkrantz [Tue, 30 Jun 2020 13:57:19 +0000 (09:57 -0400)]
zink: start using per-stage flags for new shaders, refcount shader modules

we don't want to recompile shaders if we don't have to, so we can set bitflags
upon receiving new shader states and then compile only the stages that have
changed while refcounting the unchanged stages

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

3 years agozink: use ZINK_SHADER_COUNT instead of PIPE_SHADER_TYPES - 1 everywhere
Mike Blumenkrantz [Tue, 30 Jun 2020 12:55:07 +0000 (08:55 -0400)]
zink: use ZINK_SHADER_COUNT instead of PIPE_SHADER_TYPES - 1 everywhere

this is just for convenience and consistency

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

3 years agozink: split up creating zink_shader objects and VkShaderModule objects
Mike Blumenkrantz [Sat, 13 Jun 2020 16:54:36 +0000 (12:54 -0400)]
zink: split up creating zink_shader objects and VkShaderModule objects

the actual VkShaderModule is only needed when we're creating a program to
draw with, so this can be split off for "uncompiled" and "compiled" shader
objects which will facilitate implementing shader keys

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

3 years agozink: refcount zink_gfx_program objects
Mike Blumenkrantz [Sat, 13 Jun 2020 19:53:29 +0000 (15:53 -0400)]
zink: refcount zink_gfx_program objects

now that we're tracking these by shader, we want to ensure that they live through
each render pass successfully if there's no flush regardless of the timing when the
shader objects are destroyed. this becomes useful when we split up shader create and compile
functionality in future patches, at which point program refcounts can be changed
during successive draw calls, potentially resulting in a program being destroyed at that
point when it shouldn't be

with this patch, each shader used by the program gets a reference, with the renderpass
batch itself becoming the owner of the program such that it will be deleted
when the draw state gets invalidated and a new program is created

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

3 years agozink: adjust zink_shader struct to contain full streamout info
Mike Blumenkrantz [Sat, 13 Jun 2020 15:39:00 +0000 (11:39 -0400)]
zink: adjust zink_shader struct to contain full streamout info

move remapped register_index -> slot into a separate value on the struct
in order to preserve the register_index value

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

3 years agozink: move shader state methods for pipe_context into zink_program.c
Mike Blumenkrantz [Sat, 13 Jun 2020 14:45:22 +0000 (10:45 -0400)]
zink: move shader state methods for pipe_context into zink_program.c

just moving these so all the shader code can be in one place

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

3 years agointel/dump_gpu: add an option to capture a single frame
Lionel Landwerlin [Wed, 4 Mar 2020 15:55:46 +0000 (17:55 +0200)]
intel/dump_gpu: add an option to capture a single frame

We use the driver identifier buffer to get the information about the
current frame.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: fix --platform option
Lionel Landwerlin [Wed, 4 Mar 2020 15:38:48 +0000 (17:38 +0200)]
intel/dump_gpu: fix --platform option

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agoanv: track the current frame and write it into the driver identifier BO
Lionel Landwerlin [Wed, 4 Mar 2020 23:15:57 +0000 (01:15 +0200)]
anv: track the current frame and write it into the driver identifier BO

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: only map in GTT buffers not previously mapped
Lionel Landwerlin [Sun, 13 Oct 2019 21:42:27 +0000 (00:42 +0300)]
intel/dump_gpu: only map in GTT buffers not previously mapped

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: add an only-capture option
Lionel Landwerlin [Thu, 3 Oct 2019 21:55:43 +0000 (00:55 +0300)]
intel/dump_gpu: add an only-capture option

This option allows for smaller aub files to be generated by only
storing the BOs flagged with EXEC_OBJECT_CAPTURE.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: set default device_override
Lionel Landwerlin [Thu, 3 Oct 2019 21:55:02 +0000 (00:55 +0300)]
intel/dump_gpu: set default device_override

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: further track mapping of BOs
Lionel Landwerlin [Thu, 3 Oct 2019 08:05:45 +0000 (11:05 +0300)]
intel/dump_gpu: further track mapping of BOs

We can go further in tracking what BOs are written to by the driver by
tracking when a buffer in unmapped. A BO could be mmap, written, unmap
and never be written to again. In such case we can just write the BO's
content on the first exec buf after unmap and never write it again.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agointel/dump_gpu: only write BOs mapped by the driver
Lionel Landwerlin [Wed, 2 Oct 2019 23:13:32 +0000 (02:13 +0300)]
intel/dump_gpu: only write BOs mapped by the driver

Track what BOs are mapped by the driver and only write those. We can
safely assume that when not mapped there is no data to save.

v2: Don't forget to return the ret (Rafael)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2201>

3 years agozink: set primitive restart cap
Mike Blumenkrantz [Fri, 31 Jul 2020 13:32:23 +0000 (09:32 -0400)]
zink: set primitive restart cap

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

3 years agozink: use util_draw_vbo_without_prim_restart for unsupported prim modes
Mike Blumenkrantz [Wed, 1 Jul 2020 21:45:18 +0000 (17:45 -0400)]
zink: use util_draw_vbo_without_prim_restart for unsupported prim modes

this fixes up primitive restart functionality for the primitive types that
vulkan doesn't support using primitive restart with

fixes #2873

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

3 years agozink: move 8bit index handling out of u_primconvert path
Mike Blumenkrantz [Mon, 20 Jul 2020 13:04:21 +0000 (09:04 -0400)]
zink: move 8bit index handling out of u_primconvert path

putting this through util_translate_prim_restart_ib reduces our reliance on
u_primconvert, which ideally we don't want to be using

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

3 years agozink: basic primitive restart support for strip/fan topologies
Mike Blumenkrantz [Wed, 1 Jul 2020 19:57:43 +0000 (15:57 -0400)]
zink: basic primitive restart support for strip/fan topologies

this conditionally handles rewriting the index buffer to use vk-compatible
restart indexes and then enables it in the pipeline for supported draw
modes

fixes #3174

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

3 years agoradv: Add ETC2 support on RAVEN2.
Bas Nieuwenhuizen [Thu, 6 Aug 2020 22:08:21 +0000 (00:08 +0200)]
radv: Add ETC2 support on RAVEN2.

I did a whole bunch of validation and it essentially works.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6215>

3 years agoradv: allow to force-enable LLVM internally for a specific shader stage
Samuel Pitoiset [Thu, 6 Aug 2020 15:50:33 +0000 (17:50 +0200)]
radv: allow to force-enable LLVM internally for a specific shader stage

For ACO debugging purposes, developers only.

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

3 years agoetnaviv: call nir_lower_bool_to_bitsize
Christian Gmeiner [Tue, 4 Aug 2020 20:44:21 +0000 (22:44 +0200)]
etnaviv: call nir_lower_bool_to_bitsize

Starting with commit 6f394343b1f ("nir/algebraic: i2f(f2i()) -> trunc()")
dEQP-GLES2.functional.shaders.operator.binary_operator.div.lowp_int_vertex
ends with an unsuppored flt instruction. Use nir_lower_bool_to_bitsize to
convert this flt to a flt32 which is supported. This fixes the introduced
regression.

Cc: 20.2 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6182>

3 years agopanfrost: Drop compiler cmdstream deps
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:12:00 +0000 (18:12 -0400)]
panfrost: Drop compiler cmdstream deps

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

3 years agopanfrost: Treat texture dimension as first-class
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:11:15 +0000 (18:11 -0400)]
panfrost: Treat texture dimension as first-class

Instead of hiding behind a cmdstream enum. The raw values have a very
simple interpretation as dimension.

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

3 years agopanfrost: Inline max rt into compilers
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:10:41 +0000 (18:10 -0400)]
panfrost: Inline max rt into compilers

Another dep.

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

3 years agopan/bi: Drop use of MALI_POSITIVE
Alyssa Rosenzweig [Wed, 5 Aug 2020 22:09:51 +0000 (18:09 -0400)]
pan/bi: Drop use of MALI_POSITIVE

Contributing to a dep on the main cmdstream. It's a fancy word for
subtract one...

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

3 years agopanfrost: Add panloader/ to .gitignore
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:36:47 +0000 (17:36 -0400)]
panfrost: Add panloader/ to .gitignore

For out-of-tree trace infrastructure.

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

3 years agopanfrost: Reduce bit dependency to disassembly only
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:20:25 +0000 (17:20 -0400)]
panfrost: Reduce bit dependency to disassembly only

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

3 years agopan/bi: Separate disasm/compiler targets
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:25:27 +0000 (17:25 -0400)]
pan/bi: Separate disasm/compiler targets

Likewise.

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

3 years agopan/mdg: Separate disassembler and compiler targets
Alyssa Rosenzweig [Wed, 5 Aug 2020 21:16:27 +0000 (17:16 -0400)]
pan/mdg: Separate disassembler and compiler targets

The compiler depends on the disassembler, which is okay. But the
disassembler now no longer depends on the compiler circularly, avoiding
the need to being in GLSL/NIR.

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

3 years agopanfrost: Move pandecode into lib/
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:25:52 +0000 (16:25 -0400)]
panfrost: Move pandecode into lib/

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

3 years agopanfrost: Rename encoder/ to lib/
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:16:00 +0000 (16:16 -0400)]
panfrost: Rename encoder/ to lib/

We'll want both encoding and decoding here, as a generic hardware
interface library based on GenXML.

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

3 years agopanfrost: Don't export exception_status
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:20:17 +0000 (16:20 -0400)]
panfrost: Don't export exception_status

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

3 years agopanfrost: Remove panfrost-misc.h
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:07:16 +0000 (16:07 -0400)]
panfrost: Remove panfrost-misc.h

Now unused.

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

3 years agopanfrost: Inline panfrost-misc.h into panfrost-job.h
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:05:12 +0000 (16:05 -0400)]
panfrost: Inline panfrost-misc.h into panfrost-job.h

We only need a small subset of the defines here.

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

3 years agopan/decode: Remove shader replacement artefact
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:03:09 +0000 (16:03 -0400)]
pan/decode: Remove shader replacement artefact

Did this ever work?

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

3 years agopanfrost: Move format stringify to decode.c
Alyssa Rosenzweig [Wed, 5 Aug 2020 20:01:27 +0000 (16:01 -0400)]
panfrost: Move format stringify to decode.c

Let's simplify pandecode before moving it around. We don't need to share
this routine right now, and we'll be generating it soon.

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

3 years agopanfrost: Remove blend prettyprinters
Alyssa Rosenzweig [Wed, 5 Aug 2020 19:45:52 +0000 (15:45 -0400)]
panfrost: Remove blend prettyprinters

Unused and mostly wrong too.

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

3 years agoanv: fix incorrect realloc failure handling
Lionel Landwerlin [Thu, 6 Aug 2020 08:13:06 +0000 (11:13 +0300)]
anv: fix incorrect realloc failure handling

We don't want to leak in case of failure.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Ivan Briano <ivan.briano@intel.com>
Fixes: 246261f0addf ("anv: prepare the driver for delayed submissions")
Fixes: 34f32a6d6648 ("anv: implement VK_KHR_timeline_semaphore")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6200>

3 years agoaco: fix C++11/C++14 compilation
Rhys Perry [Thu, 6 Aug 2020 22:21:47 +0000 (23:21 +0100)]
aco: fix C++11/C++14 compilation

static_assert without a message is only available since C++17.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fixes: d1f992f3c2d ('aco: rework barriers and replace can_reorder')
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3374
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6216>

3 years agost/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi
Danylo Piliaiev [Wed, 5 Aug 2020 15:07:06 +0000 (18:07 +0300)]
st/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi

After updating vertex outputs being written based on optimized NIR, they may
go out of sync with outputs in mesa IR. Which is translated to TGSI and used
together with NIR if draw doesn't have llvm.

It's much easier to treat such outputs as zero because there is no pass to
entirely get rid of them.

Similar to eeab9c93db84e5759145891e8fdde66a5cdcf917 but now for outputs.

Fixes: d684fb37bfbc47d098158cb03c0672119a4469fe
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3365
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/6187>

3 years agoBump development version and clear new_features
Dylan Baker [Thu, 6 Aug 2020 16:34:42 +0000 (09:34 -0700)]
Bump development version and clear new_features

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
3 years agoanv: Advertise shaderIntegerFunctions2
Jason Ekstrand [Wed, 22 Jul 2020 20:23:46 +0000 (15:23 -0500)]
anv: Advertise shaderIntegerFunctions2

We advertised the extension string but never the feature bit.  Doh!

Fixes: c57338b92471 "anv: Enable SPV_INTEL_shader_integer_functions2..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6033>

3 years agopanfrost: signal syncobj if nothing is going to be flushed
Icenowy Zheng [Wed, 5 Aug 2020 20:48:05 +0000 (04:48 +0800)]
panfrost: signal syncobj if nothing is going to be flushed

When nothing is going to be flushed, the kernel will get no job that
signals the syncobj.

Signal it by ourselves, otherwise it will never get signaled.

Closes: #3371
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>

3 years agoradv: Don't use both DCC and CMASK for single sample images.
Bas Nieuwenhuizen [Wed, 5 Aug 2020 22:51:38 +0000 (00:51 +0200)]
radv: Don't use both DCC and CMASK for single sample images.

Fixes: c67ef7695a2 "radv: Use ac_surface to allocate aux surfaces."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6194>

3 years agoappveyor: Use Python3.
Jose Fonseca [Tue, 4 Aug 2020 13:16:37 +0000 (14:16 +0100)]
appveyor: Use Python3.

This implied upgrading to the Visual Studio 2019 image, not for VS
itself, but for the newer Python 3.8.5 version it contains, to avoid
UnicodeDecodeError inside modulefinder module when attempting to decode
our UTF-8 encoded Python scripts with cp1252 encoding.

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

3 years agoappveyor: Upgrade pip.
Jose Fonseca [Wed, 5 Aug 2020 09:01:24 +0000 (10:01 +0100)]
appveyor: Upgrade pip.

To avoid all those warnings.

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

3 years agoutil: Fix SCons build.
Vinson Lee [Thu, 6 Aug 2020 05:44:12 +0000 (22:44 -0700)]
util: Fix SCons build.

Fixes: 848e7b947d0d ("util: Move stack debug functions to src/util")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6199>

3 years agofreedreno: Add more asserts for DST_OFF/NUM_UNIT in indirect const uploads.
Eric Anholt [Fri, 31 Jul 2020 16:54:09 +0000 (09:54 -0700)]
freedreno: Add more asserts for DST_OFF/NUM_UNIT in indirect const uploads.

These are just empirical alignment numbers from looking at dEQP traces of
the blob driver (a330, a418, a540, a618, a630), with one exception noted
in the comments.

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

3 years agofreedreno: Increase the NUM_UNIT on compute's consts in indirect dispatch.
Eric Anholt [Fri, 31 Jul 2020 23:18:41 +0000 (16:18 -0700)]
freedreno: Increase the NUM_UNIT on compute's consts in indirect dispatch.

Avoids tripping the assert in the next commit -- the blob never uses
num_unit % 4 != 0 for indirect const uploads.

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

3 years agofreedreno/ir3: Clean up instrlen setup.
Eric Anholt [Fri, 17 Jul 2020 21:08:43 +0000 (14:08 -0700)]
freedreno/ir3: Clean up instrlen setup.

We were calculating it with the gpu_id check in two places, do it once and
use ir3_compiler for the gpu_id dependency.

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

3 years agofreedreno: Split ir3_const's user buffer and indirect upload APIs.
Eric Anholt [Thu, 9 Jul 2020 23:57:29 +0000 (16:57 -0700)]
freedreno: Split ir3_const's user buffer and indirect upload APIs.

They're almost entirely split by whether you're uploading user buffer or
from a BO.  While I'm rewriting the API, drop the emit_const ->
fdN_emit_const wrapper in favor of a #define before the header and a
little helper for the asserts.

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

3 years agofreedreno: Rename emit_const_bo() to emit_const_ptrs().
Eric Anholt [Thu, 9 Jul 2020 23:23:49 +0000 (16:23 -0700)]
freedreno: Rename emit_const_bo() to emit_const_ptrs().

I keep thinking it's the "upload from inside a BO" path when it's not.

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

3 years agofreedreno/ir3: Simpify the immediates from an array of vec4 to array of dwords.
Eric Anholt [Thu, 9 Jul 2020 22:00:33 +0000 (15:00 -0700)]
freedreno/ir3: Simpify the immediates from an array of vec4 to array of dwords.

We usually had to split the idx/swiz out of the dword index anyway.  Note
that incidentally, immediates_size now increments in vec4s instad of
4*vec4s.

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

3 years agofreedreno/ir3: Merge the redundant immediate_idx/immediates_count fields
Eric Anholt [Tue, 7 Jul 2020 21:13:51 +0000 (14:13 -0700)]
freedreno/ir3: Merge the redundant immediate_idx/immediates_count fields

I got tripped up again with the index vs count vs size fields and I'd
rather we didn't store the redundant info.  Settle on immediates_count as
"how many dwords of immediates we have"

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

3 years agoglsl_to_nir: fix bitfield_extract with 16-bit operands
Rob Clark [Sat, 18 Jul 2020 17:02:11 +0000 (10:02 -0700)]
glsl_to_nir: fix bitfield_extract with 16-bit operands

These are defined to explicitly take 32b values.

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

3 years agoglsl: improve precision determination for calls
Marek Olšák [Sat, 25 Jul 2020 02:06:21 +0000 (22:06 -0400)]
glsl: improve precision determination for calls

Don't leave the precision as NONE for non-lowerable calls. Set it to HIGH
if a function really returns highp.

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

3 years agoglsl: don't lower to mediump for desktop OpenGL
Marek Olšák [Sat, 25 Jul 2020 00:31:07 +0000 (20:31 -0400)]
glsl: don't lower to mediump for desktop OpenGL

Desktop OpenGL ignores all precision qualifiers.

Also, the lowering pass doesn't work if precision qualifiers are not set,
which is only possible with desktop OpenGL, causing random behavior.

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

3 years agoglsl: don't create conversion opcodes for array types
Marek Olšák [Thu, 23 Jul 2020 22:41:28 +0000 (18:41 -0400)]
glsl: don't create conversion opcodes for array types

Instead, convert all elements one by one.
This fixes piglit shaders@glsl-bug-110796.

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

3 years agoglsl: don't lower atomic functions to mediump
Marek Olšák [Thu, 23 Jul 2020 04:13:35 +0000 (00:13 -0400)]
glsl: don't lower atomic functions to mediump

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

3 years agoglsl: don't inline intrinsics for mediump
Rob Clark [Mon, 20 Jul 2020 17:36:13 +0000 (10:36 -0700)]
glsl: don't inline intrinsics for mediump

They have an empty fxn body, trying to handle them results in the
intrinsic call being expanded into a no-op.

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

3 years agoglsl: fix constant expression evaluation for 16-bit types
Marek Olšák [Thu, 23 Jul 2020 01:31:10 +0000 (21:31 -0400)]
glsl: fix constant expression evaluation for 16-bit types

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

3 years agoglsl: lower_precision - fix assertion failure with dereferences of constants
Marek Olšák [Thu, 23 Jul 2020 01:01:54 +0000 (21:01 -0400)]
glsl: lower_precision - fix assertion failure with dereferences of constants

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

3 years agodocs: update calendar and link releases notes for 20.1.5
Eric Engestrom [Wed, 5 Aug 2020 20:58:15 +0000 (22:58 +0200)]
docs: update calendar and link releases notes for 20.1.5

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

3 years agodocs: add release notes for 20.1.5
Eric Engestrom [Wed, 5 Aug 2020 20:31:10 +0000 (22:31 +0200)]
docs: add release notes for 20.1.5

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

3 years agoglsl: remove LowerPrecisionTemporaries
Rob Clark [Wed, 5 Aug 2020 17:27:10 +0000 (10:27 -0700)]
glsl: remove LowerPrecisionTemporaries

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>

3 years agogallium: replace 16BIT_TEMPS cap with 16BIT_CONSTS
Rob Clark [Wed, 5 Aug 2020 17:21:46 +0000 (10:21 -0700)]
gallium: replace 16BIT_TEMPS cap with 16BIT_CONSTS

All drivers that support mediump lowering should support 16BIT_TEMPS,
but some do not also want 16b consts to be lowered.  Replace the pipe
cap in preperation to remove LowerPrecisionTemporaries.

Note: also updates reference checksums for the arm64_a630_traces job,
due to lowering more to 16b

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>

3 years agoglsl/lower_precision: split out const lowering
Rob Clark [Wed, 5 Aug 2020 16:56:52 +0000 (09:56 -0700)]
glsl/lower_precision: split out const lowering

Some hw can narrow 32b const/uniform to 16b on load.. and in particular
lowering constants to 16b would break const->uniform lowering.  Allow
them to lower temps to 16b, while skipping consts.

Initially it is set to the same value as LowerPrecisionTemporaries, to
preserve the current behavior.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>

3 years agofreedreno/ir3: lower local_index using local_id
Rob Clark [Mon, 20 Jul 2020 18:14:18 +0000 (11:14 -0700)]
freedreno/ir3: lower local_index using local_id

Somehow this works ok with the full compiler stack, but not in
ir3_cmdline.

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

3 years agofreedreno/ir3: ir3_cmdline updates
Rob Clark [Sun, 19 Jul 2020 17:31:23 +0000 (10:31 -0700)]
freedreno/ir3: ir3_cmdline updates

1) convert to getopt, and drop most variant related options since
   they aren't super-useful these days.. and easy enough to add
   back if/when needed.  (Also, none of the newer shader variant
   options where covered before.)
2) covert to dynamically allocated shader/variant, to get things
   working again after ir3_shader/_variant converted to ralloc
3) few small cleanups

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

3 years agoradeonsi: call nir_split_array_vars/shrink_vec_array_vars/opt_find_array_copies
Marek Olšák [Sat, 4 Jul 2020 02:09:44 +0000 (22:09 -0400)]
radeonsi: call nir_split_array_vars/shrink_vec_array_vars/opt_find_array_copies

Loosely based on RADV and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668

54793 shaders in 33659 tests
Totals:
SGPRS: 2739498 -> 2739474 (-0.00 %)
VGPRS: 1534120 -> 1534256 (0.01 %)
Spilled SGPRs: 2579 -> 2579 (0.00 %)
Spilled VGPRs: 29 -> 29 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2220 -> 288 (-87.03 %) dwords per thread
Code Size: 55572924 -> 55584592 (0.02 %) bytes
LDS: 92 -> 92 (0.00 %) blocks
Max Waves: 966044 -> 966021 (-0.00 %)
Wait states: 0 -> 0 (0.00 %)

Totals from affected shaders:
SGPRS: 7272 -> 7248 (-0.33 %)
VGPRS: 4848 -> 4984 (2.81 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 2176 -> 256 (-88.24 %)
Scratch size: 2188 -> 256 (-88.30 %) dwords per thread
Code Size: 336332 -> 348000 (3.47 %) bytes
LDS: 18 -> 18 (0.00 %) blocks
Max Waves: 2659 -> 2636 (-0.86 %)
Wait states: 0 -> 0 (0.00 %)

|   PERCENTAGE DELTAS    |  Shaders |    SGPRs |    VGPRs |SpillSGPR |SpillVGPR | PrivVGPR |  Scratch | CodeSize | MaxWaves |    Waits |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| 0ad                    |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| alien_isolation        |      2936|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| anholt                 |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| antichamber            |       180|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| batman_arkham_origins  |       589|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| bioshock-infinite      |      1769|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| borderlands2           |      3968|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| borderlands_presequel  |      1326|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| brutal-legend          |       338|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| chromeos               |        86|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| chromium               |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| civilization_beyond..  |       116|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| company_of_heroes2     |       240|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| counter_strike_glob..  |      1142|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| deadcore               |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| deus_ex_mankind_div..  |      1410|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dirt-showdown          |       533|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dirt_rally             |       364|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| divinity               |      1052|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dolphin                |        22|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| dota2                  |      1747|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| europa_universalis_4   |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| f1-2015                |       775|    0.02 %|    0.12 %|    .     |    .     | -100.00 %| -100.00 %|    0.19 %|   -0.04 %|    .     |
| furmark-0.7.0          |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| gimark-0.7.0           |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| glamor                 |        16|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| glmark                 |        96|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| grid_autosport         |      1767|   -0.03 %|    0.17 %|    .     |    .     |  -85.52 %|  -84.44 %|    0.40 %|   -0.03 %|    .     |
| hitman                 |      1413|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-celshading       |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-domino           |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-dynamicbranching |        24|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-hdr              |        10|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-portals          |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| humus-volumetricfog..  |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| left_4_dead_2          |      1762|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| legend_of_grimrock     |       100|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| life_is_strange        |      1296|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| mad_max                |       358|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| many-spheres           |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| metro_2033_redux       |      2670|    .     |    0.02 %|    .     |    .     |    .     |    .     |    .     |   -0.02 %|    .     |
| nexuiz                 |        80|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| payday2                |      1362|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-julia-fp32     |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-julia-fp64     |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-piano-0.7.0    |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| pixmark-volplosion-..  |         2|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| plot3d-0.7.0           |         8|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| portal                 |       474|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| reflections_subway     |        98|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| rocket_league          |       494|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| saints_row_iv          |      1704|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| saints_row_the_third   |       671|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| sauerbraten            |         7|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| scifi_hallway          |        98|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| serious_sam_3_bfe      |       392|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| shadow_of_mordor       |      1410|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| shadow_warrior         |      3956|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| skia                   |      6094|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| sun_temple             |       109|    .     |    .     |    .     |    .     |    .     |    .     |    0.01 %|    .     |    .     |
| supertuxkart           |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| talos_principle        |       324|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| team_fortress_2        |       808|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tesseract              |       430|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tessmark-0.7.0         |         6|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| thea                   |       172|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| tomb_raider            |      1448|   -0.02 %|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| total_war_warhammer    |       242|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ubershaders            |        54|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ue4_effects_cave       |       290|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| ue4_elemental          |       561|    .     |    .     |    .     |    .     |    .     |    .     |    0.02 %|    .     |    .     |
| ue4_lightroom_inter..  |        64|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| ue4_realistic_rende..  |        86|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_heaven         |       322|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_sanctuary      |       264|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_tropics        |       210|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unigine_valley         |       278|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| unity                  |        72|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| victor_vran            |      1262|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| warsow                 |       176|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| warzone2100            |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| wasteland2             |        76|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| wavelet-volume         |         4|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| witcher2               |      1040|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| xcom_enemy_within      |      1236|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
| yofrankie              |        82|    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |    .     |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| All affected           |       157|   -0.33 %|    2.81 %|    .     |    .     |  -88.24 %|  -88.30 %|    3.47 %|   -0.86 %|    .     |
|------------------------|----------|----------|----------|----------|----------|----------|----------|----------|----------|----------|
| Total                  |     54793|    .     |    .     |    .     |    .     |  -88.24 %|  -87.03 %|    0.02 %|    .     |    .     |

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5750>

3 years agoradeonsi: reorder NIR optimizations
Marek Olšák [Sat, 4 Jul 2020 02:05:18 +0000 (22:05 -0400)]
radeonsi: reorder NIR optimizations

Based on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5668

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5750>

3 years agoradeonsi: extend workaround for KHR-GL45.texture_view.view_classes on gfx9
Pierre-Eric Pelloux-Prayer [Wed, 29 Jul 2020 10:14:28 +0000 (12:14 +0200)]
radeonsi: extend workaround for KHR-GL45.texture_view.view_classes on gfx9

This is a followup of 19db1a540c248e330284a6c9733633d0695677a3.
This commit fixed KHR-GL45.texture_view.view_classes on gfx9 but the test
still failed when using AMD_DEBUG=nodma or AMD_DEBUG=nodcc,nodma.

The workaround is now used from si_resource_copy_region so it covers the
previous call site (si_texture_transfer_map) and the sctx->dma_copy
fallback code.

Fixes: 19db1a540c2 ("radeonsi: add a workaround to fix KHR-GL45.texture_view.view_classes on gfx9")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6115>

3 years agost/mesa: optimize DEPTH_STENCIL copies using fragment shader
Indrajit Kumar Das [Mon, 27 Jul 2020 13:51:42 +0000 (19:21 +0530)]
st/mesa: optimize DEPTH_STENCIL copies using fragment shader

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

3 years agofreedreno: allow fence_fd fences to be recycled
Rob Clark [Tue, 4 Aug 2020 21:24:44 +0000 (14:24 -0700)]
freedreno: allow fence_fd fences to be recycled

This allows us to avoid a no-op flush if there has been no rendering,
but we hit pctx->flush(PIPE_FLUSH_FENCE_FD).

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

3 years agoradeonsi: disable SDMA on gfx9
Marek Olšák [Mon, 4 May 2020 22:25:28 +0000 (18:25 -0400)]
radeonsi: disable SDMA on gfx9

Fixes: 9680a754895 "radeonsi/gfx9: enable SDMA buffer copying & clearing"
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4895>

3 years agoci: Add a build test for the Android platform
Kristian H. Kristensen [Tue, 28 Jul 2020 22:35:36 +0000 (15:35 -0700)]
ci: Add a build test for the Android platform

This builds the EGL loader and the freedreno, intel and amd vulkan
drivers.

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

3 years agoradv/android: Remove unused variable
Kristian H. Kristensen [Thu, 30 Jul 2020 22:25:09 +0000 (15:25 -0700)]
radv/android: Remove unused variable

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

3 years agovulkan: Allow global symbol HMI for Android
Kristian H. Kristensen [Wed, 29 Jul 2020 19:51:49 +0000 (12:51 -0700)]
vulkan: Allow global symbol HMI for Android

Android looks for this symbol when loading HAL modules.

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

3 years agoanv: Add stub for anv_gem_get_tiling() for Android
Kristian H. Kristensen [Wed, 29 Jul 2020 19:51:07 +0000 (12:51 -0700)]
anv: Add stub for anv_gem_get_tiling() for Android

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>

3 years agoanv: Pass device to setup_gralloc0_usage for error reporting
Kristian H. Kristensen [Wed, 29 Jul 2020 18:02:07 +0000 (11:02 -0700)]
anv: Pass device to setup_gralloc0_usage for error reporting

Otherwise it doesn't compile.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: aba57b11ee8c6d ("anv: support GetSwapchainGrallocUsage2ANDROID for Android")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>

3 years agomeson: Define ANDROID and ANDROID_API_LEVEL when compiling for Android
Kristian H. Kristensen [Wed, 29 Jul 2020 08:09:23 +0000 (01:09 -0700)]
meson: Define ANDROID and ANDROID_API_LEVEL when compiling for Android

Set ANDROID_API_LEVEL based on the value we already have and define
ANDROID to make sure we build code paths that are guarded by that.

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

3 years agoturnip: Make tu_android.c compile again
Kristian H. Kristensen [Wed, 29 Jul 2020 07:53:29 +0000 (00:53 -0700)]
turnip: Make tu_android.c compile again

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

3 years agomapi: Mark TLS symbols as optional in glapi-symbols.txt
Kristian H. Kristensen [Wed, 29 Jul 2020 07:08:46 +0000 (00:08 -0700)]
mapi: Mark TLS symbols as optional in glapi-symbols.txt

Presence of these depends on whether or not we're using ELF TLS.

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

3 years agoci: Include enough Android headers to let us compile test EGL
Kristian H. Kristensen [Tue, 28 Jul 2020 22:25:49 +0000 (15:25 -0700)]
ci: Include enough Android headers to let us compile test EGL

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

3 years agogallium/android: Rewrite backtrace helper for android
Kristian H. Kristensen [Wed, 29 Jul 2020 04:24:45 +0000 (21:24 -0700)]
gallium/android: Rewrite backtrace helper for android

The previous implementation kept a hashtable of a Backtrace object per
thread.  debug_backtrace_capture is supposed to store a backtrace in
the passed in debug_stack_frame array, but instead overwrote the
per-thread Backtrace object.

This new version works more like the libunwind based capture. We hash
the file and symbol names and store pointers in the debug_stack_frame
struct.  This way debug_backtrace_capture doesn't overwrite previous
captures or allocate memory that needs to be freed.

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

3 years agoutil: Add unit test for stack backtrace caputure
Kristian H. Kristensen [Wed, 29 Jul 2020 04:29:37 +0000 (21:29 -0700)]
util: Add unit test for stack backtrace caputure

First test never fails, but exercises the code and is useful for
manual inspection.  Second test exposes the android implementation
bug.

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

3 years agoutil: Move stack debug functions to src/util
Kristian H. Kristensen [Wed, 29 Jul 2020 05:02:31 +0000 (22:02 -0700)]
util: Move stack debug functions to src/util

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

3 years agogallium: Switch u_debug_stack/symbol.c to util/hash_table.h
Kristian H. Kristensen [Wed, 29 Jul 2020 05:52:46 +0000 (22:52 -0700)]
gallium: Switch u_debug_stack/symbol.c to util/hash_table.h

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

3 years agomapi/test: Change type to unsigned for offset
Kristian H. Kristensen [Wed, 29 Jul 2020 04:10:57 +0000 (21:10 -0700)]
mapi/test: Change type to unsigned for offset

Quiets this warning:

../../master/src/mapi/glapi/tests/check_table.cpp:576:20: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]
   { "glColor3dv", _O(Color3dv) },
                   ^~~~~~~~~~~~

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

3 years agoegl/android: Remove unused variable
Kristian H. Kristensen [Tue, 28 Jul 2020 22:38:03 +0000 (15:38 -0700)]
egl/android: Remove unused variable

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

3 years agoamd/llvm: Reorder LLVM headers
James Park [Wed, 5 Aug 2020 16:59:25 +0000 (09:59 -0700)]
amd/llvm: Reorder LLVM headers

LLVM uses __declspec(restrict) which breaks because Mesa define restrict
as __restrict. Move the LLVM headerse up to dodge the macro.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6180>