Commit Graph

142731 Commits

Author SHA1 Message Date
Alyssa Rosenzweig d8eef119fd panfrost: Specialize blendable_formats for v6
Let's bake the swizzle in.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 262d96d3df panfrost: Compile format table multiple times
This allows us to unify the midgard and bifrost tables and just #ifdef
the differences. It will soon also allow us to fix a bunch of enums and
specialize blendable formats.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig e11d0d25c6 panfrost: Add GenXML macros
From intel.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 214d56644f panfrost: Remove panfrost_bifrost_swizzle
Deprecated and now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig a23603c89d panvk: Don't use panfrost_bifrost_swizzle
It's not needed. This produces chooses slightly different formats on v7
but no functional change.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 92d2723672 panfrost: Move arch-independent pan_format code
Now pan_format.c is just tables.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig fc49ff9a8c panfrost: Inline panfrost_get_z_internal_format
Trivial, get it out of the way so pan_format can focus on the tables.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 616d7d0905 panfrost: Assert that injected jobs are for blits
Remove a level of indentation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 583d8aaea7 panfrost: Inline away pan_invocation.c
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 581bbe1c0e panfrost: Express pack_work_groups more concisely
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 5bff4992c1 panfrost: Inline away pan_pool.c
Just noise now that it's been abstracted for panvk.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 7494bb0c86 panfrost: Move panfrost_vertex/instance_id to per-gen
Now the rest of pan_attributes.c is GenXML-independent.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Alyssa Rosenzweig 840ebf0b93 panfrost: Inline flip_compare_func into pan_encoder.h
This will become the home for little GenXML-aware helpers, suitable to
be #include'd from pan_cmdstream.c (or panvk equivalent).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11785>
2021-07-12 23:12:29 +00:00
Erik Faye-Lund 1ac29863a9 lavapipe: expose strict-lines feature
The strictLines-feature requires lines to be rasterized as rectangles
by default instead of using the parallelograms you get from extending
bresenham lines along their minor axis.

Now that we can specify the line mode fully we can actually express
this, so let's do so.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund 29ceb80834 lavapipe: re-expose line-rasterization extension
While we're at it, let's also enable rectangular line support, now that
we can properly control it.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund fda906566b llvmpipe: respect rectangular_lines
With the new rectangular_lines state, we can now support rasterizing
wide lines correctly according to the vulkan spec, where this can be
specified independently of the rest of the state.

Because rectangular lines are orthogonal to multi-sampling, we now need
to also adjust with the pixel-offset in the rectangle code-path as well.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund 7221f2d682 draw: respect line_rectangular state
Now that we have a separate flag to signal rectangular lines, let's use
that instead of the smooth-flag.

This should have the benefit of also drawing rectangular lines when
multisampling stippled, non-smooth lines. But it seems there were no
test for that, so no results to update.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund 1c2690ec20 gallium: explicitly specify line rasterization mode
Currently, drivers infer the line rasterization mode from the
multisampling and line_smooth rasterization state. This is always
correct for OpenGL, but is subtly incorrect for DirectX 9, 10 and
Vulkan (when VK_EXT_line_rasterization is supported).

So let's allow front-ends to choose freely between rectangle and
paralellogram rendering.

The reason why there's no added cap for this, is that the implicit
selection that drivers currently do will work just as well (or more
correclty, just as subtly wrong) as before. And there's nothing
reasonable the front-ends can do to get the correct behavior, so
there's really no fall-back code to write either.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund e0472217b0 lavapipe: fix disable_multisample condition
There's two of the line-modes that warrants disabling multisampling,
and that's bresenham and smooth lines.

The reason we need this for the smooth lines case, is that multisampling
overrides the smooth-flag.

Fixes: 9fbf6b2abf ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Erik Faye-Lund e555e2b001 lavapipe: do not disable multisampling for smooth lines
Smooth lines are also rasterized with rectangles instead of using
bresenham-style lines, so let's make sure we exclude those as well
from this test.

Fixes: 9fbf6b2abf ("lavapipe: implement VK_EXT_line_rasterization")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11782>
2021-07-12 22:05:10 +00:00
Daniel Schürmann 7a31567db3 aco/meson: remove inc_gallium from include_directories
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11258>
2021-07-12 21:27:31 +00:00
Daniel Schürmann 1e2639026f aco: Format.
Manually adjusted some comments for more intuitive line breaks.

Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11258>
2021-07-12 21:27:31 +00:00
Daniel Schürmann 97ec360dc4 aco: add .clang-format file
Based on src/amd/.clang-format with following changes:
Language: Cpp
Standard: c++14
PointerAlignment: Left
IndentAccessModifiers: False
SpaceBeforeCtorInitializerColon: True
AllowShortCaseLabelsOnASingleLine: True
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortBlocksOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
BraceWrapping:
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  BeforeLambdaBody: true
IncludeBlocks: Regroup (with specified IncludeCategories)

Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11258>
2021-07-12 21:27:31 +00:00
Mike Blumenkrantz 023a961274 zink: ci updates
this one no longer flakes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11829>
2021-07-12 21:16:04 +00:00
Mike Blumenkrantz 3b55c21c70 zink: zero out sampler/image descriptor surface info for null descriptor updates
this is the surface struct used by the caching manager to generate a ref update template,
which means it must be kept in sync with the current state of descriptors

when the struct is zeroed, it implies that no refs need to be taken for the cached set

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11829>
2021-07-12 21:16:04 +00:00
Connor Abbott baf3cc3f6f ir3/print: Manual formatting fixups
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 177138d8cb ir3: Reformat source with clang-format
Generated using:

cd src/freedreno/ir3 && clang-format -i {**,.}/*.c {**,.}/*.h -style=file

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 082871bb35 freedreno: Add some options to .clang-format
In preparation for reformatting ir3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 2e76f7b60c ir3: Manually reformat some places
clang-format does a bad job with a few tables and macros, and there were
some places it was doing wonky things because comments were longer than
80 characters and it tries to fix that without reformatting the comment
itself. Add magic comments to tell it to turn itself off and retab those
places manually (well, with a regex!).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott f69a99081b ir3: Update .editorconfig and .dir-locals.el
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 0f28e1aad3 ir3/lower_parallelcopy: Don't manually set wrmask
It's automatically set. This avoids some weird line wrapping with
clang-format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 1514744a16 ir3: Add ir3_collect() for fixed-size collects
This avoids having the specify the size, and fixes weird formatting with
clang-format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Connor Abbott 49a39fbf0c ir3: Add missing include to ir3_parser.y
This prevents build errors in the generated ir3_parser.h when
clang-format reshuffles the header includes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11801>
2021-07-12 20:57:21 +00:00
Dave Airlie 6b36f35734 vulkan/wsi/wl: add wl_shm support for lavapipe.
This adds swrast support for rendering from lavapipe.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11819>
2021-07-12 20:27:48 +00:00
Daniel Stone 5e3f969959 Revert "ci/panfrost: Temporarily disable sun50i/RK3288"
Back by popular demand etc

This reverts commit 9868b15164488f3a87d3204ff8788e9ce2f9c132.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11828>
2021-07-12 20:11:18 +00:00
Michael Walle c704bb630d kmsro: Add mali-dp
The NXP LS1028A SoC includes a mali-dp display controller and a vivante
GPU. This allows using the Etnaviv driver on this SoC.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11419>
2021-07-12 19:51:19 +00:00
Vinson Lee a8628fb32e st/xa: Mark default xa_get_pipe_format case unreachable.
Fix defect reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value fdesc. Field fdesc.format is uninitialized.

Fixes: 9f2f5b3d7f ("st/xa: Initial import of the xa state-tracker and the xa-vmwgfx target.")
Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9035>
2021-07-12 18:53:39 +00:00
Daniel Schürmann 6d9ca1d4e4 util/meson: include inc_gallium
There are several dependencies on headers from
   /gallium/include/pipe/

which currently mean that dependencies on util
must include gallium to compile.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11811>
2021-07-12 18:27:57 +00:00
Emma Anholt 54210c685f i915g: Fix backface stencil when front_ccw is set.
If we're doing separate front/back stencil ops, then in the absence of a
hardware bit for setting front_ccw (which you can already see from how we
manage cull face) we need to flip front/back stencil register settings.

Closes: #4974, #4975
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11706>
2021-07-12 18:12:05 +00:00
Emma Anholt ba11a30bf7 i915g: Fix dumping of 3DSTATE_BACKFACE_STENCIL_OPS.
Its length was overly long and it meant we skipped the name of
3DSTATE_BACKFACE_STENCIL_MASKS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11706>
2021-07-12 18:12:05 +00:00
Samuel Pitoiset ee79b87c62 radv: lower primitive shading rate in NIR
This allows more potential compiler optimizations if the value is a
constant or from a scalar load.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11579>
2021-07-12 17:54:07 +00:00
Emma Anholt a7e753cb96 turnip: Fix allocation size for vkCmdUpdateBuffer.
tu_cs_alloc() takes a size in dwords, not bytes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11743>
2021-07-12 17:15:56 +00:00
Erik Faye-Lund 3720447204 lavapipe: expose more storage-image features
I believe these Gallium caps imply these Vulkan features. If they don't,
then we got things wrong on the Zink side as well ;)

While we're at it, query shaderStorageImageWriteWithoutFormat based on
the PIPE_SHADER_CAP_MAX_SHADER_IMAGES cap. This matches what the gallium
OpenGL frontend does.

This brings Zink on Lavapipe up to OpenGL 4.5.

For some reason, a bunch of PBO tests starts failing on CI for Zink, but
that doesn't seem like a Lavapipe problem...

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund 2e29857bb6 llvmpipe: only report supported shader-image formats
LLVMpipe has a rather limited implementation of shader-images, so let's
limit what we report to the formats required by the spec, as all of
those seems to work fine.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund dc9343b42d lavapipe: query formats for shader-image support
Assuming all formats are supported here isn't a good plan; we
don't actually support all formats.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Erik Faye-Lund 3baeb1c4d1 llvmpipe: reject unsupported shader-image formats
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10467>
2021-07-12 16:15:06 +00:00
Daniel Stone 9c8c0c2bb3 ci/panfrost: Temporarily disable sun50i/RK3288
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11825>
2021-07-12 16:07:23 +01:00
Jason Ekstrand 81670a47f0 docs: Add docs for running a local Mesa build
I'm tired of explaining this to people.  Let's put it in the actual
project docs.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11809>
2021-07-12 14:40:50 +00:00
Marcin Ślusarz f3742b9c13 intel/compiler: document register types
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11677>
2021-07-12 13:27:41 +00:00
Daniel Schürmann 9de4fe95e2 aco: remove (wrong) GCC array-bounds warning
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
2021-07-12 12:09:31 +00:00