Commit Graph

142079 Commits

Author SHA1 Message Date
Samuel Pitoiset 0cfeb93751 radv: add support for more HTILE clear codes
The HTILE clear code is now computed based on the floating point value.

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/10035>
2021-07-02 13:23:32 +02:00
Samuel Pitoiset 764960e16d radv: advertise VK_EXT_color_write_enable
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/11530>
2021-07-02 10:02:02 +00:00
Samuel Pitoiset 9a95aba377 radv: implement VK_EXT_color_write_enable
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/11530>
2021-07-02 10:02:02 +00:00
Michel Dänzer 61a2cfc302 Fix up leftover "state_trackers" references to "frontends"
Fixes: d6287a94b6 "gallium: rename 'state tracker' to 'frontend'"
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11676>
2021-07-02 07:35:05 +00:00
Jesse Natalie f8f2c3d835 nir_lower_readonly_images: Clear variable data when changing the type
For images, variable data includes the format. For samplers, variable
data is used for OpenCL inline samplers. When converting a variable
from one to the other, zero out the data so we don't accidentally
interpret a converted image as an inline sampler.

Fixes: fa677c86 ("nir_lower_readonly_images_to_tex: Support non-CL semantics")
Acked-by: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11674>
2021-07-02 04:24:22 +00:00
Mike Blumenkrantz 25ad69968b zink: check last_finished before timeline waiting
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11686>
2021-07-02 03:40:45 +00:00
Mike Blumenkrantz fd633c2444 zink: add a screen function for waiting on a batch id
this is super hacky for the non-timeline case but whatever

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11686>
2021-07-02 03:40:45 +00:00
Mike Blumenkrantz 347163aec2 zink: stop screwing up buffer offsets during for maps
stop using the memory bind offset

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11687>
2021-07-02 03:29:04 +00:00
Mike Blumenkrantz 97da7f635e zink: use 0 as the offset when mapping qbos
zink_resource_object::offset is the memory offset, which is unrelated to
the offset in a buffer

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11687>
2021-07-02 03:29:04 +00:00
Mike Blumenkrantz 9be640ff21 zink: use pipe_resource::width0 for clamping ssbo sizes
zink_resource_object::size is the size of the memory allocation, which
is effectively unrelated

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11687>
2021-07-02 03:29:04 +00:00
Mike Blumenkrantz 46695dd938 zink: don't add mem allocation offset when copying buf2image
this doesn't apply to any image/buffer operations, it's solely for memory
allocation/binding/mapping

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11687>
2021-07-02 03:29:04 +00:00
Mike Blumenkrantz f223ee9004 zink: only flag persistent resource maps for invalidation if they aren't coherent
coherent is already synchronized

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11688>
2021-07-02 03:18:19 +00:00
Mike Blumenkrantz b416b68ef3 zink: use vkresult helper for map return
consistency++

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11689>
2021-07-02 03:10:12 +00:00
Daniel Stone d40f8a2fcb util/disk_cache: Don't leak when cache is empty
When we exit early having failed to find any candidate cache files to
evict, don't leak the list head whilst doing so.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: f58e6fee74 ("util/disk_cache: delete more cache items in one go when full")
Ref: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11523>

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11682>
2021-07-02 01:54:10 +00:00
Mike Blumenkrantz 19cf64aabd zink: add resource refs after last descriptor unbind
redundant at this point; no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz f8bd5911ee zink: split samplerview/imageview usage/refcounting calls
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz 6acd2e9de3 zink: split batch usage setting from refcounting
batch tracking has until now been the same as refcounting, but this
is inefficient and incurs additional overhead from constant atomic ops,
so make them separate

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz b302ab5167 zink: split out resource tracking into more incremental functions
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz 72354df9c4 zink: remove stencil resource batch tracking
I think maybe I misunderstood how things worked, or there were issues
generally with resource lifetimes, or whatever, but this isn't needed anymore

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz ebbedb1c00 zink: don't add batch tracking during buffer rebinds if refs are dirty
this will be handled automatically

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11684>
2021-07-02 01:38:04 +00:00
Mike Blumenkrantz 539bdcd469 zink: add more explicit casts to draw code
this makes c++ happy

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11685>
2021-07-01 21:13:17 -04:00
Mike Blumenkrantz b432bdc035 zink: add c++ header guards
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11685>
2021-07-01 21:13:06 -04:00
Mike Blumenkrantz ccf6ea3070 zink: remove unnecessary return from zink_desc_type_from_vktype()
this doesn't compile in c++

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11685>
2021-07-01 21:12:19 -04:00
Mike Blumenkrantz 742805b1d7 zink: rename 'template' struct member
this is a c++ keyword

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11685>
2021-07-01 21:12:15 -04:00
Mike Blumenkrantz 48adc08b2d zink: make prim type a bitfield in pipeline info
match draw info here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11685>
2021-07-01 21:11:35 -04:00
Alyssa Rosenzweig 3da23a9c7e nir: Fix constant folding for irhadd/urhadd
This should be a subtract, not an add. The comment's proof is correct,
but the (wrong) expression we actually use isn't what it's in the
comment! Correct the discrepancy.

The lowering in nir_opt_algebraic was correctly typed.

Fixes: 272e927d0e ("nir/spirv: initial handling of OpenCL.std extension opcodes")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11671>
2021-07-02 00:21:22 +00:00
Mike Blumenkrantz ce90f73eb0 zink: rework pipeline cache implementation
this is now a screen-based queue which can be triggered to serialize
cache updates, ensuring synchronization

the cache is on the program object, enabling incremental updates as well as
variant loading for an entire pipeline collection at once

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11595>
2021-07-02 00:09:33 +00:00
Mike Blumenkrantz 8da06994cf zink: merge some streamout state emission into the same draw conditional
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11667>
2021-07-01 23:58:53 +00:00
Mike Blumenkrantz f97fa6f5f5 zink: move line width and depth bias updating into conditional during draw
only do calculations when needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11667>
2021-07-01 23:58:53 +00:00
Mike Blumenkrantz 22530ad9f1 zink: unify fb surface unbinding
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11666>
2021-07-01 23:47:18 +00:00
Mike Blumenkrantz e58eb3f269 zink: add a ref for flush resource
the lifetime of this needs to always be preserved

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11665>
2021-07-01 23:04:34 +00:00
Mike Blumenkrantz 005262863f zink: break up ctx descriptor state updating to per-type functions
this is a bit easier to read/manage going forward

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11664>
2021-07-01 22:53:51 +00:00
Mike Blumenkrantz 6368f9453a zink: unify/consolidate some barrier queuing
this queuing is based on bind counts, and it's all the same, so it
can mostly be combined for better reuse

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11663>
2021-07-01 22:42:34 +00:00
Mike Blumenkrantz 2d32d123e5 zink: avoid unnecessarily rewriting gl_DrawID
with tc enabled, we get genuine multidraws with valid drawids, so we can
update this to reflect the new capabilities...which are the same as the old
ones except that potentially some drivers can now do direct multidraws

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11662>
2021-07-01 22:30:55 +00:00
Jesse Natalie 02efc5a099 microsoft/compiler: Change behavior for emitting inexpressible barriers
If the barrier tries to apply to memory that we can't express, just
don't apply the memory portion of the barrier. Similarly, if it tries
to apply a global memory barrier at invocation level, upgrade it to
thread-group.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11670>
2021-07-01 21:05:14 +00:00
Jason Ekstrand 938ce8cdaf docs/isl/tiling: Fix swizzle pattern for X-tiling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11679>
2021-07-01 14:07:42 -05:00
Georg Lehmann adbd63e24d lavapipe: Add a missing VKAPI_ATTR.
Signed-off-by: Georg Lehmann's avatarGeorg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11114>
2021-07-01 17:09:02 +00:00
Georg Lehmann 0556173918 lavapipe: Use common default allocator.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11114>
2021-07-01 17:09:02 +00:00
Luis Felipe Strano Moraes daf3d9e1eb overlay_layer: add missing undef
reviewed-by: Dylan Baker <dylan@pnwbakers.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11673>
2021-07-01 16:42:07 +00:00
Luis Felipe Strano Moraes 7f8652d72d meson: print information about layers being built as part of summary
reviewed-by: Dylan Baker <dylan@pnwbakers.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11673>
2021-07-01 16:42:07 +00:00
Erik Faye-Lund 669b6889e4 gallium/u_threaded: do not apply start twice
We already apply start when setting the bits in writable_buffer, so
shifting the bits up by start just makes us apply the offset twice.

Caught by Coverity.

Fixes: 988d091720 ("gallium/u_threaded: clear valid buffer range only if it's not bound for write")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11635>
2021-07-01 11:57:49 +00:00
Samuel Pitoiset 28e1b02a6f radv: disable DCC for DOOM 2016 and Wolfenstein II
Both games perform two image layout transitions with the same image
in the same pipeline barrier with UNDEFINED and this re-initializes
DCC to the uncompressed state. No ideal solution sadly. Note that
both games declare all images as CONCURRENT.

This fixes rendering issues on GFX10+ because DCC for stores is
supported and this implicitly enables DCC for concurrent.

Fixes: da166f648f ("radv: enable DCC for concurrent images on GFX10")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4927
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4607
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/11656>
2021-07-01 11:09:22 +00:00
Dave Airlie d9c0687a54 zink: drop getenv hacking now that gallium is fixed.
This drops the getenv hacks which cause problems testing multithread apps

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11643>
2021-07-01 10:27:44 +00:00
Dave Airlie 75a8246563 gallium/sw: add sw_vk bit to avoid having to futz with env vars for lavapipe
lavapipe really only currently works with llvmpipe, and likely for the forseeable
future.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11643>
2021-07-01 10:27:44 +00:00
Rhys Perry ed123a03be radv: enable VK_KHR_shader_subgroup_uniform_control_flow
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11626>
2021-07-01 10:01:52 +00:00
Rhys Perry a9c4a31d8d aco: handle NIR loops without breaks
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11626>
2021-07-01 10:01:52 +00:00
Juan A. Suarez Romero fd5c787958 ci: update VK-GL-CTS to 1.2.6.2
v1:
 - Fix typos (Emma)
 - Remove needless sort (Adam)

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11654>
2021-07-01 08:12:31 +00:00
Daniel Stone 0c09498fe9 Revert "CI: Disable LAVA devices for maintenance"
This actually came back a few hours ago.

This reverts commit b07dc014c44849af59f98afa3a1703c9d9d3cf27.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11669>
2021-07-01 06:59:07 +00:00
Hyunjun Ko 9507705693 turnip/kgsl: new flag TU_USE_KGSL
There are some cases using kgsl backend on linux that is still not usual
setup though, we need to consider too.

Regarding the timeline semaphore feature, we could implement it for
the kgsl backend in the future, and probalby it should be using the
existing code in tu_drm.

See #4738, #4907

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11488>
2021-07-01 04:22:55 +00:00
Yiwei Zhang 73c71a37f4 venus: fix AHB VkBuffer memory requirement
Layering AHB on top of dma_buf_fd requires venus to combine the memory
type bits internally for VkBuffer.

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/11661>
2021-07-01 03:42:24 +00:00