Просмотр исходного кода

WIP: Getting Vulkan up to date
- Enabled KHR_maintenance1 extension
- Make sure depth buffer is bound as read-only when SSR stencil shader executes

BearishSun 8 лет назад
Родитель
Сommit
4213508f92

+ 4 - 1
Source/BansheeVulkanRenderAPI/BsVulkanDevice.cpp

@@ -78,7 +78,10 @@ namespace bs { namespace ct
 		}
 		}
 
 
 		// Create logical device
 		// Create logical device
-		const char* extensions[] = { VK_KHR_SWAPCHAIN_EXTENSION_NAME };
+		const char* extensions[] = { 
+			VK_KHR_SWAPCHAIN_EXTENSION_NAME,
+			VK_KHR_MAINTENANCE1_EXTENSION_NAME
+		};
 		uint32_t numExtensions = sizeof(extensions) / sizeof(extensions[0]);
 		uint32_t numExtensions = sizeof(extensions) / sizeof(extensions[0]);
 
 
 		VkDeviceCreateInfo deviceInfo;
 		VkDeviceCreateInfo deviceInfo;

+ 1 - 1
Source/RenderBeast/BsRenderCompositor.cpp

@@ -1853,7 +1853,7 @@ namespace bs { namespace ct
 			SSRStencilMat* stencilMat = SSRStencilMat::getVariation(viewProps.numSamples > 1, true);
 			SSRStencilMat* stencilMat = SSRStencilMat::getVariation(viewProps.numSamples > 1, true);
 
 
 			// Note: Making the assumption that the stencil buffer is clear at this point
 			// Note: Making the assumption that the stencil buffer is clear at this point
-			rapi.setRenderTarget(resolvedSceneDepthNode->output->renderTexture);
+			rapi.setRenderTarget(resolvedSceneDepthNode->output->renderTexture, FBT_DEPTH, RT_DEPTH_STENCIL);
 			stencilMat->execute(inputs.view, gbuffer, settings);
 			stencilMat->execute(inputs.view, gbuffer, settings);
 
 
 			SPtr<PooledRenderTexture> traceOutput = resPool.get(POOLED_RENDER_TEXTURE_DESC::create2D(PF_RGBA16F, width, 
 			SPtr<PooledRenderTexture> traceOutput = resPool.get(POOLED_RENDER_TEXTURE_DESC::create2D(PF_RGBA16F, width,