Vulkan: Enable Device Features for EEVEE-Next
This PR enabled device features that are required for EEVEE-Next. Enabling these features would allow an initial screen drawn by EEVEE-Next. Note: * Changes to EEVEE-Next after this commit, might require other changes * Not all features are working, but a basic diffuse cube without shadows is. * Vulkan views are not correct and leads to incorrect lighting. Pull Request: https://projects.blender.org/blender/blender/pulls/112519
This commit is contained in:
parent
f7ccec2bcc
commit
915256eb0a
|
@ -102,7 +102,7 @@ static bool vklayer_config_exist(const char *vk_extension_config)
|
|||
{
|
||||
const char *ev_val = getenv("VK_LAYER_PATH");
|
||||
if (ev_val == nullptr) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
std::stringstream filename;
|
||||
filename << ev_val;
|
||||
|
@ -229,9 +229,16 @@ class GHOST_DeviceVK {
|
|||
device_features.multiViewport = VK_TRUE;
|
||||
#endif
|
||||
device_features.drawIndirectFirstInstance = VK_TRUE;
|
||||
device_features.fragmentStoresAndAtomics = VK_TRUE;
|
||||
|
||||
VkPhysicalDeviceVulkan12Features device_12_features = {};
|
||||
device_12_features.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES;
|
||||
device_12_features.shaderOutputLayer = VK_TRUE;
|
||||
device_12_features.shaderOutputViewportIndex = VK_TRUE;
|
||||
|
||||
VkPhysicalDeviceMaintenance4FeaturesKHR maintenance_4 = {};
|
||||
maintenance_4.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR;
|
||||
maintenance_4.pNext = &device_12_features;
|
||||
maintenance_4.maintenance4 = VK_TRUE;
|
||||
|
||||
/* Enable shader draw parameters on logical device when supported on physical device. */
|
||||
|
|
Loading…
Reference in New Issue