platform/upstream/mesa.git
3 years agonvc0: fix 3d images
Ilia Mirkin [Sun, 16 May 2021 03:18:52 +0000 (23:18 -0400)]
nvc0: fix 3d images

The hardware has no support for 3d image loads/stores. So present the
image as a larger 2d image and fudge the coordinates. Note that a 2d
image (in the shader) may be backed by a slice of a 3d image, so we
always have to do the coordinate adjustments for 2d as well.

This is largely copied from the nv50 support, which has the same
restriction, with extra care taken to differentiate loads (which
specifies the X coordinate in bytes) and stores, which specifies it in
(formatted) pixels.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10820>

3 years agonv50: fix streamout queries
Ilia Mirkin [Mon, 17 May 2021 06:17:35 +0000 (02:17 -0400)]
nv50: fix streamout queries

Prior to an earlier commit, xfb queries were not being marked as 64-bit.
The end result of this is that they would never appear to be "ready",
which in turn led to there always being a wait happening.

Once these got marked as 64-bit, we started checking the attached fence
for being signalled. However the screen fence does not seem to be enough
to wait for the streamout query data to actually be written out. So
instead we add a bit of extra "data" which emulates the 32-bit query way
of doing things (with the payload in front) which is emitted from the
same "unit" as the other streamout data. This seems to be sufficient.

Note that it does not seem to be required to actually emit the final
32-bit query from the streamout unit, but that seems logical and perhaps
there are edge cases where it is required.

While at it, also make the sequence management/initialization more
similar to the nvc0 driver.

Fixes dEQP-GLES3.functional.transform_feedback.*

Fixes: 58d47ca3244 ("nv50: add compute invocations counter")
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10867>

3 years agov3dv: Fix assert.
Vinson Lee [Sat, 5 Jun 2021 07:02:45 +0000 (00:02 -0700)]
v3dv: Fix assert.

Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment deviceMask = 1U
has a side effect. This code will work differently in a non-debug
build.

Fixes: 234e1b7356e ("v3dv: implement VK_KHR_device_group")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11197>

3 years agovenus: unify VkNativeBufferANDROID and AHardwareBuffer image create info
Yiwei Zhang [Fri, 4 Jun 2021 22:43:25 +0000 (22:43 +0000)]
venus: unify VkNativeBufferANDROID and AHardwareBuffer image create info

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11195>

3 years agovenus: refactor gralloc buffer and drm modifier properties query
Yiwei Zhang [Fri, 4 Jun 2021 18:43:49 +0000 (18:43 +0000)]
venus: refactor gralloc buffer and drm modifier properties query

1. Code clean up
2. Fixed a misused allocator
3. Add error logs for external memory interop

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11195>

3 years agoagx: Handle load_back_face_agx
Alyssa Rosenzweig [Sat, 5 Jun 2021 19:05:26 +0000 (15:05 -0400)]
agx: Handle load_back_face_agx

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

3 years agoagx: Lower front face to back face
Alyssa Rosenzweig [Sat, 5 Jun 2021 19:04:35 +0000 (15:04 -0400)]
agx: Lower front face to back face

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

3 years agoagx: Pack SR immediate
Alyssa Rosenzweig [Sat, 5 Jun 2021 18:54:20 +0000 (14:54 -0400)]
agx: Pack SR immediate

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

3 years agoagx: List sr enum in Python
Alyssa Rosenzweig [Sat, 5 Jun 2021 18:47:53 +0000 (14:47 -0400)]
agx: List sr enum in Python

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

3 years agoagx: Generate enums from Python
Alyssa Rosenzweig [Sat, 5 Jun 2021 18:47:39 +0000 (14:47 -0400)]
agx: Generate enums from Python

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

3 years agoagx: Model get_sr
Alyssa Rosenzweig [Sat, 5 Jun 2021 18:38:15 +0000 (14:38 -0400)]
agx: Model get_sr

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

3 years agoasahi: Mark special fragment inputs as sysvals
Alyssa Rosenzweig [Sat, 5 Jun 2021 18:31:08 +0000 (14:31 -0400)]
asahi: Mark special fragment inputs as sysvals

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

3 years agonir: Add nir_intrinsic_load_back_face_agx
Alyssa Rosenzweig [Sat, 5 Jun 2021 19:05:37 +0000 (15:05 -0400)]
nir: Add nir_intrinsic_load_back_face_agx

On AGX, the special register for front facing is inverted from its meaning in
APIs. We need to lower load_front_face to inot(load_back_face). Doing this in
the backend is trivial, but then we would miss out on algebraic optimizations
for the inot.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11199>

3 years agofreedreno/regs: split old/not used phy registers to separate DB
Dmitry Baryshkov [Fri, 28 May 2021 21:12:39 +0000 (00:12 +0300)]
freedreno/regs: split old/not used phy registers to separate DB

In order to simplify main DSI host database, split away phy register
definitions used on DSI v2 hosts to the separate database file.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11075>

3 years agofreedreno: Don't return a flushed batch
Rob Clark [Fri, 4 Jun 2021 23:32:30 +0000 (16:32 -0700)]
freedreno: Don't return a flushed batch

Somehow fairly recently the traces CI job started hitting timeouts, not
all the time but enough to be inconvenient for CI.  I tracked it down to
getting into a situation where `ctx->batch->flush == true`, which causes
an infinite loop in the draw_vbo and clear paths (because
fd_batch_lock_submit() checks for flushed batch but fd_context_batch()
does not).  I'm not entirely sure how we get into that state, or what
triggered this (seems possibly triggered by !10937).  But it is easy
enough to recover.

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

3 years agofreedreno: Fix typo
Rob Clark [Sat, 5 Jun 2021 00:06:36 +0000 (17:06 -0700)]
freedreno: Fix typo

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

3 years agoi915: Implement __DRI2_FLUSH version 4
Ville Syrjälä [Tue, 26 Jul 2016 19:50:50 +0000 (22:50 +0300)]
i915: Implement __DRI2_FLUSH version 4

DRI3 needs version 4 of __DRI2_FLUSH.

Straight up port of i965 commit 313f2bc32b86 ("intel: Add
support for the new flush_with_flags extension.").

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9734>

3 years agoi915: Implement __DRI_IMAGE_ATTRIB_OFFSET query
Ville Syrjälä [Sat, 20 Mar 2021 13:01:53 +0000 (15:01 +0200)]
i915: Implement __DRI_IMAGE_ATTRIB_OFFSET query

DRI3 needs __DRI_IMAGE_ATTRIB_OFFSET so implement it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9734>

3 years agointel/isl: Fix isl_format_is_valid
Jason Ekstrand [Fri, 4 Jun 2021 20:15:30 +0000 (15:15 -0500)]
intel/isl: Fix isl_format_is_valid

The format enum space isn't necessarily contiguous so we can't assume
that if it's in the table it's valid.  We need to check something.

Fixes: ed6e586562f4 "intel: properly constify isl_format_layouts"
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11191>

3 years agonir: define NIR_ALU_MAX_INPUTS
Hoe Hao Cheng [Thu, 3 Jun 2021 18:48:59 +0000 (02:48 +0800)]
nir: define NIR_ALU_MAX_INPUTS

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11172>

3 years agoutil/ra: Use the conflicting neighbor to skip unavailable registers.
Emma Anholt [Fri, 4 Jun 2021 00:21:44 +0000 (17:21 -0700)]
util/ra: Use the conflicting neighbor to skip unavailable registers.

Now that we have an idea of how many regs the conflicting allocation uses,
we can just skip to the next one and save repeated tests to find the same
conflicting neighbor again.

shadowrun-returns shader-db time on skl -1.62821% +/- 1.58079% (n=679),
now there's no statistically significant change from the start of the series
(n=420)

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

3 years agolima: Use ra_alloc_contig_reg_class().
Eric Anholt [Fri, 5 Mar 2021 18:37:20 +0000 (10:37 -0800)]
lima: Use ra_alloc_contig_reg_class().

This greatly simplifies our register allocation code and reduces the
number of registers RA has to walk over.

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9437>

3 years agointel/vec4: Use ra_alloc_contig_reg_class() to reduce RA overhead.
Eric Anholt [Fri, 5 Mar 2021 18:11:07 +0000 (10:11 -0800)]
intel/vec4: Use ra_alloc_contig_reg_class() to reduce RA overhead.

We go from 1672 RA regs to the real 128 HW regs.

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

3 years agointel/fs: Use ra_alloc_contig_reg_class() to speed up RA.
Eric Anholt [Fri, 5 Mar 2021 17:20:01 +0000 (09:20 -0800)]
intel/fs: Use ra_alloc_contig_reg_class() to speed up RA.

By using the new class type, we don't need to make 1928 different
registers to represent each contigous reg size starting from the actual
128 HW register, or have a mapping between RA regs and HW base regs.  With
the number of regs reduced, and the fast q computation when using the new
classes, we no longer need to compute our own q.

This drops the FS RA initialization time on my CFL system from about 1ms to
50us.

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

3 years agov3d: Use the ra_alloc_contig_reg_class() function to speed up RA.
Eric Anholt [Fri, 5 Mar 2021 00:52:20 +0000 (16:52 -0800)]
v3d: Use the ra_alloc_contig_reg_class() function to speed up RA.

It means we don't need to do the n^2 loop over the regs to set up the pq
values, nor do we need the register conflicts lists.

Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9437>

3 years agovc4: Use the ra_alloc_contig_reg_class() function to speed up RA.
Eric Anholt [Fri, 5 Mar 2021 00:50:26 +0000 (16:50 -0800)]
vc4: Use the ra_alloc_contig_reg_class() function to speed up RA.

It means we don't need to do the n^2 loop over the regs to set up the pq
values, nor do we need to allocate conflicts lists.

Acked-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9437>

3 years agora: Add fast-path support for register classes of contiguous regs.
Eric Anholt [Thu, 4 Mar 2021 21:51:36 +0000 (13:51 -0800)]
ra: Add fast-path support for register classes of contiguous regs.

In the fully general case of register classes, to expose an allocation
class of unaligned 2-contiguous-regs allocations, for example, you'd have
your base individual regs (128 on intel), and another set of 127 regs that
each conflicted with the corresponding pair of the base regs.  Single-reg
nodes would allocate in the 128, and double-reg nodes would allocate in
the 127 and the user would remap from the 127 down to the base regs with
some irritating table.

If you need many different contiguous allocation sizes (16 is a pretty
common number across drivers), your number of regs explodes, wasting
memory and making the q computation expensive at startup.

If all the user has is contiguous-reg classes, we can easily compute the q
value up front (as found in the intel driver and nouveau, for example),
and we only have to change a couple of places in the conflict-checking
logic so the contiguous-reg classes can use the base registers.

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

3 years agora: Use struct ra_class in the public API.
Eric Anholt [Thu, 4 Mar 2021 23:14:15 +0000 (15:14 -0800)]
ra: Use struct ra_class in the public API.

All these unsigned ints are awful to keep track of.  Use pointers so we
get some type checking.

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

3 years agora: Document that class index is allocated in order, use that in r300.
Eric Anholt [Thu, 4 Mar 2021 23:17:39 +0000 (15:17 -0800)]
ra: Document that class index is allocated in order, use that in r300.

etnaviv also relies on this being the case, just drop the remapping.

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

3 years agora: Add a unit test.
Eric Anholt [Thu, 4 Mar 2021 20:22:11 +0000 (12:22 -0800)]
ra: Add a unit test.

This is mostly checking that we agree with a bit of the table from the
paper.  It proved quite useful as I was refactoring.

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

3 years agointel: properly constify isl_format_layouts
Adam Jackson [Thu, 3 Jun 2021 15:36:00 +0000 (11:36 -0400)]
intel: properly constify isl_format_layouts

Putting a const char * in the struct means it's a pointer that has to be
resolved at rtld time, which means it can be in .data.rel.ro but not
.rodata like you'd hope. Fix this with the usual string table trick.

Cuts about 20k (-80k read-write +60k read-only) and ~280 relocations
from the gallium driver.

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

3 years agozink: explicitly advertise index buffer format support
Mike Blumenkrantz [Wed, 2 Jun 2021 11:05:35 +0000 (07:05 -0400)]
zink: explicitly advertise index buffer format support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>

3 years agod3d12: explicitly advertise index buffer format support
Mike Blumenkrantz [Wed, 2 Jun 2021 11:05:35 +0000 (07:05 -0400)]
d3d12: explicitly advertise index buffer format support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>

3 years agor600: explicitly advertise index buffer format support
Erik Faye-Lund [Thu, 3 Jun 2021 12:58:19 +0000 (08:58 -0400)]
r600: explicitly advertise index buffer format support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>

3 years agor300: explicitly advertise index buffer format support
Mike Blumenkrantz [Wed, 2 Jun 2021 11:05:35 +0000 (07:05 -0400)]
r300: explicitly advertise index buffer format support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>

3 years agonouveau: explicitly advertise index buffer format support
Mike Blumenkrantz [Wed, 2 Jun 2021 11:02:17 +0000 (07:02 -0400)]
nouveau: explicitly advertise index buffer format support

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>

3 years agollvmpipe: Don't call util_init_math().
Emma Anholt [Thu, 3 Jun 2021 19:05:50 +0000 (12:05 -0700)]
llvmpipe: Don't call util_init_math().

Nothing in llvmpipe uses util_fast_log2().

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11173>

3 years agou_math: Reduce fast-log2 table size from 65k entries back to 256.
Emma Anholt [Thu, 3 Jun 2021 19:03:36 +0000 (12:03 -0700)]
u_math: Reduce fast-log2 table size from 65k entries back to 256.

This was bumped in 7e584a70c492 ("gallium: increase table size for fast
log/pow functions") presumably to fix conformance of tgsi_exec, but we
don't need that much accuracy in the only place it's used in the tree any
more: softpipe texture sampling.

softpipe glmark2 -b texture:texture-filter=linear FPS +0.335748% +/-
0.220111% (n=20)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11173>

3 years agotgsi_exec: Garbage-collect the FAST_MATH path.
Emma Anholt [Thu, 3 Jun 2021 19:01:01 +0000 (12:01 -0700)]
tgsi_exec: Garbage-collect the FAST_MATH path.

It's disabled due to non-conformance with no configuration knob to turn it
on, and if you care about swrast performance you're on llvmpipe anyway.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11173>

3 years agoRevert "Revert "zink: call tc_driver_internal_flush_notify() on flush""
Mike Blumenkrantz [Fri, 4 Jun 2021 14:02:52 +0000 (10:02 -0400)]
Revert "Revert "zink: call tc_driver_internal_flush_notify() on flush""

This reverts commit 9ff54d408ba872da44158869f363f73cddbb0f63.

this is fine now that tc unbinds are fixed

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

3 years agoaux/tc: fix ubo unbinding
Mike Blumenkrantz [Fri, 4 Jun 2021 13:57:58 +0000 (09:57 -0400)]
aux/tc: fix ubo unbinding

unsetting a ubo requires an unbind

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

3 years agoaco: simplify Phi RegClass selection
Daniel Schürmann [Fri, 4 Jun 2021 12:48:19 +0000 (14:48 +0200)]
aco: simplify Phi RegClass selection

Also adds moves validation rules to aco_validate.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11181>

3 years agoradv,aco: scalarize all phis via nir_lower_phis_to_scalar()
Daniel Schürmann [Fri, 4 Jun 2021 09:11:52 +0000 (11:11 +0200)]
radv,aco: scalarize all phis via nir_lower_phis_to_scalar()

This allows to remove some ACO code which did so previously.

Totals from 93 (0.06% of 149839) affected shaders (Navi2):
CodeSize: 582424 -> 582348 (-0.01%); split: -0.10%, +0.08%
Instrs: 107083 -> 107011 (-0.07%); split: -0.08%, +0.01%
Latency: 483338 -> 484881 (+0.32%); split: -0.09%, +0.40%
InvThroughput: 101129 -> 101532 (+0.40%); split: -0.03%, +0.42%
Copies: 9893 -> 9774 (-1.20%); split: -1.28%, +0.08%
Branches: 2862 -> 2858 (-0.14%)
PreSGPRs: 3342 -> 3339 (-0.09%)
PreVGPRs: 4567 -> 4565 (-0.04%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11181>

3 years agost/mesa: execute glFlush asynchronously if no image has been imported/exported
Marek Olšák [Fri, 21 May 2021 21:52:27 +0000 (17:52 -0400)]
st/mesa: execute glFlush asynchronously if no image has been imported/exported

This improves viewperf performance and it shouldn't break synchronization
with external clients when it's indirectly implied by glFlush.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10937>

3 years agozink: use VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL when possible
Mike Blumenkrantz [Wed, 3 Mar 2021 20:26:02 +0000 (15:26 -0500)]
zink: use VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL when possible

this is allowed for fb attachments, so we can use it to avoid needing to
change layouts for zs textures if we know that it isn't going to be written
to during a given subpass

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

3 years agozink: track number of fb attachment binds on resources
Mike Blumenkrantz [Tue, 9 Mar 2021 18:28:54 +0000 (13:28 -0500)]
zink: track number of fb attachment binds on resources

this will be useful for applying layouts

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

3 years agozink: emit fb attachment barriers inline during renderpass start
Mike Blumenkrantz [Wed, 3 Mar 2021 15:56:16 +0000 (10:56 -0500)]
zink: emit fb attachment barriers inline during renderpass start

we don't need a separate function for this

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

3 years agoradv/winsys: allow to reserve a VMID
Samuel Pitoiset [Fri, 4 Jun 2021 13:35:35 +0000 (15:35 +0200)]
radv/winsys: allow to reserve a VMID

This will be used by SPM and also for configuring the trap handler.

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

3 years agoturnip: implement VK_EXT_provoking_vertex
Danylo Piliaiev [Tue, 1 Jun 2021 09:49:31 +0000 (12:49 +0300)]
turnip: implement VK_EXT_provoking_vertex

Passes: dEQP-VK.rasterization.provoking_vertex.*

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11112>

3 years agonir/unsigned_upper_bound: don't require dominance metadata
Rhys Perry [Wed, 24 Mar 2021 14:56:48 +0000 (14:56 +0000)]
nir/unsigned_upper_bound: don't require dominance metadata

Instead, determine if it's a merge or loop exit phi.

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

3 years agoaco: don't use nir_block_is_unreachable()
Rhys Perry [Wed, 24 Mar 2021 14:54:09 +0000 (14:54 +0000)]
aco: don't use nir_block_is_unreachable()

nir_cf_reinsert() can re-create the block, invalidating dominance
metadata.

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

3 years agozink: no-op read access buffer barriers if existing access exists for earlier stage
Mike Blumenkrantz [Wed, 3 Mar 2021 18:00:55 +0000 (13:00 -0500)]
zink: no-op read access buffer barriers if existing access exists for earlier stage

only the earliest stage should be applied for these barriers, so we can skip
ones where the existing access is earlier

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

3 years agodocs: add VK_EXT_extended_dynamic_state2 features.txt entry
Tapani Pälli [Tue, 27 Apr 2021 13:03:22 +0000 (16:03 +0300)]
docs: add VK_EXT_extended_dynamic_state2 features.txt entry

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

3 years agoanv: toggle on VK_EXT_extended_dynamic_state2
Tapani Pälli [Tue, 6 Apr 2021 06:59:52 +0000 (09:59 +0300)]
anv: toggle on VK_EXT_extended_dynamic_state2

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

3 years agoanv: support blending logic op dynamic state
Tapani Pälli [Wed, 2 Jun 2021 12:33:26 +0000 (15:33 +0300)]
anv: support blending logic op 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/10366>

3 years agoanv: centralize vk_to_intel_logic_op array
Tapani Pälli [Mon, 3 May 2021 08:11:24 +0000 (11:11 +0300)]
anv: centralize vk_to_intel_logic_op array

This avoids multiple copies as we will need this in multiple places.

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

3 years agoanv: support primitive restart enable dynamic state
Tapani Pälli [Thu, 15 Apr 2021 08:13:49 +0000 (11:13 +0300)]
anv: support primitive restart enable 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/10366>

3 years agoanv: support depth bias enable dynamic state
Tapani Pälli [Thu, 22 Apr 2021 11:51:41 +0000 (14:51 +0300)]
anv: support depth bias enable 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/10366>

3 years agoanv: support rasterizer discard dynamic state
Tapani Pälli [Mon, 3 May 2021 08:09:27 +0000 (11:09 +0300)]
anv: support rasterizer discard dynamic state

Implemented by emitting 3DSTATE_STREAMOUT packet.

v2: logic fixes + merge and emit properly all contents (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/10366>

3 years agoanv: introduce new dynamic states
Tapani Pälli [Mon, 3 May 2021 07:47:39 +0000 (10:47 +0300)]
anv: introduce new dynamic states

These will be used for VK_EXT_extended_dynamic_state2.

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

3 years agoradeon/vcn/enc: use surface swizzle mode instead of linear
Leo Liu [Wed, 2 Jun 2021 16:52:05 +0000 (12:52 -0400)]
radeon/vcn/enc: use surface swizzle mode instead of linear

It will be capable to have encoder tiling supported via modifier

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

3 years agofrontends/va: Derive image from interlaced buffers for h26[4/5]encode
SureshGuttula [Fri, 28 May 2021 03:13:54 +0000 (08:43 +0530)]
frontends/va: Derive image from interlaced buffers for h26[4/5]encode

Add h26[4/5]encode application to allowlist to make an exception when
deriving images from interlaced buffers

This test is part of libva-utils,
find test code @ https://github.com/intel/libva-utils/blob/master/encode/h264encode.c

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

3 years agobroadcom/common: move v3d_tiling to common
Alejandro Piñeiro [Tue, 1 Jun 2021 12:33:06 +0000 (14:33 +0200)]
broadcom/common: move v3d_tiling to common

We initially just copied on v3dv, just in case we needed to modify
it. One year later the code is exactly the same, so let's move it to
common.

This fix an additional issue, as we were not using NEON when building
v3d_tiling.c for v3dv.

v2:
   * Add "#include util/u_box.h" at v3d_tiling.h, so we can't avoid
     the need to include it on other places. (Juan and Iago)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11121>

3 years agozink: Fix MacOS compiling issues
Duncan Hopkins [Wed, 2 Jun 2021 09:28:32 +0000 (10:28 +0100)]
zink: Fix MacOS compiling issues

Add a moltenvk-dir build option to supply the MacOS Vulkan SDK MoltenVK location.
Force compiler, for zink only, into object-c mode when MoltenVK is used to allow for the MacOS ioSurface and CAMetalLayer types that the headers expose.

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

3 years agogallium/dri: Guard DRI driver global variables on MacOS if Zink is enabled.
Duncan Hopkins [Thu, 3 Jun 2021 14:32:29 +0000 (15:32 +0100)]
gallium/dri: Guard DRI driver global variables on MacOS if Zink is enabled.

Protect the DRI galliumdrm_driver_api and galliumdrm_driver_extensions variables from __APPLE__ builds, as DRI2 cannot be enabled.

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

3 years agozink: Correct compiler issue with have_moltenvk member having been moved.
Duncan Hopkins [Thu, 3 Jun 2021 13:07:29 +0000 (14:07 +0100)]
zink: Correct compiler issue with have_moltenvk member having been moved.

have_moltenvk was moved to a different location but code being protected in platform specific guard, so was unnoticed.

Fixes: 598dc3dca41 ("zink: use cached memory for all resources when possible")

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

3 years agov3dv: expose KHR_relaxed_block_layout
Iago Toral Quiroga [Wed, 2 Jun 2021 12:26:16 +0000 (14:26 +0200)]
v3dv: expose KHR_relaxed_block_layout

It seems our compiler already meets the requirements and we pass
all the relevant tests for this as far as I can see.

Relevant CTS tests:
dEQP-VK.ssbo.*relaxed*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11159>

3 years agov3dv: increase number of supported SSBOs
Iago Toral Quiroga [Wed, 2 Jun 2021 12:29:32 +0000 (14:29 +0200)]
v3dv: increase number of supported SSBOs

Some CTS tests use more than what we expose and other drivers
also seem to be exposing many more than us (in the order of thousands).
I don't think we want to expose a very large number since we use this
limit to size some arrays in the driver, but bumping it a bit over the
minimum of 4 required by the spec might be reasonable.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11159>

3 years agoandroid: aco: add aco_optimizer_postRA.cpp to Makefile.sources
Mauro Rossi [Wed, 2 Jun 2021 16:57:57 +0000 (18:57 +0200)]
android: aco: add aco_optimizer_postRA.cpp to Makefile.sources

Fixes the following building error:

external/mesa/src/amd/compiler/aco_interface.cpp:155: error: undefined reference to 'aco::optimize_postRA(aco::Program*)'

Fixes: 0e4747d3fb7 ("aco: Introduce a new, post-RA optimizer.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11177>

3 years agoandroid: ac: add include src/util path
Mauro Rossi [Wed, 2 Jun 2021 17:28:25 +0000 (19:28 +0200)]
android: ac: add include src/util path

Fixes the following building error:

external/mesa/src/amd/common/ac_nir_lower_ngg.c:27:10: fatal error: 'u_math.h' file not found
         ^~~~~~~~~~
1 error generated.

Fixes: 3d589b8b464 ("ac: Add new NIR pass to lower NGG VS/TES.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11177>

3 years agoandroid: ac: add ac_nir_lower_ngg.c to Makefile.sources
Mauro Rossi [Wed, 2 Jun 2021 15:12:51 +0000 (17:12 +0200)]
android: ac: add ac_nir_lower_ngg.c to Makefile.sources

Fixes the following building errors:

external/mesa/src/amd/vulkan/radv_shader.c:868: error: undefined reference to 'ac_nir_lower_ngg_gs'
external/mesa/src/amd/vulkan/radv_shader.c:851: error: undefined reference to 'ac_nir_lower_ngg_nogs'
external/mesa/src/amd/compiler/aco_interface.cpp:155: error: undefined reference to 'aco::optimize_postRA(aco::Program*)'

Fixes: 3d589b8b464 ("ac: Add new NIR pass to lower NGG VS/TES.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11177>

3 years agointel: Rename GFX 12.5 to XE_HP
Anuj Phogat [Mon, 10 May 2021 22:14:39 +0000 (15:14 -0700)]
intel: Rename GFX 12.5 to XE_HP

git grep -l "GFX 12\.5" | xargs sed -ie "s/GFX 12\.5/XE_HP/g"

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10877>

3 years agodocs/install: remove one extra when
Petr Vaněk [Wed, 2 Jun 2021 21:27:52 +0000 (23:27 +0200)]
docs/install: remove one extra when

Fixes: 0fa854aea5ff ("docs: rework/update install.html")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11161>

3 years agoswr: fix uninitialized variable warnings
Michel Zou [Thu, 3 Jun 2021 18:20:44 +0000 (20:20 +0200)]
swr: fix uninitialized variable warnings

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11170>

3 years agozink: fix win32 build
Michel Zou [Thu, 3 Jun 2021 18:16:38 +0000 (20:16 +0200)]
zink: fix win32 build

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11170>

3 years agovenus: query experimental features in one call
Chia-I Wu [Thu, 3 Jun 2021 20:05:30 +0000 (13:05 -0700)]
venus: query experimental features in one call

It is simpler.  But I mainly want to work around

../src/virtio/vulkan/vn_cs.h:173:4: error: argument 1 null where non-null expected [-Werror=nonnull]
  173 |    memcpy(val, dec->cur, val_size);

We trust virglrenderer and it never instructs the decoder to memcpy to
pData when it is NULL.  The compiler does not know however.  A proper
fix will be to generate

  if (!pData)
    unreachable();

to help the compiler.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11174>

3 years agovenus: support AHB prop query with host dma_buf size
Yiwei Zhang [Tue, 1 Jun 2021 22:23:53 +0000 (22:23 +0000)]
venus: support AHB prop query with host dma_buf size

Upon instance creation, venus experimental features are cached in the
vn_instance. If memoryResourceAllocationSize feature is supported, chain
VkMemoryResourceAllocationSizeProperties100000MESA to the pNext of
VkMemoryResourcePropertiesMESA to get the host allocation size of the
dma_buf fd.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11048>

3 years agovenus: update to the latest venus protocol
Yiwei Zhang [Tue, 1 Jun 2021 20:28:15 +0000 (20:28 +0000)]
venus: update to the latest venus protocol

We introduce vkGetVenusExperimentalFeatureData100000MESA to negotiate
experimental venus features under development between the guest and the
host, which can help avoid breaking existing clients of venus. All the
experimental features will be cleaned up and merged into core upon
finalizing venus protocol.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11048>

3 years agogitlab-ci: enable testing on Intel Kaby Lake as experimental
Gustavo Padovan [Thu, 3 Jun 2021 10:37:46 +0000 (07:37 -0300)]
gitlab-ci: enable testing on Intel Kaby Lake as experimental

We now have nami/sona Chromebooks available at the Collabora lab,
so we can start the process of stabilizing them for MesaCI.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11162>

3 years agovenus: silence compiler warnings
Chia-I Wu [Thu, 3 Jun 2021 16:10:36 +0000 (09:10 -0700)]
venus: silence compiler warnings

Silence warnings in release builds.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11166>

3 years agoRevert "virgl: Cache depth and stencil buffers"
Lepton Wu [Thu, 3 Jun 2021 01:00:06 +0000 (18:00 -0700)]
Revert "virgl: Cache depth and stencil buffers"

This reverts commit d245d7b6b8bb75622dd43fb845f60d55ad3ebc89.

It broke various dEQP EGL tests because the reused resource
at host side could have a different sample_count with what we want.
The example of tests get broken:

dEQP-EGL.functional.color_clears.single_context.gles2.rgba8888_window

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

3 years agoac: add ac_thread_trace::data
Samuel Pitoiset [Thu, 3 Jun 2021 07:07:54 +0000 (09:07 +0200)]
ac: add ac_thread_trace::data

Instead of passing two different structs to ac_dump_rgp_capture().

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

3 years agoac/rgp: fix ac_fill_sqtt_asic_info() name
Samuel Pitoiset [Thu, 3 Jun 2021 06:49:31 +0000 (08:49 +0200)]
ac/rgp: fix ac_fill_sqtt_asic_info() name

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

3 years agoac: rename ac_dump_thread_trace() to ac_dump_rgp_capture()
Samuel Pitoiset [Thu, 3 Jun 2021 06:41:21 +0000 (08:41 +0200)]
ac: rename ac_dump_thread_trace() to ac_dump_rgp_capture()

RGP captures can contain both SQTT and SPM data. While we are at it,
move it to ac_rgp.h and adjust a message.

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

3 years agofrontends/va: use pipe buffer map instead of texture map
Leo Liu [Wed, 2 Jun 2021 16:12:32 +0000 (12:12 -0400)]
frontends/va: use pipe buffer map instead of texture map

Fixes: eb74f9776 ("gallium: split transfer_(un)map into buffer_(un)map and texture_(un)map")

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11141>

3 years agodocs: add links to documented drivers
Erik Faye-Lund [Tue, 1 Jun 2021 12:51:12 +0000 (14:51 +0200)]
docs: add links to documented drivers

There's a few more drivers that we have docs for that we didn't link to
from the systems article yet. Let's fix that.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: clean up freedreno links
Erik Faye-Lund [Tue, 1 Jun 2021 12:56:17 +0000 (14:56 +0200)]
docs: clean up freedreno links

Instead of linking directly to the Freedreno wiki, let's link to the
driver docs, and then put a link to the Freedreno wiki there.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: split out layered driver to its own list
Erik Faye-Lund [Tue, 1 Jun 2021 12:30:22 +0000 (14:30 +0200)]
docs: split out layered driver to its own list

This mirrors what we're doing for the front-page at mesa3d.org.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: clean up openswr links
Erik Faye-Lund [Tue, 1 Jun 2021 12:22:48 +0000 (14:22 +0200)]
docs: clean up openswr links

Instead of linking directly to openswr.org, let's link to the driver
docs, and have the driver-docs link to the project-webiste.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: clean up software-drivers list
Erik Faye-Lund [Tue, 1 Jun 2021 12:20:54 +0000 (14:20 +0200)]
docs: clean up software-drivers list

This capitalizes driver names, and spells out OpenSWR (like the docs
does).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: move swrast to deprecated drivers list
Erik Faye-Lund [Tue, 1 Jun 2021 12:18:49 +0000 (14:18 +0200)]
docs: move swrast to deprecated drivers list

This driver was removed in 435de835cd6 ("swrast: Remove the classic
swrast DRI driver"), but we forgot to update the documentation to
reflect that.

Better late than never!

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: clean up list of deprecated systems
Erik Faye-Lund [Tue, 1 Jun 2021 12:01:03 +0000 (14:01 +0200)]
docs: clean up list of deprecated systems

This mostly spells out brand-names, and sorts the list.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: rename vmware-guest article
Erik Faye-Lund [Tue, 1 Jun 2021 11:30:44 +0000 (13:30 +0200)]
docs: rename vmware-guest article

No other drivers use the vendor in the title or path, so it seems better
to not do this for the vmware-guest driver as well. So let's rename it
to SVGA instead. The actual text itself makes it clear enough what it is
about.

This makes it stand out less in the toctree.

I chose the name "WMware SVGA3D", because that's less ambigious than the
"SVGA"-alternative, and was requested by VMware people.t

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: update llvm requirement
Erik Faye-Lund [Tue, 1 Jun 2021 11:23:29 +0000 (13:23 +0200)]
docs: update llvm requirement

Our build-scripts no longer support LLVM versions prior to 3.9, so let's
remove mentions of older versions.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: update list of apis to match website
Erik Faye-Lund [Tue, 1 Jun 2021 10:31:26 +0000 (12:31 +0200)]
docs: update list of apis to match website

This adds a few missing APIs (like Vulkan), and reorders the list to
match the order we're listing them on the frontpage of mesa3d.org.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agodocs: do not list all gles major versions
Erik Faye-Lund [Tue, 1 Jun 2021 10:29:20 +0000 (12:29 +0200)]
docs: do not list all gles major versions

We support all versions of OpenGL ES, no need to point out each version.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11109>

3 years agoloader: allocate VRAM in display GPU in case of prime
Yogesh Mohanmarimuthu [Mon, 3 May 2021 18:22:40 +0000 (23:52 +0530)]
loader: allocate VRAM in display GPU in case of prime

Allocates VRAM in display GPU in case of prime. Then the dma_buf is imported
into prime GPU.

v2: add comments to make code more readable (Pierre-Eric)
    removed if check limiting p2p only for matching driver name
v3: keep old path for non mesa driver (Michel Dänzer)
v4: destroy linear_buffer_display_gpu after import (Michel Dänzer)
    fall back if linear_buffer_display_gpu alloc fail (Michel Dänzer)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
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/10595>

3 years agoglx: create DRI screen for display GPU incase of prime
Yogesh Mohanmarimuthu [Mon, 3 May 2021 17:52:28 +0000 (23:22 +0530)]
glx: create DRI screen for display GPU incase of prime

The created DRI screen can be used to allocate VRAM memory from
display GPU in case of prime.

v2: add comments to make code readable (Pierre-Eric)
    remove driver name match check
v3: keep old path for non-mesa driver (Michel Dänzer)
v4: fallback if driver not found for display GPU (Michel Dänzer)
    fallback if create screen fail for display gpu (Michel Dänzer)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
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/10595>

3 years agoglx: Keep display fd open for prime
Yogesh Mohanmarimuthu [Mon, 3 May 2021 17:27:07 +0000 (22:57 +0530)]
glx: Keep display fd open for prime

Keep the display fd open for creating DRI screen on display gpu in
case of prime.

v2: initialize psc->fd_display_gpu early (Michel Dänzer)
    fix display gpu fd leakage (Michel Dänzer)
v3: fix more display gpu fd leakage (Michel Dänzer)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10595>

3 years agoturnip/kgsl: Fix to build on android.
Hyunjun Ko [Thu, 3 Jun 2021 02:00:59 +0000 (02:00 +0000)]
turnip/kgsl: Fix to build on android.

Fixes: 3f229e34 ("turnip: Implement VK_KHR_timeline_semaphore.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11153>