Skip to content

Commit

Permalink
layers: Remove GPL StageCount VU
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-lunarg authored and jeremyg-lunarg committed Jan 10, 2024
1 parent ef8339e commit 780c653
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 29 deletions.
14 changes: 7 additions & 7 deletions layers/stateless/sl_pipeline.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Copyright (c) 2015-2023 The Khronos Group Inc.
* Copyright (c) 2015-2023 Valve Corporation
* Copyright (c) 2015-2023 LunarG, Inc.
* Copyright (C) 2015-2023 Google Inc.
/* Copyright (c) 2015-2024 The Khronos Group Inc.
* Copyright (c) 2015-2024 Valve Corporation
* Copyright (c) 2015-2024 LunarG, Inc.
* Copyright (C) 2015-2024 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -292,9 +292,9 @@ bool StatelessValidation::manual_PreCallValidateCreateGraphicsPipelines(

if (graphics_lib_info && (graphics_lib_info->flags & (VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT |
VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT))) {
skip |= ValidateArray(create_info_loc.dot(Field::stageCount), create_info_loc.dot(Field::pStages),
create_info.stageCount, &create_info.pStages, true, true,
"VUID-VkGraphicsPipelineCreateInfo-flags-06644", "VUID-VkGraphicsPipelineCreateInfo-flags-06640");
skip |=
ValidateArray(create_info_loc.dot(Field::stageCount), create_info_loc.dot(Field::pStages), create_info.stageCount,
&create_info.pStages, false, true, kVUIDUndefined, "VUID-VkGraphicsPipelineCreateInfo-flags-06640");
}

// <VkDynamicState, index in pDynamicStates, hash for enum key>
Expand Down
9 changes: 4 additions & 5 deletions tests/unit/gpu_av_oob.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Copyright (c) 2020-2023 The Khronos Group Inc.
* Copyright (c) 2020-2023 Valve Corporation
* Copyright (c) 2020-2023 LunarG, Inc.
* Copyright (c) 2020-2023 Google, Inc.
* Copyright (c) 2020-2024 The Khronos Group Inc.
* Copyright (c) 2020-2024 Valve Corporation
* Copyright (c) 2020-2024 LunarG, Inc.
* Copyright (c) 2020-2024 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -563,7 +563,6 @@ TEST_F(NegativeGpuAVOOB, GPL) {
const auto render_pass = pre_raster.gp_ci_.renderPass;
const auto subpass = pre_raster.gp_ci_.subpass;

m_errorMonitor->SetAllowedFailureMsg("VUID-VkGraphicsPipelineCreateInfo-flags-06644");
CreatePipelineHelper fragment(*this);
fragment.InitFragmentLibInfo(nullptr);
fragment.gp_ci_.stageCount = 0;
Expand Down
17 changes: 0 additions & 17 deletions tests/unit/graphics_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,22 +869,6 @@ TEST_F(NegativeGraphicsLibrary, FragmentStateWithPreRaster) {
m_errorMonitor->VerifyFound();
}

TEST_F(NegativeGraphicsLibrary, StageCount) {
RETURN_IF_SKIP(InitBasicGraphicsLibrary());
InitRenderTarget();

CreatePipelineHelper pre_raster_lib(*this);
const auto vs_spv = GLSLToSPV(VK_SHADER_STAGE_VERTEX_BIT, kVertexMinimalGlsl);
vkt::GraphicsPipelineLibraryStage vs_stage(vs_spv, VK_SHADER_STAGE_VERTEX_BIT);
pre_raster_lib.InitPreRasterLibInfo(&vs_stage.stage_ci);
pre_raster_lib.InitState();
pre_raster_lib.gp_ci_.stageCount = 0;
pre_raster_lib.gp_ci_.layout = pre_raster_lib.pipeline_layout_.handle();
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkGraphicsPipelineCreateInfo-flags-06644");
pre_raster_lib.CreateGraphicsPipeline(false);
m_errorMonitor->VerifyFound();
}

TEST_F(NegativeGraphicsLibrary, NullStages) {
RETURN_IF_SKIP(InitBasicGraphicsLibrary());
InitRenderTarget();
Expand All @@ -910,7 +894,6 @@ TEST_F(NegativeGraphicsLibrary, MissingShaderStages) {
pipe.InitState();

// set in stateless
m_errorMonitor->SetAllowedFailureMsg("VUID-VkGraphicsPipelineCreateInfo-flags-06644");
// 02096 is effectively unrelated, but gets triggered due to lack of mesh shader extension
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkGraphicsPipelineCreateInfo-stage-02096");
m_errorMonitor->SetDesiredFailureMsg(kErrorBit, "VUID-VkGraphicsPipelineCreateInfo-pStages-06896");
Expand Down

0 comments on commit 780c653

Please sign in to comment.