-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
261 additions
and
192 deletions.
There are no files selected for viewing
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
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
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,27 @@ | ||
function(vull_add_shader name) | ||
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name}) | ||
set(binary ${CMAKE_CURRENT_BINARY_DIR}/${name}.spv) | ||
cmake_path(GET source EXTENSION extension) | ||
cmake_path(GET binary PARENT_PATH binary_dir) | ||
file(MAKE_DIRECTORY ${binary_dir}) | ||
message(STATUS "Adding output for ${binary}") | ||
if(${extension} STREQUAL ".vsl") | ||
# Vull shader. | ||
add_custom_command( | ||
OUTPUT ${binary} | ||
COMMAND vslc ${source} ${binary} | ||
DEPENDS ${source} | ||
VERBATIM) | ||
else() | ||
# GLSL. | ||
add_custom_command( | ||
OUTPUT ${binary} | ||
COMMAND ${GLSLC} -MD --target-env=vulkan1.3 ${source} -o ${binary} | ||
DEPENDS ${source} | ||
DEPFILE ${binary}.d | ||
VERBATIM) | ||
endif() | ||
|
||
# TODO: This shouldn't be needed. | ||
# set_property(TARGET vull APPEND PROPERTY OBJECT_DEPENDS ${binary}) | ||
endfunction() |
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
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
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,12 @@ | ||
#pragma once | ||
|
||
namespace vull { | ||
|
||
class TestDescriptor {}; | ||
|
||
} // namespace vull | ||
|
||
#define VULL_TEST_CASE(suite, name) \ | ||
static void suite##_##name(); \ | ||
[[gnu::section("vulltest"), gnu::used]] vull::TestDescriptor s_##suite##_##name##_descriptor; \ | ||
static void suite##_##name() |
Oops, something went wrong.