Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beau test app #1839

Open
wants to merge 70 commits into
base: dev
Choose a base branch
from
Open

Beau test app #1839

wants to merge 70 commits into from

Conversation

beau-lunarg
Copy link
Contributor

No description provided.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5210 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 5210 passed.

Copy link
Contributor

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks to be what I expect.

As the vk-bootstrap author, I want to suggest so many minor things because they were written for the 'library' which can't assume how the code will be used - whereas here we can make that assumption and remove it. But for the time being that is just fine, it won't hurt us to have.

This looks to be a fine base to create bespoke test cases with. None of my comments are fixes, just comments about the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy to look into rewriting this using the existing python codegen so that its consistent with the rest of the repo. Because vk-bootstrap is its own repo, it re-implements a lot of logic that can be removed by using gfxr common codegen.

Comment on lines +269 to +283
/* If headless mode is false, by default vk-bootstrap use the following logic to enable the windowing extensions

#if defined(_WIN32)
VK_KHR_win32_surface
#elif defined(__linux__)
VK_KHR_xcb_surface
VK_KHR_xlib_surface
VK_KHR_wayland_surface
#elif defined(__APPLE__)
VK_EXT_metal_surface
#elif defined(__ANDROID__)
VK_KHR_android_surface
#elif defined(_DIRECT2DISPLAY)
VK_KHR_display
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vk-bootstrap auto enables surface extensions which is fine for everything BUT linux. The code enables xcb, xlib, & wayland surface extensions if available. So its up to SDL to choose the right extension. Wanted to mention this behavior in case you think the code should enable only 1 surface extension at a time.

// Convenient named constants for passing to set_desired_min_image_count().
// Note that it is not an `enum class`, so its constants can be passed as an integer value without casting
// In other words, these might as well be `static const int`, but they benefit from being grouped together this way.
enum BufferMode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use enum class here :)

Comment on lines +47 to +66
VkQueue graphics_queue;
VkQueue present_queue;

std::vector<VkImage> depth_images;
std::vector<VmaAllocation> depth_image_allocations;
std::vector<VkImageView> depth_image_views;

std::vector<VkImage> render_targets;
std::vector<VmaAllocation> render_target_allocations;
std::vector<VkImageView> render_target_views;

std::vector<VkFramebuffer> framebuffers;

VkRenderPass render_pass;
VkPipelineLayout pipeline_layout;
VkPipeline graphics_pipeline;

VkCommandPool command_pools[MAX_FRAMES_IN_FLIGHT];

size_t current_frame = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These objects are going to be useful for a lot of test cases, would be worth sub classing TestAppBase with something like TestAppRenderLoopBase which adds the basic renderpass, color target, depth target, etc. Akin to Vulkan-Samples.

Fine to have this here for a first draft while we figure out what is "actually" common and what needs to be bespoke code per test.

davidlunarg and others added 28 commits November 22, 2024 11:01
Remove the hard-coded dependency of the DX12 GFXR codegen upon our
Vulkan and the Khronos registry edit functionality (which the DX
side really doesn't use).
This includes removing the dependency on the "base_generators"
directory as well.
NOTE: This did require copying a functionality (like write) from
the Khronos source to maintain consistency (so I added the Khronos
copyright notice to the dx12_generators/base_generator.py file).

The reason behind this is there are big changes coming to the Vulkan
side in preparation of supporting other Khronos APIs and these changes
could break DX12.
Retry when capture was SUCCESS and replay is NOT_READY. Continue in all
other cases, including when capture was NOT_READY and replay is SUCCESS.
When the replay --use-cached-psos option is not specified, clear the
cached PSO data from the ID3D12Device2::CreatePipelineState parameters,
similar to what is currently done for the ID3D12Device
CreateComputePipelineState and CreateGraphicsPipelineState methods.
Prevents uninitialized next/pNext.  The lower level decoders aren't
always setting values. Set a good state at initialization (zeros)

Layered API support.
Prevent collisions with other API consumers and decoders

Layered API support.
Split vulkan instance and device creation override into reusable
pieces suitable for layered API support (specifically OpenXR)

Make neeed information public for other replay consumers

Layered API support.
Vulkan captures unwrapped physical device handles, Layered API (like OpenXR)
captures wrapped handles.  During replay two HandleId's will reference the
same VkPhysical device.  The vulkan_alias is the handleId as known by the
vulkan_consumer, which will be created/updated, etc, by all Vulkan replay
calls.
Move replay options around that are shared between multiple
replay paths.

For layered API support.
Install page guard signal handler using AddSpecialSignalHandlerFn from
the libsigchain in the Android runtime. This prevents traced
applications from replacing our signal handler when they try to install
thier own signal handlers with sigaction.

This is implicitly enabled when using page_guard on Android and falls
back to sigaction if libsigchain isn't found or the add call fails.

If the signal handler watcher is enabled, the watcher thread will exit
as soon as our handler is successfully added with libsigchain.
* Fix descriptor info assert during capture

* Combine asserts
- various changes to state-writer: always provide shader-group-handles
- track bound pipelines in replay, retrieve map of old/new handles in CmdTraceRays
- Add a generic murmur32-implementation to util/hash.h
- Add a 'linear hashmap' type (cpu-flavor), populate with handles
- Add unit-test for linear_hashmap
The DestroyState() overrides added by 1644 should also do what the
default DestroyState is doing. This patch should address this omission
Fix invalid conversion errors by casting argument values to their target
platform full types. This fixes compilation issues for code like this:
```
VkWaylandSurfaceCreateInfoKHR waylandSurfaceCreateInfoKHR_17 {
  VkStructureType(1000006000),
  NULL,
  VkWaylandSurfaceCreateFlagsKHR(0),
  0,
  0x2000000,
};
```
which compiled with g++ 14.2.1 20240912 yields this:
```
src/frame_0000_0000.cpp:132:25:
  error: invalid conversion from ‘int’ to ‘wl_surface*’ [-fpermissive]
```
Use ID3D12GraphicsCommandList4ComPtr to release automatically.
…er (#1841)

* Combine common code from vulkan capture manager and vulkan state writer
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 308301.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 308301 lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.