Add statically disabled geometry shaders on mobile

This commit is contained in:
Wojtek Figat
2024-03-30 22:08:44 +01:00
parent 369c19bd5d
commit e1944bce96
17 changed files with 74 additions and 8 deletions

View File

@@ -352,7 +352,7 @@ bool GPUDeviceDX11::Init()
_device->CheckFeatureSupport(D3D11_FEATURE_D3D11_OPTIONS2, &featureDataD3D11Options2, sizeof(featureDataD3D11Options2));
limits.HasCompute = d3D10XHardwareOptions.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x != 0;
limits.HasTessellation = GPU_ALLOW_TESSELLATION_SHADERS;
limits.HasGeometryShaders = true;
limits.HasGeometryShaders = GPU_ALLOW_GEOMETRY_SHADERS;
limits.HasInstancing = true;
limits.HasVolumeTextureRendering = true;
limits.HasDrawIndirect = true;
@@ -376,7 +376,7 @@ bool GPUDeviceDX11::Init()
{
limits.HasCompute = false;
limits.HasTessellation = false;
limits.HasGeometryShaders = true;
limits.HasGeometryShaders = GPU_ALLOW_GEOMETRY_SHADERS;
limits.HasInstancing = true;
limits.HasVolumeTextureRendering = false;
limits.HasDrawIndirect = false;

View File

@@ -92,6 +92,7 @@ GPUShaderProgram* GPUShaderDX11::CreateGPUShaderProgram(ShaderStage type, const
shader = New<GPUShaderProgramVSDX11>(initializer, buffer, inputLayout, inputLayoutSize);
break;
}
#if GPU_ALLOW_TESSELLATION_SHADERS
case ShaderStage::Hull:
{
// Read control points
@@ -118,6 +119,8 @@ GPUShaderProgram* GPUShaderDX11::CreateGPUShaderProgram(ShaderStage type, const
shader = New<GPUShaderProgramDSDX11>(initializer, buffer);
break;
}
#endif
#if GPU_ALLOW_GEOMETRY_SHADERS
case ShaderStage::Geometry:
{
// Create shader
@@ -129,6 +132,7 @@ GPUShaderProgram* GPUShaderDX11::CreateGPUShaderProgram(ShaderStage type, const
shader = New<GPUShaderProgramGSDX11>(initializer, buffer);
break;
}
#endif
case ShaderStage::Pixel:
{
// Create shader

View File

@@ -122,6 +122,7 @@ public:
}
};
#if GPU_ALLOW_TESSELLATION_SHADERS
/// <summary>
/// Hull Shader for DirectX 11 backend.
/// </summary>
@@ -159,7 +160,9 @@ public:
{
}
};
#endif
#if GPU_ALLOW_GEOMETRY_SHADERS
/// <summary>
/// Geometry Shader for DirectX 11 backend.
/// </summary>
@@ -177,6 +180,7 @@ public:
{
}
};
#endif
/// <summary>
/// Pixel Shader for DirectX 11 backend.