platform/upstream/mesa.git
4 years agoandroid: Disable trying to read/write to the disk cache.
Eric Anholt [Fri, 18 Sep 2020 17:42:52 +0000 (10:42 -0700)]
android: Disable trying to read/write to the disk cache.

We need the disk cache enabled in Android to get EGL_ANDROID_blob_cache's
callbacks called, but we don't actually want to store anything on disk.
Fixes "Failed to create //.cache for shader cache (Read-only file
system)---disabling." spam on init.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6762>

4 years agomesa: Make the android_stub be a set of non-installed shared libraries.
Eric Anholt [Mon, 21 Sep 2020 21:27:24 +0000 (14:27 -0700)]
mesa: Make the android_stub be a set of non-installed shared libraries.

Previously, we included the stubs in our driver binaries, so they didn't
call the actual system libraries for these functions.  This was enough to
build-test the Android code in CI without even the NDK.

To make NDK-built Mesa drivers useful, we need to link against these
system libraries that aren't present in the NDK.  Split the symbols to
separate non-installed shared libraries and link against those, so that
when you drop the resulting .so in your /vendor/lib64/hw/, it just works
out.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6805>

4 years agoamd: add VanGogh support
Marek Olšák [Mon, 27 Jul 2020 23:39:50 +0000 (19:39 -0400)]
amd: add VanGogh support

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6820>

4 years agoamd: add Dimgrey Cavefish support
Marek Olšák [Tue, 17 Sep 2019 01:41:08 +0000 (21:41 -0400)]
amd: add Dimgrey Cavefish support

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6820>

4 years agoradeonsi: remove KILL_PS_INF_INTERP/CLAMP_DIV_BY_ZERO, use screen::options
Marek Olšák [Tue, 22 Sep 2020 06:39:09 +0000 (02:39 -0400)]
radeonsi: remove KILL_PS_INF_INTERP/CLAMP_DIV_BY_ZERO, use screen::options

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

4 years agoradeonsi: move debug options from si_disk_cache_create to si_get_ir_cache_key
Marek Olšák [Tue, 22 Sep 2020 06:35:53 +0000 (02:35 -0400)]
radeonsi: move debug options from si_disk_cache_create to si_get_ir_cache_key

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

4 years agoradeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it
Marek Olšák [Sun, 19 Jul 2020 12:58:51 +0000 (08:58 -0400)]
radeonsi: set TRUNC_COORD=0 for Total War: WARHAMMER to fix it

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3233

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

4 years agoci: Use ignore_scheduled_pipelines anchor in .radeonsi-rules
Michel Dänzer [Mon, 21 Sep 2020 17:27:51 +0000 (19:27 +0200)]
ci: Use ignore_scheduled_pipelines anchor in .radeonsi-rules

Without this, scheduled pipelines erroneously tried to create jobs using
this template, which can't work, because their dependency jobs don't
exist in scheduled pipelines. Unfortunately, this resulted in scheduled
pipelines not running silently, without any direct feedback about what's
wrong (see https://gitlab.com/gitlab-org/gitlab/-/issues/25490).

Fixes: 6c8b921572a5 "ci: Build kernels and rootfs for x86 devices"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6802>

4 years agotu: Expose shaderStorageImage*WithoutFormat
Connor Abbott [Mon, 21 Sep 2020 12:04:27 +0000 (14:04 +0200)]
tu: Expose shaderStorageImage*WithoutFormat

We don't use the format anymore in the backend, except determining the
number of components, and we fallback to 4 there if it's not specified.
So we should be safe to enable this.

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

4 years agoir3: Don't use the format to get the image type
Connor Abbott [Mon, 21 Sep 2020 11:47:48 +0000 (13:47 +0200)]
ir3: Don't use the format to get the image type

Use the sampler type instead, which was recently plumbed through core
NIR, for load/store and the right type for atomics. This removes the
last hard dependency on the image format.

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

4 years agotu: Expose shaderImageGatherExtended
Connor Abbott [Mon, 21 Sep 2020 12:06:22 +0000 (14:06 +0200)]
tu: Expose shaderImageGatherExtended

This just allows textureGather() to have offsets, which we already
supported in ir3.

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

4 years agotu: Expose shaderStorageImageExtendedFormats
Connor Abbott [Mon, 21 Sep 2020 11:34:10 +0000 (13:34 +0200)]
tu: Expose shaderStorageImageExtendedFormats

We already supported all the formats on the list, so it's trivial to
enable.

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

4 years agor600/sfn: Be a bit more verbose when logging skipped FS outputs
Gert Wollny [Tue, 22 Sep 2020 07:22:20 +0000 (09:22 +0200)]
r600/sfn: Be a bit more verbose when logging skipped FS outputs

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

4 years agor600/sfn: Acquire the number of FS outputs and the write_all info early
Gert Wollny [Tue, 22 Sep 2020 07:21:53 +0000 (09:21 +0200)]
r600/sfn: Acquire the number of FS outputs and the write_all info early

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

4 years agor600/sfn: Take dual source blending output indices into account
Gert Wollny [Tue, 22 Sep 2020 07:20:41 +0000 (09:20 +0200)]
r600/sfn: Take dual source blending output indices into account

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

4 years agor600/sfn: Handle number of color outputs taking dual source blending into account
Gert Wollny [Tue, 22 Sep 2020 07:19:30 +0000 (09:19 +0200)]
r600/sfn: Handle number of color outputs taking dual source blending into account

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

4 years agor600/sfn: Keep info about dual-source blend in FS
Gert Wollny [Tue, 22 Sep 2020 07:16:23 +0000 (09:16 +0200)]
r600/sfn: Keep info about dual-source blend in FS

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

4 years agor600/sfn: Sort the outputs of the FS according to data index
Gert Wollny [Tue, 22 Sep 2020 07:15:31 +0000 (09:15 +0200)]
r600/sfn: Sort the outputs of the FS according to data index

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

4 years agor600: Add flag for dual-source blending to shader key
Gert Wollny [Tue, 22 Sep 2020 07:13:57 +0000 (09:13 +0200)]
r600: Add flag for dual-source blending to shader key

Otherwise the number of outputs and the output data index can't be
interpreted correctly.

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

4 years agor600/sfn: remove a useless if-condition
Gert Wollny [Tue, 22 Sep 2020 07:02:08 +0000 (09:02 +0200)]
r600/sfn: remove a useless if-condition

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

4 years agor600/sfn: run late algebraic optimizations
Gert Wollny [Tue, 22 Sep 2020 07:01:48 +0000 (09:01 +0200)]
r600/sfn: run late algebraic optimizations

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

4 years agor600/sfn: use cnde instead of cnde_int
Gert Wollny [Mon, 21 Sep 2020 18:02:12 +0000 (20:02 +0200)]
r600/sfn: use cnde instead of cnde_int

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

4 years agoetnaviv: fix comment for source of etna_mesa_debug
Michael Tretter [Tue, 8 Sep 2020 13:27:18 +0000 (15:27 +0200)]
etnaviv: fix comment for source of etna_mesa_debug

The file and the environment variables have different names than
described in the comment. Fix the comment to avoid confusion.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6661>

4 years agonir: Rename get_buffer_size to get_ssbo_size
Jason Ekstrand [Tue, 22 Sep 2020 08:24:45 +0000 (03:24 -0500)]
nir: Rename get_buffer_size to get_ssbo_size

This makes it explicit that this intrinsic is only for SSBOs.  For the
v3dv driver, we'll be adding a get_ubo_size intrinsic and we want to be
able to distinguish between the two.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6812>

4 years agoaco: stop multiplying driver_location by 4
Rhys Perry [Fri, 18 Sep 2020 12:31:43 +0000 (13:31 +0100)]
aco: stop multiplying driver_location by 4

This didn't really serve any purpose, doesn't match how FS inputs are
currently done, and prevented us from using
nir_io_add_const_offset_to_base in the future.

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

4 years agoaco: remove dead indirect fs input loading
Rhys Perry [Fri, 11 Sep 2020 16:23:18 +0000 (17:23 +0100)]
aco: remove dead indirect fs input loading

It's asserted that the visit_load_input code isn't reached. It also didn't
handle divergent indexing and this situation should have been lowered
anyway.

I think this used to be needed to pass a dEQP-VK.glsl.indexing.* test, but
it doesn't seem needed anymore.

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

4 years agoaco: use nir's constant source helpers more
Rhys Perry [Fri, 11 Sep 2020 16:22:28 +0000 (17:22 +0100)]
aco: use nir's constant source helpers more

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

4 years agoaco: use nir_get_io_offset_src() in visit_load_input()
Rhys Perry [Fri, 11 Sep 2020 16:17:51 +0000 (17:17 +0100)]
aco: use nir_get_io_offset_src() in visit_load_input()

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

4 years agoaco: use io semantics to get an intrinsic's slot
Rhys Perry [Fri, 11 Sep 2020 14:22:34 +0000 (15:22 +0100)]
aco: use io semantics to get an intrinsic's slot

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

4 years agoaco: Use NIR IO semantics for tess factor IO locations.
Timur Kristóf [Sat, 12 Sep 2020 12:48:52 +0000 (14:48 +0200)]
aco: Use NIR IO semantics for tess factor IO locations.

Previously we relied on looping over the NIR output variables
to remember the driver location of the tess factors, now use
the new NIR IO semantics instead.

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

4 years agoanv: implement VK_KHR_copy_commands2
Lionel Landwerlin [Wed, 15 Jul 2020 09:30:49 +0000 (12:30 +0300)]
anv: implement VK_KHR_copy_commands2

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6801>

4 years agovulkan: bump headers/registry to 1.2.154
Lionel Landwerlin [Wed, 15 Jul 2020 08:03:10 +0000 (11:03 +0300)]
vulkan: bump headers/registry to 1.2.154

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6801>

4 years agonir/lower_samplers: Clamp out-of-bounds access to array of samplers
Danylo Piliaiev [Fri, 21 Aug 2020 14:21:14 +0000 (17:21 +0300)]
nir/lower_samplers: Clamp out-of-bounds access to array of samplers

Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says:

"In the subsections described above for array, vector, matrix and
 structure accesses, any out-of-bounds access produced undefined
 behavior.... Out-of-bounds reads return undefined values, which
 include values from other variables of the active program or zero."

Robustness extensions suggest to return zero on out-of-bounds
accesses, however it's not applicable to the arrays of samplers,
so just clamp the index.

Otherwise instr->sampler_index or instr->texture_index would be out
of bounds, and they are used as an index to arrays of driver state.

E.g. this fixes such dereference:
 if (options->lower_tex_packing[tex->sampler_index] !=
in nir_lower_tex.c

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6428>

4 years agonir/large_constants: Eliminate out-of-bounds writes to large constants
Danylo Piliaiev [Fri, 21 Aug 2020 13:35:28 +0000 (16:35 +0300)]
nir/large_constants: Eliminate out-of-bounds writes to large constants

Out-of-bounds writes could be eliminated per spec:

Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says:

"In the subsections described above for array, vector, matrix and
 structure accesses, any out-of-bounds access produced undefined
 behavior.... Out-of-bounds writes may be discarded or overwrite
 other variables of the active program."

Fixes: 1235850522cd5e7b07701f7065996430ca1514b6
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6428>

4 years agonir/lower_io: Eliminate oob writes and return zero for oob reads
Danylo Piliaiev [Fri, 21 Aug 2020 10:42:55 +0000 (13:42 +0300)]
nir/lower_io: Eliminate oob writes and return zero for oob reads

Out-of-bounds writes could be eliminated per spec:

Section 5.11 (Out-of-Bounds Accesses) of the GLSL 4.60 spec says:

 "In the subsections described above for array, vector, matrix and
  structure accesses, any out-of-bounds access produced undefined
  behavior....
  Out-of-bounds writes may be discarded or overwrite
  other variables of the active program.
  Out-of-bounds reads return undefined values, which
  include values from other variables of the active program or zero."

GL_KHR_robustness and GL_ARB_robustness encourage us to return zero
for reads.

Otherwise get_io_offset would return out-of-bound offset which may
result in out-of-bound loading/storing of inputs/outputs,
that could cause issues in drivers down the line.

E.g. this fixes such dereference:
 int vue_slot = vue_map->varying_to_slot[intrin->const_index[0]];
in brw_nir.c

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6428>

4 years agoradeon: rename RADEON_TRANSFER_* -> RADEON_MAP_*
Marek Olšák [Thu, 6 Aug 2020 16:47:01 +0000 (12:47 -0400)]
radeon: rename RADEON_TRANSFER_* -> RADEON_MAP_*

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

4 years agogallium: rename transfer flags -> map flags in comments
Marek Olšák [Wed, 1 Jul 2020 12:41:11 +0000 (08:41 -0400)]
gallium: rename transfer flags -> map flags in comments

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

4 years agogallium: rename pipe_transfer_usage -> pipe_map_flags
Marek Olšák [Wed, 1 Jul 2020 12:21:38 +0000 (08:21 -0400)]
gallium: rename pipe_transfer_usage -> pipe_map_flags

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

4 years agogallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*
Marek Olšák [Wed, 1 Jul 2020 12:16:12 +0000 (08:16 -0400)]
gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*

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

4 years agoradeonsi: add 16-bit ALU vectorization
Marek Olšák [Fri, 24 Jul 2020 20:15:51 +0000 (16:15 -0400)]
radeonsi: add 16-bit ALU vectorization

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

4 years agoradeonsi: don't scalarize 16-bit vec2 ALU opcodes
Marek Olšák [Fri, 24 Jul 2020 20:14:02 +0000 (16:14 -0400)]
radeonsi: don't scalarize 16-bit vec2 ALU opcodes

prerequisite for enabling vectorization, so that we don't scalarize
and vectorize at the same time, causing an infinite loop.

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

4 years agoradeonsi: vectorize IO for better ALU vectorization
Marek Olšák [Fri, 24 Jul 2020 20:16:46 +0000 (16:16 -0400)]
radeonsi: vectorize IO for better ALU vectorization

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

4 years agoradeonsi: implement 16-bit FS color outputs
Marek Olšák [Mon, 11 May 2020 06:42:18 +0000 (02:42 -0400)]
radeonsi: implement 16-bit FS color outputs

This removes type conversions from 16 bits to 32 bits in the main function
and then back to 16 bits in the epilog.

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

4 years agoradeonsi: set flags for FP16 in shaders
Marek Olšák [Fri, 4 Sep 2020 17:48:30 +0000 (13:48 -0400)]
radeonsi: set flags for FP16 in shaders

v2: remove the enablement code

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

4 years agoradeonsi: don't lower pack for better 16-bit vectorization
Marek Olšák [Fri, 4 Sep 2020 10:49:09 +0000 (06:49 -0400)]
radeonsi: don't lower pack for better 16-bit vectorization

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

4 years agoac/nir: implement nir_op_[un]pack_[64/32]_*
Daniel Schürmann [Mon, 31 Aug 2020 16:34:02 +0000 (17:34 +0100)]
ac/nir: implement nir_op_[un]pack_[64/32]_*

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

4 years agoglsl: Initialize ir_constant member const_elements in all constructors.
Vinson Lee [Fri, 18 Sep 2020 00:32:15 +0000 (17:32 -0700)]
glsl: Initialize ir_constant member const_elements in all constructors.

Fix defects reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member const_elements is not
initialized in this constructor nor in any functions that it calls.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6770>

4 years agopan/bi: Fix typo.
Vinson Lee [Fri, 18 Sep 2020 22:21:14 +0000 (15:21 -0700)]
pan/bi: Fix typo.

Fix defect reported by Coverity Scan.

Same on both sides (CONSTANT_EXPRESSION_RESULT)
pointless_expression: The expression src0_u8 || src0_u8 does not
accomplish anything because it evaluates to either of its
identical operands, src0_u8.

Fixes: 2ff53879f214 ("pan/bi: Use new packing")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6780>

4 years agost/mesa: Deal with empty textures/buffers in semaphore wait/signal.
Bas Nieuwenhuizen [Sat, 19 Sep 2020 15:28:17 +0000 (17:28 +0200)]
st/mesa: Deal with empty textures/buffers in semaphore wait/signal.

The actual texture might not have been created yet.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3257
CC: mesa-stable
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6788>

4 years agoturnip/kgsl: Associate fences with submits.
Eric Anholt [Thu, 17 Sep 2020 16:13:10 +0000 (09:13 -0700)]
turnip/kgsl: Associate fences with submits.

This fixes all the I was seeing in the multiview tests.

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

4 years agoturnip: Add kgsl backend
Kristian H. Kristensen [Tue, 7 Apr 2020 19:36:20 +0000 (12:36 -0700)]
turnip: Add kgsl backend

Lacking a bit around fences and wsi integration, but there's enough
here to actually drive the GPU.

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

4 years agointel/compiler: fixup Gen12 workaround for array sizes
Lionel Landwerlin [Tue, 15 Sep 2020 12:33:14 +0000 (15:33 +0300)]
intel/compiler: fixup Gen12 workaround for array sizes

We didn't handle the case of NULL images/textures for which we should
return 0.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 397ff2976ba281 ("intel: Implement Gen12 workaround for array textures of size 1")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3522
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6729>

4 years agowsi/x11: Create a present queue for VK_PRESENT_MODE_FIFO_RELAXED_KHR
Adam Jackson [Mon, 21 Sep 2020 19:48:22 +0000 (15:48 -0400)]
wsi/x11: Create a present queue for VK_PRESENT_MODE_FIFO_RELAXED_KHR

This activates the target_msc computation that we'd otherwise be using
if we were just FIFO; otherwise we'd always set target_msc = 0 and it'd
act like IMMEDIATE.

Fixes: 77d25627933 "wsi/x11: Hook up VK_PRESENT_MODE_FIFO_RELAXED_KHR"
Fixes: mesa/mesa#3512
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6804>

4 years agogallium/auxiliary/vl: Include src region in scale_y calculation
Thong Thai [Tue, 15 Sep 2020 22:55:45 +0000 (18:55 -0400)]
gallium/auxiliary/vl: Include src region in scale_y calculation

Signed-off-by: Thong Thai <thong.thai@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3521
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6736>

4 years agofrontends/va: Enabled packed headers for H.264 encoder
Thong Thai [Tue, 2 Jun 2020 13:27:07 +0000 (09:27 -0400)]
frontends/va: Enabled packed headers for H.264 encoder

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4184>

4 years agoradeon: Pass HEVC encode crop parameters to the encoder
Thong Thai [Thu, 12 Mar 2020 14:05:48 +0000 (10:05 -0400)]
radeon: Pass HEVC encode crop parameters to the encoder

Signed-off-by: Thong Thai <thong.thai@amd.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2351
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4184>

4 years agogallium: Parse packed HEVC SPS encode header for crop parameters
Thong Thai [Thu, 12 Mar 2020 14:06:52 +0000 (10:06 -0400)]
gallium: Parse packed HEVC SPS encode header for crop parameters

The crop / conformance window parameters are set by ffmpeg but they only
seem to be made available in packed headers. This commit copies the H265
header parsing code from st/omx (planning in the future to move this
code to a common place to be shared by the different state trackers) in
order to grab the crop parameters

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4184>

4 years agor600/sfn: Fix typo in comment
Gert Wollny [Sat, 19 Sep 2020 13:38:35 +0000 (15:38 +0200)]
r600/sfn: Fix typo in comment

Thanks Stanislav Jakúbek for ponting it out.

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

4 years agor600/sfn: Fix component count for fdph
Gert Wollny [Sat, 19 Sep 2020 13:36:35 +0000 (15:36 +0200)]
r600/sfn: Fix component count for fdph

The second parameter has four components, and this is the one that would
be copied when splitting constants.

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

4 years agor600/sfn: make number of source components a local variable
Gert Wollny [Sat, 19 Sep 2020 13:24:15 +0000 (15:24 +0200)]
r600/sfn: make number of source components a local variable

There is no need to keep that value as a member and it irritates
Coverity.

Fixes: 688680decce9
  r600/nir: fetch sources and split uniforms before emittting alu instructions

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

4 years agogallium/auxiliary/vl: Odd Dimensions are failing
Krunal Patel [Sun, 20 Sep 2020 21:19:20 +0000 (02:49 +0530)]
gallium/auxiliary/vl: Odd Dimensions are failing

Issue: While running the tast for odd resolutions there are green lines
observed in the dumped image. The resolution is 321x241, the extra 1 pixel
data is missing in the image. The reason for this is in the post
processing when we adjust the size of height and width we are
dividing it by 2.

Fix: To resolve this issue we first need to align it to 2 and then divide
by 2 to get the required values. Once we do this we will have proper data
in the dumped image and missing pixel data will be available.

Signed-off-by: Krunal Patel <krunalkumarmukeshkumar.patel@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6795>

4 years agoradv: do not lower UBO/SSBO access to offsets
Samuel Pitoiset [Tue, 2 Jun 2020 11:20:34 +0000 (13:20 +0200)]
radv: do not lower UBO/SSBO access to offsets

Use nir_lower_explicit_io instead of lowering to offsets. Extra
(useless) additions are removed by lowering load_vulkan_descriptor
to vec2(src.x, 0).

fossils-db (Navi):
Totals from 18236 (13.21% of 138013) affected shaders:
SGPRs: 1172766 -> 1168278 (-0.38%); split: -0.89%, +0.50%
VGPRs: 940156 -> 952232 (+1.28%); split: -0.08%, +1.37%
SpillSGPRs: 30286 -> 31109 (+2.72%); split: -0.78%, +3.50%
SpillVGPRs: 1893 -> 1909 (+0.85%)
CodeSize: 87910396 -> 88113592 (+0.23%); split: -0.35%, +0.58%
Scratch: 819200 -> 823296 (+0.50%)
MaxWaves: 205535 -> 202102 (-1.67%); split: +0.05%, -1.72%
Instrs: 17052527 -> 17113484 (+0.36%); split: -0.32%, +0.67%
Cycles: 670794876 -> 669084540 (-0.25%); split: -0.38%, +0.13%
VMEM: 5274728 -> 5388556 (+2.16%); split: +3.10%, -0.94%
SMEM: 1196146 -> 1165850 (-2.53%); split: +2.06%, -4.60%
VClause: 381463 -> 399217 (+4.65%); split: -1.08%, +5.73%
SClause: 666216 -> 631135 (-5.27%); split: -5.44%, +0.18%
Copies: 1292720 -> 1289318 (-0.26%); split: -1.28%, +1.01%
Branches: 467336 -> 473028 (+1.22%); split: -0.67%, +1.89%
PreSGPRs: 766459 -> 772175 (+0.75%); split: -0.53%, +1.28%
PreVGPRs: 819746 -> 825327 (+0.68%); split: -0.05%, +0.73%

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6202>

4 years agoradv: add a helper for loading meta descriptors
Samuel Pitoiset [Tue, 2 Jun 2020 15:29:14 +0000 (17:29 +0200)]
radv: add a helper for loading meta descriptors

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6202>

4 years agoci: Don't create test-docs job if the pages one exists in the pipeline
Michel Dänzer [Wed, 2 Sep 2020 16:39:52 +0000 (18:39 +0200)]
ci: Don't create test-docs job if the pages one exists in the pipeline

It's redundant in that case.

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

4 years agoci: Prevent pages job from running in pre-merge pipelines
Michel Dänzer [Wed, 2 Sep 2020 16:35:32 +0000 (18:35 +0200)]
ci: Prevent pages job from running in pre-merge pipelines

Since pre-merge pipelines run in the "mesa" namespace now, the rule
would have created the job if the source branch was named "master" (and
the job might have updated the public website).

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

4 years agoci: Always use CI_PROJECT_NAMESPACE instead of CI_PROJECT_PATH
Michel Dänzer [Tue, 8 Sep 2020 16:02:58 +0000 (18:02 +0200)]
ci: Always use CI_PROJECT_NAMESPACE instead of CI_PROJECT_PATH

And always check it first.

Cleanup for consistency.

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

4 years agoci: Add "is for Marge Bot" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 16:00:21 +0000 (18:00 +0200)]
ci: Add "is for Marge Bot" YAML anchor

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

4 years agoci: Add "is pre-merge pipeline" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 15:58:32 +0000 (17:58 +0200)]
ci: Add "is pre-merge pipeline" YAML anchor

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

4 years agoci: Add "is post-merge pipeline" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 15:47:18 +0000 (17:47 +0200)]
ci: Add "is post-merge pipeline" YAML anchor

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

4 years agoci: Add "is forked branch" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 15:52:24 +0000 (17:52 +0200)]
ci: Add "is forked branch" YAML anchor

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

4 years agoci: Add "is forked branch or pre-merge pipeline" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 15:30:49 +0000 (17:30 +0200)]
ci: Add "is forked branch or pre-merge pipeline" YAML anchor

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

4 years agoci: Add "is post-merge pipeline, not for Marge Bot" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 10:36:11 +0000 (12:36 +0200)]
ci: Add "is post-merge pipeline, not for Marge Bot" YAML anchor

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

4 years agoci: Add "is pre-merge pipeline for Marge Bot" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 10:31:08 +0000 (12:31 +0200)]
ci: Add "is pre-merge pipeline for Marge Bot" YAML anchor

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

4 years agoci: Add "is master branch of main project" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 10:20:39 +0000 (12:20 +0200)]
ci: Add "is master branch of main project" YAML anchor

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

4 years agoci: Add "is scheduled pipeline" YAML anchor
Michel Dänzer [Tue, 8 Sep 2020 15:44:40 +0000 (17:44 +0200)]
ci: Add "is scheduled pipeline" YAML anchor

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

4 years agoradv: fix transform feedback crashes if pCounterBufferOffsets is NULL
Samuel Pitoiset [Mon, 21 Sep 2020 11:43:49 +0000 (13:43 +0200)]
radv: fix transform feedback crashes if pCounterBufferOffsets is NULL

From the Vulkan 1.2.154 spec:
    "If pCounterBufferOffsets is NULL, then it is assumed the
     offsets are zero."

Fix new CTS
dEQP-VK.transform_feedback.simple.backward_dependency_no_offset_array.

CC: mesa-stable
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/6798>

4 years agoaco: use bit vectors for liveness sets
Rhys Perry [Mon, 14 Sep 2020 15:45:55 +0000 (16:45 +0100)]
aco: use bit vectors for liveness sets

This seems to be much faster than hash sets. When compiling pipelines from
5 games, live_var_analysis takes about a third the time it used to and
fossilize-replay is ~1.77% faster.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6733>

4 years agoaco: keep track of temporaries' regclasses in the Program
Rhys Perry [Mon, 14 Sep 2020 19:58:33 +0000 (20:58 +0100)]
aco: keep track of temporaries' regclasses in the Program

A future change will switch the liveness sets to bit vectors, which don't
contain regclass information.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6733>

4 years agoradeonsi: change vendor name to AMD
Pierre-Eric Pelloux-Prayer [Wed, 16 Sep 2020 11:08:58 +0000 (13:08 +0200)]
radeonsi: change vendor name to AMD

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

4 years agoradeonsi: reduce PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE value
Pierre-Eric Pelloux-Prayer [Wed, 16 Sep 2020 21:11:01 +0000 (23:11 +0200)]
radeonsi: reduce PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE value

The new value (64 MB) is a compromise:
- the old value was very large (max_alloc & 0xffffffff) and caused https://gitlab.freedesktop.org/mesa/mesa/-/issues/3301
- amdgpu-pro allows 512MB, nvidia 64MB

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

4 years agoradeonsi: move GL vendor workaround to drirc
Pierre-Eric Pelloux-Prayer [Tue, 15 Sep 2020 08:48:26 +0000 (10:48 +0200)]
radeonsi: move GL vendor workaround to drirc

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

4 years agogallium: add PIPE_CAP_MAX_TEXTURE_MB
Pierre-Eric Pelloux-Prayer [Mon, 14 Sep 2020 08:49:29 +0000 (10:49 +0200)]
gallium: add PIPE_CAP_MAX_TEXTURE_MB

Allows driver to override the default value (1024) from mesa.

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

4 years agoradv,aco: fix reading primitive ID in FS after TES
Rhys Perry [Thu, 17 Sep 2020 13:41:27 +0000 (14:41 +0100)]
radv,aco: fix reading primitive ID in FS after TES

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3530
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6760>

4 years agopanfrost: decode: Misc formatting improvements
Boris Brezillon [Thu, 10 Sep 2020 10:46:33 +0000 (12:46 +0200)]
panfrost: decode: Misc formatting improvements

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: Avoid copying job descriptors around when we can
Boris Brezillon [Tue, 8 Sep 2020 18:32:41 +0000 (20:32 +0200)]
panfrost: Avoid copying job descriptors around when we can

Job descriptors are written section by section and are never modified
after them been emitted. Let's avoid copying things around by allocating
descriptors upfront and letting the scoreboard logic only write the
header section.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the compute job descriptor
Boris Brezillon [Tue, 8 Sep 2020 17:41:51 +0000 (19:41 +0200)]
panfrost: XML-ify the compute job descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: Rename the Blend dither disable flag
Boris Brezillon [Tue, 8 Sep 2020 10:48:15 +0000 (12:48 +0200)]
panfrost: Rename the Blend dither disable flag

It's actually encoding the "Round to FB precision" information.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the fragment job descriptor
Boris Brezillon [Tue, 8 Sep 2020 10:43:48 +0000 (12:43 +0200)]
panfrost: XML-ify the fragment job descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the write value job descriptor
Boris Brezillon [Tue, 8 Sep 2020 08:39:23 +0000 (10:39 +0200)]
panfrost: XML-ify the write value job descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the job header descriptor
Boris Brezillon [Tue, 8 Sep 2020 05:07:41 +0000 (07:07 +0200)]
panfrost: XML-ify the job header descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the multi-target framebuffer descriptors
Boris Brezillon [Tue, 8 Sep 2020 08:17:40 +0000 (10:17 +0200)]
panfrost: XML-ify the multi-target framebuffer descriptors

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the bifrost tiler descriptors
Boris Brezillon [Tue, 8 Sep 2020 08:11:26 +0000 (10:11 +0200)]
panfrost: XML-ify the bifrost tiler descriptors

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the single target framebuffer descriptor
Boris Brezillon [Sun, 6 Sep 2020 09:01:09 +0000 (11:01 +0200)]
panfrost: XML-ify the single target framebuffer descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the midgard tiler descriptor
Boris Brezillon [Sat, 5 Sep 2020 16:16:37 +0000 (18:16 +0200)]
panfrost: XML-ify the midgard tiler descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: Add Tiled linear mode to the Block Format enum
Boris Brezillon [Thu, 3 Sep 2020 15:27:51 +0000 (17:27 +0200)]
panfrost: Add Tiled linear mode to the Block Format enum

Add it for completeness.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: Clarify what TILED mode is
Boris Brezillon [Thu, 3 Sep 2020 15:26:49 +0000 (17:26 +0200)]
panfrost: Clarify what TILED mode is

We have 2 tile modes: tiled linear and tiled U-interleaved. Let's rename
the existing value to clarify that.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: XML-ify the local storage descriptor
Boris Brezillon [Thu, 3 Sep 2020 07:18:09 +0000 (09:18 +0200)]
panfrost: XML-ify the local storage descriptor

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: decode: Use pan_{unpack,print}() when applicable
Boris Brezillon [Tue, 15 Sep 2020 07:25:18 +0000 (09:25 +0200)]
panfrost: decode: Use pan_{unpack,print}() when applicable

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: decode: Add a macro to dump unpacked descriptors
Boris Brezillon [Sat, 5 Sep 2020 16:14:17 +0000 (18:14 +0200)]
panfrost: decode: Add a macro to dump unpacked descriptors

And use it where it makes sense.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>

4 years agopanfrost: decode: Rework the DUMP_{CL,ADDR}() macros
Boris Brezillon [Wed, 9 Sep 2020 15:56:53 +0000 (17:56 +0200)]
panfrost: decode: Rework the DUMP_{CL,ADDR}() macros

We don't need to pass the indentation level explicitly if we use
pandecode_log() instead of fprintf(). This helps keeping a consistent
indentation across descriptors.

While at it, let's rework those macros to allow creating titles from
a format string.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>