mesa.git
4 years agopanfrost: Implement EXT_multisampled_render_to_texture
Alyssa Rosenzweig [Tue, 21 Jul 2020 22:54:18 +0000 (18:54 -0400)]
panfrost: Implement EXT_multisampled_render_to_texture

Significantly helps WebGL performance with Chromium's OpenGL ES backend.
Also update docs/features.txt

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

4 years agopanfrost: Add MSAA mode selection field
Alyssa Rosenzweig [Tue, 21 Jul 2020 22:51:07 +0000 (18:51 -0400)]
panfrost: Add MSAA mode selection field

This field enables MSAA, either writing samples to separate surfaces, to
a single large-bpp surface, or implicitly resolved and to a single
surface.

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

4 years agodocs/features: Add GL_EXT_multisampled_render_to_texture
Alyssa Rosenzweig [Mon, 3 Aug 2020 17:19:43 +0000 (13:19 -0400)]
docs/features: Add GL_EXT_multisampled_render_to_texture

Currently only a6xx, panfrost added later in series.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6161>

4 years agoradv: print warnings for famous RADV_PERFTEST options that no longer exist
Samuel Pitoiset [Fri, 26 Jun 2020 10:12:18 +0000 (12:12 +0200)]
radv: print warnings for famous RADV_PERFTEST options that no longer exist

RADV_PERFTEST=aco no longer exists, ACO is the default compiler.
RADV_PERFTEST=llvm is deprecated, use RADV_DEBUG=llvm instead.

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

4 years agoradeon/vcn: Corrected vp9 ref associated data incase of target->codec is NULL
SureshGuttula [Sat, 13 Jun 2020 06:51:48 +0000 (12:21 +0530)]
radeon/vcn: Corrected vp9 ref associated data incase of target->codec is NULL

This patch fixes the case where less number of reference surfaces created and destoyed
on need basis. The problem comes when we are refereing old assoiciated data for newly
created target buffer with same address. Here old target buffer destroyed as that
surface is no more used as reference for next frames and when we create a new surface
for the next frame to process we will get the surfaceid and same target address
of destroyed surface.

When new surface/surface->buffer/target ,target->codec is null as we cleared when we
destroy this surface, but per ref_mapping logic, it was taking null associated data
i.e.0 as curr_ref_idx. Hence total reference mapping table goes wrong with wrong data.
Beacuse of this, we have seen corrupted vp9 decoded frames.

Signed-off-by: SureshGuttula <suresh.guttula@amd.corp-partner.google.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5452>

4 years agospirv: Propagate explicit layout only in types that need it
Caio Marcelo de Oliveira Filho [Wed, 29 Jul 2020 19:42:08 +0000 (12:42 -0700)]
spirv: Propagate explicit layout only in types that need it

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

4 years agolima: Fix lima_screen_query_dmabuf_modifiers()
Roman Stratiienko [Sun, 26 Jul 2020 03:37:57 +0000 (06:37 +0300)]
lima: Fix lima_screen_query_dmabuf_modifiers()

Incorrect implementation has been found during code surfing.
v3d implementation used for reference.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6076>

4 years agotu: Implement VK_EXT_conditional_rendering
Connor Abbott [Mon, 20 Jul 2020 10:14:41 +0000 (12:14 +0200)]
tu: Implement VK_EXT_conditional_rendering

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

4 years agotu: Reset has_tess after renderpass
Connor Abbott [Mon, 3 Aug 2020 09:13:56 +0000 (11:13 +0200)]
tu: Reset has_tess after renderpass

Don't force sysmem for render passes after the one that uses
tessellation.

Also, move this into tu_cmd_state as that's where it belongs.

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

4 years agofreedreno: Document draw predication packets
Connor Abbott [Sat, 18 Jul 2020 17:25:01 +0000 (19:25 +0200)]
freedreno: Document draw predication packets

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

4 years agotu: Fix DST_INCOHERENT_FLUSH copy/paste error
Connor Abbott [Tue, 7 Jul 2020 15:10:44 +0000 (17:10 +0200)]
tu: Fix DST_INCOHERENT_FLUSH copy/paste error

This was meant to handle incoherent accesses by always flushing them,
but it accidentally checked for the coherent variant instead. As a
result e.g. a vkCmdClearImage() followed by a renderpass using the image
didn't get any flushes, resulting in the same sort of corruption seen
with sysmem renderpass clears. This happened to be exposed via some
tests that used multiview.

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

4 years agoturnip: implement VK_EXT_4444_formats
Jonathan Marek [Mon, 3 Aug 2020 19:52:59 +0000 (15:52 -0400)]
turnip: implement VK_EXT_4444_formats

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

4 years agoutil/format: translate A4R4G4B4_UNORM and A4B4G4R4_UNORM vulkan formats
Jonathan Marek [Mon, 3 Aug 2020 19:49:42 +0000 (15:49 -0400)]
util/format: translate A4R4G4B4_UNORM and A4B4G4R4_UNORM vulkan formats

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

4 years agoturnip: rework extended formats to allow more extended formats
Jonathan Marek [Mon, 3 Aug 2020 19:45:34 +0000 (15:45 -0400)]
turnip: rework extended formats to allow more extended formats

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

4 years agoci: Actually upload trace artifacts to MinIO for baremetal
Tomeu Vizoso [Tue, 4 Aug 2020 09:17:59 +0000 (11:17 +0200)]
ci: Actually upload trace artifacts to MinIO for baremetal

Baremetal jobs filter the variables they get from .gitlab-ci.yml, and
TRACIE_UPLOAD_TO_MINIO and others weren't being let through.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Fixes: d4ca45eca2a5 ("ci: Upload traces' reference and actual images to MinIO")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6171>

4 years agoturnip: add support for D32_SFLOAT_S8_UINT
Jonathan Marek [Thu, 18 Jun 2020 03:11:05 +0000 (23:11 -0400)]
turnip: add support for D32_SFLOAT_S8_UINT

Add support for D32_SFLOAT_S8_UINT, which requires special handling because
it is actually two images.

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

4 years agoci: Remove kernel module build that slipped in
Tomeu Vizoso [Tue, 4 Aug 2020 09:00:54 +0000 (11:00 +0200)]
ci: Remove kernel module build that slipped in

Some changes unintendedly slipped into an unrelated commit before it was
merged.

This caused kernel modules to be built and installed in the ramdisk,
which caused some devices to fail to boot due to the ramdisk size limit
being surpassed.

These changes weren't in effect until a subsequent commit triggered a
rebuild of the ramdisks.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Fixes: a9560939e07a ("ci: Build-test Panfrost tools")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6167>

4 years agoci: Download traces from MinIO in baremetal runs
Tomeu Vizoso [Fri, 31 Jul 2020 06:24:13 +0000 (08:24 +0200)]
ci: Download traces from MinIO in baremetal runs

Now that we have MinIO, we can distribute traces better than by direct
downloads from git.

With a caching MinIO instance local to the DUT, total run times should
be noticeably impacted.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6136>

4 years agoci: Upload traces' reference and actual images to MinIO
Tomeu Vizoso [Fri, 31 Jul 2020 06:13:15 +0000 (08:13 +0200)]
ci: Upload traces' reference and actual images to MinIO

Now that the devices have sane dates, we can upload to MinIO.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6136>

4 years agospirv: Do more complex unwrapping in get_nir_type
Jason Ekstrand [Fri, 24 Jul 2020 15:46:20 +0000 (10:46 -0500)]
spirv: Do more complex unwrapping in get_nir_type

The OpenGL flavor of SPIR-V allows for samplers inside structs.  This
means that our simple array-of-array handling isn't sufficient and we
need something substantially more complex for generating NIR types.

Fixes: 14a12b771d0 "spirv: Rework our handling of images and samplers"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6065>

4 years agocompiler/types: Add a struct_type_is_packed wrapper
Jason Ekstrand [Fri, 24 Jul 2020 15:45:36 +0000 (10:45 -0500)]
compiler/types: Add a struct_type_is_packed wrapper

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6065>

4 years agofreedreno: Fix "Offset of packed bitfield changed" warnings:
Eric Anholt [Mon, 3 Aug 2020 19:59:11 +0000 (12:59 -0700)]
freedreno: Fix "Offset of packed bitfield changed" warnings:

Example:

../src/freedreno/ir2/instr-a2xx.h:384:1: note: offset of packed bit-field
‘const_index’ has changed in GCC 4.4
  384 | } instr_fetch_vtx_t;

It's apparently due to bitfields that would cross the width of their type.
Just expand the types of the affected fields so that the compiler quiets
down.

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

4 years agoturnip: delete tu_clear_sysmem_attachments_2d
Jonathan Marek [Mon, 6 Jul 2020 15:33:32 +0000 (11:33 -0400)]
turnip: delete tu_clear_sysmem_attachments_2d

2D path is using the same hardware as the 3D path, with the advantage of
separate register state, but here it requires WFI and extra cache flushing
and invalidating, so it should be better to just use the 3D path. There are
also some cases where the 3D path would be much faster, since it can clear
multiple attachments at once.

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

4 years agoturnip: fix sysmem CmdClearAttachments 3D fallback breaking GMEM path flush
Jonathan Marek [Wed, 8 Jul 2020 11:46:09 +0000 (07:46 -0400)]
turnip: fix sysmem CmdClearAttachments 3D fallback breaking GMEM path flush

It was clearing the flush bits, which are used by both GMEM/SYSMEM paths,
but emitting the flushes inside the cond_exec, where they would only run
for the sysmem path.

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

4 years agonir/deref: Don't try to compare derefs containing casts
Jason Ekstrand [Sat, 25 Jul 2020 01:27:37 +0000 (20:27 -0500)]
nir/deref: Don't try to compare derefs containing casts

One day, we may want copy_prop_vars or other passes to be able to see
through certain types of casts such as when someone casts a uint64_t to
a uvec2.  However, for now we should just avoid casts all together.

Fixes: d8e3edb784d3a "nir/deref: Support casts and ptr_as_array in..."
Tested-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6072>

4 years agonir: Remove the old nir_opt_shrink_load.
Eric Anholt [Thu, 23 Jul 2020 05:10:39 +0000 (22:10 -0700)]
nir: Remove the old nir_opt_shrink_load.

The old pass only handled intrinsic load_constant, while the new
nir_opt_shrink_vectors handles ALU ops, nir load_consts, along with all
the load intrinsics.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>

4 years agoamd: Swap from nir_opt_shrink_load() to nir_opt_shrink_vectors().
Eric Anholt [Thu, 23 Jul 2020 05:00:57 +0000 (22:00 -0700)]
amd: Swap from nir_opt_shrink_load() to nir_opt_shrink_vectors().

This should do much more trimming than shrink_load, and is a win on i965's
vec4 and nir-to-tgsi.  For scalar backends like this that don't need ALU
shrinking, it still gets more load intrinsics covered.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>

4 years agoi965: Enable vector shrinking in the vec4 backend.
Eric Anholt [Thu, 23 Jul 2020 04:35:07 +0000 (21:35 -0700)]
i965: Enable vector shrinking in the vec4 backend.

This manages to make some extra vec operations that would turn into movs
go away.

brw shader-db:
total instructions in shared programs: 3895037 -> 3893221 (-0.05%)
total cycles in shared programs: 113832759 -> 113792154 (-0.04%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>

4 years agonir: Add a pass to cut the trailing ends of vectors.
Eric Anholt [Wed, 22 Jul 2020 23:57:22 +0000 (16:57 -0700)]
nir: Add a pass to cut the trailing ends of vectors.

Ideally we'd also handle unused middles of vectors and reswizzle ALU-only
uses of it so we could write fewer channels, but that's future work/

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6050>

4 years agoturnip: workaround for a630 d24_unorm_s8_uint fails
Jonathan Marek [Thu, 11 Jun 2020 21:57:54 +0000 (17:57 -0400)]
turnip: workaround for a630 d24_unorm_s8_uint fails

A630 doesn't have the HW format we use to sample stencil, so it needs a
workaround. It also has a bug around the AS_R8G8B8A8 format, which doesn't
work when UBWC is disabled, so use 8_8_8_8_UNORM instead when UBWC is
disabled (using AS_R8G8B8A8 or 8_8_8_8_UNORM should only matter with UBWC)

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

4 years agoetnaviv: fix nir validation problem
Christian Gmeiner [Thu, 30 Jul 2020 19:25:12 +0000 (21:25 +0200)]
etnaviv: fix nir validation problem

Fixes the following validation problem:
  error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Lukas F. Hartmann <lukas@mntmn.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6127>

4 years agofreedreno/decode: move dependencies up a level
Rob Clark [Sun, 2 Aug 2020 19:17:28 +0000 (12:17 -0700)]
freedreno/decode: move dependencies up a level

This is mainly for the benefit of automated syncing of changes from mesa
back to envytools, where the same subdir meson.build's are used, but the
toplevel meson.build is different.  In the envytools case, we want these
depenendencies to be required.

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

4 years agofreedreno/registers: install gzip'd register database
Rob Clark [Sun, 2 Aug 2020 18:55:43 +0000 (11:55 -0700)]
freedreno/registers: install gzip'd register database

The decode tools aren't too useful to install without the xml.  But
since libxml2 can read compressed xml, we'll gzip them for installation.

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

4 years agofreedreno/registers: split header build into subdirs
Rob Clark [Sun, 2 Aug 2020 18:35:48 +0000 (11:35 -0700)]
freedreno/registers: split header build into subdirs

Instead of building the adreno/foo.xml headers from the toplevel, split
out a subdir().  This fits better with how meson likes things to be
structured.  But it does require fixing a bit about how gen_header.py
resolves imports, ie. it cannot assume the src file is at the root of
the $RNN_PATH.

This is needed for the next patch, to add support for installing the
register database for use with installed tools.

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

4 years agofreedreno/registers: add .gitignore
Rob Clark [Sun, 2 Aug 2020 17:20:38 +0000 (10:20 -0700)]
freedreno/registers: add .gitignore

Testing headergen2 will create .xml.h in the same location as the .xml.
But we don't want this to get accidentially committed.

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

4 years agofreedreno/rnn: rework RNN_DEF_PATH construction
Rob Clark [Sun, 2 Aug 2020 17:16:47 +0000 (10:16 -0700)]
freedreno/rnn: rework RNN_DEF_PATH construction

No need for rnn_path.h, just construct the whole thing in meson and pass
via c_args.  Also move where the path is constructed up one level.  This
will be needed for syncing back to envytools, where the path will be
different.

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

4 years agofreedreno/rnn: also look for .xml.gz
Rob Clark [Sun, 2 Aug 2020 17:00:02 +0000 (10:00 -0700)]
freedreno/rnn: also look for .xml.gz

libxml2 can load gzip compressed files, so lets look for these too.
This will be useful for installing the register database so that an
installed cffdump/crashdec can use them.  But it isn't too useful
to be able to edit the installed register database, so we can gzip
them to use less disk space.

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

4 years agoradv: Implement VK_EXT_4444_formats
Joshua Ashton [Wed, 15 Jul 2020 10:21:23 +0000 (11:21 +0100)]
radv: Implement VK_EXT_4444_formats

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

4 years agoanv: Implement VK_EXT_4444_formats
Jason Ekstrand [Tue, 14 Jul 2020 22:59:49 +0000 (17:59 -0500)]
anv: Implement VK_EXT_4444_formats

We only support the ARGB format, not the ABGR one.  Fortunately, the
ARGB is the one required by D3D11.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6158>

4 years agovulkan: Update Vulkan XML and headers to 1.2.149
Jason Ekstrand [Mon, 3 Aug 2020 14:40:54 +0000 (09:40 -0500)]
vulkan: Update Vulkan XML and headers to 1.2.149

Reviewed-by Joshua Ashton <joshua@froggi.es>

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

4 years agou_prim_restart: add inline function for getting restart index based on index size
Mike Blumenkrantz [Fri, 31 Jul 2020 15:08:04 +0000 (11:08 -0400)]
u_prim_restart: add inline function for getting restart index based on index size

handy to have this available for drivers to reuse

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

4 years agoiris: Zero the add-on clear color BO on import
Nanley Chery [Fri, 10 Jul 2020 22:48:36 +0000 (15:48 -0700)]
iris: Zero the add-on clear color BO on import

When iris imports an I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS surface, it
allocates a buffer to hold the indirect clear color. When the import is
complete, iris_resource::aux::clear_color is set to zero but the
indirect buffer is filled with garbage values. This could break certain
texture view use-cases, so zero the allocated buffer to fix those.

Fixes: c19492bcdb9 ("iris: Handle importing aux-enabled surfaces on TGL")
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6092>

4 years agoci: Build-test Panfrost tools
Tomeu Vizoso [Mon, 3 Aug 2020 14:19:38 +0000 (16:19 +0200)]
ci: Build-test Panfrost tools

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3348
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6157>

4 years agozink: implement handling for VK_EXT_calibrated_timestamps
Mike Blumenkrantz [Fri, 10 Jul 2020 18:42:08 +0000 (14:42 -0400)]
zink: implement handling for VK_EXT_calibrated_timestamps

just the extension setup; we need this to handle device timestamp
queries outside of batches

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

4 years agozink: store valid timestamp bits onto zink_screen
Mike Blumenkrantz [Fri, 10 Jul 2020 18:40:01 +0000 (14:40 -0400)]
zink: store valid timestamp bits onto zink_screen

we need this for converting timestamp ticks to nonoseconds

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

4 years agozink: handle VK_EXT_vertex_attribute_divisor setup
Mike Blumenkrantz [Thu, 9 Jul 2020 20:34:41 +0000 (16:34 -0400)]
zink: handle VK_EXT_vertex_attribute_divisor setup

this just enables the extension

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

4 years agozink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS
Mike Blumenkrantz [Thu, 2 Jul 2020 19:41:51 +0000 (15:41 -0400)]
zink: clamp PIPE_SHADER_CAP_MAX_SHADER_BUFFERS to PIPE_MAX_SHADER_BUFFERS

this value gets split between ssbos and abos, so clamping to 8 here causes
a number of tests to fail just because there's not enough buffers available

other gallium drivers return 32 here, so this seems pretty safe

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

4 years agozink: implement VK_EXT_robustness2
Mike Blumenkrantz [Thu, 2 Jul 2020 18:53:45 +0000 (14:53 -0400)]
zink: implement VK_EXT_robustness2

this adds support for null descriptors, which is necessary for full
compliance with ARB_texture_buffer_object

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

4 years agopan/mdg: Test for SSA before chasing addresses
Alyssa Rosenzweig [Fri, 31 Jul 2020 14:43:55 +0000 (10:43 -0400)]
pan/mdg: Test for SSA before chasing addresses

It's possible an SSA value depends on a register; in this case, chasing
the source would result in a crash as the chase helper in NIR asserts
is_ssa. Instead we should check a priori that all the argments are in
fact SSA, bailing otherwise.

In the piglit shader exhibiting this bug (by looping over the index),
bailing on the ishl instruction is -necessary-. This is not merely us
being cowardly to avoid seeing through the registers; indeed, if we
wrote away the ishl instruction, the shift itself would have to be
stored in a load/store register (r26/r27) which would preclude reading
it in the loop, creating a register allocation failure later in the
compile. So this is the correct solution due to the restricted
semantics.

Closes #3286

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Icecream95 <ixn@keemail.me>
Fixes: f5401cb8866 ("pan/midgard: Add address analysis framework")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6144>

4 years agopan/mdg: Mask spills from texture write
Alyssa Rosenzweig [Fri, 31 Jul 2020 14:31:50 +0000 (10:31 -0400)]
pan/mdg: Mask spills from texture write

This prevents RA failures the results of reading multiple textures that
require less than 4 channels, as seen in a number of GL 3 WebRender shaders.

Closes: #3342
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reported-by: Icecream95 <ixn@keemail.me>
Tested-by: Icecream95 <ixn@keemail.me>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6144>

4 years agoswr: Bump maximum 2D texture size to 16kx16k
jzielins [Wed, 29 Jul 2020 11:27:00 +0000 (13:27 +0200)]
swr: Bump maximum 2D texture size to 16kx16k

This may be required by some applications, even though
not all texture formats will be below 2GB limit.

This change also increases the maximum size of render target,
that was inadvertently lowered some time ago.

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6139>

4 years agomesa/st: Actually free the driver part of memory objects on destruction.
Bas Nieuwenhuizen [Sat, 1 Aug 2020 01:13:55 +0000 (03:13 +0200)]
mesa/st: Actually free the driver part of memory objects on destruction.

_mesa_delete_memory_object(ctx, obj) == free(obj) but doesn't free the
part of the gallium driver.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1206
Fixes: 49f4ecc6777 "mesa/st: start adding memory object support"
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6148>

4 years agogallivm/nir: Lower uniforms to UBOs in llvm draw if the driver didn't request this...
Gert Wollny [Sun, 28 Jun 2020 16:18:19 +0000 (18:18 +0200)]
gallivm/nir: Lower uniforms to UBOs in llvm draw if the driver didn't request this already

When the llvm draw engine is used for draw shaders in st_program the driver
may not enable the cap PIPE_CAP_PACKED_UNIFORMS, so uniforms are not
be lowered to UBOs. However, llvm doesn't support nir_load_uniform, so lower
the uniforms to UBO now. The multiplier is set to 16 to be the same like in
the TGSI code path.

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

4 years agoandroid: freedreno: move a2xx disasm out of gallium
Mauro Rossi [Fri, 31 Jul 2020 07:19:56 +0000 (09:19 +0200)]
android: freedreno: move a2xx disasm out of gallium

Fixes the following building errors:

clang: error: no such file or directory: 'external/mesa/src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c'
clang: error: no input files

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
ld.lld: error: undefined symbol: disasm_a2xx
>>> referenced by ir2_assemble.c:546 (external/mesa/src/gallium/drivers/freedreno/a2xx/ir2_assemble.c:546)
>>>               ir2_assemble.o:(assemble) in archive out/target/product/x86_64/obj/STATIC_LIBRARIES/libmesa_pipe_freedreno_intermediates/libmesa_pipe_freedreno.a
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)

Fixes: f39afda1a7a ("freedreno: move a2xx disasm out of gallium")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>

4 years agoandroid: freedreno/common: add support for libfreedreno_common static
Mauro Rossi [Thu, 30 Jul 2020 21:18:51 +0000 (23:18 +0200)]
android: freedreno/common: add support for libfreedreno_common static

Porting of meson build rules to Android

Fixes: 9623debf48a ("freedreno: Centralize UUID generation into new files freedreno_uuid.c/h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>

4 years agoandroid: freedreno/ir3: fix include paths
Mauro Rossi [Thu, 30 Jul 2020 20:38:17 +0000 (22:38 +0200)]
android: freedreno/ir3: fix include paths

Fixes the following building error:

external/mesa/src/freedreno/ir3/disasm-a3xx.c:33:10: fatal error: 'disasm.h' file not found
#include "disasm.h"
         ^~~~~~~~~~
1 error generated.

Fixes: f7bd3456d79 ("freedreno: deduplicate a3xx+ disasm")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>

4 years agoandroid: freedreno/registers: fix generated headers rules
Mauro Rossi [Thu, 30 Jul 2020 20:21:43 +0000 (22:21 +0200)]
android: freedreno/registers: fix generated headers rules

Fixes the following building errors:

FAILED: ninja: 'external/mesa/src/freedreno/registers/a2xx.xml',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/a2xx.xml.h',
missing and no known rule to make it
...
FAILED: ninja: 'external/mesa/src/freedreno/registers/adreno-pm4-pack.xml.h',
needed by 'out/target/product/x86_64/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/adreno-pm4-pack.xml.h',
missing and no known rule to make it

Fixes: b721d336da9 ("freedreno: slurp in rnndb")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>

4 years agoanv: toggle on VK_EXT_extended_dynamic_state
Tapani Pälli [Wed, 10 Jun 2020 10:07:25 +0000 (13:07 +0300)]
anv: toggle on VK_EXT_extended_dynamic_state

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: dynamic vertex input binding stride and size support
Tapani Pälli [Tue, 2 Jun 2020 07:02:25 +0000 (10:02 +0300)]
anv: dynamic vertex input binding stride and size support

If pStrides or Psizes are NULL we should use the values defined by the
pipeline.

v2: fix commit message and fix the code to set explicitly if we are
    using dynamic stride/size

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: depth/stencil dynamic state support
Tapani Pälli [Mon, 1 Jun 2020 09:28:30 +0000 (12:28 +0300)]
anv: depth/stencil dynamic state support

v2: code cleanup, remove extra spaces (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: add support for dynamic primitive topology change
Tapani Pälli [Tue, 16 Jun 2020 05:37:26 +0000 (08:37 +0300)]
anv: add support for dynamic primitive topology change

This is done using 3DSTATE_VF_TOPOLOGY packet that overrides topology
used in subsequent 3DPRIMITIVE commands. For gen7[5] we override the
pipeline topology when emitting draw commands.

v2: fix the way gen7[5] is handled (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: add support for dynamic viewport and scissor with count
Tapani Pälli [Sun, 31 May 2020 10:54:47 +0000 (13:54 +0300)]
anv: add support for dynamic viewport and scissor with count

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: add support for dynamic cull mode and winding order
Tapani Pälli [Fri, 29 May 2020 07:20:18 +0000 (10:20 +0300)]
anv: add support for dynamic cull mode and winding order

v2: cleanup, white space issues (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: handle dynamic viewport count
Tapani Pälli [Wed, 10 Jun 2020 07:52:29 +0000 (10:52 +0300)]
anv: handle dynamic viewport count

Emit 3DSTATE_CLIP during cmd_buffer_flush_state so that we can change
the max viewport count dynamically.

v2: use one common clip state as size is the same for all gens (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: consider dynamic state when creating pipeline
Tapani Pälli [Tue, 9 Jun 2020 11:16:37 +0000 (14:16 +0300)]
anv: consider dynamic state when creating pipeline

Leave default state values as zero so that when we OR them later
it is only the dynamic state value that matters.

v2: code cleanup + skip topology emit in base batch
    when topology is dynamic (Lionel)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: add new dynamic states
Tapani Pälli [Fri, 29 May 2020 06:43:55 +0000 (09:43 +0300)]
anv: add new dynamic states

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agoanv: add VK_EXT_extended_dynamic_state but leave it disabled
Tapani Pälli [Fri, 29 May 2020 08:57:07 +0000 (11:57 +0300)]
anv: add VK_EXT_extended_dynamic_state but leave it disabled

This is needed to ensure the function prototypes are declared.

v2: tweak commit message (Jason)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5604>

4 years agomeson: fix `-D xlib-lease=auto` detection
Eric Engestrom [Sat, 1 Aug 2020 11:41:30 +0000 (13:41 +0200)]
meson: fix `-D xlib-lease=auto` detection

This is used by Vulkan, not EGL, and depends on having DRM/KMS, not GBM.

Reported-by: Oschowa <oschowa@web.de>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3346
Fixes: e00adef34a5ce485e2c9 ("egl: automatically compile the `drm` platform when available")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6150>

4 years agoegl: consistently use dri2_egl_display() helper macro
Eric Engestrom [Tue, 10 Sep 2019 13:18:47 +0000 (14:18 +0100)]
egl: consistently use dri2_egl_display() helper macro

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6133>

4 years agofreedreno/afuc: Fix PM4 enum parsing
Connor Abbott [Fri, 31 Jul 2020 09:07:17 +0000 (11:07 +0200)]
freedreno/afuc: Fix PM4 enum parsing

We were open-coding it, and getting variant parsing wrong for things
like "A4XX-" which don't explicitly include the version being
disassembled. Use the rnn function instead. This makes CP_INDIRECT show
up again. Also propagate const-ness to users.

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

4 years agofreedreno/afuc: Add missing rnn_prepdb()
Connor Abbott [Fri, 31 Jul 2020 10:11:16 +0000 (12:11 +0200)]
freedreno/afuc: Add missing rnn_prepdb()

It's totally not obvious, but this runs extra error checking and is
necessary for correct variant handling, and variant handling will
silently not work if it's not enabled. Add it asm.c even though it's not
strictly necessary, to prevent anyone from missing this in the future.

Missing this really should be an error.

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

4 years agofreedreno/cffdec: Stop open-coding enum parsing
Connor Abbott [Fri, 31 Jul 2020 09:45:09 +0000 (11:45 +0200)]
freedreno/cffdec: Stop open-coding enum parsing

Now that rnndec_decode_enum() has been fixed, it does the same thing as
this function.

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

4 years agofreedreno/rnn: Make rnn_decode_enum() respect variants
Connor Abbott [Fri, 31 Jul 2020 09:41:24 +0000 (11:41 +0200)]
freedreno/rnn: Make rnn_decode_enum() respect variants

We'll need this for afuc, and we're currently also open-coding the same
thing in rnnutils. It seems this function was added to decode pm4 packet
names, but it currently has no users, so make it useful for what it
was intended to do.

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

4 years agoegl/haiku: drop overwritten preset of EGL version
Eric Engestrom [Wed, 29 Jul 2020 14:57:33 +0000 (16:57 +0200)]
egl/haiku: drop overwritten preset of EGL version

`init_haiku()` is called by `eglInitialize()`, which then calls
`_eglComputeVersion()` (without even anything in between). The latter
sets the EGL version based on the extensions supported, and since Haiku
doesn't support any it will end up overwriting the same `1.4` value.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6131>

4 years agoegl: const _eglDriver
Eric Engestrom [Thu, 30 Jul 2020 23:38:41 +0000 (01:38 +0200)]
egl: const _eglDriver

Converted using `s/_EGLDriver/const _EGLDriver/g` and dropped a couple
of irrelevant changes in comments, in the `_EGL_DRIVER_TYPECAST()` macro
and the typedef itself.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6129>

4 years agoegl: Allow software rendering for vgem/virtio_gpu in platform_device
Lepton Wu [Thu, 9 Jul 2020 18:49:33 +0000 (11:49 -0700)]
egl: Allow software rendering for vgem/virtio_gpu in platform_device

Then user could explicitly choose the underlying device for software
rendering when both vgem/virtio_vga are there.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5830>

4 years agointel/tools: Test notification subregisters
Matt Turner [Thu, 16 Jul 2020 06:05:30 +0000 (23:05 -0700)]
intel/tools: Test notification subregisters

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

4 years agointel/tools: Simplify notification register handling
Matt Turner [Thu, 16 Jul 2020 05:55:35 +0000 (22:55 -0700)]
intel/tools: Simplify notification register handling

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

4 years agointel/tools: Don't hardcode notification register
Matt Turner [Thu, 16 Jul 2020 05:33:25 +0000 (22:33 -0700)]
intel/tools: Don't hardcode notification register

Previously we parsed a src non-terminal but did nothing with it. Since
the WAIT instruction is kind of weird, in that you have to give it the
same notification subregister for both destination and source, and it
always has an exec size of 1, let's parse a destination instead of a
source. This way, we can parse a writemask rather than a swizzle in
align16 mode, and easily convert the writemask to a swizzle to create
the source register.

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

4 years agointel/tools: Manually set ARF register file/nr/subnr
Matt Turner [Thu, 16 Jul 2020 05:21:09 +0000 (22:21 -0700)]
intel/tools: Manually set ARF register file/nr/subnr

brw_reg::subnr is in bytes, like the subnr field in the instruction
word, but we disassemble the subregister number in units of the type.
For example g0.3<1>F would have a subnr=12.

These non-terminals produce a brw_reg and feed into other non-terminals
that call brw_reg(), where they are passed the subnr that we set here.
brw_reg()'s subnr parameter is expected to be in terms of the register
type, and it is multiplied by the type size to calculate the subnr in
bytes.

In these non-terminals, we don't know the register type yet, so we
must store the subregister number as it was given to us in the .subnr
field and let the brw_reg() constructor handle the conversion to the
canonical byte-based subnr form when it knows the type.

Before this patch, subregister numbers applied to these registers would
be multiplied with the type size twice.

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

4 years agointel/tools: Pass integers, not enums, to stride()
Matt Turner [Wed, 8 Jul 2020 20:55:21 +0000 (13:55 -0700)]
intel/tools: Pass integers, not enums, to stride()

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

4 years agointel/compiler: Relax SENDS regioning assertions
Matt Turner [Wed, 15 Jul 2020 22:12:57 +0000 (15:12 -0700)]
intel/compiler: Relax SENDS regioning assertions

The next commit fixes a mistake in the assembler and ends up running
afoul of this assertion.

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

4 years agointel/tools: Simplify dstregion
Matt Turner [Wed, 15 Jul 2020 23:32:37 +0000 (16:32 -0700)]
intel/tools: Simplify dstregion

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

4 years agointel/tools: Simplify immediate handling
Matt Turner [Wed, 15 Jul 2020 23:23:13 +0000 (16:23 -0700)]
intel/tools: Simplify immediate handling

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

4 years agointel/tools: Make writemask an integer
Matt Turner [Wed, 15 Jul 2020 23:15:39 +0000 (16:15 -0700)]
intel/tools: Make writemask an integer

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

4 years agointel/tools: Make swizzle an integer
Matt Turner [Wed, 15 Jul 2020 23:13:27 +0000 (16:13 -0700)]
intel/tools: Make swizzle an integer

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

4 years agointel/tools: Simplify register type handling
Matt Turner [Wed, 8 Jul 2020 20:26:21 +0000 (13:26 -0700)]
intel/tools: Simplify register type handling

Produce a brw_reg_type rather than a whole brw_reg and rename a few
non-terminals.

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

4 years agointel/tools: Don't allow empty type specifier
Matt Turner [Wed, 8 Jul 2020 20:15:19 +0000 (13:15 -0700)]
intel/tools: Don't allow empty type specifier

It's preferable to require an explicit type.

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

4 years agointel/tools: Remove stray newline
Matt Turner [Wed, 8 Jul 2020 20:33:13 +0000 (13:33 -0700)]
intel/tools: Remove stray newline

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

4 years agointel/tools: Fix typos
Matt Turner [Wed, 8 Jul 2020 20:10:13 +0000 (13:10 -0700)]
intel/tools: Fix typos

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

4 years agopan/bit: Remove BI_SHIFT stub
Alyssa Rosenzweig [Fri, 31 Jul 2020 14:13:14 +0000 (10:13 -0400)]
pan/bit: Remove BI_SHIFT stub

Fixes compile error with -Dtools=panfrost

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 946ff9b4396 ("bifrost: Add support for nir_op_ishl")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6142>

4 years agopan/bit: Update f32->f16 convert test
Alyssa Rosenzweig [Fri, 31 Jul 2020 00:22:56 +0000 (20:22 -0400)]
pan/bit: Update f32->f16 convert test

Needs a second argument to be consistent with the real IR and the
hardware instruction.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 8a4efe2d730 ("pan/bi: Pack second argument of F32_TO_F16")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6142>

4 years agoci: Set date in LAVA DUTs from NTP servers
Tomeu Vizoso [Fri, 31 Jul 2020 04:51:47 +0000 (06:51 +0200)]
ci: Set date in LAVA DUTs from NTP servers

The MinIO server is sometimes complaining about the submitted date being
too off.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6135>

4 years agodocs: Explain how to set up a personal gitlab runner.
Eric Anholt [Mon, 20 Jul 2020 16:32:16 +0000 (09:32 -0700)]
docs: Explain how to set up a personal gitlab runner.

I'm not the only one doing it, so document it, especially since there's a
new trick as of
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5669

Reviewed-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5988>

4 years agofreedreno/a6xx: Fix CP_BIN_SIZE_ADDRESS name
Connor Abbott [Thu, 30 Jul 2020 10:36:30 +0000 (12:36 +0200)]
freedreno/a6xx: Fix CP_BIN_SIZE_ADDRESS name

Also document some other registers gleaned from looking at the context
switch save/restore routines and fix CP_SDS_REM_SIZE, and make the names
line up with the CP perfcntr names. Note that the CP reads the draw
stream size in CP_SET_BIN_DATA5 using MEM_READ_ADDR, which is probably
why this was mistaken for the draw stream size address.

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

4 years agoi965/i915: Add colorspace support to YUV sampling
David Stevens [Thu, 30 Jul 2020 09:44:41 +0000 (18:44 +0900)]
i965/i915: Add colorspace support to YUV sampling

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

4 years agonir: Add colorspace support to YUV lowering pass
David Stevens [Wed, 8 Jul 2020 04:23:22 +0000 (13:23 +0900)]
nir: Add colorspace support to YUV lowering pass

This change adds support for BT709 and BT2020 colorspace to the YUV
lowering pass. The default remains BT601.

This change also fixes minor imprecision in the last digits of the BT601
offsets due to computation from rounded values when the math was
simplified.

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

4 years agozink: add extension loading framework for spirv builder
Mike Blumenkrantz [Fri, 17 Jul 2020 13:50:35 +0000 (09:50 -0400)]
zink: add extension loading framework for spirv builder

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

4 years agopan/mdg: emit REGISTER_UNUSED on unused ALU src2
Italo Nicola [Thu, 30 Jul 2020 23:24:06 +0000 (23:24 +0000)]
pan/mdg: emit REGISTER_UNUSED on unused ALU src2

This saves power and time by skipping a roundtrip to the register file.

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

4 years agomapi: Return NULL function pointers for GL_EXT_debug_marker
Lepton Wu [Thu, 25 Jun 2020 20:52:24 +0000 (13:52 -0700)]
mapi: Return NULL function pointers for GL_EXT_debug_marker

Mesa returns a stub function pointer to glAnything for years.
Android framework till API level 30 just uses function pointers
returned from eglGetProcAddress without checking if the underlying
extension is supported. If we return stub pointers for functions
in GL_EXT_debug_marker, Android just uses our stub functions instead
of its own stubs and then fail the dEQP. In the past, the issue
didn't show up because mesa only has limited slots and run out of slots
before Android calls eglGetProcAddress on functions inside
GL_EXT_debug_marker.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5652>