Commit graph

49390 commits

Author SHA1 Message Date
Enrico Galli
e2e22720dc d3d12, microsoft/compiler: Moving driver_location allocation to compiler
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10989>
2021-06-24 20:05:12 +00:00
Enrico Galli
d0f1698a73 d3d12, microsoft/compiler: Switching semantic names to TEXCOORD
Switching from GENERIC/VARYING to TEXCOORD. This change better aligns
with other dxil generators (SPIRV-Cross, Tint).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10989>
2021-06-24 20:05:12 +00:00
Erik Faye-Lund
f815026d36 zink: cast pointers to uintptr_t
The way p_atomic_cmpxchg is implemented on Windows really wants us to
use integers instead of things like pointers. So let's use uintptr_t
here. It seems cleaner to use that than the value zero for the last
argument, because it shows the intent of the code more clearly.

Fixes: d80d9e1c93 ("zink: queue v3.0")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11424>
2021-06-24 17:51:47 +00:00
Erik Faye-Lund
bae4dca8e4 aux/trace: fix bool argument
The second argument to debug_get_bool_option is a boolean, not a
pointer. Passing a NULL-pointer there triggers a warning, which we treat
as an error on MSVC:

---8<---
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): error C2220:
the following warning is treated as an error
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): warning C4047:
'function': 'bool' differs in levels of indirection from 'void *'
../src/gallium/auxiliary/driver_trace/tr_screen.c(1071): error C4024:
'debug_get_bool_option': different types for formal and actual parameter 2
---8<---

Fixes: c1270d4845 ("aux/trace: add screen deduplication for zink+lavapipe tracing")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11424>
2021-06-24 17:51:47 +00:00
Erik Faye-Lund
45b7b57a83 iris/ci: disable amly jobs
These runners are having stability issues, and is causing a lot of
merge-requests to fail without reason. Let's disable them until the
runners have gotten some stability fixes in place.

See this discussion for details:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3437#note_971266

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11580>
2021-06-24 17:13:18 +00:00
Rafael Antognolli
aa3775c8e4 iris: Map with WC on non-LLC platforms.
Reworks:
 * Jordan: Required rework following
   f62724ccac ("iris: Pick a single mmap mode (WB/WC) at BO allocation time")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
2021-06-24 16:14:38 +00:00
Rafael Antognolli
b6a7400dfd iris/bufmgr: Add flag to allocate from local memory.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
2021-06-24 16:14:38 +00:00
Rafael Antognolli
55be94dcab iris/bufmgr: Add new set of buckets for local memory.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
2021-06-24 16:14:38 +00:00
Rafael Antognolli
e60114b2ae iris/bufmgr: Query memory region info.
v2 (Jason Ekstrand):
 - Don't leak meminfo if the ioctl fails on the second pass

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
2021-06-24 16:14:38 +00:00
Jordan Justen
84069acfd4 iris/bufmgr: Align vma addresses to 64K for local memory
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>
2021-06-24 16:14:38 +00: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
Erik Faye-Lund
9aff548ff4 libgl-gdi: add missing include
Without this, I get the following error if I try to compile Zink without
any other drivers:

src/gallium/targets/libgl-gdi/libgl_gdi.c(210): error C2037: left of
'flush_frontbuffer' specifies undefined struct/union 'pipe_screen'

Fixes: fdfe4a4d30 ("libgl-gdi: add zink support")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11536>
2021-06-24 09:30:20 +00:00
Erik Faye-Lund
fa784acbdf zink: remove some needless moltenvk details
This removes a macro that we don't need, and removes a comment about a
detail that we don't care about in that location.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:47:00 +02:00
Erik Faye-Lund
ccb9f8670e zink: do not store moltenvk functions in screen
These functions are only used once anyway, no need to store them and
make the rest of Zink care.

Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:46:55 +02:00
Erik Faye-Lund
95cbb560cf zink: remove unused moltenvk functions
These functions were added, but never used. Let's get rid of them.

Fixes: c2cb2dd3bc ("zink: Added support for MacOS MoltenVK APIs.")
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:46:52 +02:00
Erik Faye-Lund
7b220f8694 zink: unbreak moltenvk code
These functions don't exist in the Khronos XML, so we don't generate
dispatch-table entries for them. So let's not try to call them in that
way.

Fixes: 5574868103 ("zink: use the dispatch tables")
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:46:31 +02:00
Erik Faye-Lund
e979ecbd45 zink: remove unused function-pointers
We also forgot to remove these when we stoped using them, more stuff to
delete, yeah!

Fixes: 5574868103 ("zink: use the dispatch tables")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:46:13 +02:00
Erik Faye-Lund
efa863990a zink: drop unused macros
We stopped using these without removing them, let's tidy that bit up.

Fixes: 5574868103 ("zink: use the dispatch tables")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554>
2021-06-24 10:45:18 +02:00
Dave Airlie
d2114bf413 crocus: fix another printf specifier.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11570>
2021-06-24 07:10:49 +00:00
Dave Airlie
78c979dc93 crocus/gfx6: always be dirtying gs attachments for xfb
This fixes hangs seen with xfb and the deqp test

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>
2021-06-24 06:50:49 +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
0fa4b64f6c crocus: dirty blend state more often.
The blend state depends on wm_prog_data dual_src and it also
depends on the cbuf formats in can_emit_logic_op.

Dirty it in the correct places.

Fixes:
dEQP-GLES3.functional.fbo.invalidate*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>
2021-06-24 06:50:49 +00:00
Dave Airlie
a74c16e5f8 crocus/gfx6: fix sampler view first level.
The gfx6 state needs to dirty sampler state so that BaseMipLevel
gets updated properly.

Fixes:
dEQP-GLES3.functional.texture.mipmap.cube.base_level.*

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>
2021-06-24 06:50:49 +00:00
Dave Airlie
c282a082be crocus/query: poll the syncobj in the no wait situation
In the no wait, poll the syncobj and bail if it's hasn't signalled.
This fixes a bunch of deqp xfb tests on sandybridge

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>
2021-06-24 06:50:49 +00:00
Adam Jackson
9ca6abd424 vl/dri3: Don't leak regions on the X server
I can't tell from a quick read whether this clip region is actually just
the bounding box so could be skipped entirely. But the old code never
destroyed it, which means we'd leak a couple hundred bytes on the X
server side for every SwapBuffers until the client dies of XID
exhaustion, which is somewhere north of 2GB for typical systems so you
may or may not just run out of memory first.

Create the region at swap time and stash it in the drawable state.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11461>
2021-06-24 03:18:06 +00:00
Marek Olšák
888b7ba338 radeonsi: optimize set_inlinable_constants when they don't change
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11509>
2021-06-23 22:37:34 -04:00
Marek Olšák
ff42fd1fdf radeonsi: don't use NGG culling on 1 RB chips
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11509>
2021-06-23 22:37:31 -04:00
Marek Olšák
f7afcc3d11 radeonsi: remove incorrect comment about hangs in gfx10_ngg_gs_emit_epilogue
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11509>
2021-06-23 22:37:29 -04:00
Marek Olšák
593f3b3a5a radeonsi: if shader culling culls all vertices, cull the primitive exports too
This was overlooked. It benefits triangle strips the most due to
GS fast launch.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11509>
2021-06-23 22:37:27 -04:00
Marek Olšák
defc7c92d9 radeonsi: document why VBO descriptors in user SGPRs are beneficial
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11509>
2021-06-23 22:37:23 -04:00
Mike Blumenkrantz
f99f7c06e7 lavapipe: implement multidraw ext
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11533>
2021-06-24 01:35:33 +00:00
Mike Blumenkrantz
be0e34450b zink: use depth/stencil-only layouts for depth/stencil-only formats
just kidding, this is banned by spec

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11389>
2021-06-24 01:19:07 +00:00
Emma Anholt
a067f54f3e ci/i915g: Skip the piglit glx tests since we're not running X.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11559>
2021-06-23 19:54:55 +00:00
Emma Anholt
1ccb8ab801 i915g: Finish out blend factor overrides for both RGBx and A8.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11559>
2021-06-23 19:54:55 +00:00
Emma Anholt
2683c7bf9a i915g: Fix bad naming of depth texture formats.
Now matches classic's i915_reg.h and the spec.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11559>
2021-06-23 19:54:55 +00:00
Daniel Stone
43b99e48b1 Revert "ci: disable panfrost t760 jobs"
Both our T760 machines took a dive in beautiful synchronicity last
night, were recovered early this morning.

This reverts commit 854d93f73d.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11555>
2021-06-23 12:30:07 +01:00
Tapani Pälli
2d87ea3166 iris: take a reference to memobj bo in iris_resource_from_memobj
v2: and remove it from iris_memobj_create_from_handle ... (Nanley)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4969
Fixes: 772dc50d16 ("iris: hook up resource creation from memory object")
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/11552>
2021-06-23 10:46:09 +00:00
Pierre-Eric Pelloux-Prayer
52547cfbd0 radeonsi: disable ngg culling on llvm < 12
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4874
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11362>
2021-06-23 08:42:46 +00:00
Dave Airlie
29d272f144 crocus: fix batch state bo leak
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11547>
2021-06-23 05:31:59 +00:00
Dave Airlie
9027aae546 crocus: fix vertex buffer leak on screen end.
this was stopping the screen from being cleaned up as well

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11547>
2021-06-23 05:31:59 +00:00
Dave Airlie
6036121a55 crocus: free context state properly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11547>
2021-06-23 05:31:59 +00:00
Mike Blumenkrantz
c9bc5e3a86 zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:42 +00:00
Mike Blumenkrantz
a784713080 zink: remove primconvert
this is no longer used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:42 +00:00
Mike Blumenkrantz
c032c9e32d zink: export supported primitive restart types
this is now handled by gallium, so the codepath can be dropped

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:42 +00:00
Mike Blumenkrantz
2953d70994 zink: export supported prim types
this is now handled by gallium, so the related codepaths can be dropped

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:42 +00:00
Mike Blumenkrantz
8ac4be916e zink: export 8bit index buffer support based on extension presence
this is now handled by gallium, so the codepath can be dropped

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:42 +00:00
Mike Blumenkrantz
09c28a35a5 zink: export PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART
gallium will now handle unsupported restart index rewriting, so
this codepath can be removed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:41 +00:00
Mike Blumenkrantz
3fc651110c gallium: add a pipe cap for determining driver support for prim type in restarts
this is another prim type bitmask which will trigger automatic draw rewriting
to a direct draw any time a prim-restart draw occurs with a prim type that is
not supported by the driver for prim restart, even if that prim type is supported
for normal drawing

the default is set to all prim types to preserve existing functionality, and PrimitiveRestartForPatches
is now explicitly set to false because no driver supports it

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:41 +00:00
Mike Blumenkrantz
f8ff6eb78b gallium: add a pipe cap for performing automatic prim type conversion
drivers can now export a bitmask of the primitive types they support,
and all others will be automatically be rewritten

the default value is set to all primitive types supported to preserve
existing behavior

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:41 +00:00
Mike Blumenkrantz
c8e674d4e3 gallium: handle automatic 8bit -> 16bit index buffer rewrites
this is based on PIPE_FORMAT_R8_UINT format support

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10973>
2021-06-23 03:13:41 +00:00