mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
Fix some compile errors caused by cherry-picking an old commit
This commit is contained in:
parent
35df964d61
commit
581f6e428e
4 changed files with 5 additions and 10 deletions
|
@ -103,7 +103,7 @@ void VkDescriptorSetManager::UpdateFixedSet()
|
|||
WriteDescriptors update;
|
||||
update.AddCombinedImageSampler(FixedSet.get(), 0, fb->GetTextureManager()->Shadowmap.View.get(), fb->GetSamplerManager()->ShadowmapSampler.get(), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
||||
update.AddCombinedImageSampler(FixedSet.get(), 1, fb->GetTextureManager()->Lightmap.View.get(), fb->GetSamplerManager()->LightmapSampler.get(), VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
|
||||
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
update.AddAccelerationStructure(FixedSet.get(), 2, fb->GetRaytrace()->GetAccelStruct());
|
||||
update.Execute(fb->device.get());
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ void VkDescriptorSetManager::CreateFixedSetLayout()
|
|||
DescriptorSetLayoutBuilder builder;
|
||||
builder.AddBinding(0, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
builder.AddBinding(1, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1, VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
builder.AddBinding(2, VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1, VK_SHADER_STAGE_FRAGMENT_BIT);
|
||||
builder.DebugName("VkDescriptorSetManager.FixedSetLayout");
|
||||
FixedSetLayout = builder.Create(fb->device.get());
|
||||
|
@ -283,7 +283,7 @@ void VkDescriptorSetManager::CreateFixedSetPool()
|
|||
{
|
||||
DescriptorPoolBuilder poolbuilder;
|
||||
poolbuilder.AddPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 2 * maxSets);
|
||||
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
poolbuilder.AddPoolSize(VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1 * maxSets);
|
||||
poolbuilder.MaxSets(maxSets);
|
||||
poolbuilder.DebugName("VkDescriptorSetManager.FixedDescriptorPool");
|
||||
|
|
|
@ -55,7 +55,7 @@ void VkRaytrace::SetLevelMesh(hwrenderer::LevelMesh* mesh)
|
|||
{
|
||||
Reset();
|
||||
Mesh = mesh;
|
||||
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
if (fb->device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
{
|
||||
CreateVulkanObjects();
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ 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();
|
||||
if (fb->device->SupportsDeviceExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME))
|
||||
if (fb->device->SupportsExtension(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.
|
||||
|
|
|
@ -568,8 +568,3 @@ void VulkanRenderDevice::SetSceneRenderTarget(bool useSSAO)
|
|||
{
|
||||
mRenderState->SetRenderTarget(&GetBuffers()->SceneColor, GetBuffers()->SceneDepthStencil.View.get(), GetBuffers()->GetWidth(), GetBuffers()->GetHeight(), VK_FORMAT_R16G16B16A16_SFLOAT, GetBuffers()->GetSceneSamples());
|
||||
}
|
||||
|
||||
bool VulkanRenderDevice::RaytracingEnabled()
|
||||
{
|
||||
return vk_raytrace && device->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue