case AllocationCallbackRecord::TYPE_ALLOCATION:
{
if (record.data.allocation.returnedPtr)
- {
+ {
if (!de::contains(ptrToSlotIndex, record.data.allocation.returnedPtr))
{
ptrToSlotIndex[record.data.allocation.returnedPtr] = allocations.size();
else
{
const size_t slotNdx = ptrToSlotIndex[record.data.allocation.returnedPtr];
- if (!allocations[slotNdx].isLive)
+ if (!allocations[slotNdx].isLive)
{
allocations[slotNdx].isLive = true;
allocations[slotNdx].record = record;
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY,
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN,
};
-
+
MovePtr<tcu::TestCaseGroup> clipVolumeGroup(new tcu::TestCaseGroup(testCtx, "clip_volume", "clipping with the clip volume"));
// Fully inside the clip volume
// Check device for multidraw support:
if (m_context.getDeviceFeatures().multiDrawIndirect)
- m_isMultiDrawEnabled = true;
+ m_isMultiDrawEnabled = true;
else
m_isMultiDrawEnabled = false;
-
+
m_drawIndirectMaxCount = m_context.getDeviceProperties().limits.maxDrawIndirectCount;
}
noFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirtsInstanceNotSupported> >(m_testCtx, "triangle_list", "Draws an instanced triangle list", shaderPaths, vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST));
noFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirtsInstanceNotSupported> >(m_testCtx, "triangle_strip", "Draws an instanced triangle strip", shaderPaths, vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP));
- }
+ }
indirectDrawInstancedGroup->addChild(noFirstInstanceGroup);
tcu::TestCaseGroup* firstInstanceGroup = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
}
} // DrawTests
-} // vkt
\ No newline at end of file
+} // vkt
} // Draw
} // vkt
-#endif // _VKTDRAWTESTCASEUTIL_HPP
\ No newline at end of file
+#endif // _VKTDRAWTESTCASEUTIL_HPP
}
} // Draw
-} // vkt
\ No newline at end of file
+} // vkt
memBarrier.srcAccessMask = vk::VK_ACCESS_TRANSFER_WRITE_BIT;
memBarrier.dstAccessMask = vk::VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | vk::VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT |
vk::VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | vk::VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
-
+
m_vk.cmdPipelineBarrier(*m_cmdBuffer, vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT |
vk::VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | vk::VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT,
0, 1, &memBarrier, 0, NULL, 0, NULL);
-
+
const vk::VkRect2D renderArea = { { 0, 0 }, { WIDTH, HEIGHT } };
const RenderPassBeginInfo renderPassBegin(*m_renderPass, *m_framebuffer, renderArea);
const vk::VkClearDepthStencilValue depthStencilClearValue = { 0.0f, 0 };
const ImageSubresourceRange subresourceRangeDepthStencil[2] = { vk::VK_IMAGE_ASPECT_DEPTH_BIT, vk::VK_IMAGE_ASPECT_STENCIL_BIT };
-
+
m_vk.cmdClearDepthStencilImage(*m_cmdBuffer, m_depthStencilImage->object(),
vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &depthStencilClearValue, 2, subresourceRangeDepthStencil);
{
ImageParams(const ImageType imageType, const tcu::UVec3& imageSize)
: m_imageType (imageType)
- , m_imageSize (imageSize)
+ , m_imageSize (imageSize)
{
}
ImageType m_imageType;
void createChildren (tcu::TestCaseGroup* imageTests)
{
tcu::TestContext& testCtx = imageTests->getTestContext();
-
+
imageTests->addChild(createImageStoreTests(testCtx));
imageTests->addChild(createImageLoadStoreTests(testCtx));
imageTests->addChild(createImageFormatReinterpretTests(testCtx));
// Remove storage usage if the optimal tiling feature does not support it
usage &= ~VK_IMAGE_USAGE_STORAGE_BIT;
}
-
+
const VkImageCreateInfo colorImageParams =
{
VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // VkStructureType sType;
}
} // QueryPool
-} // vkt
\ No newline at end of file
+} // vkt
Move<VkBuffer> vertexBuffer;
de::MovePtr<Allocation> vertexBufferMemory;
const VkPhysicalDeviceProperties properties = m_context.getDeviceProperties();
-
+
if (attributeBatchSize > properties.limits.maxVertexInputAttributeOffset)
{
std::stringstream message;
descriptorSetLayout = m_descriptorSetLayoutBuilder.build(vk, vkDevice);
if (!m_uniformInfos.empty())
descriptorPool = m_descriptorPoolBuilder.build(vk, vkDevice, VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT, 1u);
- else
+ else
{
const VkDescriptorPoolSize poolSizeCount = { vk::VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1 };
const VkDescriptorPoolCreateInfo createInfo =
};
- const VkImageSubresourceRange clearRange =
+ const VkImageSubresourceRange clearRange =
{
aspectMask, // VkImageAspectFlags aspectMask;
0u, // deUint32 baseMipLevel;
Parameters (deUint32 baseMipLevel_ = 0,
vk::VkComponentMapping componentMapping_ = vk::makeComponentMappingRGBA(),
- vk::VkSampleCountFlagBits samples_ = vk::VK_SAMPLE_COUNT_1_BIT,
+ vk::VkSampleCountFlagBits samples_ = vk::VK_SAMPLE_COUNT_1_BIT,
Init initialization_ = INIT_UPLOAD_DATA)
: baseMipLevel (baseMipLevel_)
, componentMapping (componentMapping_)
// Texel declaration
frag << "\t" << outType << " texel;\n";
frag << "\tint success = " << funcCall << ";\n";
-
+
// Check sparse validity, and handle each case
frag << "\tif (sparseTexelsResidentARB(success))\n"
<< "\t\to_color = texel;\n"
{
frag << "\t\to_color = " << funcCall << ";\n";
}
-
+
frag << "}\n";
return glu::FragmentSource(frag.str());
DE_ASSERT(false);
}
}
-
+
result += "(u_sampler, v_texCoord";
if (isDepthFormat(textureFormat))
if (sparseCase == ShaderRenderCaseInstance::IMAGE_BACKING_MODE_SPARSE)
result += ", texel";
-
+
if (gatherArgs.componentNdx >= 0)
{
DE_ASSERT(gatherArgs.componentNdx < 4);
deUint32 queueCount;
};
-SparseResourcesBaseInstance::SparseResourcesBaseInstance (Context &context)
+SparseResourcesBaseInstance::SparseResourcesBaseInstance (Context &context)
: TestInstance(context)
{
}
* limitations under the License.
*
*//*!
- * \file vktSparseResourcesBase.hpp
- * \brief Sparse Resources Base Instance
+ * \file vktSparseResourcesBase.hpp
+ * \brief Sparse Resources Base Instance
*//*--------------------------------------------------------------------*/
#include "tcuDefs.hpp"
const Queue& sparseQueue = getQueue(VK_QUEUE_SPARSE_BINDING_BIT, 0);
const Queue& computeQueue = getQueue(VK_QUEUE_COMPUTE_BIT, 0);
- VkBufferCreateInfo bufferCreateInfo =
+ VkBufferCreateInfo bufferCreateInfo =
{
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, // VkStructureType sType;
DE_NULL, // const void* pNext;
- VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
+ VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT, // VkBufferCreateFlags flags;
m_bufferSizeInBytes, // VkDeviceSize size;
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
TCU_THROW(NotSupportedError, "Required memory size for sparse resources exceeds device limits");
DE_ASSERT((bufferMemRequirements.size % bufferMemRequirements.alignment) == 0);
-
+
const deUint32 memoryType = findMatchingMemoryType(instance, physicalDevice, bufferMemRequirements, MemoryRequirement::Any);
if (memoryType == NO_MATCH_FOUND)
referenceData.resize(m_bufferSize);
for (deUint32 valueNdx = 0; valueNdx < m_bufferSize; ++valueNdx)
- {
+ {
referenceData[valueNdx] = static_cast<deUint8>((valueNdx % bufferMemRequirement.alignment) + 1u);
}
const Queue& sparseQueue = getQueue(VK_QUEUE_SPARSE_BINDING_BIT, 0);
const Queue& computeQueue = getQueue(VK_QUEUE_COMPUTE_BIT, 0);
- VkBufferCreateInfo bufferCreateInfo =
+ VkBufferCreateInfo bufferCreateInfo =
{
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, // VkStructureType sType;
DE_NULL, // const void* pNext;
deviceInterface.cmdPipelineBarrier(*commandBuffer, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0u, 0u, DE_NULL, 1u, &inputBufferBarrier, 0u, DE_NULL);
}
-
+
deviceInterface.cmdDispatch(*commandBuffer, 1u, 1u, 1u);
{
const Unique<VkImage> imageRead(createImage(deviceInterface, *m_logicalDevice, &imageSparseInfo));
const Unique<VkImage> imageWrite(createImage(deviceInterface, *m_logicalDevice, &imageSparseInfo));
- // Create semaphores to synchronize sparse binding operations with other operations on the sparse images
+ // Create semaphores to synchronize sparse binding operations with other operations on the sparse images
const Unique<VkSemaphore> memoryBindSemaphoreTransfer(makeSemaphore(deviceInterface, *m_logicalDevice));
const Unique<VkSemaphore> memoryBindSemaphoreCompute(makeSemaphore(deviceInterface, *m_logicalDevice));
VK_ACCESS_TRANSFER_WRITE_BIT,
VK_ACCESS_HOST_READ_BIT,
outputBuffer->get(),
- 0u,
+ 0u,
imageSizeInBytes
);
ImageType imageType;
tcu::UVec3 imageSizes[sizeCountPerImageType];
};
-
+
static const ImageParameters imageParametersArray[] =
{
{ IMAGE_TYPE_2D, { tcu::UVec3(512u, 256u, 1u), tcu::UVec3(1024u, 128u, 1u), tcu::UVec3(11u, 137u, 1u) } },
for (deInt32 imageTypeNdx = 0; imageTypeNdx < DE_LENGTH_OF_ARRAY(imageParametersArray); ++imageTypeNdx)
{
const ImageType imageType = imageParametersArray[imageTypeNdx].imageType;
- de::MovePtr<tcu::TestCaseGroup> imageTypeGroup(new tcu::TestCaseGroup(testCtx, (getImageTypeName(imageType) + functions[functionNdx]).c_str(), ""));
+ de::MovePtr<tcu::TestCaseGroup> imageTypeGroup(new tcu::TestCaseGroup(testCtx, (getImageTypeName(imageType) + functions[functionNdx]).c_str(), ""));
for (deInt32 formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(formats); ++formatNdx)
{
} // sparse
} // vkt
-#endif // _VKTSPARSERESOURCESSHADERINTRINSICS_HPP
\ No newline at end of file
+#endif // _VKTSPARSERESOURCESSHADERINTRINSICS_HPP
TCU_THROW(NotSupportedError, "Sparse residency for image type is not supported");
imageSparseInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
- imageSparseInfo.pNext = DE_NULL;
+ imageSparseInfo.pNext = DE_NULL;
imageSparseInfo.flags = VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT | VK_IMAGE_CREATE_SPARSE_BINDING_BIT;
- imageSparseInfo.imageType = mapImageType(m_imageType);
+ imageSparseInfo.imageType = mapImageType(m_imageType);
imageSparseInfo.format = mapTextureFormat(m_format);
imageSparseInfo.extent = makeExtent3D(getLayerSize(m_imageType, m_imageSize));
imageSparseInfo.arrayLayers = getNumLayers(m_imageType, m_imageSize);
aspectRequirements = sparseMemoryRequirements[colorAspectIndex];
DE_ASSERT((aspectRequirements.imageMipTailSize % imageMemoryRequirements.alignment) == 0);
-
+
const VkImageAspectFlags aspectMask = aspectRequirements.formatProperties.aspectMask;
const VkExtent3D imageGranularity = aspectRequirements.formatProperties.imageGranularity;
const deUint32 memoryType = findMatchingMemoryType(instance, physicalDevice, imageMemoryRequirements, MemoryRequirement::Any);
// Copy reference data from input buffer to sparse image
std::vector <VkBufferImageCopy> bufferImageCopy;
bufferImageCopy.resize(imageSparseInfo.mipLevels);
-
+
bufferOffset = 0u;
for (deUint32 mipLevelNdx = 0u; mipLevelNdx < imageSparseInfo.mipLevels; ++mipLevelNdx)
{
deviceInterface.cmdPipelineBarrier(*commandBuffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0u, 0u, DE_NULL, 2u, bufferOutputHostReadBarriers, 0u, DE_NULL);
}
-
+
// End recording commands
endCommandBuffer(deviceInterface, *commandBuffer);
-
+
const VkPipelineStageFlags stageBits[] = { VK_PIPELINE_STAGE_TRANSFER_BIT };
-
+
// Submit commands for execution and wait for completion
submitCommandsAndWait(deviceInterface, *m_logicalDevice, extractQueue.queueHandle, *commandBuffer, 1u, &memoryBindSemaphore.get(), stageBits);
if (deMemCmp(&bufferResidencyData[0], &residencyReferenceData[0], imageResidencySizeInBytes) != 0)
return tcu::TestStatus::fail("Failed");
-
+
// Retrieve data from texels buffer to host memory
const Allocation& bufferTexelsAllocation = bufferTexels->getAllocation();
} // sparse
} // vkt
-#endif // _VKTSPARSERESOURCESSHADERINTRINSICSBASE_HPP
\ No newline at end of file
+#endif // _VKTSPARSERESOURCESSHADERINTRINSICSBASE_HPP
<< "OpBranch %branch_texel_resident\n"
<< "%branch_texel_resident = OpLabel\n"
-
+
<< "OpReturn\n"
<< "OpFunctionEnd\n";
if (!checkImageFormatFeatureSupport(instance, physicalDevice, imageSparseInfo.format, VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT))
TCU_THROW(NotSupportedError, "Device does not support image format for sampled images");
- // Check if device supports image format for color attachment
+ // Check if device supports image format for color attachment
if (!checkImageFormatFeatureSupport(instance, physicalDevice, imageSparseInfo.format, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))
TCU_THROW(NotSupportedError, "Device does not support image format for color attachment");
vertexData.push_back(tcu::Vec2(-1.0f,-1.0f));
vertexData.push_back(tcu::Vec2( 0.0f, 0.0f));
-
+
vertexData.push_back(tcu::Vec2(-1.0f, 1.0f));
vertexData.push_back(tcu::Vec2( 0.0f, 1.0f));
vertexBuffer = de::SharedPtr<Buffer>(new Buffer(deviceInterface, *m_logicalDevice, allocator, makeBufferCreateInfo(vertexDataSizeInBytes, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT), MemoryRequirement::HostVisible));
const Allocation& vertexBufferAllocation = vertexBuffer->getAllocation();
-
+
deMemcpy(vertexBufferAllocation.getHostPtr(), &vertexData[0], static_cast<std::size_t>(vertexDataSizeInBytes));
flushMappedMemoryRange(deviceInterface, *m_logicalDevice, vertexBufferAllocation.getMemory(), vertexBufferAllocation.getOffset(), vertexDataSizeInBytes);
for (deUint32 mipLevelNdx = 0u; mipLevelNdx < imageSparseInfo.mipLevels; ++mipLevelNdx)
{
const vk::VkExtent3D mipLevelSize = mipLevelExtents(imageSparseInfo.extent, mipLevelNdx);
-
- const vk::VkRect2D renderArea =
+
+ const vk::VkRect2D renderArea =
{
makeOffset2D(0u, 0u),
makeExtent2D(mipLevelSize.width, mipLevelSize.height),
// Draw full screen quad
deviceInterface.cmdDraw(commandBuffer, 4u, 1u, 0u, 0u);
-
+
// End render pass
endRenderPass(deviceInterface, commandBuffer);
}
} // sparse
} // vkt
-#endif // _VKTSPARSERESOURCESSHADERINTRINSICSSAMPLED_HPP
\ No newline at end of file
+#endif // _VKTSPARSERESOURCESSHADERINTRINSICSSAMPLED_HPP
} // sparse
} // vkt
-#endif // _VKTSPARSERESOURCESSHADERINTRINSICSSTORAGE_HPP
\ No newline at end of file
+#endif // _VKTSPARSERESOURCESSHADERINTRINSICSSTORAGE_HPP
sparseTests->addChild(createBufferSparseMemoryAliasingTests(testCtx));
sparseTests->addChild(createImageSparseMemoryAliasingTests(testCtx));
sparseTests->addChild(createSparseResourcesShaderIntrinsicsTests(testCtx));
-
+
return sparseTests.release();
}
*
*//*!
* \file vktSparseResourcesTests.hpp
- * \brief Sparse Resources Tests
+ * \brief Sparse Resources Tests
*//*--------------------------------------------------------------------*/
#include "tcuDefs.hpp"
}
VkSparseMemoryBind makeSparseMemoryBind (const vk::DeviceInterface& vk,
- const vk::VkDevice device,
+ const vk::VkDevice device,
const vk::VkDeviceSize allocationSize,
const deUint32 memoryType,
const vk::VkDeviceSize resourceOffset)
0.0f, 1.0f
);
- const VkRect2D scissor =
+ const VkRect2D scissor =
{
makeOffset2D(0, 0),
makeExtent2D(m_renderSize.x(), m_renderSize.y()),
0u, // compare mask
0u, // write mask
0u // reference
- );
+ );
const VkPipelineDepthStencilStateCreateInfo pipelineDepthStencilStateInfo =
{
const std::string& xy,
const std::string& xyz);
//!< Size used for addresing image in a compute shader
-tcu::UVec3 getShaderGridSize (const ImageType imageType,
- const tcu::UVec3& imageSize,
+tcu::UVec3 getShaderGridSize (const ImageType imageType,
+ const tcu::UVec3& imageSize,
const deUint32 mipLevel = 0);
//!< Size of a single image layer
-tcu::UVec3 getLayerSize (const ImageType imageType,
+tcu::UVec3 getLayerSize (const ImageType imageType,
const tcu::UVec3& imageSize);
//!< Number of array layers (for array and cube types)
-deUint32 getNumLayers (const ImageType imageType,
+deUint32 getNumLayers (const ImageType imageType,
const tcu::UVec3& imageSize);
//!< Number of texels in an image
-deUint32 getNumPixels (const ImageType imageType,
+deUint32 getNumPixels (const ImageType imageType,
const tcu::UVec3& imageSize);
//!< Coordinate dimension used for addressing (e.g. 3 (x,y,z) for 2d array)
deUint32 getDimensions (const ImageType imageType);
//!< Coordinate dimension used for addressing a single layer (e.g. 2 (x,y) for 2d array)
-deUint32 getLayerDimensions (const ImageType imageType);
+deUint32 getLayerDimensions (const ImageType imageType);
//!< Helper function for checking if requested image size does not exceed device limits
bool isImageSizeSupported (const vk::InstanceInterface& instance,
const vk::VkPhysicalDevice physicalDevice,
const deUint32 memoryType,
const vk::VkDeviceSize resourceOffset);
-vk::Move<vk::VkRenderPass> makeRenderPass (const vk::DeviceInterface& vk,
- const vk::VkDevice device,
+vk::Move<vk::VkRenderPass> makeRenderPass (const vk::DeviceInterface& vk,
+ const vk::VkDevice device,
const vk::VkFormat colorFormat);
-vk::Move<vk::VkRenderPass> makeRenderPassWithoutAttachments(const vk::DeviceInterface& vk,
+vk::Move<vk::VkRenderPass> makeRenderPassWithoutAttachments(const vk::DeviceInterface& vk,
const vk::VkDevice device);
vk::Move<vk::VkFramebuffer> makeFramebuffer (const vk::DeviceInterface& vk,
const Unique<VkEvent> event (createEvent(vk, device, &eventInfo, DE_NULL));
beginCommandBuffer(vk, *cmdBuffer);
- vk.cmdWaitEvents(*cmdBuffer, 1u, &event.get(), VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
+ vk.cmdWaitEvents(*cmdBuffer, 1u, &event.get(), VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
endCommandBuffer(vk, *cmdBuffer);
VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence));
if (VK_SUCCESS != vk.setEvent(device, *event))
return tcu::TestStatus::fail("Couldn't set event");
-
+
if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, LONG_FENCE_WAIT))
return tcu::TestStatus::fail("Queue should end execution");
endCommandBuffer(vk, cmdBuffers[SET]);
beginCommandBuffer(vk, cmdBuffers[WAIT]);
- vk.cmdWaitEvents(cmdBuffers[WAIT], 1u, &event.get(),VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
+ vk.cmdWaitEvents(cmdBuffers[WAIT], 1u, &event.get(),VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
endCommandBuffer(vk, cmdBuffers[WAIT]);
VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence));
endCommandBuffer(vk, cmdBuffers[SET]);
beginCommandBuffer(vk, cmdBuffers[WAIT]);
- vk.cmdWaitEvents(cmdBuffers[WAIT], 1u, &event.get(), VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
+ vk.cmdWaitEvents(cmdBuffers[WAIT], 1u, &event.get(), VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
endCommandBuffer(vk, cmdBuffers[WAIT]);
VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo[SET], fence[SET]));
endCommandBuffer(vk, secondaryCmdBuffers[SET]);
VK_CHECK(vk.beginCommandBuffer(secondaryCmdBuffers[WAIT], &cmdBufferBeginInfo));
- vk.cmdWaitEvents(secondaryCmdBuffers[WAIT], 1u, &event.get(),VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
+ vk.cmdWaitEvents(secondaryCmdBuffers[WAIT], 1u, &event.get(),VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL);
endCommandBuffer(vk, secondaryCmdBuffers[WAIT]);
beginCommandBuffer(vk, *primaryCmdBuffer);
0u, // deUint32 signalSemaphoreCount;
DE_NULL, // const VkSemaphore* pSignalSemaphores;
};
-
+
if (VK_NOT_READY != vk.getFenceStatus(device, *fence))
return tcu::TestStatus::fail("Created fence should be in unsignaled state");
0u, // VkFenceCreateFlags flags;
};
const Unique<VkFence> fence (createFence(vk, device, &fenceInfo));
-
+
VK_CHECK(vk.beginCommandBuffer(*cmdBuffer, &info));
endCommandBuffer(vk, *cmdBuffer);
VK_CHECK(vk.queueSubmit(queue, 2u, submitInfo, *fence));
submitInfo[FIRST].pSignalSemaphores = &semaphore.get();
submitInfo[SECOND].sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- submitInfo[SECOND].pNext = DE_NULL;
- submitInfo[SECOND].waitSemaphoreCount = 1u;
- submitInfo[SECOND].pWaitSemaphores = &semaphore.get();
- submitInfo[SECOND].pWaitDstStageMask = stageBits;
- submitInfo[SECOND].commandBufferCount = 1u;
- submitInfo[SECOND].pCommandBuffers = &cmdBuffer[SECOND].get();
+ submitInfo[SECOND].pNext = DE_NULL;
+ submitInfo[SECOND].waitSemaphoreCount = 1u;
+ submitInfo[SECOND].pWaitSemaphores = &semaphore.get();
+ submitInfo[SECOND].pWaitDstStageMask = stageBits;
+ submitInfo[SECOND].commandBufferCount = 1u;
+ submitInfo[SECOND].pCommandBuffers = &cmdBuffer[SECOND].get();
submitInfo[SECOND].signalSemaphoreCount = 0u;
- submitInfo[SECOND].pSignalSemaphores = DE_NULL;
-
+ submitInfo[SECOND].pSignalSemaphores = DE_NULL;
+
VK_CHECK(vk.beginCommandBuffer(*cmdBuffer[FIRST], &info));
endCommandBuffer(vk, *cmdBuffer[FIRST]);
VK_CHECK(vk.beginCommandBuffer(*cmdBuffer[SECOND], &info));
VkSubmitInfo swapInfo = submitInfo[SECOND];
submitInfo[SECOND] = submitInfo[FIRST];
submitInfo[FIRST] = swapInfo;
- submitInfo[SECOND].pCommandBuffers = &cmdBuffer[SECOND].get();
+ submitInfo[SECOND].pCommandBuffers = &cmdBuffer[SECOND].get();
submitInfo[FIRST].pCommandBuffers = &cmdBuffer[FIRST].get();
}
}
} // synchronization
-} // vkt
\ No newline at end of file
+} // vkt
} // vkt
-#endif // _VKTSYNCHRONIZATIONINTERNALLYSYNCHRONIZEDOBJECTSTESTS_HPP
\ No newline at end of file
+#endif // _VKTSYNCHRONIZATIONINTERNALLYSYNCHRONIZEDOBJECTSTESTS_HPP
-#ifndef _VKTTESSELLATIONUSERDEFINEDIOTESTS_HPP
-#define _VKTTESSELLATIONUSERDEFINEDIOTESTS_HPP
+#ifndef _VKTTESSELLATIONUSERDEFINEDIO_HPP
+#define _VKTTESSELLATIONUSERDEFINEDIO_HPP
/*------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
} // tessellation
} // vkt
-#endif // _VKTTESSELLATIONUSERDEFINEDIOTESTS_HPP
+#endif // _VKTTESSELLATIONUSERDEFINEDIO_HPP
&clearValue, // const VkClearValue* pClearValues;
};
- // Add barrier for initializing image state
+ // Add barrier for initializing image state
{
const vk::VkImageMemoryBarrier initializeBarrier =
{
-#ifndef _VKWSISURFACETESTS_HPP
-#define _VKWSISURFACETESTS_HPP
+#ifndef _VKTWSISURFACETESTS_HPP
+#define _VKTWSISURFACETESTS_HPP
/*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
} // wsi
} // vkt
-#endif // _VKWSISURFACETESTS_HPP
+#endif // _VKTWSISURFACETESTS_HPP
-#ifndef _VKWSISWAPCHAINTESTS_HPP
-#define _VKWSISWAPCHAINTESTS_HPP
+#ifndef _VKTWSISWAPCHAINTESTS_HPP
+#define _VKTWSISWAPCHAINTESTS_HPP
/*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
} // wsi
} // vkt
-#endif // _VKWSISWAPCHAINTESTS_HPP
+#endif // _VKTWSISWAPCHAINTESTS_HPP
-#ifndef _VKWSITESTS_HPP
-#define _VKWSITESTS_HPP
+#ifndef _VKTWSITESTS_HPP
+#define _VKTWSITESTS_HPP
/*-------------------------------------------------------------------------
* Vulkan Conformance Tests
* ------------------------
} // wsi
} // vkt
-#endif // _VKWSITESTS_HPP
+#endif // _VKTWSITESTS_HPP
COMPRESSEDTEXFORMAT_LAST
};
-int getBlockSize (CompressedTexFormat format);
+int getBlockSize (CompressedTexFormat format);
IVec3 getBlockPixelSize (CompressedTexFormat format);
bool isEtcFormat (CompressedTexFormat format);
* \brief Object containing Either First or Second type of object
*
* \note Type First and Second are always aligned to same alignment as
- * deUint64.
+ * deUint64.
* \note This type always uses at least sizeof(bool) + max(sizeof(First*),
- * sizeof(Second*)) + sizeof(deUint64) of memory.
+ * sizeof(Second*)) + sizeof(deUint64) of memory.
*//*--------------------------------------------------------------------*/
template<typename First, typename Second>
class Either
Interval convert (const Interval& x) const;
std::string floatToHex (double x) const;
- std::string intervalToHex (const Interval& interval) const;
+ std::string intervalToHex (const Interval& interval) const;
static FloatFormat nativeFloat (void);
static FloatFormat nativeDouble (void);
private:
- int exponentShift (int exp) const;
+ int exponentShift (int exp) const;
Interval clampValue (double d) const;
int m_minExp; // Minimum exponent, inclusive
*
*//*!
* \file
- * \brief Templatized matrix class.
+ * \brief Templatized matrix class.
*//*--------------------------------------------------------------------*/
#include "tcuDefs.hpp"
// \note Copy constructor and assignment operators are public and auto-generated
int m_width;
- int m_height;
+ int m_height;
de::ArrayBuffer<deUint32> m_pixels;
} DE_WARN_UNUSED_TYPE;
void setCurrentArchive (Archive& archive) { m_curArchive = &archive; }
void setTerminateAfter (bool terminate) { m_terminateAfter = terminate; }
- bool getTerminateAfter (void) const { return m_terminateAfter; }
+ bool getTerminateAfter (void) const { return m_terminateAfter; }
protected:
TestContext (const TestContext&);
RESULT_FAILED
};
- Event (void);
+ Event (void);
~Event (void);
void setResult (Result result);
Result waitReady (void);
EndToken (void) {}
};
- void operator<< (const EndToken&);
+ void operator<< (const EndToken&);
private:
Thread& m_thread;
//! Allocate and construct an object and return its address as a MovePtr.
template<typename T>
-inline MovePtr<T> newMovePtr (void) { return MovePtr<T>(new T()); }
+inline MovePtr<T> newMovePtr (void) { return MovePtr<T>(new T()); }
template<typename T, typename P0>
inline MovePtr<T> newMovePtr (P0 p0) { return MovePtr<T>(new T(p0)); }
template<typename T, typename P0, typename P1>
* copied, direct initialization syntax must be used, i.e.:
*
* MovePtr<Foo> createFoo (void);
- * UniquePtr<Foo> fooPtr(createFoo()); // NOT fooPtr = createFoo();
+ * UniquePtr<Foo> fooPtr(createFoo()); // NOT fooPtr = createFoo();
*
*//*--------------------------------------------------------------------*/
template<typename T, class Deleter = DefaultDeleter<T> >
bool operator>= (const Version& v) const;
private:
- int m_major;
+ int m_major;
int m_minor;
};
{
glw::GLenum getImageGLTarget (eglw::EGLenum source);
-eglw::EGLint apiRenderableType (glu::ApiType apiType);
+eglw::EGLint apiRenderableType (glu::ApiType apiType);
eglw::EGLContext createGLContext (const eglw::Library& egl, eglw::EGLDisplay display, eglw::EGLConfig config, const glu::ContextType& contextType);
eglw::EGLConfig chooseConfig (const eglw::Library& egl, eglw::EGLDisplay display, const glu::RenderConfig& config);
class BooleanPointerFmt
{
public:
- const deUint8* const value;
+ const deUint8* const value;
const deUint32 size;
BooleanPointerFmt (const deUint8* value_, deUint32 size_) : value(value_), size(size_) {}
const MultisamplePixelBufferAccess& depthMultisampleBuffer = MultisamplePixelBufferAccess(),
const MultisamplePixelBufferAccess& stencilMultisampleBuffer = MultisamplePixelBufferAccess());
- int getNumSamples (void) const;
+ int getNumSamples (void) const;
const MultisamplePixelBufferAccess& getColorBuffer (int ndx) const { DE_ASSERT(de::inRange(ndx, 0, m_numColorBuffers)); return m_colorBuffers[ndx]; }
int getNumColorBuffers (void) const { return m_numColorBuffers; }
namespace Image
{
-TestCaseGroup* createSimpleCreationTests (EglTestContext& eglTestCtx, const std::string& name, const std::string& desc);
+TestCaseGroup* createSimpleCreationTests (EglTestContext& eglTestCtx, const std::string& name, const std::string& desc);
TestCaseGroup* createModifyTests (EglTestContext& eglTestCtx, const std::string& name, const std::string& desc);
TestCaseGroup* createMultiContextRenderTests (EglTestContext& eglTestCtx, const std::string& name, const std::string& desc);
{
public:
ErrorCase (Context& ctx, const char* name, const char* desc);
- virtual ~ErrorCase (void) {}
+ virtual ~ErrorCase (void) {}
virtual void expectError (glw::GLenum error0, glw::GLenum error1) = 0;
};
void fail (const std::string& msg);
int getInteger (glw::GLenum pname) const;
const glu::RenderContext& getRenderContext (void) const { return m_renderCtx; }
- const glu::ContextInfo& getContextInfo (void) const { return m_ctxInfo; }
+ const glu::ContextInfo& getContextInfo (void) const { return m_ctxInfo; }
void beginSection (const std::string& desc);
void endSection (void);
void expectError (glw::GLenum error);
void expectError (glw::GLenum error0, glw::GLenum error1);
bool isShaderSupported (glu::ShaderType shaderType);
- bool isExtensionSupported (std::string extension);
+ bool isExtensionSupported (std::string extension);
protected:
ErrorCase& m_host;
private:
glu::RenderContext& m_renderCtx;
- const glu::ContextInfo& m_ctxInfo;
+ const glu::ContextInfo& m_ctxInfo;
tcu::ResultCollector& m_results;
int m_openSections;
};
deUint32 getGeometryNumOutputVertices (void) const;
void setGeometryNumOutputVertices (deUint32);
- deUint32 getTessellationNumOutputPatchVertices (void) const;
+ deUint32 getTessellationNumOutputPatchVertices (void) const;
void setTessellationNumOutputPatchVertices (deUint32);
bool isValid (void) const;
enum ResourceNameGenerationFlag
{
- RESOURCE_NAME_GENERATION_FLAG_DEFAULT = 0x0,
+ RESOURCE_NAME_GENERATION_FLAG_DEFAULT = 0x0,
RESOURCE_NAME_GENERATION_FLAG_TOP_LEVEL_BUFFER_VARIABLE = 0x1,
RESOURCE_NAME_GENERATION_FLAG_TRANSFORM_FEEDBACK_VARIABLE = 0x2,
AttribType (const std::string& name, deUint32 locationSize, deUint32 typeEnum);
const std::string& getName (void) const { return m_name; }
- deUint32 getLocationSize (void) const { return m_locationSize; }
+ deUint32 getLocationSize (void) const { return m_locationSize; }
deUint32 getGLTypeEnum (void) const { return m_glTypeEnum; }
private:
Attribute (const AttribType& type,
const std::string& name,
- deInt32 layoutLocation = LOC_UNDEF,
+ deInt32 layoutLocation = LOC_UNDEF,
const Cond& cond = Cond::COND_ALWAYS,
int arraySize = NOT_ARRAY);
OutputType outputType;
Storage storage;
Usage usage;
- int componentCount;
+ int componentCount;
int offset;
int stride;
bool normalize;
bool isBufferStrideAligned (void) const;
};
- std::string getName (void) const;
+ std::string getName (void) const;
std::string getDesc (void) const;
std::string getMultilineDesc (void) const;
};
// Utilities for building
-Image* makeImage (GLenum bufType, ImageFormat format,
+Image* makeImage (GLenum bufType, ImageFormat format,
GLsizei width, GLsizei height, FboBuilder& builder);
Attachment* makeAttachment (GLenum bufType, ImageFormat format,
GLsizei width, GLsizei height, FboBuilder& builder);
, m_binder (binder_)
, m_genCreates (genCreates_) {}
- GLuint gen (void);
+ GLuint gen (void);
void release (GLuint name) { (this->*m_deleteFunc)(1, &name); }
bool exists (GLuint name) { return (this->*m_existsFunc)(name) != GL_FALSE; }
Binder* binder (void) const { return m_binder; }
protected:
FboAttacher (const Context& ctx,
Type& elementType, Type& containerType)
- : Attacher (ctx, elementType, containerType) {}
+ : Attacher (ctx, elementType, containerType) {}
virtual void initStorage (void) = 0;
};
{
public:
FboInputAttacher (FboAttacher& attacher)
- : InputAttacher (attacher) {}
+ : InputAttacher (attacher) {}
void drawContainer (GLuint container, Surface& dst);
};
{
public:
FboOutputAttacher (FboAttacher& attacher)
- : OutputAttacher (attacher) {}
+ : OutputAttacher (attacher) {}
void setupContainer (GLuint seed, GLuint container);
void drawAttachment (GLuint attachment, Surface& dst);
};
void verifyStateFramebufferInteger (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLenum target, glw::GLenum pname, int expected, QueryType type);
void verifyStateFramebufferIntegerMin (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLenum target, glw::GLenum pname, int minValue, QueryType type);
void verifyStateProgramInteger (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLuint program, glw::GLenum pname, int expected, QueryType type);
-void verifyStateProgramIntegerVec3 (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLuint program, glw::GLenum pname, const tcu::IVec3& expected, QueryType type);
+void verifyStateProgramIntegerVec3 (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLuint program, glw::GLenum pname, const tcu::IVec3& expected, QueryType type);
void verifyStatePipelineInteger (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLuint pipeline, glw::GLenum pname, int expected, QueryType type);
void verifyStateTextureParamInteger (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLenum target, glw::GLenum pname, int expected, QueryType type);
void verifyStateTextureParamFloat (tcu::ResultCollector& result, glu::CallLogWrapper& gl, glw::GLenum target, glw::GLenum pname, float expected, QueryType type);
virtual Array* getArray (int i);
virtual int getArrayCount (void);
virtual void newArray (Array::Storage storage);
- virtual void render (Array::Primitive primitive, int firstVertex, int vertexCount, bool useVao, float coordScale, float colorScale);
+ virtual void render (Array::Primitive primitive, int firstVertex, int vertexCount, bool useVao, float coordScale, float colorScale);
const tcu::Surface& getSurface (void) const { return m_screen; }
private:
- void updateProgram (void);
+ void updateProgram (void);
glu::RenderContext& m_renderCtx;
sglr::Context& m_ctx;
inline bool operator<= (const WrappedType<Type>& other) const { return m_value <= other.m_value; }
inline bool operator>= (const WrappedType<Type>& other) const { return m_value >= other.m_value; }
- inline operator Type (void) const { return m_value; }
+ inline operator Type (void) const { return m_value; }
template<class T>
inline T to (void) const { return (T)m_value; }
private:
inline bool operator<= (const Fixed& other) const { return m_value <= other.m_value; }
inline bool operator>= (const Fixed& other) const { return m_value >= other.m_value; }
- inline operator deInt32 (void) const { return m_value; }
+ inline operator deInt32 (void) const { return m_value; }
template<class T>
inline T to (void) const { return (T)m_value; }
private:
Array::OutputType outputType;
Array::Storage storage;
Array::Usage usage;
- int componentCount;
+ int componentCount;
int offset;
int stride;
bool normalize;
GLValue max;
};
- std::string getName (void) const;
+ std::string getName (void) const;
std::string getDesc (void) const;
Array::Primitive primitive;