diff --git a/data/shaders/glsl/multiview/multiview.vert b/data/shaders/glsl/multiview/multiview.vert index 4a893296..14a6dcc5 100644 --- a/data/shaders/glsl/multiview/multiview.vert +++ b/data/shaders/glsl/multiview/multiview.vert @@ -19,11 +19,6 @@ layout (binding = 0) uniform UBO vec4 lightPos; } ubo; -out gl_PerVertex -{ - vec4 gl_Position; -}; - void main() { outColor = inColor; diff --git a/data/shaders/glsl/multiview/multiview.vert.spv b/data/shaders/glsl/multiview/multiview.vert.spv index 69fc64cd..d217329b 100644 Binary files a/data/shaders/glsl/multiview/multiview.vert.spv and b/data/shaders/glsl/multiview/multiview.vert.spv differ diff --git a/data/shaders/glsl/multiview/viewdisplay.vert b/data/shaders/glsl/multiview/viewdisplay.vert index a5d60d0e..3a42f3c5 100644 --- a/data/shaders/glsl/multiview/viewdisplay.vert +++ b/data/shaders/glsl/multiview/viewdisplay.vert @@ -2,11 +2,6 @@ layout (location = 0) out vec2 outUV; -out gl_PerVertex -{ - vec4 gl_Position; -}; - void main() { outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2); diff --git a/data/shaders/glsl/multiview/viewdisplay.vert.spv b/data/shaders/glsl/multiview/viewdisplay.vert.spv index 4040f608..822048d7 100644 Binary files a/data/shaders/glsl/multiview/viewdisplay.vert.spv and b/data/shaders/glsl/multiview/viewdisplay.vert.spv differ diff --git a/examples/multiview/multiview.cpp b/examples/multiview/multiview.cpp index 20aa3d70..a73992f3 100644 --- a/examples/multiview/multiview.cpp +++ b/examples/multiview/multiview.cpp @@ -49,6 +49,8 @@ public: VkPipeline viewDisplayPipelines[2]; + VkPhysicalDeviceMultiviewFeaturesKHR physicalDeviceMultiviewFeatures{}; + // Camera and view properties float eyeSeparation = 0.08f; const float focalLength = 0.5f; @@ -69,6 +71,11 @@ public: // Reading device properties and features for multiview requires VK_KHR_get_physical_device_properties2 to be enabled enabledInstanceExtensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME); + + // Enable required extension features + physicalDeviceMultiviewFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR; + physicalDeviceMultiviewFeatures.multiview = VK_TRUE; + deviceCreatepNextChain = &physicalDeviceMultiviewFeatures; } ~VulkanExample() diff --git a/examples/tessellation/tessellation.cpp b/examples/tessellation/tessellation.cpp index 7bec8187..444a0789 100644 --- a/examples/tessellation/tessellation.cpp +++ b/examples/tessellation/tessellation.cpp @@ -93,6 +93,9 @@ public: else { wireframe = false; } + if (deviceFeatures.samplerAnisotropy) { + enabledFeatures.samplerAnisotropy = VK_TRUE; + } } void buildCommandBuffers() diff --git a/examples/texturecubemap/texturecubemap.cpp b/examples/texturecubemap/texturecubemap.cpp index 9a6fa606..33358541 100644 --- a/examples/texturecubemap/texturecubemap.cpp +++ b/examples/texturecubemap/texturecubemap.cpp @@ -84,6 +84,14 @@ public: uniformBuffers.skybox.destroy(); } + // Enable physical device features required for this example + virtual void getEnabledFeatures() + { + if (deviceFeatures.samplerAnisotropy) { + enabledFeatures.samplerAnisotropy = VK_TRUE; + } + } + void loadCubemap(std::string filename, VkFormat format, bool forceLinearTiling) { ktxResult result;