Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Add synchronization2_timeline_semaphore_simple #237

Merged
merged 2 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion application_sandbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ add_vulkan_subdirectory(subgroup_ballot)
add_vulkan_subdirectory(swapchain_colorspace)
add_vulkan_subdirectory(subgroup_vote)
add_vulkan_subdirectory(synchronization2_async_compute)
add_vulkan_subdirectory(synchronization2_set_event)
add_vulkan_subdirectory(synchronization2_blit_image)
add_vulkan_subdirectory(synchronization2_set_event)
add_vulkan_subdirectory(synchronization2_timeline_semaphore_simple)
add_vulkan_subdirectory(synchronization2_write_timestamp)
add_vulkan_subdirectory(texel_buffer_alignment)
add_vulkan_subdirectory(textured_cube)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2022 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

add_shader_library(synchronization2_timeline_semaphore_simple_shaders
SOURCES
cube.frag
cube.vert
SHADER_DEPS
shader_library
)

add_vulkan_sample_application(synchronization2_timeline_semaphore_simple
SOURCES main.cpp
LIBS
vulkan_helpers
MODELS
standard_models
SHADERS
synchronization2_timeline_semaphore_simple_shaders
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Timeline Semaphore Simple (VK_KHR_synchronization2 version)

This is based on the timeline_semaphore_simple sample, using the VK_KHR_synchronization2
extension. Specifically, this uses the vkQueueSubmit2KHR and VkSemaphoreSubmitInfoKHR.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2019 Google Inc.
bjoeris marked this conversation as resolved.
Show resolved Hide resolved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#version 450

layout(location = 0) out vec4 out_color;
layout (location = 1) in vec2 texcoord;



void main() {
out_color = vec4(texcoord, 0.0, 1.0);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* Copyright 2019 Google Inc.
bjoeris marked this conversation as resolved.
Show resolved Hide resolved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#version 450
#include "models/model_setup.glsl"

layout (location = 1) out vec2 texcoord;

layout (binding = 0, set = 0) uniform camera_data {
layout(column_major) mat4x4 projection;
};

layout (binding = 1, set = 0) uniform model_data {
layout(column_major) mat4x4 transform;
};

void main() {
gl_Position = projection * transform * get_position();
texcoord = get_texcoord();
}
Loading