Commit graph

201327 commits

Author SHA1 Message Date
Yahan Zhou
563c11a3a9 Fix corner cases where vk dependency graph breaks
There are 2 issues with the current implementation of VkReconstruct:

a. When deleting a child handle it does not erase itself from its
   parent. When doing snapshot we enumerate children handles and check
   if they are still "alive". But the handle pool is written in the way
   that it could reuse handles that have been previously destroyed,
   invalidating the "alive" check.
b. Previous dependency graph does not support one handle with multiple
   parents.

In this commit we fix (a) by making child<->parent pointer
bidirectional. When deleting a child it will be erased from its parents.

We fix (b) by rewriting a significant part of dependency graph logic on
snapshot save.

The commit also makes all destroy command to be recursive (except for
vkDestroyShaderModule), which will be handled in later commits.

Also add dependency VkFrameBuffer -> VkImageView.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
d0a4d3f3bc Add composition support to the end2end test framework
... so that we can start to test GL->VK->Host-Compositor flows.

Adds a fake render control lib that basically just exposes some of
the render control functions with scoped host connection inside of
a `RenderControlDevice`.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
c2d57b76be Ensure glProgramBinary initializes uniform and attrib info
Adds Scoped* helper classes to hopefully make writing tests easier.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
b1b8eb9301 Make it not crash during vk snapshot load
We are trying to make vk snapshot load the google Chrome home page
without crashing. With this CL it does not crash during load but would
crash with a device lost after submitting a queue (which is
unsurprising because everything is missing to snapshot vk queue).

Content of this commit includes:

 - Add dependencies for VkImageView, VkGraphicsPipelines, VkFramebuffer.
   They are necessary to tell the snapshot module the order of vk object
   creation.
 - Add vkBindImageMemory into the loading sequencey of VkImage, so that
   it would be executed before vkCreateImageView.
 - Delay the destruction of VkShaderModule. This is because other
   objects can still refer to it after it is destroyed.
 - Initialize VK backend for color buffer properly on snapshot load.
 - Save and load vk images in the same order by sorting them according
   to their boxed handle.
 - Record all the placeholder handles for vkCreateDescriptorPool. For
   performance purpose this function creates a lot of extra handles
   without real contents. We need to snapshot those handles as well.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Bo Hu
2f958ad3f8 goldfish: handle null handle
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Erwin Jansen
677b398ea4 Enable GFXStream bazel build
This builds the "standalone" GFXStream library that can be consumed by
Qemu 8.2

The bazel build allows us to transition rutabaga to a bazel based
build, which will unify the Qemu 8.2 build as used by the emulator.

It also opens up the path to migrate this to g3 if we decide to do this.

This change forces a few header changes, as bazel is more strict about
the relationship between headers and packages, and doesn't easily give
you fine grained control over the include paths.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
0deb66fcae Add support for VK_EXT_robustness2
This extension is required to get Vulkan Capabilities
Viewer working correctly in the emulator.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
36d09f70ce [guest] Fuchsia: open magma device
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
a7b61ee151 Introduce Gfxstream Features to decouple Gfxstream from AEMU
... which will allow building Gfxstream from a fixed version of
AEMU for the purposes of packaging.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Gurchetan Singh
f1392431e0 gfxstream: generate development ICD for meson build
An user is now able to do:

export VK_ICD_FILENAMES=./amd64-build/guest/vulkan/gfxstream_vk_devenv_icd.x86_64.json

that allows vulkan apps without install the ICD.

If built with option `-Dgfxstream-build=guest-test`, that would go
into the gfxstream VK ICD and the test layer.  Unfortunately,
the test layer hangs right now since I believe the gfxstream_backend's
vulkan loading logic is also affected by the environment variable.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
876844ddd6 Add VK_EXT_validation_features to host modules
This is another extension used for vulkan validation.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
fe6accba65 Better track color buffer usage in Vulkan
Sometimes guest renders to an AHB without calling
vkQueueSignalReleaseImageANDROIDAsyncGOOGLE. This would result in the
color buffer not being updated from Vulkan.

This commit tracks the situation that AHB is rendered to, and copies its
content to color buffer.

Note that it adds extra wait, which could hurt performance.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
ae8d2c2907 Add VK_EXT_debug_utils to host modules for codegen
Fixes emulator crashes when the validation layers
are enabled on the guest side.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
9fbbdf87b6 [guest] Fix Fuchsia build, add missing header
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
220d0ffb79 [guest] Remove Fuchsia syslog_static dependency
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
272db6ebc4 Use append to chain memory pointer info
Append importHostInfo rather than directly assigning
to pNext for VkMemoryAllocateInfo struct.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
C Stout
2daad5f609 [guest] Fuchsia: include missing Vulkan entry points
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Serdar Kocdemir
bb2e9be160 Reduce heap pressure on getPacketContents
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
092dbc32ab Make RutabagaLayer shared between "guest impls"
... so that "guest gralloc", "guest egl", "guest vulkan", etc are
all using the same underlying emulation layer (RutabagaLayer).

This moves Gralloc and ANativeWindow into platform as these should
be hidden from GfxstreamEnd2EndTests.

Note: we still want to static-ify a lot of the guest libraries.

      meson setup \
          -Ddefault_library=static \
          -Dgfxstream-build=both \
          build
      meson compile -C build

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Jason Macnak
bfac7ab65e Handle AHB R8 format conversions
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Lars Harrison
fe4a621c7b Fix coherent memory allocation to use device
When allocating coherent memory (generally, suballocations) and looking
up existing VkDeviceMemory entries, the device is critical to finding
valid allocation blocks, otherwise allocations from other devices might
be chosen, which invalidate things.

This happens only in situations where a single process has multiple
VkDevices, so it was rare enough not to be caught until now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Gurchetan Singh
ef4d6d8fb4 gfxstream: build the test layer via Meson
Useful for host driver in guest efforts.

     ninja -C amd64-build/

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
362ffb5f81 Snapshot vk image content in common situation
This commit snapshots vk image content by allocating a staging buffer
and copying the bytes on snapshot. It only works in the simplest setup.
Many situations are not considered in this commit, they include:

(1) the image does not support VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
layout;
(2) the image does not support VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
layout;
(3) the queue is dirty.

Also there is no performance optimization.

Implementation-wise, snapshot happens in VkDecoderGlobalState after
recording / playing back all create / bind commands. It borrows an
existing queue to run the extra vk copy commands. A temporary staging
buffer is also created for copying. Later we could optimize the code
by reusing most of the temporary objects.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Yahan Zhou
67203e1574 Add snasphot support for vk coherent memory
This commit tracks more functions related to coherent memory snapshot
and saves the memory content.

At this point we are not sure if we need to manually copy the memory
content, because they are supposed to be cloned in RAM snapshot. We
could revert that part if they turn out to be unnecessary in future.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:06:00 +00:00
Mitchell Kember
6af6eb87c6 [fxbug.dev] Migrate bug numbers
This changes fxbug.dev/ URLs from Monorail bug numbers to the new
Fuchsia Issue Tracker numbers.

The migration to the new issue tracker was announced here:
https://groups.google.com/a/fuchsia.dev/g/announce/c/GOYfJozEqmk/m/qsGsaJ7UAAAJ

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
C Stout
db16144c89 [guest] Build fixes for Fuchsia
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Aaron Ruby
c3f327db2f gfxstream: logging on Linux guests
- Downgrade some logging messages to verbose

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jean-Francois Thibert
cdc3c521fd Add vkUpdateDescriptorSetWithTemplateKHR to resource tracker
The call has to be processed using the internal descriptor logic.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1050781c4e gfxstream: always initialize rcEncoder and other things
Similiar solution to aosp/2925036, but perhaps simpler.

- Creates the rcEncoder(..) when a new thread-local encoder
  is initialized.
- keeps SetupInstanceForProcess improvement
- Always use kCapsetGfxStreamVulkan.  This should make no
  difference, since goldfish doesn't advertise
  kCapsetGfxstreamVulkan and HostConnection::get(..) defaults
  to kCapsetGfxstreamVulkan anyways to get ASG ring parameters.
- Move additional static global variables before functions

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
2dbbeca869 gfxstream: add REQUIRED_TYPES list
This makes the checks into a list.  It also adds support for
uint16_t, which are hit with newer versions of vk.xml.

I'm not sure exactly why we need the list, only that codegen
errors occur if we don't don't generate a type here.

Maybe as we try to upstream the cerealgenerator, we can figure
out why and fix it.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
a1ac0bedfc gfxstream: add GFXSTREAM_ENABLE_GUEST_GOLDFISH
Reduces the need for goldfish sync headers in guest Linux VK build.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
c5ced9e430 gfxstream: nuke HOST_BUILD
The host build has been deprecated in favor of end2end tests.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
7d85b542e8 gfxstream: nuke VIRTIO_GPU flag
It's always set.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Lars Harrison
f44b1e5523 Always initialize gfxstream vulkan
This change splits SetupInstance on the gfxstream vulkan layer into
SetupInstanceForProcess and SetupInstanceForThread, then forces
SetupInstanceForThread if the HostConnection for the current thread
hasn't been initialized when getConnection is called. Currently, this
will create an rcEncoder and include the PUID, which - when missing -
causes the host to get very confused.

This path is triggered by ANGLE, where a separate thread runs through
vulkan initialization than which ultimately uses the vulkan
components. In this case, none of the vulkan initialization code will
have independently called SetupInstanceForProcess on the current thread.

The semantics of SetupInstanceForProcess and SetupInstanceForThread are
somewhat muddled, because the sequence number pointer is a per-process
concept, but only set when initializing the rcEncoder per thread.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
4eadf2b2a7 gfxstream: don't forward declare ProcessResources
This avoids compilation errors when codegen'ing at build
time.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
afe32a932a gfxstream: PLATFORM_SDK_VERSION --> ANDROID_API_LEVEL
Name change.  Previosuly, the code keyed on the level was not
compiled?

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
833850c606 gfxstream: reduce use of PLATFORM_SDK_VERSION
It's way past API-level 26 now.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Jason Macnak
5dc2d5f5c5 Fix "-Werror=conversion" errors for RanchuHwc
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Merged-In: I371b357e8e4400a58d0010dd20a8da285d4602b0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
1de3238758 Add VK_EXT_fragment_density_map for Chrome
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
ab348d8429 gfxstream: guest: cpp_args --> guest_cpp_args
This is more descriptive..

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Aaron Ruby
15897b4eeb gfxstream: Advertise VK_KHR_external_semaphore_fd always on Linux/Android guests.
Lack of host support is only an issue for non-sync, opaque FDs,
in which case an appropriate VK_ERROR should be returned in the
corresponding host calls.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
10ba22db00 Do not copy invalid descriptor set image view handles
Also do the same filtering for descriptor and texel buffers

Spec defines what types must have valid handles,
e.g. VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, etc

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
fa12aebec9 Move vkUpdateDescriptorSets to hand-written mode
Do the same with vkQueueCommitDescriptorSetUpdatesGOOGLE

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Igor Chernyshev
6d2f549ccf Enable VK_KHR_create_renderpass2 in Guest
This is a part of the spec, and controls should be done on the host,
where special handling is actually [not yet] done

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1b33515a08 gfxstream: codegen: allow generating host/guest autogen separately
This allows codgen the guest encoders and host decoders are
separate steps, based on environment variables.  This is useful
since genRule (Android.bp) and custom_target (meson) both the
output files to explicitly listed.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Tom Cherry
6bb76947ae Do not pass std::shared_ptr when not transfering ownership
This goes against Google's C++ primer [1] and the Core C++ guidelines
[2]. It incurs additional runtime overhead to increase and
subsequently decrease the reference count without providing value,
since the parent function maintains the a reference to the object
through the duration of the function.

1: go/cpp-primer#unique_ptr - "In general, if you find yourself
wanting to use a pointer or reference to a unique_ptr, you're probably
not transferring ownership, so you should usually just pass a raw
pointer or reference to the underlying object, and keep unique_ptr out
of it."
2: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f7-for-general-use-take-t-or-t-arguments-rather-than-smart-pointers

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Yahan Zhou
8d8540772e Declare AHB blob unsupported in Vulkan
It diverged between old gralloc and minigbm.

Merged-In: If0c1896c6acef97db9ec3ae3abfe88eea333b42f
Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
5781ca340a genvk: options.filename --> args.target
Previously, for gfxstream the filename was "CMakeLists.txt",
but that was changed with the prior commit.  Not having a
filename doesn't affect codegen, but does throw an error
afterwards when timing statistics are thrown out.

Luckily, args.target and options.filename are more or less
synonymous in genvk.py, so use that.  This should be fairly
upstreamable too if we choose to do so.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
1e49af4f71 gfxstream: use absolute path for some code
Some code may be auto-generated, some may not be.

Eventually we want to move autogenerated code into specialized
directories, so it be generated but not necessarily checked
in [for certain cases].

Also, nuke codegen for CMakeLists.txt: we have multiple other
build systems now (Blueprint, meson), and it doesn't make
sense codegen one anymore.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00
Gurchetan Singh
bfacad0e96 gfxstream: nuke goldfish_vk_handlemap
Not used.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
2024-09-19 20:05:59 +00:00