Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layers: Fix pMultisampleState ignore logic #7926

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"sub_dir": "Vulkan-Utility-Libraries",
"build_dir": "Vulkan-Utility-Libraries/build",
"install_dir": "Vulkan-Utility-Libraries/build/install",
"commit": "68780d9b8c4dd256e55a3df60969970cb29911ce",
"commit": "ad7f699a7b2b5deb66eb3de19f24aa33597ed65b",
"deps": [
{
"var_name": "VULKAN_HEADERS_INSTALL_DIR",
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/nvidia_best_practices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,12 @@ TEST_F(VkNvidiaBestPracticesLayerTest, BindPipeline_SwitchTessGeometryMesh)

CreatePipelineHelper vsPipe(*this, &pipeline_rendering_info);
vsPipe.shader_stages_ = {vs.GetStageCreateInfo()};
vsPipe.rs_state_ci_.rasterizerDiscardEnable = VK_TRUE;
vsPipe.CreateGraphicsPipeline();

CreatePipelineHelper vgsPipe(*this, &pipeline_rendering_info);
vgsPipe.shader_stages_ = {vs.GetStageCreateInfo(), gs.GetStageCreateInfo()};
vgsPipe.rs_state_ci_.rasterizerDiscardEnable = VK_TRUE;
vgsPipe.CreateGraphicsPipeline();

m_commandBuffer->begin();
Expand Down
16 changes: 16 additions & 0 deletions tests/unit/pipeline_positive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,22 @@ TEST_F(PositivePipeline, CombinedImageSamplerConsumedAsBoth) {
pipe.CreateComputePipeline();
}

TEST_F(PositivePipeline, IgnoredMultisampleState) {
TEST_DESCRIPTION("https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5931");
RETURN_IF_SKIP(Init());
InitRenderTarget();

const uint64_t fake_address_64 = 0xCDCDCDCDCDCDCDCD;
const uint64_t fake_address_32 = 0xCDCDCDCD;
void *bad_pointer = sizeof(void *) == 8 ? reinterpret_cast<void *>(fake_address_64) : reinterpret_cast<void *>(fake_address_32);

CreatePipelineHelper pipe(*this);
pipe.shader_stages_ = {pipe.vs_->GetStageCreateInfo()};
pipe.rs_state_ci_.rasterizerDiscardEnable = VK_TRUE;
pipe.gp_ci_.pMultisampleState = reinterpret_cast<const VkPipelineMultisampleStateCreateInfo *>(bad_pointer);
pipe.CreateGraphicsPipeline();
}

TEST_F(PositivePipeline, CreateGraphicsPipelineWithIgnoredPointers) {
TEST_DESCRIPTION("Create Graphics Pipeline with pointers that must be ignored by layers");
SetTargetApiVersion(VK_API_VERSION_1_1);
Expand Down