mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Only define SUPPORTS_RAYTRACING if it was detected
This commit is contained in:
parent
e0907f62d5
commit
5aa0fb536f
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
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();
|
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 << defines;
|
||||||
code << "\n$placeholder$"; // here the code can later add more needed #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";
|
code << "\n#define MAX_STREAM_DATA " << std::to_string(MAX_STREAM_DATA).c_str() << "\n";
|
||||||
|
|
Loading…
Reference in a new issue