Tapani Pälli
5f7df5df0d
crocus: disable depth and d+s formats with memory objects
...
This is similar to i965 commit ba11f673a2
, we set depth and
d+s formats unsupported for now.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Tapani Pälli
e47b72e931
crocus: take a reference to memobj bo in crocus_resource_from_memobj
...
This is the same fix as commit 2d87ea3166
for iris driver.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10609 >
2021-08-09 05:38:50 +03:00
Dave Airlie
c12444ab88
crocus/gen45: fix mapping compressed textures
...
I don't think iris ever hits this path, but probably has the same bug if
it did.
Fixes texsubimage on gfx4 + gfx4.5
Fixes: 5bf6ec31cc
("crocus/gen4: restrict memcpy mapping to gen5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12164 >
2021-08-03 05:37:52 +10:00
Dave Airlie
5bf6ec31cc
crocus/gen4: restrict memcpy mapping to gen5
...
This is due to gen4 + 4.5 having some rather strange swizzling
that we can't actually detect properly in userspace
Fixes: f3630548f1
("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12058 >
2021-07-26 20:28:37 +00:00
Dave Airlie
b7302ecf11
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 >
2021-07-06 13:56:48 +10:00
Dave Airlie
86368a5fa2
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 >
2021-07-06 13:56:48 +10:00
Dave Airlie
902eaa9382
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 >
2021-07-06 13:56:48 +10:00
Dave Airlie
a9df8f7b64
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 >
2021-07-06 13:56:48 +10:00
Dave Airlie
db6042ea14
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 >
2021-07-06 13:56:44 +10:00
Dave Airlie
1d438c11c8
crocus: inline the d/s resource handling functions
...
These are pretty simple, so inlining is fine and helps drawoverhead
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11707 >
2021-07-05 14:47:30 +10:00
Jason Ekstrand
94a52bc85c
isl,iris: Move the extra_aux_surf logic into iris
...
This gets rid of the awkward interface for isl_surf_get_ccs_surf where
we passed it two aux surfaces and it was supposed to fill out the second
one based on whether or not the first one already had stuff in it.
Instead, we now pass it three well-labled surfaces: surf,
hiz_or_mcs_surf, and ccs_surf which have obvious meanings. This does
mean that iris has to carry a bit of logic and we have to flip
parameters around in all the callers. But the resulting interface is
much cleaner.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11479 >
2021-06-24 13:57:40 +00:00
Dave Airlie
7399d6028f
crocus: Avoid replacing backing storage for buffers with no contents
...
Ported 97e9de1795
from iris
We might get asked to pitch the storage on a buffer that already has
no meaningful contents. In this case, the existing buffer is as good
as a new one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567 >
2021-06-24 06:50:49 +00:00
Dave Airlie
a9c1c75e9c
crocus: convert a bunch of is_haswell into verx10 checks.
...
This just make things easier when gen8 support is added
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11507 >
2021-06-22 18:56:20 +00:00
Jason Ekstrand
7b8199e4a2
crocus: Drop extra_aux support
...
This exists for combined MCS+CCS or HiZ+CCS which was introduced on
Tigerlake. Crocus will never support hardware that has these features
so there's no point carrying the dead copied+pasted code from iris.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11483 >
2021-06-19 14:57:25 +00:00
Dave Airlie
cebbdf5de3
crocus: fix scanout tiling so glamor/modesetting can work.
...
This fixes the scanout tiling to be like iris, with this X/glamor
can run.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11354 >
2021-06-15 10:58:09 +10:00
Dave Airlie
bc9af971d2
crocus: hook up resource creation from memory object
...
Port 772dc50d16
from iris
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
8bf662df52
crocus: hook up memory object creation from handle
...
Port cdb5a72764
from iris
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
9be4eb1688
crocus: Drop buffer support in resource_from_handle
...
Port 9d503b36ca
from iris
The callers don't seem to pass targets of PIPE_BUFFER. Stop nesting an
if-else block by dropping support for this target.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
32728dc66e
crocus: introduce main resource configuration helper.
...
Along the lines of what iris does.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
1e6e87a3c9
crocus: Make iris_bo_import_dmabuf take a modifier
...
Port 493298528a
from iris
Replace the tiling parameter with a modifier parameter. I find it more
straightforward to have this function figure out the tiling from the
modifier than to have its caller do it.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
4cd0f8535c
crocus: Don't call SET_TILING for dmabuf imports
...
This is a port of c111e9099c
from iris to
crocus.
Calling SET_TILING on a DMA buffer with the gen12 CCS modifier can fail
unnecessarily. The main surface in the BO is Y-tiled, but the CCS portion is
linear and can have a stride that's not a multiple of 128B. Because SET_TILING
is called on the CCS plane with I915_TILING_Y, the ioctl will sometimes reject
the stride.
SET_TILING was originally used in b6d45e7f74
to
fix an assertion failure in iris_resource_from_handle. Assigning the BO's
tiling_mode field is sufficient to avoid the failure.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11352 >
2021-06-15 00:02:06 +00:00
Dave Airlie
f3630548f1
crocus: initial gallium driver for Intel gfx 4-7
...
This is a gallium driver for the Intel gfx 4-7 GPUs.
It was initially cloned from the iris driver by Ilia Mirkin,
then I ported over large reams of code from i965 until it worked.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11146 >
2021-06-14 06:34:05 +10:00