Yiwei Zhang
e8a63cf61e
virgl: fake modifier plane count query support
...
dri2_create_image_from_fd might pass host modifier. Before virgl
consumes modifier info from the guest side, fake the support so that the
image creation can still proceed instead of bailing.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15658 >
2022-03-31 00:00:01 +00:00
Jason Ekstrand
51077e821a
vulkan: Allow the driver to manually enable threaded submit
...
This is useful for drivers that wish to be able to block inside their
vk_queue::driver_submit hook.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
08512aea09
vulkan: Replace various uses of device->timeline_mode
...
What we really care about is if we're DEFERRED so we need to do a flush
and if there can be any other threads we might race against. We don't
really care about the timeline mode itself.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
8e51778acf
vulkan/queue: Rework vk_queue_submit()
...
Instead of basing everything on the timeline mode, base it on the submit
mode of the queue. This makes a lot more sense since it's what we
really care about anyway.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
e0ffdc8ce0
vulkan/queue: Rework submit thread enabling
...
Now that we have a threading mode in the device, we can set that based
on the environment variable instead of delaying it to submit time. This
allows us to avoid the static variable trickery we use to avoid reading
environment variables over and over again. We also move the enabling of
the submit thread up a level or two and give it a bit more obvious
condition.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Jason Ekstrand
9ddab162b7
vulkan/queue: Add a submit mode enum
...
This encapsulates all three possible submit modes: immediate, deferred,
and threaded. It's more clear than the has_thread boolean combined with
device-level checks.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566 >
2022-03-30 23:17:56 +00:00
Emma Anholt
97f17d4b38
glsl: Delete dont_lower_swz path of lower_quadop_vector.
...
This was last used with Mesa classic, in _mesa_ir_link_shader().
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15623 >
2022-03-30 22:26:15 +00:00
Emma Anholt
761eb7e539
glsl: Delete unused EmitNoPow path.
...
This was last used with i915c, now lower_fpow covers this class of
lowering.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15623 >
2022-03-30 22:26:15 +00:00
Jason Ekstrand
dc2c9bae25
vulkan: Add more VU comments to justify framebuffer asserts
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15674 >
2022-03-30 20:43:12 +00:00
Mike Blumenkrantz
38064566c6
zink: update radv ci baseline
...
just rebased cts locally and this is what popped out
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15672 >
2022-03-30 17:50:35 +00:00
Alyssa Rosenzweig
0c1fde956b
panfrost: Add Valhall compressed formats
...
We need to map to the interchange format, since there is no longer a pixel
format for the memory layout. Use this new format table on v9.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
42b9295fa6
panfrost: Restrict Z/S formats for Valhall
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
ac51142bab
panfrost: Handle Valhall IDVS in job_uses_tiling
...
Valhall-style IDVS uses a distinct job type which has to be handled separately.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
ee9b63a7bb
panfrost: Disable AFBC on Valhall
...
Doesn't work yet. Kick the can down the road; I'd like to get textures
and FBOs working at all before worrying about compressing them.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
5b056971a3
pan/bi: Preload r60/r61 for MSAA + blend shader
...
This is the sort of leakiness I hate about blend shaders. MSAA + blend shader is
somewhat obscure but gets hit in the CTS.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
913a7ed41a
pan/bi: Use ID accessors for LEA_ATTR
...
This is more portable.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
3e08672369
pan/bi: Split out load/store to thread storage
...
We need a slightly different idiom on Valhall, so let's first split the
helpers for encapsulation.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
5e76467d5d
pan/bi: Use nir_tex_instr_has_implicit_derivative
...
Rather tracking it ourselves. Slightly shorter.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
fc81415f47
pan/bi: Call Valhall backend passes on v9
...
These are required to lower the IR into something suitable for Valhall
packing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
ac5eb4934b
pan/bi: Fix write_mask size
...
We really need to stop tying the IR to Bifrost...
Fixes: 3c817ed511 ("pan/bi: Model Valhall texture instructions")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Alyssa Rosenzweig
12edaae64a
pan/bi: Add .shadow modifier to TEX_GATHER
...
Although TEX_GATHER looks like TEX_FETCH, it does support shadow comparators
like TEX_SINGLE. Model this in the IR so we can use it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15586 >
2022-03-30 17:29:12 +00:00
Rajnesh Kanwal
860e3f6ff9
pvr: Check if the buffer/image was bound before unbinding.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15641 >
2022-03-30 14:26:07 +00:00
Rohan Garg
d876abeaa8
anv: Drop dead code in anv_UpdateDescriptorSets
...
Signed-off-by: Rohan Garg <rohan.garg@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15666 >
2022-03-30 15:19:47 +02:00
Omar Akkila
4e4b411378
ci: cherry-pick deqp fix for zlib dependency
...
Zlib was bumped to 1.2.12 breaking links to the previous 1.2.11.
Unfortunately, no tag currently carries the fix so cherry-pick it for
now.
Signed-off-by: Omar Akkila <omar.akkila@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15626 >
2022-03-30 08:23:18 +00:00
Omar Akkila
803705425e
ci: uprev vkd3d-proton to v2.6
...
GitHub has deprecated the git:// protocol and no longer
accepts them. One of them vkd3d-proton's dependencies 'dxil-spirv'
was still using git:// for its submodules up until v2.6 where it
now uses https:// instead.
Signed-off-by: Omar Akkila <omar.akkila@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15626 >
2022-03-30 08:23:18 +00:00
Omar Akkila
f2fa850888
ci: uprev Fossilize
...
Fossilize used the git:// protocol for fetching submodules
but as of January 11, 2022, GitHub has tempirarily disabled
acceptance of the Git protocol until March 15, 2022 whereby
it will be permanantly disabled.
This patch uprevs to the Fossilize commit that switches
submodule URLs to https:// instead. Otherwise, we would get
an error stating that "The unauthenticated git protocol on
port 9418 is no longer supported." when trying to clone
submodules.
See https://github.blog/2021-09-01-improving-git-protocol-security-github
for more info.
Signed-off-by: Omar Akkila <omar.akkila@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15626 >
2022-03-30 08:23:18 +00:00
Lionel Landwerlin
684a4ea30c
intel/clc: fix missing pointer write
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 346a7f14fb ("intel/compiler: Add code for compiling CL-style SPIR-V kernels")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15611 >
2022-03-30 07:56:25 +00:00
Samuel Pitoiset
03888bf09c
radv: fix mismatch between radv_GetPhysicalDeviceMemoryProperties*()
...
This fixes a regression with
dEQP-VK.api.info.get_physical_device_properties2.memory_properties.
This test expects the unused array elements to be untouched.
Fixes: 87b65af43e ("radv: Use common GetPhysicalDeviceMemoryProperties")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15629 >
2022-03-30 07:00:57 +00:00
Corentin Noël
f86bc873ff
nir_to_tgsi: Require the block index to always be populated
...
In some cases like when using `NIR_DEBUG=serialize`, impl->num_blocks is 0
which leads to assertions error in the blocklist. Make sure to require the
num_blocks to be populated.
Fixes: 74c02d99b2
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15640 >
2022-03-30 04:19:14 +00:00
Mike Blumenkrantz
6cfde0abe9
mesa/st: don't add pointsize to ES programs if it already exists
...
an obvious missed case from the previous series, but there's no need
to-readd an output if it already exists here
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15590 >
2022-03-30 03:49:36 +00:00
Mike Blumenkrantz
2b22485702
mesa/st: rework pointsize constant uploads
...
this now has a flag that is toggled when the last vertex stage changes,
and this will trigger the appropriate updates during state validation
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15590 >
2022-03-30 03:49:36 +00:00
Mike Blumenkrantz
0108323996
mesa/st: always flag last vertex stage constants for upload on pointsize change
...
if the driver requires pointsize uploads, the pointsize has to actually be uploaded
whenever the pointsize changes
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15590 >
2022-03-30 03:49:36 +00:00
Mike Blumenkrantz
452d4d00df
mesa/st: rework atom flagging when pointsize changes
...
if the driver requires pointsize uploads, only flag the last vertex
stage for updates, not all vertex stages
this should be functionally equivalent but without the unnecessary overhead
of also scanning the other stages
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15590 >
2022-03-30 03:49:36 +00:00
Mike Blumenkrantz
206d2f3127
zink: add driver workaround for broken EXT_depth_clip_control
...
for #6186
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15513 >
2022-03-30 03:36:33 +00:00
Mike Blumenkrantz
fe7c3eba33
llvmpipe: handle sampling from 2d views of 3d images
...
this is seldom used but is required by KHR_gl_texture_3D_image
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15583 >
2022-03-30 03:18:52 +00:00
Mike Blumenkrantz
d415c28e64
zink: force push descriptors cache update if hashing detects changes
...
this was previously only forced if the program pointer changed,
but programs can be freed and reused, and these are definite cases
where the last set cannot be reused, so jam it in
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15591 >
2022-03-30 03:04:47 +00:00
Mike Blumenkrantz
5461a1cbaa
lavapipe: enforce monotonic timeline incrementing
...
maybe just being overly paranoid, but make sure that the timeline id
gets compared while the lock is held in every scenario
cc: mesa-stable
Reviewed-by: Omar Akkila <omar.akkila@collabora.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15453 >
2022-03-30 02:47:45 +00:00
Mike Blumenkrantz
7aed40e4ab
lavapipe: allow timeline progress in GetSemaphoreCounterValue
...
the vulkan spec doesn't explicitly state whether this function progresses
a given semaphore's timeline, and apparently there are some cases where
it's assumed that progress occurs if this function is called in a loop
instead of WaitSemaphores, so check the current fence for completion
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15453 >
2022-03-30 02:47:45 +00:00
Mike Blumenkrantz
4eca6e3e5d
lavapipe: fix xfb availability query copying
...
xfb queries have 2 results
cc: mesa-stable
fixes (zink):
spec@arb_query_buffer_object@qbo
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15644 >
2022-03-30 02:31:56 +00:00
Dave Airlie
63d0440034
lavapipe: add loop unrolling.
...
zink was giving us rolled spir-v and nothing was unrolling it,
start unrolling the NIR in the frontend.
unrolling would leave a texture with a constant texture_offset,
translate it to a texture index.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15287 >
2022-03-30 02:16:18 +00:00
Mike Blumenkrantz
8e2555234b
lavapipe: fix shader indexing of sampler arrays with const array index
...
if it's a constant, then just return that bit, not the full bitmask
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15287 >
2022-03-30 02:16:18 +00:00
Yonggang Luo
c91e3c6a42
util: Should not use ASSERTED in util_thread_get_time_nano
...
The parameter is not ASSERTED
Fixes: 0f1b3fc17f ("util: Fixes unused parameter warnings")
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15655 >
2022-03-29 23:33:21 +00:00
Mike Blumenkrantz
4525d7ed85
vulkan: update more headers to 1.3.210
...
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15645 >
2022-03-29 22:43:52 +00:00
Mike Blumenkrantz
e219351457
iris: assert that samplerview base_array_layer is zero for hw < skl
...
this codepath is broken for older hardware
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15610 >
2022-03-29 22:12:30 +00:00
Mike Blumenkrantz
4ec71a3429
crocus: assert that 3d samplerview base_array_layer is zero
...
this codepath will not work on crocus
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15610 >
2022-03-29 22:12:30 +00:00
Mike Blumenkrantz
65ec846f77
intel/isl: fix 2d view of 3d textures
...
according to KHR_gl_texture_3D_image:
If <target> is EGL_GL_TEXTURE_3D_KHR, <buffer> must be the name of a
complete, nonzero, GL_TEXTURE_3D (or equivalent in GL extensions) target
texture object, cast
into the type EGLClientBuffer. <attr_list> should specify the mipmap
level (EGL_GL_TEXTURE_LEVEL_KHR) and z-offset (EGL_GL_TEXTURE_ZOFFSET_KHR)
which will be used as the EGLImage source; the specified mipmap level must
be part of <buffer>, and the specified z-offset must be smaller than the
depth of the specified mipmap level.
thus a 2d view of a 3d surface is not only legal, it's part of the spec and
must be supported when available
cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15584 >
2022-03-29 21:44:51 +00:00
Pavel Ondračka
806dcf9db7
r300: only output wpos in vertex shaders when needed
...
Right now we always copy pos to wpos regardless of if the fragment
shader needs it or not. Instead just do it only for the shaders
that really need it.
Shader-db is not able to measure preciselly the effect as we
build only the non-wpos variants, but given that majority of fragment
shaders don't needs the wpos, the real effect should be close:
total instructions in shared programs: 105427 -> 104313 (-1.06%)
instructions in affected programs: 53098 -> 51984 (-2.10%)
total temps in shared programs: 13991 -> 13958 (-0.24%)
temps in affected programs: 114 -> 81 (-28.95%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321 >
2022-03-29 21:37:24 +00:00
Pavel Ondračka
8c90a5fab7
r300: move r300_init_vs_outputs to r300_translate_vertex_shader
...
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321 >
2022-03-29 21:37:24 +00:00
Pavel Ondračka
882811b1ff
r300: restructure r300_vertex_shader
...
Make the r300_vertex_shader structure resemble the r300_framgment_shader
in order to allow support for shader variants. There is no functional
change, but it will be used in the next commit to only output wpos
when needed from vertex shaders.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321 >
2022-03-29 21:37:24 +00:00
Pavel Ondračka
d9449c5201
r300: optimize single write scenarios in rc_copy_output
...
Right now we always write to a temp and than emit movs to both
POS and WPOS.
When the result is trivial, like:
MOV temp[0], in[0]
MOV output[0], temp[0]
MOV output[1], temp[0]
the dataflow analysis passes can take care of it, this is however
one of the last optimizations we need the pass for. Additionally
it fails even for some still trivial cases like:
MAD temp[2], const[3], temp[0].wwww, temp[1];
MOV output[0], temp[2];
MOV output[2], temp[2];
This patch will just duplicate the output instuction when there
is only a single output write.
The long-term plan would be to just trust NIR, do as little in
the backend as possible and optimize the remaining backend passes
to not need any additional cleanups.
total instructions in shared programs: 105862 -> 105427 (-0.41%)
instructions in affected programs: 20527 -> 20092 (-2.12%)
total temps in shared programs: 14029 -> 13991 (-0.27%)
temps in affected programs: 152 -> 114 (-25.00%)
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Reviewed-by: Filip Gawin <filip.gawin@zoho.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15321 >
2022-03-29 21:37:24 +00:00