aboutsummaryrefslogtreecommitdiff
path: root/tests/vklayertests_buffer_image_memory_sampler.cpp
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2019-07-16 15:44:48 -0600
committerMark Lobodzinski <mark@lunarg.com>2019-07-18 16:05:56 -0600
commit25734589b76eca94d297430d51a5cabe106c9bdc (patch)
tree9a061f9ebf9f3544f08060fbc3e261c0bf128cb8 /tests/vklayertests_buffer_image_memory_sampler.cpp
parent0e65e191c4b9044d8e42727cc82ccc04d8055b0a (diff)
downloadvulkan-validation-layers-25734589b76eca94d297430d51a5cabe106c9bdc.tar.gz
corechecks: Make vertex buffers use object_bindings
Command buffers treated vertex buffers differently than other buffers as far as in_use bound objects went. Reconciled. Change-Id: Ia98c019eb8b3c18e784ba31dd7496d30cceb7b4a
Diffstat (limited to 'tests/vklayertests_buffer_image_memory_sampler.cpp')
-rw-r--r--tests/vklayertests_buffer_image_memory_sampler.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/vklayertests_buffer_image_memory_sampler.cpp b/tests/vklayertests_buffer_image_memory_sampler.cpp
index a507c1a67..11a45d59a 100644
--- a/tests/vklayertests_buffer_image_memory_sampler.cpp
+++ b/tests/vklayertests_buffer_image_memory_sampler.cpp
@@ -4496,9 +4496,6 @@ TEST_F(VkLayerTest, VertexBufferInvalid) {
"Submit a command buffer using deleted vertex buffer, delete a buffer twice, use an invalid offset for each buffer type, "
"and attempt to bind a null buffer");
- const char *deleted_buffer_in_command_buffer = "UNASSIGNED-CoreValidation-DrawState-InvalidBuffer";
- const char *invalid_offset_message = "VUID-vkBindBufferMemory-memoryOffset-01036";
-
ASSERT_NO_FATAL_FAILURE(Init());
ASSERT_NO_FATAL_FAILURE(InitViewport());
ASSERT_NO_FATAL_FAILURE(InitRenderTarget());
@@ -4511,23 +4508,23 @@ TEST_F(VkLayerTest, VertexBufferInvalid) {
m_commandBuffer->begin();
m_commandBuffer->BeginRenderPass(m_renderPassBeginInfo);
vkCmdBindPipeline(m_commandBuffer->handle(), VK_PIPELINE_BIND_POINT_GRAPHICS, pipe.pipeline_);
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "CoreValidation-DrawState-InvalidCommandBuffer-VkBuffer");
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT,
+ "CoreValidation-DrawState-InvalidCommandBuffer-VkDeviceMemory");
{
- // Create and bind a vertex buffer in a reduced scope, which will cause
- // it to be deleted upon leaving this scope
+ // Create and bind a vertex buffer in a reduced scope, which will cause it to be deleted upon leaving this scope
const float vbo_data[3] = {1.f, 0.f, 1.f};
VkVerticesObj draw_verticies(m_device, 1, 1, sizeof(vbo_data[0]), sizeof(vbo_data) / sizeof(vbo_data[0]), vbo_data);
draw_verticies.BindVertexBuffers(m_commandBuffer->handle());
draw_verticies.AddVertexInputToPipeHelpr(&pipe);
- }
- m_commandBuffer->Draw(1, 0, 0, 0);
+ m_commandBuffer->Draw(1, 0, 0, 0);
- m_commandBuffer->EndRenderPass();
- m_commandBuffer->end();
+ m_commandBuffer->EndRenderPass();
+ }
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, deleted_buffer_in_command_buffer);
- m_commandBuffer->QueueCommandBuffer(false);
+ vkEndCommandBuffer(m_commandBuffer->handle());
m_errorMonitor->VerifyFound();
{
@@ -4542,7 +4539,7 @@ TEST_F(VkLayerTest, VertexBufferInvalid) {
m_errorMonitor->SetUnexpectedError("value of pCreateInfo->usage must not be 0");
if (VkBufferTest::GetTestConditionValid(m_device, VkBufferTest::eInvalidMemoryOffset)) {
// Create and bind a memory buffer with an invalid offset.
- m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, invalid_offset_message);
+ m_errorMonitor->SetDesiredFailureMsg(VK_DEBUG_REPORT_ERROR_BIT_EXT, "VUID-vkBindBufferMemory-memoryOffset-01036");
m_errorMonitor->SetUnexpectedError(
"If buffer was created with the VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, "
"memoryOffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment");