Tests need a pipeline/framebuffer/renderpass per command buffer to be
executed. For the single command buffer case, we were creating an extra
one that is unused.
However, it will produce crashes if we ever add tests with more than
two command buffers, as it is using the command buffer index to get
the respective pipeline/framebuffer/renderpass element to bind.
Components: Vulkan
VK-GL-CTS issue: 2293
Affected tests:
dEQP-VK.pipeline.dynamic_offset.*
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Change-Id: Ie1b2fb80f4fdff56c9e7879c9b1382f61c4ee622
}
// Create render passes
- for (deUint32 renderPassIdx = 0; renderPassIdx < 2; renderPassIdx++)
+ for (deUint32 renderPassIdx = 0; renderPassIdx < m_params.numCmdBuffers; renderPassIdx++)
{
// The first pass clears the output image, and the second one draws on top of the first pass.
const VkAttachmentLoadOp loadOps[] =
}
// Create framebuffers
- for (deUint32 framebufferIdx = 0; framebufferIdx < 2; framebufferIdx++)
+ for (deUint32 framebufferIdx = 0; framebufferIdx < m_params.numCmdBuffers; framebufferIdx++)
{
const VkImageView attachmentBindInfos[] =
{
}
// Create pipelines
- for (deUint32 pipelineIdx = 0; pipelineIdx < 2; pipelineIdx++)
+ for (deUint32 pipelineIdx = 0; pipelineIdx < m_params.numCmdBuffers; pipelineIdx++)
{
const VkVertexInputBindingDescription vertexInputBindingDescription =
{