Enable device features, validation fixes

This commit is contained in:
saschawillems 2016-12-25 12:51:46 +01:00
parent aad384c3ce
commit 04fdd16076
3 changed files with 7 additions and 11 deletions

View file

@ -16,6 +16,11 @@ layout (binding = 0) uniform UBO
layout (location = 0) in int inInstanceIndex[]; layout (location = 0) in int inInstanceIndex[];
out gl_PerVertex
{
vec4 gl_Position;
};
void main() void main()
{ {
vec4 instancedPos = ubo.instancePos[inInstanceIndex[0]]; vec4 instancedPos = ubo.instancePos[inInstanceIndex[0]];

View file

@ -169,17 +169,6 @@ public:
// Semaphore used to synchronize between offscreen and final scene rendering // Semaphore used to synchronize between offscreen and final scene rendering
VkSemaphore offscreenSemaphore = VK_NULL_HANDLE; VkSemaphore offscreenSemaphore = VK_NULL_HANDLE;
// Device features to be enabled for this example
virtual VkPhysicalDeviceFeatures getEnabledFeatures()
{
VkPhysicalDeviceFeatures enabledFeatures{};
enabledFeatures.geometryShader = VK_TRUE;
enabledFeatures.shaderClipDistance = VK_TRUE;
enabledFeatures.shaderCullDistance = VK_TRUE;
enabledFeatures.shaderTessellationAndGeometryPointSize = VK_TRUE;
return enabledFeatures;
}
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION) VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
{ {
enableTextOverlay = true; enableTextOverlay = true;
@ -196,6 +185,8 @@ public:
camera.setPerspective(60.0f, (float)width / (float)height, zNear, zFar); camera.setPerspective(60.0f, (float)width / (float)height, zNear, zFar);
timerSpeed *= 0.25f; timerSpeed *= 0.25f;
paused = true; paused = true;
// Device features to be enabled for this example
enabledFeatures.geometryShader = VK_TRUE;
} }
~VulkanExample() ~VulkanExample()