Skip to content

Commit

Permalink
Merge vk-gl-cts/vulkan-cts-1.1.1 into vk-gl-cts/vulkan-cts-1.1.2
Browse files Browse the repository at this point in the history
Change-Id: I5a798ad268b27984038160cf645fc162260b069b
  • Loading branch information
alegal-arm committed Aug 31, 2018
2 parents fdcf06b + f77f9b2 commit 0770bab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class CopyBufferToImageTestCase : public TestCase
: TestCase (testCtx, name, "Copy buffer to image.")
, m_fillValue (fillValue)
, m_refData (data)
, m_validator (vk::VK_FORMAT_R32G32B32A32_SFLOAT)
, m_cmdBufferType (cmdBufferType)
{
}
Expand All @@ -108,7 +109,7 @@ CopyBufferToImageTestInstance::CopyBufferToImageTestInstance (Context& ctx,
const ImageValidator& validator,
const CmdBufferType cmdBufferType)
: ProtectedTestInstance (ctx)
, m_imageFormat (vk::VK_FORMAT_R32G32B32A32_UINT)
, m_imageFormat (vk::VK_FORMAT_R32G32B32A32_SFLOAT)
, m_fillValue (fillValue)
, m_refData (refData)
, m_validator (validator)
Expand Down Expand Up @@ -179,16 +180,16 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
};
vk.cmdPipelineBarrier(targetCmdBuffer,
vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
(vk::VkDependencyFlags) 0,
0, (const vk::VkMemoryBarrier *) DE_NULL,
1, &startBufferBarrier,
0, (const vk::VkImageMemoryBarrier *) DE_NULL);
}
vk.cmdFillBuffer(targetCmdBuffer, **srcBuffer, 0u, VK_WHOLE_SIZE, m_fillValue);

// Barrier to change accessMask to transfer read bit for source buffer
{
// Barrier to change accessMask to transfer read bit for source buffer
const vk::VkBufferMemoryBarrier startCopyBufferBarrier =
{
vk::VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, // VkStructureType sType
Expand All @@ -201,17 +202,8 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
0u, // VkDeviceSize offset
VK_WHOLE_SIZE, // VkDeviceSize size
};
vk.cmdPipelineBarrier(targetCmdBuffer,
vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
(vk::VkDependencyFlags)0,
0, (const vk::VkMemoryBarrier*)DE_NULL,
1, &startCopyBufferBarrier,
0, (const vk::VkImageMemoryBarrier*)DE_NULL);
}

// Start image barrier for destination image.
{
// Start image barrier for destination image.
const vk::VkImageMemoryBarrier startImgBarrier =
{
vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, // VkStructureType sType
Expand All @@ -233,11 +225,11 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
};

vk.cmdPipelineBarrier(targetCmdBuffer,
vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
vk::VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
(vk::VkDependencyFlags)0,
0, (const vk::VkMemoryBarrier*)DE_NULL,
0, (const vk::VkBufferMemoryBarrier*)DE_NULL,
1, &startCopyBufferBarrier,
1, &startImgBarrier);
}

Expand Down Expand Up @@ -283,8 +275,8 @@ tcu::TestStatus CopyBufferToImageTestInstance::iterate()
}
};
vk.cmdPipelineBarrier(targetCmdBuffer,
vk::VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
(vk::VkDependencyFlags)0,
0, (const vk::VkMemoryBarrier*)DE_NULL,
0, (const vk::VkBufferMemoryBarrier*)DE_NULL,
Expand Down
32 changes: 22 additions & 10 deletions framework/common/tcuRasterizationVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,15 +936,21 @@ bool verifyMultisampleLineGroupRasterization (const tcu::Surface& surface, const
(lineNormalizedDeviceSpace[1] + tcu::Vec2(1.0f, 1.0f)) * 0.5f * viewportSize,
};

const tcu::Vec2 lineDir = tcu::normalize(lineScreenSpace[1] - lineScreenSpace[0]);
const tcu::Vec2 lineScreenSpaceRounded[2] =
{
tcu::Vec2(deFloatRound(lineScreenSpace[0].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[0].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits)),
tcu::Vec2(deFloatRound(lineScreenSpace[1].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[1].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits))
};

const tcu::Vec2 lineDir = tcu::normalize(lineScreenSpaceRounded[1] - lineScreenSpaceRounded[0]);
const tcu::Vec2 lineNormalDir = tcu::Vec2(lineDir.y(), -lineDir.x());

const tcu::Vec2 lineQuadScreenSpace[4] =
{
lineScreenSpace[0] + lineNormalDir * halfLineWidth,
lineScreenSpace[0] - lineNormalDir * halfLineWidth,
lineScreenSpace[1] - lineNormalDir * halfLineWidth,
lineScreenSpace[1] + lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[0] + lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[0] - lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[1] - lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[1] + lineNormalDir * halfLineWidth,
};
const tcu::Vec2 lineQuadNormalizedDeviceSpace[4] =
{
Expand Down Expand Up @@ -989,15 +995,21 @@ bool verifyMultisampleLineGroupInterpolation (const tcu::Surface& surface, const
(lineNormalizedDeviceSpace[1] + tcu::Vec2(1.0f, 1.0f)) * 0.5f * viewportSize,
};

const tcu::Vec2 lineDir = tcu::normalize(lineScreenSpace[1] - lineScreenSpace[0]);
const tcu::Vec2 lineScreenSpaceRounded[2] =
{
tcu::Vec2(deFloatRound(lineScreenSpace[0].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[0].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits)),
tcu::Vec2(deFloatRound(lineScreenSpace[1].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[1].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits))
};

const tcu::Vec2 lineDir = tcu::normalize(lineScreenSpaceRounded[1] - lineScreenSpaceRounded[0]);
const tcu::Vec2 lineNormalDir = tcu::Vec2(lineDir.y(), -lineDir.x());

const tcu::Vec2 lineQuadScreenSpace[4] =
{
lineScreenSpace[0] + lineNormalDir * halfLineWidth,
lineScreenSpace[0] - lineNormalDir * halfLineWidth,
lineScreenSpace[1] - lineNormalDir * halfLineWidth,
lineScreenSpace[1] + lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[0] + lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[0] - lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[1] - lineNormalDir * halfLineWidth,
lineScreenSpaceRounded[1] + lineNormalDir * halfLineWidth,
};
const tcu::Vec2 lineQuadNormalizedDeviceSpace[4] =
{
Expand Down

0 comments on commit 0770bab

Please sign in to comment.