update vulkan samples with SPIR-V shaders

This commit is contained in:
Rutwik Choughule
2021-06-02 17:17:21 +05:30
parent 5c3ec60fae
commit 7a5b3e6c8c
17 changed files with 2368 additions and 2116 deletions

View File

@@ -19,8 +19,17 @@ For Linux:
-- Install "libxcb1-dev" and "xorg-dev" as GLFW3 is depended on it
-- Add Vulkan and GLFW3 libraries directories to LD_LIBRARY_PATH
For Linux aarch64(L4T):
-- Install GLFW3 library using "sudo apt-get install libglfw3-dev" this will provide glfw3
-- install above will also provide libvulkan-dev as dependencies
-- Add Vulkan and GLFW3 libraries directories to LD_LIBRARY_PATH
-- Pass path to vulkan sdk while building 'make VULKAN_SDK_PATH=<PATH_TO_VULKAN_SDK>', VULKAN_SDK_PATH in this scenario is typically "/usr"
-- Pass path to vulkan sdk while building 'make VULKAN_SDK_PATH=<PATH_TO_VULKAN_SDK>', VULKAN_SDK_PATH in this scenario is typically "/usr"
For Shader changes:
-- Update the sinewave.vert and/or sinewave.frag shader source file as required
-- Use the glslc shader compiler from the installed Vulkan SDK's bin directory to compile shaders as:
glslc sinewave.vert -o vert.spv
glslc sinewave.frag -o frag.spv
** Make sure to add glslc's path in your PATH environment variable **

Binary file not shown.

View File

@@ -92,9 +92,9 @@ class VulkanCudaSineWave : public VulkanBaseApp {
}
// Add our compiled vulkan shader files
char *vertex_shader_path =
sdkFindFilePath("sinewave.vert", execution_path.c_str());
sdkFindFilePath("vert.spv", execution_path.c_str());
char *fragment_shader_path =
sdkFindFilePath("sinewave.frag", execution_path.c_str());
sdkFindFilePath("frag.spv", execution_path.c_str());
m_shaderFiles.push_back(
std::make_pair(VK_SHADER_STAGE_VERTEX_BIT, vertex_shader_path));
m_shaderFiles.push_back(

Binary file not shown.