This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy timeline_semaphore_simple to synchronization2_timeline_semaphore…
…_simple
- Loading branch information
Showing
5 changed files
with
560 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
application_sandbox/synchronization2_timeline_semaphore_simple/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |
6 changes: 6 additions & 0 deletions
6
application_sandbox/synchronization2_timeline_semaphore_simple/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
25 changes: 25 additions & 0 deletions
25
application_sandbox/synchronization2_timeline_semaphore_simple/cube.frag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
32 changes: 32 additions & 0 deletions
32
application_sandbox/synchronization2_timeline_semaphore_simple/cube.vert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
Oops, something went wrong.