Fixing several validation related issues
This commit is contained in:
parent
6f723ea1e0
commit
a5022d6d5f
7 changed files with 18 additions and 10 deletions
|
|
@ -19,11 +19,6 @@ layout (binding = 0) uniform UBO
|
|||
vec4 lightPos;
|
||||
} ubo;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = inColor;
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -93,6 +93,9 @@ public:
|
|||
else {
|
||||
wireframe = false;
|
||||
}
|
||||
if (deviceFeatures.samplerAnisotropy) {
|
||||
enabledFeatures.samplerAnisotropy = VK_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void buildCommandBuffers()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue