Skip to content

Commit

Permalink
tests: Remove VK_LAYER_TESTS_VALIDATION_FEATURES
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg committed Jun 18, 2024
1 parent 346dc33 commit bfcd01e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
32 changes: 0 additions & 32 deletions tests/framework/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,34 +153,6 @@ VkInstanceCreateInfo VkRenderFramework::GetInstanceCreateInfo() const {
return info;
}

void *VkRenderFramework::SetupValidationSettings(void *first_pnext) {
auto validation = GetEnvironment("VK_LAYER_TESTS_VALIDATION_FEATURES");
vvl::ToLower(validation);
VkValidationFeaturesEXT *features = vku::FindStructInPNextChain<VkValidationFeaturesEXT>(first_pnext);
if (validation == "all" || validation == "core" || validation == "none") {
if (!features) {
features = &m_validation_features;
features->sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT;
features->pNext = first_pnext;
first_pnext = features;
}

if (validation == "all") {
features->enabledValidationFeatureCount = 4;
features->pEnabledValidationFeatures = validation_enable_all;
features->disabledValidationFeatureCount = 0;
} else if (validation == "core") {
features->disabledValidationFeatureCount = 0;
} else if (validation == "none") {
features->disabledValidationFeatureCount = 1;
features->pDisabledValidationFeatures = &validation_disable_all;
features->enabledValidationFeatureCount = 0;
}
}

return first_pnext;
}

void VkRenderFramework::InitFramework(void *instance_pnext) {
ASSERT_EQ((VkInstance)0, instance_);

Expand Down Expand Up @@ -242,10 +214,6 @@ void VkRenderFramework::InitFramework(void *instance_pnext) {

auto ici = GetInstanceCreateInfo();

// If is validation features then check for disabled validation

instance_pnext = SetupValidationSettings(instance_pnext);

// concatenate pNexts
void *last_pnext = nullptr;
if (instance_pnext) {
Expand Down
9 changes: 0 additions & 9 deletions tests/framework/render.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ class VkRenderFramework : public VkTestFramework {
// struct, so be sure to call SetTargetApiVersion before
void AddDisabledFeature(vkt::Feature feature);

void *SetupValidationSettings(void *first_pnext);

template <typename GLSLContainer>
std::vector<uint32_t> GLSLToSPV(VkShaderStageFlagBits stage, const GLSLContainer &code,
const spv_target_env env = SPV_ENV_VULKAN_1_0) {
Expand Down Expand Up @@ -245,13 +243,6 @@ class VkRenderFramework : public VkTestFramework {
// Device extensions to enable
std::vector<const char *> m_device_extension_names;

VkValidationFeaturesEXT m_validation_features;
VkValidationFeatureEnableEXT validation_enable_all[4] = {VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT,
VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT,
VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT,
VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT};
VkValidationFeatureDisableEXT validation_disable_all = VK_VALIDATION_FEATURE_DISABLE_ALL_EXT;

private:
// TODO - move to own helper logic
vkt::Framebuffer *m_framebuffer;
Expand Down

0 comments on commit bfcd01e

Please sign in to comment.