Skip to content

Commit

Permalink
tests: Add missing shader object tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ziga-lunarg authored and spencer-lunarg committed Jan 7, 2025
1 parent b842783 commit deb7f44
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/unit/shader_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7209,3 +7209,31 @@ TEST_F(NegativeShaderObject, PushConstantNotDeclared) {
push_constant_range.offset = 0u;
const vkt::Shader validShader(*m_device, createInfo);
}

TEST_F(NegativeShaderObject, BindWithoutFeature) {
TEST_DESCRIPTION("Use vkCmdBindShadersEXT without enabling shaderObject feature");

AddRequiredExtensions(VK_EXT_SHADER_OBJECT_EXTENSION_NAME);
RETURN_IF_SKIP(Init());
m_command_buffer.Begin();
VkShaderStageFlagBits stage = VK_SHADER_STAGE_FRAGMENT_BIT;
VkShaderEXT handle = VK_NULL_HANDLE;
m_errorMonitor->SetDesiredError("VUID-vkCmdBindShadersEXT-None-08462");
vk::CmdBindShadersEXT(m_command_buffer.handle(), 1u, &stage, &handle);
m_errorMonitor->VerifyFound();
m_command_buffer.End();
}

TEST_F(NegativeShaderObject, InvalidRayTracingStage) {
TEST_DESCRIPTION("Use vkCmdBindShadersEXT without enabling shaderObject feature");

RETURN_IF_SKIP(InitBasicShaderObject());

m_command_buffer.Begin();
VkShaderStageFlagBits stage = VK_SHADER_STAGE_RAYGEN_BIT_KHR;
VkShaderEXT handle = VK_NULL_HANDLE;
m_errorMonitor->SetDesiredError("VUID-vkCmdBindShadersEXT-pStages-08465");
vk::CmdBindShadersEXT(m_command_buffer.handle(), 1u, &stage, &handle);
m_errorMonitor->VerifyFound();
m_command_buffer.End();
}

0 comments on commit deb7f44

Please sign in to comment.