Skip to content

Commit

Permalink
Only define SUPPORTS_RAYTRACING if it was detected
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas authored and coelckers committed Jun 22, 2022
1 parent e0907f6 commit 5aa0fb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/rendering/vulkan/shaders/vk_shader.cpp
Expand Up @@ -351,7 +351,8 @@ std::unique_ptr<VulkanShader> VkShaderManager::LoadVertShader(FString shadername
std::unique_ptr<VulkanShader> VkShaderManager::LoadFragShader(FString shadername, const char *frag_lump, const char *material_lump, const char *light_lump, const char *defines, bool alphatest, bool gbufferpass)
{
FString code = GetTargetGlslVersion();
code << "\n#define SUPPORTS_RAYTRACING\n";
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
code << "\n#define SUPPORTS_RAYTRACING\n";
code << defines;
code << "\n$placeholder$"; // here the code can later add more needed #defines.
code << "\n#define MAX_STREAM_DATA " << std::to_string(MAX_STREAM_DATA).c_str() << "\n";
Expand Down

0 comments on commit 5aa0fb5

Please sign in to comment.