Move shaders into glsl and hlsl directories
Move `data/shaders` to `data/shaders/glsl` Move `data/hlsl` to `data/shaders/hlsl` Fix up shader paths in the cpp files to point to the new glsl location. `data/shaders/hlsl/compile.py` still overwrites the glsl .spv files (for now). Issue: #723
This commit is contained in:
parent
cac1d2e850
commit
ca884587a4
1043 changed files with 1207 additions and 1201 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Vulkan Example - Minimal headless compute example
|
||||
* Vulkan Example - Minimal headless compute example
|
||||
*
|
||||
* Copyright (C) 2017 by Sascha Willems - www.saschawillems.de
|
||||
*
|
||||
|
|
@ -51,7 +51,7 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL debugMessageCallback(
|
|||
int32_t messageCode,
|
||||
const char* pLayerPrefix,
|
||||
const char* pMessage,
|
||||
void* pUserData)
|
||||
void* pUserData)
|
||||
{
|
||||
LOG("[VALIDATION]: %s - %s\n", pLayerPrefix, pMessage);
|
||||
return VK_FALSE;
|
||||
|
|
@ -62,7 +62,7 @@ class VulkanExample
|
|||
public:
|
||||
VkInstance instance;
|
||||
VkPhysicalDevice physicalDevice;
|
||||
VkDevice device;
|
||||
VkDevice device;
|
||||
uint32_t queueFamilyIndex;
|
||||
VkPipelineCache pipelineCache;
|
||||
VkQueue queue;
|
||||
|
|
@ -133,8 +133,8 @@ public:
|
|||
appInfo.pEngineName = "VulkanExample";
|
||||
appInfo.apiVersion = VK_API_VERSION_1_0;
|
||||
|
||||
/*
|
||||
Vulkan instance creation (without surface extensions)
|
||||
/*
|
||||
Vulkan instance creation (without surface extensions)
|
||||
*/
|
||||
VkInstanceCreateInfo instanceCreateInfo = {};
|
||||
instanceCreateInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
|
|
@ -197,10 +197,10 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Vulkan device creation
|
||||
/*
|
||||
Vulkan device creation
|
||||
*/
|
||||
// Physical device (always use first)
|
||||
// Physical device (always use first)
|
||||
uint32_t deviceCount = 0;
|
||||
VK_CHECK_RESULT(vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr));
|
||||
std::vector<VkPhysicalDevice> physicalDevices(deviceCount);
|
||||
|
|
@ -245,7 +245,7 @@ public:
|
|||
cmdPoolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
|
||||
VK_CHECK_RESULT(vkCreateCommandPool(device, &cmdPoolInfo, nullptr, &commandPool));
|
||||
|
||||
/*
|
||||
/*
|
||||
Prepare storage buffers
|
||||
*/
|
||||
std::vector<uint32_t> computeInput(BUFFER_ELEMENTS);
|
||||
|
|
@ -314,7 +314,7 @@ public:
|
|||
vkFreeCommandBuffers(device, commandPool, 1, ©Cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
Prepare compute pipeline
|
||||
*/
|
||||
{
|
||||
|
|
@ -351,7 +351,7 @@ public:
|
|||
pipelineCacheCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO;
|
||||
VK_CHECK_RESULT(vkCreatePipelineCache(device, &pipelineCacheCreateInfo, nullptr, &pipelineCache));
|
||||
|
||||
// Create pipeline
|
||||
// Create pipeline
|
||||
VkComputePipelineCreateInfo computePipelineCreateInfo = vks::initializers::computePipelineCreateInfo(pipelineLayout, 0);
|
||||
|
||||
// Pass SSBO size via specialization constant
|
||||
|
|
@ -365,9 +365,9 @@ public:
|
|||
shaderStage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
|
||||
shaderStage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
|
||||
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||
shaderStage.module = vks::tools::loadShader(androidapp->activity->assetManager, (getAssetPath() + "shaders/computeheadless/headless.comp.spv").c_str(), device);
|
||||
shaderStage.module = vks::tools::loadShader(androidapp->activity->assetManager, (getShadersPath() + "computeheadless/headless.comp.spv").c_str(), device);
|
||||
#else
|
||||
shaderStage.module = vks::tools::loadShader((getAssetPath() + "shaders/computeheadless/headless.comp.spv").c_str(), device);
|
||||
shaderStage.module = vks::tools::loadShader((getShadersPath() + "computeheadless/headless.comp.spv").c_str(), device);
|
||||
#endif
|
||||
shaderStage.pName = "main";
|
||||
shaderStage.pSpecializationInfo = &specializationInfo;
|
||||
|
|
@ -387,7 +387,7 @@ public:
|
|||
VK_CHECK_RESULT(vkCreateFence(device, &fenceCreateInfo, nullptr, &fence));
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
Command buffer creation (for compute work submission)
|
||||
*/
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue