Commit graph

137297 commits

Author SHA1 Message Date
Adam Jackson
4daef7ffe3 mesa: Remove redundant gl_config::sampleBuffers
This is just !!samples.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
4fbe1cbe4c mesa: Stop tracking visual rating in gl_config
We never create non-conformant configs, and we can predict slow-or-not
purely from the accum-buffer-ness of the config.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
d21b8afa3d mesa: Remove the pretense of aux buffer support
This might be nice to hook up at some point, but it's doing nothing at
the moment and it's not clear to me that it belongs as GL state instead
of winsys state.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
78dfab95b8 mesa: Remove unused gl_config::level
This is the (GLX) framebuffer overlay level, and it's never set to
anything interesting.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
c17d35b402 mesa: Remove transparency state from struct gl_config
We never set this to anything interesting, and this is really winsys
state not GL state anyway.

Nota bene: __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE is set to GLX_NONE
instead of the GLX_DONT_CARE we looked like we were doing before. This
is to preserve backward compatibility with older (technically, all
current) X servers, which when building their fbconfigs initialize a
field named 'transparentPixel' _twice_, and the second time from
__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, but then uses 'transparentPixel's
value for GLX_TRANSPARENT_TYPE. Which, GLX_DONT_CARE isn't a valid value
for that, so glx-fbconfig-sanity fails among much else.

This is harmless, in that I don't think any DRI driver has ever wired
this up (I can't find any evidence in r100 or mga history) and certainly
none that we can currently load have this working.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
c212283ef8 mesa: Remove the texture-from-pixmap state from struct gl_config
This never varies at all, let alone per-config. GLX does read these
values out though so hardwire the values in a different place.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
5ffd1ebe6b mesa: Remove misc pbuffer attributes from struct gl_config
pbuffers aren't a first-class object in mesa, they're just funnily-named
framebuffers. It's thus somewhat silly to track this state separately
when it's effectively identical to GL_MAX_RENDERBUFFER_SIZE, and there's
never been a DRI driver that's ever set these values to anything
interesting. Drop them from mesa (but leave the tokens defined for
compatibility).

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
1f626eb6a9 dri: Fold attribMap into the code
This table is mostly a mapping into struct gl_config, which is about to
get radically simplified, so we're going to need code to compute values
here instead of just looking up fields in a struct. Keeping the __ATTRIB
bit is somewhat ugly, but we'll expand it back out after the gl_config
changes settle.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Adam Jackson
49fb7f9e5c dri: Explicitly handle all the config attributes
The code is broken elsewhere and requires that the attrib map actually
be large enough.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
2021-03-30 20:33:51 +00:00
Matt Turner
b58fbfa828 Remove Scons leftovers
Fixes: 6e6cd7d93c ("scons: Remove.")
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9738>
2021-03-30 20:17:19 +00:00
Matt Turner
40647fcc3d ci: Disable panfrost g52
The runners appear to be down at the moment.

Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4538
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9930>
2021-03-30 19:41:56 +00:00
Tony Wasserka
e5c869c2ee ci: skip pipeline_barrier tests that currently crash on RADV
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4511
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9893>
2021-03-30 16:50:49 +00:00
Boyuan Zhang
3c64c090e0 frontends/omx/h265: search entire dpb list
When more than 1 idr frames have been added to dpb list, there might be 2
frames with same poc in the dpb list. In this case, driver needs to search
the entire dpb list in order to get newly added reference frame with given poc

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9881>
2021-03-30 15:47:54 +00:00
Ruijing Dong
eaf197605e radeon/vcn: release si buffer for encoding at the end.
Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9882>
2021-03-30 15:41:12 +00:00
Erik Faye-Lund
89a04a54c4 compiler/glsl: avoid null-pointer deref
When we encounter a bindless image here, lower_deref returns a
NULL-pointer, and calling record_images_used will try to dereference
that NULL-pointer.

So let's dig out the var from the source instruction instead of the
result of the lowering.

Fixes: 5910c938a2 ("nir/glsl: gather bitmask of images used by program")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9895>
2021-03-30 15:22:17 +00:00
Mike Blumenkrantz
cb580af02a zink: remove zink_create_fence()
merge this down into batch state creation to keep fence file complexity down

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
11926342e3 zink: also check for device lost reset on flush
if there's a reset callback available, call that instead of cycling

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
dc5d02ca54 zink: break out queue submit into separate functions
to be used with async submission

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
38c5e154df zink: move VkQueue to batch object
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
ef538e50c8 zink: remove zink_fence_init()
contents moved to more correct places

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
95af27f032 zink: make a local screen pointer in zink_flush
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
3a344174dc zink: store context to batch state
this will be used for post-flush device resets when device is lost

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:59 +00:00
Mike Blumenkrantz
ba6265a1ff zink: rename init_batch_state to get_batch_state
more sensible, no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
f9ee9c4539 zink: assume fence has already completed if a batch state isn't found
we're not going to be waiting on fences from the future, so if we can't
find a fence then it must have completed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
03946bfcdd zink: explicitly reset a couple more batch state members
no functional changes at this time

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
f32079efab zink: add locking for fence resources
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
0ebc13564a zink: split fence finish func
one part of this will be used to handle tc mechanics, the other part is for
internal use

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
4a736677af zink: add function for checking whether a batch is done
this is like wait_on_batch, but without the waiting

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
6eaaaaa542 zink: add locking for batch states
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
c452c82b98 zink: manually invoke cpu detection during screen init
ensure this gets populated before using it

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
0731861748 zink: add locking for resource maps
vulkan prohibits multiple maps on a resource, so these have to be locked
down

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Mike Blumenkrantz
e7420c7708 zink: add locking for descriptor pools
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
2021-03-30 15:12:58 +00:00
Juan A. Suarez Romero
1f90d51749 v3dv: fix unused value
Do not assign to a variable that won't be used.

Fixes CID#1468098 "Unused value (UNUSED_VALUE)".

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9910>
2021-03-30 14:15:43 +00:00
Juan A. Suarez Romero
cc1f070a27 broadcom/compiler: fix unused value
Do not assign to a variable that won't be used.

Fixes CID#1451708 and CID#1451710 "Unused value (UNUSED_VALUE)".

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9910>
2021-03-30 14:15:43 +00:00
Erik Faye-Lund
d03a9fa50c docs: do not try to copy missing file
This file was removed, but the inclusion in the docs build was missed.

Fixes: 6e6cd7d93c ("scons: Remove.")
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9913>
2021-03-30 11:48:52 +00:00
Samuel Pitoiset
688dada1a8 radv: do not fixup DCC after compute color resolves if DCC stores enabled
With compressed DCC writes supported, the image should still be
compressed after resolving using the compute path.

Fixes various dEQP-VK.api.copy_and_blit.core.resolve_image.*
failures with RADV_DEBUG=forcecompress on GFX10.

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/9908>
2021-03-30 10:01:12 +00:00
Erik Faye-Lund
8e2f320f36 lavapipe: report correct value for maxTexelBufferElements
We already have a pipe_cap for this, so let's use that to report the
correct value.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9891>
2021-03-30 08:25:05 +00:00
Juan A. Suarez Romero
528d66eaa2 ci/v3d: run full GLES3 and GLES31 testsuite
There is margin in the time budget to run the full GLES3 and GLES31 CTS
instead of only 50%.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9899>
2021-03-30 08:03:16 +00:00
Juan A. Suarez Romero
dc859bb5bb ci/broadcom: update piglit expected results
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9899>
2021-03-30 08:03:16 +00:00
Marcin Ślusarz
1df3a00dcd iris: disable dynamic VAO fastpath on GFX version 9
Enabling this fast path, while making CPU side simpler
(and thus reducing driver's CPU overhead), forces us to
generate multiple VERTEX_BUFFER_STATE packets pointing to
the same buffer, but with slightly shifted BufferStartingAddress.
This is fine on GFX version >= 11 and < 8, but on version
8 and 9, thanks to internal details of the VF cache, vertex
data from each VERTEX_BUFFER_STATE is cached separately
and this results in a lot of cache misses.

Disabling this fast path restores previous performance levels.

On my SKL GT2 machine this improves performance in:
- GLB27 Egypt offscreen by 37%
- GLB27 TRex offscreen by 22%
- gfxbench5 Manhattan offscreen by 1.75%
- gfxbench5 Manhattan31 offscreen by 1.9%
- gfxbench5 Aztec Ruins high by 2.3%

In Intel performance CI on GFX version 9 it improves performance in:
- gfxbench5 Manhattan offscreen by 1.65%
- gfxbench5 Aztec Ruins normal offscreen by 1.33%

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3277
Fixes: 42842306d3 ("mesa,st/mesa: add a fast path for non-static VAOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857>
2021-03-30 07:32:16 +00:00
Marcin Ślusarz
33d87eeb5a gallium: add PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH
Fixes: 42842306d3 ("mesa,st/mesa: add a fast path for non-static VAOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9857>
2021-03-30 07:32:16 +00:00
Mike Blumenkrantz
84ad0feec5 zink: rework memory_barrier hook
this is a bit more sensible all around without being too much hammer
and not enough nail

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9886>
2021-03-30 04:26:28 +00:00
Mike Blumenkrantz
3047c7c77f zink: rework some includes
descriptors.h requires stuff from context.h and vice versa, so there's
a little redefinition here to work around that

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883>
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
5c1ce2edb8 zink: use GENERAL layout for sampler images that are also bound as shader images
we can't have the same image with 2 layouts, so just go with the more global one

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883>
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
ed0fedf1c2 zink: simplify some descriptor update function parameters
just removing unused params

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883>
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
dd29a7e5b0 zink: move descriptor barrier handling to main update function
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883>
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
c7f9dc5891 zink: move update_descriptors & related funcs to zink_descriptors.c
keep zink_draw.c for draw stuff

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9883>
2021-03-30 04:11:37 +00:00
Mike Blumenkrantz
812f7ecb13 zink: rework texture_barrier hook
we can be more precise with this and avoid flushing unnecessarily

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9791>
2021-03-30 00:49:43 +00:00
Alyssa Rosenzweig
8578adeaa6 nir: Unify memory atomics
Avoids some copypaste and makes it easier to see how the different types
relate.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8847>
2021-03-30 00:11:01 +00:00
Mike Blumenkrantz
ee8ea0cf86 lavapipe: ignore unused clearvalues when beginning renderpass
according to spec, unused clearvalues aren't accessed

> Only elements corresponding to cleared attachments are used. Other elements of pClearValues are ignored.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9900>
2021-03-29 23:48:55 +00:00