Mike Blumenkrantz [Tue, 11 May 2021 14:21:41 +0000 (10:21 -0400)]
zink: remove refs from buffer rebinds
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692>
Mike Blumenkrantz [Wed, 12 May 2021 11:17:19 +0000 (07:17 -0400)]
zink: move resource object ref to batch in init_storage_object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692>
Mike Blumenkrantz [Wed, 12 May 2021 11:16:54 +0000 (07:16 -0400)]
zink: move resource object ref to batch in invalidate hook
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692>
Mike Blumenkrantz [Tue, 11 May 2021 14:27:55 +0000 (10:27 -0400)]
zink: add util function for transferring resource refs to batch
there's no point in doing unref->ref if it's known that this will happen
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692>
Mike Blumenkrantz [Tue, 6 Jul 2021 21:09:23 +0000 (17:09 -0400)]
relnotes: more lavapipe features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
Mike Blumenkrantz [Tue, 6 Jul 2021 21:09:13 +0000 (17:09 -0400)]
features: more lavapipe extensions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
Mike Blumenkrantz [Tue, 6 Jul 2021 19:04:55 +0000 (15:04 -0400)]
lavapipe: implement KHR_separate_depth_stencil_layouts
this is a conformant implementation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
Mike Blumenkrantz [Tue, 6 Jul 2021 19:04:55 +0000 (15:04 -0400)]
lavapipe: implement EXT_separate_stencil_usage
this is a conformant implementation
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11738>
Alyssa Rosenzweig [Tue, 22 Jun 2021 15:16:37 +0000 (11:16 -0400)]
pan/decode: Handle IDVS jobs on Bifrost
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413>
Alyssa Rosenzweig [Tue, 22 Jun 2021 15:05:22 +0000 (11:05 -0400)]
panfrost: Add secondary shader XML fields
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413>
Daniel Stone [Wed, 16 Jun 2021 09:10:48 +0000 (10:10 +0100)]
panfrost/genxml: Decode Bifrost index-driven vertex jobs
Bifrost has a new type of job called 'index-driven vertex', which takes
in two shaders. The primary shader, called for all values, performs
position shading to a cacheline-aligned attribute buffer. The secondary
shader, called for values still live after culling, performs varying
shading.
It is the responsiblilty of the implementation to ensure that vertices
from different instances do not share a cacheline.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413>
Jason Ekstrand [Mon, 28 Jun 2021 22:15:28 +0000 (17:15 -0500)]
iris: Use isl_surf_get_uncompressed_surf
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Jason Ekstrand [Tue, 29 Jun 2021 00:11:46 +0000 (19:11 -0500)]
iris: Don't leak the surface if uncompressed re-interp fails
Fixes:
a032a9665f27 "iris: Enable PIPE_CAP_SURFACE_REINTERPRET_BLOCKS"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Jason Ekstrand [Tue, 29 Jun 2021 00:03:18 +0000 (19:03 -0500)]
intel/isl: Add more cases to isl_surf_get_uncompressed_surf
We can actually create array surfaces instead of requiring single-slice
in a few cases. This does require us to be very careful about our
checks, though.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Jason Ekstrand [Thu, 22 Feb 2018 22:31:00 +0000 (14:31 -0800)]
intel/blorp: Use isl_surf_get_uncompressed_surf
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Jason Ekstrand [Fri, 23 Feb 2018 19:51:55 +0000 (11:51 -0800)]
intel/blorp: Adjust the compressed copy rectangle before convert_to_single_slice
It doesn't matter for the actual copy rectangle and this makes the
asserts a bit nicer as we don't need to bother with the intratile
offsets because there aren't any yet.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Jason Ekstrand [Thu, 22 Feb 2018 21:48:52 +0000 (13:48 -0800)]
intel/isl: Pull the uncompressed surface view code from anv
This adds a helper isl_surf_get_uncompressed_surf for creating a surface
which provides an uncompressed view into a compressed surface. The code
is basically a direct port of the uncompressed surface code from the
Vulkan driver which, in turn, was a port from BLORP.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>
Kenneth Graunke [Fri, 2 Jul 2021 19:47:38 +0000 (12:47 -0700)]
crocus: Reduce SSBO alignment requirements from 64B to 4B.
Mirroring a change in iris; see the previous commit for rationale.
One difference is that crocus does sometimes use CPU maps on Atoms
for *reads*...but writes don't go through CPU caches. Should be OK.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11727>
Kenneth Graunke [Fri, 2 Jul 2021 19:39:49 +0000 (12:39 -0700)]
iris: Reduce SSBO alignment requirements from 64B to 4B
Back when SSBOs were first enabled in i965, we tried to work around
issues where the CPU and GPU were incoherently writing to the same
cacheline by forcing an alignment such that different sections of
data would fall in different cachelines. This seems wrong.
On integrated GPUs with LLC, CPU and GPU writes should be coherent.
On integrated GPUs without LLC, we either enable snooping (so they
are again coherent), or we use WC maps (so the CPU cache isn't used).
Discrete GPUs always use WC maps (so the CPU cache isn't used).
This should work. In other words, I think the increased alignment
was just working around coherency problems on atoms that have been
fixed in the intervening 6 year time period.
Untyped surface messages require 4B alignment.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5016
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11727>
Alyssa Rosenzweig [Fri, 28 May 2021 22:29:03 +0000 (18:29 -0400)]
panfrost: Eliminate redundant flushes with AFBC
We have all the information we need easily available.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Alyssa Rosenzweig [Fri, 28 May 2021 22:23:37 +0000 (18:23 -0400)]
panfrost: Split "flush writer" from "flush accessing"
Since writers are counted in the accessor set, the old implementation
had a redundant flush in the "flush accessing" case. To fix, split the
two modes into separate functions, removing the redundancy and offering
a much more ergonomic API.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Boris Brezillon [Wed, 12 May 2021 16:23:19 +0000 (18:23 +0200)]
panfrost: Do tracking of resources, not BOs
Squashed together with commits from Boris's original dependency tracking
cleanup series.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Alyssa Rosenzweig [Mon, 17 May 2021 19:56:53 +0000 (15:56 -0400)]
panfrost: Wrap occlusion query in pipe_resource
For proper tracking.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Alyssa Rosenzweig [Mon, 17 May 2021 18:42:13 +0000 (14:42 -0400)]
panfrost: Express dependencies as resources, not BOs
This is a more ergnomic API, and will allow further optimizations.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Boris Brezillon [Wed, 12 May 2021 17:49:08 +0000 (19:49 +0200)]
panfrost: Replace the batch->bos hashmap by a sparse array
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>
Emma Anholt [Mon, 28 Jun 2021 21:42:21 +0000 (14:42 -0700)]
nir: Free the instructions in a DCE instr removal.
No significant change in shader-db time (n=11), but should be a little win
for memory usage by the compiler.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>
Emma Anholt [Mon, 28 Jun 2021 17:51:06 +0000 (10:51 -0700)]
nir: Use remove_and_dce for nir_shader_lower_instructions().
Reduces the work that other shader passes have to do to look at dead code,
and possibly extra rounds around the optimization loop if dce wasn't the
last pass in it.
shader-db runtime -1.12919% +/- 0.264337% (n=49) on SKL.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>
Emma Anholt [Fri, 25 Jun 2021 23:53:55 +0000 (16:53 -0700)]
nir: Add a nir_instr_remove that recursively removes dead code.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>
Emma Anholt [Mon, 28 Jun 2021 20:08:37 +0000 (13:08 -0700)]
anv: Fix unused var warning on release builds from an assertion.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>
Mike Blumenkrantz [Fri, 14 May 2021 21:44:29 +0000 (17:44 -0400)]
zinK: tweak shader module update -> pipeline combined_dirty conditional
make this more explicit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
Mike Blumenkrantz [Fri, 14 May 2021 19:17:03 +0000 (15:17 -0400)]
zink: remove shader_id
now that shaders are per-program, shader_id is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
Mike Blumenkrantz [Fri, 14 May 2021 17:29:48 +0000 (13:29 -0400)]
zink: remove gfx program slot mapping
if shaders aren't being shared between programs, they can instead directly
assign io between the shader stages such that only the producer and consumer
pair need to have their slots match up
this requires that each gfx program struct stores base nir for a given shader
in order to avoid breaking io for other programs which reuse shader states
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
Mike Blumenkrantz [Fri, 14 May 2021 21:48:53 +0000 (17:48 -0400)]
zink: set gfx program shaders and generate internal tcs during program creation
the base shader states will never change for a program, and tcs will never
change its io, so there's no point in having this in the shader update hotpath
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
Mike Blumenkrantz [Fri, 14 May 2021 20:02:52 +0000 (16:02 -0400)]
zink: split up shader cache per-stage
this reduces overhead from lookups by ensuring that the number of entries
in a given table are minimized
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
Mike Blumenkrantz [Mon, 10 May 2021 21:34:25 +0000 (17:34 -0400)]
zink: make shader cache local to a single program
sharing caches makes things complicated and doesn't yield much benefit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11691>
James Jones [Thu, 18 Mar 2021 22:36:07 +0000 (15:36 -0700)]
gbm: Load backend based on DRM device driver name
After attempting to use the GBM backend specified by the user
via an environment variable, if any, but before falling back
to the built-in GBM backends, attempt to dlopen
libg<DRM driver name>_gbm.so in the GBM backend library search
path (Defaults to "$libdir/gbm") and initialize a device using
it. This enables automatic backend discovery for devices that
do not provide a DRI driver.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Sat, 14 Dec 2019 02:05:39 +0000 (18:05 -0800)]
gbm: Support dynamically loading named backends
If the user specifies a backend name explicitly
via an environment variable and it is not in the
list of built-in backends, attempt to load it at
runtime.
runtime-loaded backends get a new gbm_backend_desc
struct instance for each device using them (A
small increase in memory usage to eliminate the
need for the locking and bookkeeping sharing them
would require), so these structures need to be
freed when destroying devices using runtime-loaded
backends.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Wed, 23 Jun 2021 01:00:01 +0000 (18:00 -0700)]
gbm: Put common device creation in a helper function
Subsequent changes will use this same logic to
instantiate devices with the correct version and
set up their backend reference.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Wed, 23 Jun 2021 00:44:17 +0000 (17:44 -0700)]
gbm: Rename the DRI backend from gbm_dri.so to dri
A subsequent change will allow loading backends
from DSOs specified by the GBM_BACKEND environment
variable. The exact DSO name and path are derived
by the common loader code and will be of the form:
<gbm_backend_path>/<GBM_BACKEND>_gbm.so
E.g., a user would set the environment variable to
"external" to load "external_gbm.so". Users will
also still be able to explicitly request any
builtin backends by name as well, so this change
helps keep the environment variable syntax
consistent between internal and external backends.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Fri, 23 Apr 2021 06:18:49 +0000 (23:18 -0700)]
meson: Add a GBM backends search path build option
This is the list of locations where GBM will look
for alternate backend implementations based on the
DRM driver name. It defaults to $libdir/gbm.
On Android, this path is currently hard-coded to
/vendor/lib[64]/gbm.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Fri, 23 Apr 2021 06:17:08 +0000 (23:17 -0700)]
loader: Factor out driver library loading code
Separate the path-building and dlopen() portion of
loader_open_driver() from the DRI extension
loading logic. The former will be shared by the
GBM backend loading logic in a subsequent change.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Fri, 23 Apr 2021 19:46:25 +0000 (12:46 -0700)]
gbm: Rename backend description list to builtin_backends
This just makes it clearer the array isn't a global
list of all backends in use.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Thu, 24 Jun 2021 21:03:38 +0000 (14:03 -0700)]
gbm: Add backend ABI-check test
This is based on the wayland EGL library ABI test
framework. The helper macros were copied from
there and expanded to support more than one
struct/type, and to additionally check member
type compatibility by default.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Thu, 17 Oct 2019 05:16:53 +0000 (22:16 -0700)]
gbm: Version the GBM backend interface
Define a version number for the interface GBM uses
to offload work to its backends/drivers. Store the
version in the backend interface structs provided
to the loader by backends, as well as in the core
interface struct provided to backends by the GBM
loader code to backends.
The backend can create structures of any version
it supports, which can be greater or less than the
interface version specified by GBM in the core
interface structure. Hence, GBM will need to take
care to check the backend version before accessing
any members added to structs defined in
gbm_backend_abi.h after this change.
Similarly, the backend may need to check the
interface version supported by the GBM library
before passing back data in any structure members
that require the GBM library to interact with
them for correct operation. For example, if for
some reason a structure defined in
gbm_backend_abi.h gained a field which was a
pointer to memory allocated by the backend and
freed by GBM, the backend should avoid allocating
this memory if the GBM library did not specify an
interface version new enough to indicate that it
was aware of the new structure member.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Thu, 3 Jun 2021 22:36:10 +0000 (15:36 -0700)]
gbm: Move majority of gbmint.h to gbm_backend_abi.h
The content of gbm_backend_abi.h are nearly an
identical copy of the old gbmint.h. Only minimal
modifications have been made to ease history
tracking. Subsequent changes will further
formalize the ABI structures in gbm_backend_abi.h
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Thu, 3 Jun 2021 22:24:43 +0000 (15:24 -0700)]
gbm: Add gbm_core struct to export code to backends
The GBM core/loader code defines one helper
function used by both itself and the built-in DRI
backend. Presumably, external backend authors
would want to use such functions as well, so
package them into a single struct that will be
passed explicitly to externally loaded backends in
subsequent changes.
Another option considered was to simply export
the gbm_format_canonicalize() function directly,
optionally renaming it to better indicate it is
intended only for "internal" use first. However,
even with a rename, this would expose it to
potential use by applications as well, which is
not ideal, as it is not intended to be part of
the application-facing GBM ABI.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Sat, 14 Dec 2019 00:32:57 +0000 (16:32 -0800)]
gbm: Give gbm_device a reference to its backend
This will be used for looking up the backend
again at destruction time to perform any backend-
agnostic cleanup. To facilitate that, also
dispatch device destruction to the backend manager
code.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Thu, 3 Jun 2021 21:20:03 +0000 (14:20 -0700)]
gbm: Give getenv backend override its own function
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Sat, 14 Dec 2019 00:20:02 +0000 (16:20 -0800)]
gbm: Consolidate env var and default backend loops
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Sat, 14 Dec 2019 00:14:41 +0000 (16:14 -0800)]
gbm: Create device directly in find_backend
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Fri, 13 Dec 2019 23:54:53 +0000 (15:54 -0800)]
gbm: Inline load_backend function content
It was a functional no-op with the currently
available backends (Only DRI), and its implied
intended functionality is implemented elsewhere
in subsequent patches.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
James Jones [Wed, 2 Jun 2021 00:35:27 +0000 (17:35 -0700)]
gbm: Remove stat and refcount fields from gbm_device
These were unused.
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
Mike Blumenkrantz [Mon, 5 Jul 2021 14:28:13 +0000 (10:28 -0400)]
util/vbuf: check 3-component 16bit int formats for translation
some drivers don't support these
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11716>
Mike Blumenkrantz [Mon, 5 Jul 2021 22:01:16 +0000 (18:01 -0400)]
lavapipe: handle null vertex buffers more gracefully
this should propagate down to be handled correctly in llvmpipe
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11723>
luc [Mon, 21 Jun 2021 23:41:44 +0000 (07:41 +0800)]
panfrost: Only clear existing color buffers
in case that only one cbuf allocated but all clear bits set,
the driver will crash due to null pointer dereference.
Signed-off-by: luc <onion0709@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11515>
Icecream95 [Thu, 17 Jun 2021 11:26:28 +0000 (23:26 +1200)]
Revert "panfrost: Fix crc_valid condition"
This "fix" is no longer needed now we write CRC data correctly for
partial writes.
This reverts commit
a78487f795e81c8fc27c2d1054f58dd35eda8c3a.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11446>
Icecream95 [Thu, 17 Jun 2021 11:31:20 +0000 (23:31 +1200)]
panfrost: Set bound dimensions to framebuffer size
Otherwise CRC calculation will miss the pixels outside the extent
bounds but still in a tile that is rendered.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11446>
Dave Airlie [Tue, 6 Jul 2021 04:07:15 +0000 (14:07 +1000)]
ac: fix win32 build
Fixes:
e2e9dd44f422 ("ac/surface: Handle non-retiled displayable DCC correctly for modifiers.")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11725>
Alyssa Rosenzweig [Tue, 6 Jul 2021 03:17:33 +0000 (23:17 -0400)]
asahi: Use XML for interpolation packet
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Tue, 6 Jul 2021 01:53:09 +0000 (21:53 -0400)]
asahi: Enable primitive restart
Passes dEQP-GLES3.functional.primitive_restart.* except for a flake.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Tue, 6 Jul 2021 00:14:58 +0000 (20:14 -0400)]
asahi: Set data_valid for the depth buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Tue, 6 Jul 2021 00:14:22 +0000 (20:14 -0400)]
asahi: Identify attachment length field
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:56:22 +0000 (19:56 -0400)]
asahi: Use GenXML for main bind fragment
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:50:13 +0000 (19:50 -0400)]
asahi: Extend IOGPU header to contain encoder
Let's squash together all the resulting zeroes. Trying to discern some structure out of this.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:45:41 +0000 (19:45 -0400)]
asahi: Move IOGPU header to XML
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:38:47 +0000 (19:38 -0400)]
asahi: Identify "command buffer" size field in map
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:37:15 +0000 (19:37 -0400)]
asahi: Parametrize software "command buffer" size
Will vary depending on # of attachments.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:27:45 +0000 (19:27 -0400)]
asahi: Sync attachment magic with asahi demo
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:26:20 +0000 (19:26 -0400)]
asahi: Add XML for the attachment structure
We need a lot more control over these magic structures to get Z/S attachments working correctly. This is an early start.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 21:32:34 +0000 (17:32 -0400)]
asahi: Skip over holes in the vbufs
Fixes dEQP-GLES2.functional.vertex_arrays.multiple_attributes.stride.3_float2_17_float2_17_float2_0
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 21:01:44 +0000 (17:01 -0400)]
asahi: Comment on an embedded data structure
This file makes me sad :'(
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:48:20 +0000 (16:48 -0400)]
asahi: Flush for accesses to Z/S buffer
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:01:13 +0000 (16:01 -0400)]
asahi: Implement the stencil test
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:00:45 +0000 (16:00 -0400)]
asahi: Prepack rasterizer faces
A bit more efficient and will allow easy implementation of the stencil test.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Alyssa Rosenzweig [Tue, 6 Jul 2021 13:41:15 +0000 (09:41 -0400)]
asahi: Fix meson dependency on packing in compiler
Closes: #5030
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes:
6a657b17b9b ("agx: Remap fragment shader varyings explicitly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>
Mike Blumenkrantz [Wed, 30 Jun 2021 14:01:58 +0000 (10:01 -0400)]
radv: implement VK_EXT_multi_draw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Wed, 19 May 2021 14:32:29 +0000 (10:32 -0400)]
radv: add a gfx10 bug workaround for NOT_EOP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Wed, 19 May 2021 14:25:11 +0000 (10:25 -0400)]
radv: split indexed draw cases based on whether drawid is used
fewer conditionals in the draw loop = less overhead
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Tue, 22 Jun 2021 17:05:17 +0000 (13:05 -0400)]
radv: determine if hardware can emit NOT_EOP before emitting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Wed, 27 Jan 2021 22:33:15 +0000 (17:33 -0500)]
radv: emit drawid for multidraws
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Tue, 30 Mar 2021 20:17:09 +0000 (16:17 -0400)]
radv: emit NOT_EOP for multi indexed draws
this is never emitted currently because drawCount is always 1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Mike Blumenkrantz [Tue, 30 Mar 2021 20:24:01 +0000 (16:24 -0400)]
radv: use multidraw iteration for direct draws
there's still no arrays of draw info being passed, but this takes care of
all the work for it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11532>
Rhys Perry [Tue, 29 Jun 2021 17:54:45 +0000 (18:54 +0100)]
radv: use null vertex descriptor if num_records=0
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>
Rhys Perry [Tue, 29 Jun 2021 15:30:00 +0000 (16:30 +0100)]
radv: adjust num_records when offset>stride
If an attribute's offset is larger than the stride, the compiler will
increase the vertex index and use offset%stride instead as the offset.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>
Rhys Perry [Tue, 29 Jun 2021 15:18:55 +0000 (16:18 +0100)]
radv: don't ever convert num_records to bytes if it's zero
If num_records==0, this conversion doesn't work. We should just keep it at
zero.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>
Dave Airlie [Mon, 5 Jul 2021 07:13:48 +0000 (17:13 +1000)]
crocus: enable threaded context support
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Tested-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
Dave Airlie [Mon, 5 Jul 2021 05:59:42 +0000 (15:59 +1000)]
crocus: add unsync transfer pool
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
Dave Airlie [Mon, 5 Jul 2021 05:50:08 +0000 (15:50 +1000)]
crocus/tc: init/deinit threaded resource
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
Dave Airlie [Mon, 5 Jul 2021 05:46:54 +0000 (15:46 +1000)]
crocus: use threaded context base classes
should be a pretty non-functional change
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
Dave Airlie [Tue, 6 Jul 2021 03:21:58 +0000 (13:21 +1000)]
crocus: support rebinding streamout target buffers
Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>
Bas Nieuwenhuizen [Sun, 2 May 2021 01:51:29 +0000 (03:51 +0200)]
ac/surface: Handle non-retiled displayable DCC correctly for modifiers.
There is some hardware with num_render_backends == 1, but the number
of render backends in GB_ADDR_CFG > 1. Turns out this can be turned
off by making them rb unaligned which is valid with only 1 render
backend.
Fixes:
0833dd7d124 ("amd/common: Add support for modifiers.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10575>
Mike Blumenkrantz [Mon, 5 Jul 2021 22:25:33 +0000 (18:25 -0400)]
features: mark off EXT_vertex_input_dynamic_state for lavapipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11724>
Mike Blumenkrantz [Mon, 5 Jul 2021 21:51:15 +0000 (17:51 -0400)]
features: add VK_EXT_multi_draw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11722>
Mike Blumenkrantz [Mon, 5 Jul 2021 21:44:03 +0000 (17:44 -0400)]
features: fix ARB_shader_group_vote -> GL_ARB_shader_group_vote
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11721>
Mike Blumenkrantz [Mon, 5 Jul 2021 21:43:53 +0000 (17:43 -0400)]
features: mark off some zink features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11720>
Mike Blumenkrantz [Mon, 5 Jul 2021 21:29:04 +0000 (17:29 -0400)]
features: mark off line rasterization for lavapipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11719>
Mike Blumenkrantz [Mon, 5 Jul 2021 15:22:35 +0000 (11:22 -0400)]
relnotes: add some line feature updates for lavapipe
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11715>
Alyssa Rosenzweig [Mon, 5 Jul 2021 17:01:33 +0000 (13:01 -0400)]
asahi: Handle nonzero first_level
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:57:44 +0000 (12:57 -0400)]
asahi: Wire in u_blitter
Fixes dEQP-GLES3.functional.fbo.color.repeated_clear.blit.tex2d.rgba8
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:56:23 +0000 (12:56 -0400)]
asahi: Track more Gallium state
Needed to feed u_blitter.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>