Add support for Geometry Shaders on Vulkan

#136
This commit is contained in:
Wojtek Figat
2021-05-18 11:41:18 +02:00
parent 9cba6bad6d
commit 2e93a7fd08
2 changed files with 4 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ bool DepthOfFieldPass::Init()
_platformSupportsBokeh = _platformSupportsDoF && limits.HasGeometryShaders && limits.HasDrawIndirect && limits.HasAppendConsumeBuffers;
_platformSupportsBokeh &= GPUDevice::Instance->GetRendererType() != RendererType::DirectX12; // TODO: fix bokeh crash on d3d12 (driver issue probably - started to happen recently)
_platformSupportsBokeh &= GPUDevice::Instance->GetRendererType() != RendererType::Vulkan; // TODO: add bokeh on Vulkan (draw indirect with UA output from PS)
// Create pipeline states
if (_platformSupportsDoF)

View File

@@ -259,6 +259,9 @@ META_VS_IN_ELEMENT(TEXCOORD, 0, R32G32_FLOAT, 0, ALIGN, PER_VERTEX, 0, true)
Quad_VS2GS VS_WriteToSlice(float2 position : POSITION0, float2 texCoord : TEXCOORD0, uint layerIndex : SV_InstanceID)
{
Quad_VS2GS output;
#if VULKAN
position.y = position.y * -1.0f;
#endif
output.Vertex.Position = float4(position, 0, 1);
output.Vertex.TexCoord = texCoord;
output.LayerIndex = layerIndex;