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

Commit

Permalink
Copy timeline_semaphore_simple to synchronization2_timeline_semaphore…
Browse files Browse the repository at this point in the history
…_simple
  • Loading branch information
bjoeris committed May 2, 2022
1 parent 7bd5a56 commit 94b1da9
Show file tree
Hide file tree
Showing 5 changed files with 560 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2019 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(timeline_semaphore_simple_shaders
SOURCES
cube.frag
cube.vert
SHADER_DEPS
shader_library
)

add_vulkan_sample_application(timeline_semaphore_simple
SOURCES main.cpp
LIBS
vulkan_helpers
MODELS
standard_models
SHADERS
timeline_semaphore_simple_shaders
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Timeline Semaphore Simple

Draws a simple cube on the screen. Inserts a timeline semaphore between
the VkAcquireNextImage and main Submission, and uses the same timeline
semaphore between the main submission and a dummy submission to signal
VkQueuePresentKHR.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2019 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.
*/

#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.
*
* 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

0 comments on commit 94b1da9

Please sign in to comment.