// record resetting event
vk.cmdResetEvent(*primCmdBuf, *event,stageMask);
- };
+ }
}
endCommandBuffer(vk, *primCmdBuf);
// record resetting event
vk.cmdResetEvent(*primCmdBuf, *event,stageMask);
- };
+ }
}
// end recording of secondary buffers
&secBufferInheritInfo,
};
- // Create an occlusion query with VK_QUERY_CONTROL_PRECISE_BIT set
const VkQueryPoolCreateInfo queryPoolCreateInfo =
{
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, // sType
VK_CHECK(vk.beginCommandBuffer(primCmdBuf.get(), &primBufferBeginInfo));
{
vk.cmdResetQueryPool(primCmdBuf.get(), queryPool.get(), 0u, 1u);
- vk.cmdBeginQuery(primCmdBuf.get(), queryPool.get(), 0u, VK_QUERY_CONTROL_PRECISE_BIT);
+ vk.cmdBeginQuery(primCmdBuf.get(), queryPool.get(), 0u, 0u);
{
vk.cmdExecuteCommands(primCmdBuf.get(), 1u, &secCmdBuf.get());
}
}
endCommandBuffer(vk, primCmdBuf.get());
- return tcu::TestStatus::pass("Successfully recorded a secondary command buffer allowing a precise occlusion query.");
+ return tcu::TestStatus::pass("Successfully recorded an imprecise query with a secondary command buffer allowing a precise occlusion query.");
}
tcu::TestStatus recordBufferQueryImpreciseWithoutFlagTest(Context& context)
&secBufferInheritInfo,
};
- // Create an occlusion query with VK_QUERY_CONTROL_PRECISE_BIT set
const VkQueryPoolCreateInfo queryPoolCreateInfo =
{
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, // sType
VK_CHECK(vk.beginCommandBuffer(primCmdBuf.get(), &primBufferBeginInfo));
{
vk.cmdResetQueryPool(primCmdBuf.get(), queryPool.get(), 0u, 1u);
- vk.cmdBeginQuery(primCmdBuf.get(), queryPool.get(), 0u, VK_QUERY_CONTROL_PRECISE_BIT);
+ vk.cmdBeginQuery(primCmdBuf.get(), queryPool.get(), 0u, 0u);
{
vk.cmdExecuteCommands(primCmdBuf.get(), 1u, &secCmdBuf.get());
}
}
endCommandBuffer(vk, primCmdBuf.get());
- return tcu::TestStatus::pass("Successfully recorded a secondary command buffer allowing a precise occlusion query.");
+ return tcu::TestStatus::pass("Successfully recorded an imprecise query with a secondary command buffer not allowing a precise occlusion query.");
}
/******** 19.4. Command Buffer Submission (5.4 in VK 1.0 Spec) ****************/
// create semaphores for use in this test
semaphoreArray[idx] = createSemaphore(vk, vkDevice);
semaphores[idx] = semaphoreArray[idx].get();
- };
+ }
{
// create submit info for buffer - signal semaphores
}
// end recording of secondary buffers
endCommandBuffer(vk, cmdBuffers[ndx]);
- };
+ }
// record primary command buffer one
VK_CHECK(vk.beginCommandBuffer(*primCmdBufOne, &primCmdBufBeginInfo));
bool optional = (m_testParams.additionalDescriptorBinding != BINDING_Undefined) && (m_testParams.additionalDescriptorType != VK_DESCRIPTOR_TYPE_UNDEFINED);
+ const VkShaderStageFlags bindingStageFlags = (m_testParams.descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT) ?
+ VkShaderStageFlags{VK_SHADER_STAGE_FRAGMENT_BIT} : m_testParams.stageFlags;
+
const VkDescriptorSetLayoutBinding bindings[] =
{
{
m_testParams.descriptorBinding, // binding
m_testParams.descriptorType, // descriptorType
descriptorCount, // descriptorCount
- m_testParams.stageFlags, // stageFlags
+ bindingStageFlags, // stageFlags
DE_NULL, // pImmutableSamplers
},
{
m_testParams.additionalDescriptorBinding, // binding
m_testParams.additionalDescriptorType, // descriptorType
1, // descriptorCount
- m_testParams.stageFlags, // stageFlags
+ bindingStageFlags, // stageFlags
DE_NULL, // pImmutableSamplers
}
};
break;
default:
TCU_THROW(InternalError, "Unexpected descriptor type");
- break;
}
break;
case VK_SHADER_STAGE_FRAGMENT_BIT:
break;
default:
TCU_THROW(InternalError, "Unexpected descriptor type");
- break;
}
break;
case VK_SHADER_STAGE_COMPUTE_BIT:
break;
default:
TCU_THROW(InternalError, "Unexpected descriptor type");
- break;
}
break;
default:
TCU_THROW(InternalError, "Unexpected stage");
- break;
}
return s.str();
{
imageExtent.width *= 2;
imageExtent.height *= 2;
- };
+ }
createImages(variables.descriptorsImages, variables.descriptorsBufferInfos, variables.descriptorsBuffer,
VK_BUFFER_USAGE_TRANSFER_SRC_BIT, imageExtent, m_colorFormat, VK_IMAGE_LAYOUT_UNDEFINED, 1, m_testParams.usesMipMaps);