Commit graph

140225 commits

Author SHA1 Message Date
Alyssa Rosenzweig
f7918ebc82 agx: Track current_block
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Alyssa Rosenzweig
0a7a6f0558 agx: Implement boolean mov
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Alyssa Rosenzweig
a1a8ee9b11 agx: Enable 1-bit load_const
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Alyssa Rosenzweig
2d1390392f agx: Pack ld_var Dx
In the expected place.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Alyssa Rosenzweig
1f2d1423bb agx: Drop cmdline version back to ES3.0
The patch needed for this to work was dropped. Fixes the standalone
compiler.

Fixes: 972409dacb ("asahi: Stub command-line compiler for AGX G13B")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Alyssa Rosenzweig
10e9a1bd32 asahi: Fix meson.build definition to depend on agx_pack.h
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
2021-05-31 01:23:35 +05:30
Daniel Stone
53c84551f5 doc: Gratuituous promotion of Wayland
This is really just a dummy commit to get the docs regenerated so
we can stop 404ing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11083>
2021-05-30 14:44:04 +01:00
Karol Herbst
4d5c57edca gv100/ir: fix quadop/pop lowering
Fixes: texture_cube_map_array.sampling

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
2021-05-30 13:34:31 +00:00
Karol Herbst
f4847077c7 gm107/ir: emit barrier sources for quadon/pop
We drop them later on, but it's actually how that needs to be done on
Volta.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
2021-05-30 13:34:31 +00:00
Karol Herbst
de666cc418 gv100/ir: add support for barrier thread state files for OP_CVT
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
2021-05-30 13:34:31 +00:00
Karol Herbst
f14ed4f077 nv50/ir: add barrier and thread_state files
Those are required on Turing+ to handle cross thread synchronization and
other goodies as the c/r stack is gone.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
2021-05-30 13:34:31 +00:00
Karol Herbst
f4c6c89dec nv50/ir/ra: fixes upcoming barrier file
Replaces some FILE_ADDRESS with LAST_REGISTER_FILE and makes RA not choke
on instructions using TS values.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11061>
2021-05-30 13:34:31 +00:00
Daniel Stone
79a7f33710 CI: Disable rk3399-gru-kevin jobs for now
We lost a few machines from the rota due to an infrastructure issue and
we don't have enough for good parallelism.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11082>
2021-05-30 12:40:43 +01:00
Hoe Hao Cheng
17d7b0bb8f vulkan/util: generate vk_dispatch_table that combines all dispatch tables
Zink uses this, as it doesn't need to differentiate all the entrypoints.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11045>
2021-05-30 01:57:49 +00:00
Boyuan Zhang
c9baccb516 radeon/vcn: enable parsing support for st_rps_bits
Set st_rps_bits in hevc message buffer and set corresponding flag to indicate
that st_rps_bits will be used for parsing the short_term_ref_pic_set structure.

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/10889>
2021-05-29 20:40:08 +00:00
Boyuan Zhang
9bd391bb64 frontends/vdpau: disable UseStRpsBits for vdpau hevc
vdpau interface doesn't provide st_rps_bits, it uses NumDeltaPocsOfRefRpsIdx
instead. So disabling the flag to indicate st_rps_bits will not be used.

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/10889>
2021-05-29 20:40:08 +00:00
Boyuan Zhang
1285e0d2fc frontends/va: get st_rps_bits from VA pic param hevc
Get st_rps_bits from VAPictureParameterBufferHEVC, and set the flag that
indicates st_rps_bits will be used for parsing the short_term_ref_pic_set
structure

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/10889>
2021-05-29 20:40:08 +00:00
Boyuan Zhang
db0bf188d9 vl: add st_rps_bits for HEVC decode
st_rps_bits is used for accelorater to skip parsing the short_term_ref_pic_set
structure, which is needed for HEVC decode.

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/10889>
2021-05-29 20:40:08 +00:00
Vinson Lee
fa1a1e7c80 travis: Download XQuartz from GitHub.
Bintray was sunsetted on May 1st, 2021.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11026>
2021-05-29 10:25:16 +00:00
Erik Faye-Lund
05bb449610 util/prim_restart: revert part of bad fix
When drawing using util_translate_prim_restart_ib, zink explicitly
ignores pipe_draw_start_count_bias::start, because
util_translate_prim_restart_ib used to create a new index-buffer without
padding at the start.

This makes a lot of sense, because creating a padded index buffer is
just wasteful.

So let's walk back on the choice of starting to pad the output buffer.

Fixes: 1272c2e052 ("util/prim_restart: fix util_translate_prim_restart_ib")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4851
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11059>
2021-05-29 09:13:03 +00:00
Erik Faye-Lund
1dfad514ea zink: add support for string-markers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11004>
2021-05-29 09:02:13 +00:00
Erik Faye-Lund
6c03a85094 zink: untangle have_EXT_debug_utils and ZINK_DEBUG_VALIDATION
EXT_debug_utils is useful for more than just validation, so let's
untangle these a bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11004>
2021-05-29 09:02:13 +00:00
Erik Faye-Lund
ba392e9511 zink: implement half-float packing
This cap isn't really optional for drivers that implement GL SPIR-V
support, so let's just implement it.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4846
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11057>
2021-05-29 08:16:40 +00:00
Erik Faye-Lund
1887ff2ebb zink: mark 2d-arrays as cube-compatible
OpenGL allows reinterpreting 2D array textures as cubemaps,
so we need to always set the cube-compatible flag for them.

This fixes a piglit test on Lavapipe.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund
71494c4874 zink: only mark resources as cube-compatible if supported
We need to check if the number of samples are valid for the image
first if we've going to set the cube-compatible bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund
b92c1a043a lavapipe: do not interpret cube-compatible as cubemap
Now that we handle the cubemap-array views properly, we no longer need
to do this. It's allowed in Gallium to create cubemap views of 2d
arrays, so this should work fine.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Erik Faye-Lund
a5f41925a6 lavapipe: handle cube-array image-views
It seems this was missed in the past.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10913>
2021-05-29 07:32:34 +00:00
Yiwei Zhang
60f513279c venus: fix mismatched bo mmap_size for export and multiple imports
Spec requires apps to use the size returned from
vkGetAndroidHardwareBufferPropertiesANDROID for AHB import, which
includes dedicated image/buffer import and non-dedicated buffer import.

Spec requires venus to use the size from image and buffer memory
requirement for dma_buf fd import if it's dedicated. If not dedicated,
the actual payload size should be used.

For AHB export allocation of VkImage, the app provided size will be 0,
and internally we must use the size from image memory requirement.

For AHB export allocation of VkBuffer, the app provided size comes from
buffer memory requirements and it can be smaller than the actual AHB
size due to page alignment. Internally that's the size we must use.

For AHB import, app must use the size from AHB prop query. Internally,
we have to override that with the size from memory requirement if the
import operation is dedicated to a VkImage or a VkBuffer. If not
dedicated, the actual payload size should be used.

The not working scenario is:
1. App creates an AHB backed VkBuffer, and the exported AHB size is
   larger than the buffer memory requirement (very common).
2. App imports the AHB without a dedicated VkBuffer. Then the entire
   AHB payload will be imported and the mmap_size might increase.

Test: dEQP-VK.api.external.memory.android_hardware_buffer.*

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/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang
beb80858d8 venus: refactor for property query of dma_buf fd
With a TODO to route host storage size instead of that from the guest.

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/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang
ccefcb0baf venus: fix misaligned bo_flags between import and query
For importing an dma_buf fd, export info is not required. Leaving the
bo_flags missing VIRTGPU_BLOB_FLAG_USE_SHAREABLE bit as well as the
VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE bit. Upon querying fd properties,
DMA_BUF handle type will be specified which generates a new bo_flags
not matching the prior one.

This patch aligns the above 2 bits for the dma_buf import path.

Test: vkGetAndroidHardwareBufferPropertiesANDROID should succeed with
      a valid AHB with AHARDWAREBUFFER_FORMAT_BLOB format.

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/11055>
2021-05-29 04:48:50 +00:00
Yiwei Zhang
1df4c960c6 venus: rename dmabuf to dma_buf when it represents a type
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/11055>
2021-05-29 04:48:50 +00:00
Charmaine Lee
fda4eaf5c4 svga: fix texture rectangle sampling when no sampler view declaration is defined
It is valid to not have a sampler view declaration for the corresponding
 sampler in a TGSI shader, and hence we should not rely on the sampler view
 declaration to determine if we need to adjust the unnormalized coordinates
 for texture rectangle sampling.

 This patch is to prep for tgsi shaders that are translated from nir which
 in many cases do not issue sampler view declarations.

 Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

 Reviewed-by: Neha Bhende <bhenden@vmware.com

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Neha Bhende
fd98649091 svga: Use shader_key info to declare resources if TGSI shader is missing it
Sometimes, TGSI shader doesn't have SVIEW declaration if it is not
utilize in shader. In such cases, declare those resources with the
help of information stored in shader key.

Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

Tested with piglit, gleretrace

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Neha Bhende
4b958ac720 svga: Add target and sampler_return_type info into shader key
Fixes: 584b107037 ("st/mesa: Drop the TGSI paths for drawpixels and use nir-to-tgsi")

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11011>
2021-05-29 00:10:34 +00:00
Roman Stratiienko
e91445464f anv_android: Add missing type
Fixes: 2797c75426 ("anv: fix AHB leak upon exportable allocation")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11068>
2021-05-28 23:20:24 +00:00
Chia-I Wu
1d2a33c705 venus: ignore pInheritanceInfo when we should
pInheritanceInfo should be ignored when the command buffer is primary.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4850
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Chia-I Wu
f7001f7a2d venus: remember cmd buffer level and queue family
We need them for wsi queue ownership transfer and others.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Chia-I Wu
fb549d21d8 venus: add struct vn_command_buffer_builder
We are going to remember more states.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11067>
2021-05-28 23:09:22 +00:00
Mike Blumenkrantz
67d2939e4a lavapipe: add more format mappings for vertex buffer formats
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10957>
2021-05-28 22:42:42 +00:00
Marek Olšák
264aaf99df mesa: don't save/restore VAO NumUpdates and IsDynamic to fix update tracking
NumUpdates is used to indicate whether a VAO is static or dynamic, but if
we restored an older value, it could incorrectly indicate that it's not
dynamic.

This fixes a small performance issue with torcs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák
d415df207a mesa: don't call FLUSH_VERTICES in glPopClientAttrib
These states don't affect draws, so any enqueued Begin/End vertices don't
need flushing.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák
11f41ba2f9 mesa: optimize unreferencing VBOs in glPopClientAttrib
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák
67ab6e8eb1 mesa: optimize glPush/PopClientAttrib for GL_CLIENT_VERTEX_ARRAY_BIT
This improves performance in torcs by 6%.

The idea is to skip saving and restoring vertex attribs and bindings that
have never been changed.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák
c1205a6b0f mesa: don't call _mesa_set_draw_vao in glPushClientAttrib
Pushing states doesn't affect draws.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Marek Olšák
5195d848a0 mesa: move _mesa_copy_vertex_attrib/buffer functions to their only use
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10994>
2021-05-28 22:15:38 +00:00
Mike Blumenkrantz
076a352f81 aux/indices: employ Delete The Code methodology
the util functions will assert for unknown prim types, so the switches
are redundant now

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz
0987c87445 aux/indices: break out index count conversion into separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz
4ece3931bc aux/indices: break out index size conversion to separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz
cad2026b72 aux/indices: break out primitive type conversion to separate function
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10965>
2021-05-28 21:51:32 +00:00
Mike Blumenkrantz
9d13d3e9ad llvmpipe: ci updates
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11049>
2021-05-28 20:46:14 +00:00