Merge "Merge remote-tracking branch 'origin/vulkan-cts-1.0.2' into HEAD" into oreo-cts-dev
am: 6d6ebc1b4b
Change-Id: I71f98787bf29843efbe66343187c3a67c7ca39f9
diff --git a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
index 86edde0..7022834 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
@@ -3185,7 +3185,7 @@
0u, // deUint32 baseMipLevel;
1u, // deUint32 mipLevels;
0u, // deUint32 baseArraySlice;
- getArraySize(m_params.dst.image) // deUint32 arraySize;
+ getArraySize(m_params.src.image) // deUint32 arraySize;
}
},
// destination image
diff --git a/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp
index 64d863f..5e5b596 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiDescriptorPoolTests.cpp
@@ -212,7 +212,13 @@
DE_NULL, // const VkSampler* pImmutableSamplers;
};
- const vector<VkDescriptorSetLayoutBinding> descriptorSetLayoutBindings (params.bindingCount, descriptorSetLayoutBinding);
+ vector<VkDescriptorSetLayoutBinding> descriptorSetLayoutBindings (params.bindingCount, descriptorSetLayoutBinding);
+
+ for (deUint32 binding = 0; binding < deUint32(descriptorSetLayoutBindings.size()); ++binding)
+ {
+ descriptorSetLayoutBindings[binding].binding = binding;
+ }
+
const VkDescriptorSetLayoutCreateInfo descriptorSetLayoutInfo =
{
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, // VkStructureType sType;
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
index af8c011..f70b924 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
@@ -104,6 +104,18 @@
{
bool limitsOk = true;
VkPhysicalDeviceLimits* limits = &properties->limits;
+ deUint32 shaderStages = 3;
+
+ if (features->tessellationShader)
+ {
+ shaderStages += 2;
+ }
+
+ if (features->geometryShader)
+ {
+ shaderStages++;
+ }
+
struct FeatureLimitTable
{
deUint32 offset;
@@ -139,13 +151,13 @@
{ LIMIT(maxPerStageDescriptorStorageImages), 4, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
{ LIMIT(maxPerStageDescriptorInputAttachments), 4, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
{ LIMIT(maxPerStageResources), 0, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_NONE , -1 },
- { LIMIT(maxDescriptorSetSamplers), 96, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
- { LIMIT(maxDescriptorSetUniformBuffers), 72, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
+ { LIMIT(maxDescriptorSetSamplers), shaderStages * 16, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
+ { LIMIT(maxDescriptorSetUniformBuffers), shaderStages * 12, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
{ LIMIT(maxDescriptorSetUniformBuffersDynamic), 8, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
- { LIMIT(maxDescriptorSetStorageBuffers), 24, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
+ { LIMIT(maxDescriptorSetStorageBuffers), shaderStages * 4, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
{ LIMIT(maxDescriptorSetStorageBuffersDynamic), 4, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
- { LIMIT(maxDescriptorSetSampledImages), 96, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
- { LIMIT(maxDescriptorSetStorageImages), 24, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
+ { LIMIT(maxDescriptorSetSampledImages), shaderStages * 16, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
+ { LIMIT(maxDescriptorSetStorageImages), shaderStages * 4, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN, -1 },
{ LIMIT(maxDescriptorSetInputAttachments), 0, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_NONE , -1 },
{ LIMIT(maxVertexInputAttributes), 16, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
{ LIMIT(maxVertexInputBindings), 16, 0, 0, 0.0f, LIMIT_FORMAT_UNSIGNED_INT, LIMIT_TYPE_MIN , -1 },
@@ -660,7 +672,6 @@
"VK_KHR_external_memory_capabilities",
"VK_KHR_external_semaphore_capabilities",
"VK_KHR_external_fence_capabilities",
- "VK_KHR_sampler_ycbcr_conversion"
};
checkKhrExtensions(results, extensions, DE_LENGTH_OF_ARRAY(s_allowedInstanceKhrExtensions), s_allowedInstanceKhrExtensions);
diff --git a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
index 41bdd3e..233dcaf 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiSmokeTests.cpp
@@ -595,7 +595,7 @@
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, // sType
DE_NULL, // pNext
0u, // flags
- VK_TRUE, // depthClampEnable
+ VK_FALSE, // depthClampEnable
VK_FALSE, // rasterizerDiscardEnable
VK_POLYGON_MODE_FILL, // polygonMode
VK_CULL_MODE_NONE, // cullMode
diff --git a/external/vulkancts/modules/vulkan/draw/vktBasicDrawTests.cpp b/external/vulkancts/modules/vulkan/draw/vktBasicDrawTests.cpp
index 65f80a0..e59d45e 100644
--- a/external/vulkancts/modules/vulkan/draw/vktBasicDrawTests.cpp
+++ b/external/vulkancts/modules/vulkan/draw/vktBasicDrawTests.cpp
@@ -319,6 +319,18 @@
const vk::VkDevice device = m_context.getDevice();
const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
+ const vk::VkPhysicalDeviceFeatures features = m_context.getDeviceFeatures();
+
+ if (features.geometryShader == VK_FALSE &&
+ (m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY ||
+ m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY ||
+ m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY ||
+ m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY)
+ )
+ {
+ TCU_THROW(NotSupportedError, "Geometry Not Supported");
+ }
+
const PipelineLayoutCreateInfo pipelineLayoutCreateInfo;
m_pipelineLayout = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo);
diff --git a/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp b/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp
index 13b80e3..1e5d734 100644
--- a/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp
+++ b/external/vulkancts/modules/vulkan/draw/vktDrawInstancedTests.cpp
@@ -121,23 +121,23 @@
}
template<typename T>
-de::SharedPtr<Buffer> createAndUploadBuffer(const std::vector<T> data, const vk::DeviceInterface& vk, const Context& context)
+de::SharedPtr<Buffer> createAndUploadBuffer(const std::vector<T> data, const vk::DeviceInterface& vk, const Context& context, vk::VkBufferUsageFlags usage)
{
const vk::VkDeviceSize dataSize = data.size() * sizeof(T);
- de::SharedPtr<Buffer> vertexBuffer = Buffer::createAndAlloc(vk, context.getDevice(),
- BufferCreateInfo(dataSize, vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT),
- context.getDefaultAllocator(),
- vk::MemoryRequirement::HostVisible);
+ de::SharedPtr<Buffer> buffer = Buffer::createAndAlloc(vk, context.getDevice(),
+ BufferCreateInfo(dataSize, usage),
+ context.getDefaultAllocator(),
+ vk::MemoryRequirement::HostVisible);
- deUint8* ptr = reinterpret_cast<deUint8*>(vertexBuffer->getBoundMemory().getHostPtr());
+ deUint8* ptr = reinterpret_cast<deUint8*>(buffer->getBoundMemory().getHostPtr());
deMemcpy(ptr, &data[0], static_cast<size_t>(dataSize));
vk::flushMappedMemoryRange(vk, context.getDevice(),
- vertexBuffer->getBoundMemory().getMemory(),
- vertexBuffer->getBoundMemory().getOffset(),
+ buffer->getBoundMemory().getMemory(),
+ buffer->getBoundMemory().getOffset(),
VK_WHOLE_SIZE);
- return vertexBuffer;
+ return buffer;
}
class TestVertShader : public rr::VertexShader
@@ -455,8 +455,8 @@
const deUint32 firstInstance = firstInstanceIndices[firstInstanceIndexNdx];
prepareVertexData(instanceCount, firstInstance);
- const de::SharedPtr<Buffer> vertexBuffer = createAndUploadBuffer(m_data, m_vk, m_context);
- const de::SharedPtr<Buffer> instancedVertexBuffer = createAndUploadBuffer(m_instancedColor, m_vk, m_context);
+ const de::SharedPtr<Buffer> vertexBuffer = createAndUploadBuffer(m_data, m_vk, m_context, vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT);
+ const de::SharedPtr<Buffer> instancedVertexBuffer = createAndUploadBuffer(m_instancedColor, m_vk, m_context, vk::VK_BUFFER_USAGE_VERTEX_BUFFER_BIT);
de::SharedPtr<Buffer> indexBuffer;
de::SharedPtr<Buffer> indirectBuffer;
m_vk.beginCommandBuffer(*m_cmdBuffer, &beginInfo);
@@ -486,7 +486,7 @@
if (m_params.function == TestParams::FUNCTION_DRAW_INDEXED || m_params.function == TestParams::FUNCTION_DRAW_INDEXED_INDIRECT)
{
- indexBuffer = createAndUploadBuffer(m_indexes, m_vk, m_context);
+ indexBuffer = createAndUploadBuffer(m_indexes, m_vk, m_context, vk::VK_BUFFER_USAGE_INDEX_BUFFER_BIT);
m_vk.cmdBindIndexBuffer(*m_cmdBuffer, indexBuffer->object(), 0, vk::VK_INDEX_TYPE_UINT32);
}
@@ -530,7 +530,7 @@
};
std::vector<vk::VkDrawIndirectCommand> drawCommands;
drawCommands.push_back(drawCommand);
- indirectBuffer = createAndUploadBuffer(drawCommands, m_vk, m_context);
+ indirectBuffer = createAndUploadBuffer(drawCommands, m_vk, m_context, vk::VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT);
m_vk.cmdDrawIndirect(*m_cmdBuffer, indirectBuffer->object(), 0, 1u, 0u);
break;
@@ -547,7 +547,7 @@
};
std::vector<vk::VkDrawIndexedIndirectCommand> drawCommands;
drawCommands.push_back(drawCommand);
- indirectBuffer = createAndUploadBuffer(drawCommands, m_vk, m_context);
+ indirectBuffer = createAndUploadBuffer(drawCommands, m_vk, m_context, vk::VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT);
m_vk.cmdDrawIndexedIndirect(*m_cmdBuffer, indirectBuffer->object(), 0, 1u, 0u);
break;
diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
index 682f91d..29476ab 100644
--- a/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
+++ b/external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
@@ -8346,6 +8346,71 @@
DE_FATAL("Unknown stage");
}
+void removeIllegalAccessFlags (vk::VkAccessFlags& accessflags, vk::VkPipelineStageFlags stageflags)
+{
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT))
+ accessflags &= ~vk::VK_ACCESS_INDIRECT_COMMAND_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_VERTEX_INPUT_BIT))
+ accessflags &= ~vk::VK_ACCESS_INDEX_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_VERTEX_INPUT_BIT))
+ accessflags &= ~vk::VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT;
+
+ if (!(stageflags & (vk::VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT)))
+ accessflags &= ~vk::VK_ACCESS_UNIFORM_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT))
+ accessflags &= ~vk::VK_ACCESS_INPUT_ATTACHMENT_READ_BIT;
+
+ if (!(stageflags & (vk::VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT)))
+ accessflags &= ~vk::VK_ACCESS_SHADER_READ_BIT;
+
+ if (!(stageflags & (vk::VK_PIPELINE_STAGE_VERTEX_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT |
+ vk::VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT)))
+ accessflags &= ~vk::VK_ACCESS_SHADER_WRITE_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT))
+ accessflags &= ~vk::VK_ACCESS_COLOR_ATTACHMENT_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT))
+ accessflags &= ~vk::VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
+
+ if (!(stageflags & (vk::VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT |
+ vk::VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT)))
+ accessflags &= ~vk::VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT;
+
+ if (!(stageflags & (vk::VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT |
+ vk::VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT)))
+ accessflags &= ~vk::VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_TRANSFER_BIT))
+ accessflags &= ~vk::VK_ACCESS_TRANSFER_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_TRANSFER_BIT))
+ accessflags &= ~vk::VK_ACCESS_TRANSFER_WRITE_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_HOST_BIT))
+ accessflags &= ~vk::VK_ACCESS_HOST_READ_BIT;
+
+ if (!(stageflags & vk::VK_PIPELINE_STAGE_HOST_BIT))
+ accessflags &= ~vk::VK_ACCESS_HOST_WRITE_BIT;
+}
+
void applyOp (State& state, const Memory& memory, Op op, Usage usage)
{
switch (op)
@@ -8487,6 +8552,9 @@
if (!srcStages)
srcStages = dstStages;
+ removeIllegalAccessFlags(dstAccesses, dstStages);
+ removeIllegalAccessFlags(srcAccesses, srcStages);
+
if (srcLayout == vk::VK_IMAGE_LAYOUT_UNDEFINED)
state.imageDefined = false;
@@ -8616,6 +8684,9 @@
if (!srcStages)
srcStages = dstStages;
+ removeIllegalAccessFlags(dstAccesses, dstStages);
+ removeIllegalAccessFlags(srcAccesses, srcStages);
+
state.commandBufferIsEmpty = false;
state.cache.barrier(srcStages, srcAccesses, dstStages, dstAccesses);
break;
@@ -8805,6 +8876,9 @@
if (!srcStages)
srcStages = dstStages;
+ removeIllegalAccessFlags(dstAccesses, dstStages);
+ removeIllegalAccessFlags(srcAccesses, srcStages);
+
return de::MovePtr<CmdCommand>(new ImageTransition(srcStages, srcAccesses, dstStages, dstAccesses, srcLayout, dstLayout));
}
@@ -8854,6 +8928,9 @@
if (!srcStages)
srcStages = dstStages;
+ removeIllegalAccessFlags(dstAccesses, dstStages);
+ removeIllegalAccessFlags(srcAccesses, srcStages);
+
PipelineBarrier::Type type;
if (op == OP_PIPELINE_BARRIER_IMAGE)
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp
index 46f94b5..dc09eeb 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp
@@ -899,6 +899,8 @@
TestInstance* MSCaseSampleQualifierDistinctValues::createInstance (Context& context) const
{
+ if (!context.getDeviceFeatures().sampleRateShading)
+ TCU_THROW(NotSupportedError, "sampleRateShading support required");
return new MSInstanceDistinctValues(context, m_imageMSParams);
}
diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp
index eaedb30..a3b977a 100644
--- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp
+++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp
@@ -953,8 +953,8 @@
drawState.numSamples = m_samples;
drawState.sampleShadingEnable = true;
- vulkanProgram.descriptorSetLayout = descriptorSetLayout;
- vulkanProgram.descriptorSet = descriptorSet;
+ vulkanProgram.descriptorSetLayout = *descriptorSetLayout;
+ vulkanProgram.descriptorSet = *descriptorSet;
VulkanDrawContext vulkanDrawContext(m_context, drawState, drawCallData, vulkanProgram);
vulkanDrawContext.draw();
@@ -1502,8 +1502,8 @@
drawState.numSamples = m_sampleCount;
drawState.sampleShadingEnable = true;
- vulkanProgram.descriptorSetLayout = descriptorSetLayout;
- vulkanProgram.descriptorSet = descriptorSet;
+ vulkanProgram.descriptorSetLayout = *descriptorSetLayout;
+ vulkanProgram.descriptorSet = *descriptorSet;
VulkanDrawContext vulkanDrawContext(m_context, drawState, drawCallData, vulkanProgram);
vulkanDrawContext.draw();
diff --git a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp
index 4d40ddf..e5511c9 100644
--- a/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp
+++ b/external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderMatrixTests.cpp
@@ -1434,10 +1434,10 @@
for (int attribNdx = 0; attribNdx < 4; attribNdx++)
{
m_userAttribTransforms[attribNdx] = Mat4(0.0f);
- m_userAttribTransforms[attribNdx]( 0, 3) = 0.2f; // !< prevent matrix*vec from going into zero (assuming vec.w != 0)
- m_userAttribTransforms[attribNdx]( 1, 3) = 0.1f; // !<
- m_userAttribTransforms[attribNdx]( 2, 3) = 0.4f + 0.15f * float(attribNdx); // !<
- m_userAttribTransforms[attribNdx]( 3, 3) = 0.7f; // !<
+ m_userAttribTransforms[attribNdx]( 0, 3) = (op == OP_INVERSE ? -0.5f : 0.2f); // prevent matrix*vec from going into zero (assuming vec.w != 0).
+ m_userAttribTransforms[attribNdx]( 1, 3) = (op == OP_INVERSE ? -1.3f : 0.1f); // Modified input for OP_INVERSE case, as determinant of final input
+ m_userAttribTransforms[attribNdx]( 2, 3) = 0.4f + 0.15f * float(attribNdx); // matrix is spanning both sides of 0, so 0 (and division by 0) may happen on mediump.
+ m_userAttribTransforms[attribNdx]( 3, 3) = (op == OP_INVERSE ? -3.0f : 0.7f); // Modified OP_INVERSE final input matrix is same signed in whole input range.
m_userAttribTransforms[attribNdx]((0 + attribNdx) % 4, 0) = 1.0f;
m_userAttribTransforms[attribNdx]((1 + attribNdx) % 4, 1) = 1.0f;
m_userAttribTransforms[attribNdx]((2 + attribNdx) % 4, 2) = 1.0f;
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
index 848f1ce..0b556ac 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
@@ -5851,16 +5851,21 @@
if (m_features == COMPUTE_TEST_USES_INT16)
{
- m_asmTypes["int_capabilities"] = "OpCapability Int16\n";
+ m_asmTypes["int_capabilities"] = "OpCapability Int16\n"
+ "OpCapability StorageUniformBufferBlock16\n";
+ m_asmTypes["int_extensions"] = "OpExtension \"SPV_KHR_16bit_storage\"\n";
}
else if (m_features == COMPUTE_TEST_USES_INT64)
{
m_asmTypes["int_capabilities"] = "OpCapability Int64\n";
+ m_asmTypes["int_extensions"] = "";
}
else if (m_features == COMPUTE_TEST_USES_INT16_INT64)
{
- m_asmTypes["int_capabilities"] = string("OpCapability Int16\n") +
- "OpCapability Int64\n";
+ m_asmTypes["int_capabilities"] = "OpCapability Int16\n"
+ "OpCapability StorageUniformBufferBlock16\n"
+ "OpCapability Int64\n";
+ m_asmTypes["int_extensions"] = "OpExtension \"SPV_KHR_16bit_storage\"\n";
}
else
{
@@ -5889,6 +5894,7 @@
const StringTemplate shader (
"OpCapability Shader\n"
"${int_capabilities}"
+ "${int_extensions}"
"OpMemoryModel Logical GLSL450\n"
"OpEntryPoint GLCompute %main \"main\" %id\n"
"OpExecutionMode %main LocalSize 1 1 1\n"
@@ -5981,6 +5987,11 @@
spec.outputs.push_back(test->m_outputBuffer);
spec.numWorkGroups = IVec3(1, 1, 1);
+ if (test->m_features == COMPUTE_TEST_USES_INT16 || test->m_features == COMPUTE_TEST_USES_INT16_INT64)
+ {
+ spec.extensions.push_back("VK_KHR_16bit_storage");
+ }
+
group->addChild(new SpvAsmComputeShaderCase(testCtx, test->m_name.c_str(), "Convert integers with OpSConvert.", spec, test->m_features));
}
@@ -6019,6 +6030,11 @@
spec.outputs.push_back(test->m_outputBuffer);
spec.numWorkGroups = IVec3(1, 1, 1);
+ if (test->m_features == COMPUTE_TEST_USES_INT16 || test->m_features == COMPUTE_TEST_USES_INT16_INT64)
+ {
+ spec.extensions.push_back("VK_KHR_16bit_storage");
+ }
+
group->addChild(new SpvAsmComputeShaderCase(testCtx, test->m_name.c_str(), "Convert integers with OpUConvert.", spec, test->m_features));
}
return group.release();
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp
index 758e7e5..9224c9f 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariablePointersTests.cpp
@@ -1665,6 +1665,7 @@
"OpDecorate %arr2_v4float ArrayStride 16 \n"
"OpDecorate %arr2_inner_struct ArrayStride 64 \n"
"OpDecorate %mat2x2_inner_struct ArrayStride 128 \n"
+ "OpDecorate %mat2x2_ptr ArrayStride 128 \n"
"OpDecorate %sb_buf ArrayStride 256 \n"
"OpDecorate %v4f32_ptr ArrayStride 16 \n"
@@ -1743,6 +1744,10 @@
"%param = OpFunctionParameter %v4f32\n"
"%entry = OpLabel\n"
+ // Define base pointers for OpPtrAccessChain
+ "%in_a_matptr = OpAccessChain %mat2x2_ptr %in_a %c_i32_0\n"
+ "%in_b_matptr = OpAccessChain %mat2x2_ptr %in_b %c_i32_0\n"
+
// Define the 2 pointers from which we're going to choose one.
"${a_loc} \n"
"${b_loc} \n"
@@ -1799,34 +1804,34 @@
"%b_loc = OpAccessChain %sb_f32ptr %in_b %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_3"};
const string inputAPtrAccessChain[] = { "",
- "%a_loc = OpPtrAccessChain %mat2x2_ptr %in_a %c_i32_0 %c_i32_0",
- "%a_loc = OpPtrAccessChain %arr2_ptr %in_a %c_i32_0 %c_i32_0 %c_i32_0",
- "%a_loc = OpPtrAccessChain %inner_struct_ptr %in_a %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1",
- "%a_loc = OpPtrAccessChain %arr_v4f32_ptr %in_a %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_1",
- "%a_loc = OpPtrAccessChain %v4f32_ptr %in_a %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_0 %c_i32_0 %c_i32_0",
+ "%a_loc = OpPtrAccessChain %mat2x2_ptr %in_a_matptr %c_i32_0",
+ "%a_loc = OpPtrAccessChain %arr2_ptr %in_a_matptr %c_i32_0 %c_i32_0",
+ "%a_loc = OpPtrAccessChain %inner_struct_ptr %in_a_matptr %c_i32_0 %c_i32_1 %c_i32_1",
+ "%a_loc = OpPtrAccessChain %arr_v4f32_ptr %in_a_matptr %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_1",
+ "%a_loc = OpPtrAccessChain %v4f32_ptr %in_a_matptr %c_i32_0 %c_i32_1 %c_i32_0 %c_i32_0 %c_i32_0",
// Next case emulates:
- // %a_loc = OpPtrAccessChain %sb_f32ptr %in_a %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_3
+ // %a_loc = OpPtrAccessChain %sb_f32ptr %in_a_matptr %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_3
// But rewrite it to exercise OpPtrAccessChain with a non-zero first index:
// %a_loc_arr is a pointer to an array that we want to index with 1.
// But instead of just using OpAccessChain with first index 1, use OpAccessChain with index 0 to
// get a pointer to the first element, then send that into OpPtrAccessChain with index 1.
- "%a_loc_arr = OpPtrAccessChain %arr_v4f32_ptr %in_a %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 "
+ "%a_loc_arr = OpPtrAccessChain %arr_v4f32_ptr %in_a_matptr %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 "
"%a_loc_first_elem = OpAccessChain %v4f32_ptr %a_loc_arr %c_i32_0 "
"%a_loc = OpPtrAccessChain %sb_f32ptr %a_loc_first_elem %c_i32_1 %c_i32_3"};
const string inputBPtrAccessChain[] = { "",
- "%b_loc = OpPtrAccessChain %mat2x2_ptr %in_b %c_i32_0 %c_i32_0",
- "%b_loc = OpPtrAccessChain %arr2_ptr %in_b %c_i32_0 %c_i32_0 %c_i32_0",
- "%b_loc = OpPtrAccessChain %inner_struct_ptr %in_b %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1",
- "%b_loc = OpPtrAccessChain %arr_v4f32_ptr %in_b %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_1",
- "%b_loc = OpPtrAccessChain %v4f32_ptr %in_b %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_0 %c_i32_0 %c_i32_0",
+ "%b_loc = OpPtrAccessChain %mat2x2_ptr %in_b_matptr %c_i32_0",
+ "%b_loc = OpPtrAccessChain %arr2_ptr %in_b_matptr %c_i32_0 %c_i32_0",
+ "%b_loc = OpPtrAccessChain %inner_struct_ptr %in_b_matptr %c_i32_0 %c_i32_1 %c_i32_1",
+ "%b_loc = OpPtrAccessChain %arr_v4f32_ptr %in_b_matptr %c_i32_0 %c_i32_0 %c_i32_0 %c_i32_1",
+ "%b_loc = OpPtrAccessChain %v4f32_ptr %in_b_matptr %c_i32_0 %c_i32_1 %c_i32_0 %c_i32_0 %c_i32_0",
// Next case emulates:
- // %b_loc = OpPtrAccessChain %sb_f32ptr %in_b %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_3
+ // %b_loc = OpPtrAccessChain %sb_f32ptr %in_b_matptr %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_1 %c_i32_3
// But rewrite it to exercise OpPtrAccessChain with a non-zero first index:
// %b_loc_arr is a pointer to an array that we want to index with 1.
// But instead of just using OpAccessChain with first index 1, use OpAccessChain with index 0 to
// get a pointer to the first element, then send that into OpPtrAccessChain with index 1.
- "%b_loc_arr = OpPtrAccessChain %arr_v4f32_ptr %in_b %c_i32_0 %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 "
+ "%b_loc_arr = OpPtrAccessChain %arr_v4f32_ptr %in_b_matptr %c_i32_0 %c_i32_1 %c_i32_1 %c_i32_1 "
"%b_loc_first_elem = OpAccessChain %v4f32_ptr %b_loc_arr %c_i32_0 "
"%b_loc = OpPtrAccessChain %sb_f32ptr %b_loc_first_elem %c_i32_1 %c_i32_3"};
@@ -2466,7 +2471,6 @@
// VARIABLES
"%input = OpVariable %float_struct_ptr StorageBuffer \n"
- "%float_var = OpVariable %sb_f32ptr StorageBuffer %c_null_ptr \n"
);
const StringTemplate testFunction (
@@ -2488,7 +2492,7 @@
"OpReturnValue %output_color\n"
"OpFunctionEnd\n");
- // float_var has been inintialized to NULL.
+ // f32_ptr_var has been inintialized to NULL.
// Now set it to the input variable and return it as output
{
GraphicsResources resources;
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
index b3c8cf9..071ce13 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationCrossInstanceSharingTests.cpp
@@ -72,6 +72,178 @@
const bool dedicated;
};
+// A helper class to test for extensions upfront and throw not supported to speed up test runtimes compared to failing only
+// after creating unnecessary vkInstances. A common example of this is win32 platforms taking a long time to run _fd tests.
+class NotSupportedChecker
+{
+public:
+ NotSupportedChecker (const Context& context,
+ TestConfig config,
+ const OperationSupport& writeOp,
+ const OperationSupport& readOp)
+ : m_context (context)
+ {
+ // Check instance support
+ requireInstanceExtension("VK_KHR_get_physical_device_properties2");
+
+ requireInstanceExtension("VK_KHR_external_semaphore_capabilities");
+ requireInstanceExtension("VK_KHR_external_memory_capabilities");
+
+ // Check device support
+ if (config.dedicated)
+ requireDeviceExtension("VK_KHR_dedicated_allocation");
+
+ requireDeviceExtension("VK_KHR_external_semaphore");
+ requireDeviceExtension("VK_KHR_external_memory");
+
+ if (config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR
+ || config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR
+ || config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR)
+ {
+ requireDeviceExtension("VK_KHR_external_semaphore_fd");
+ requireDeviceExtension("VK_KHR_external_memory_fd");
+ }
+
+ if (config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR
+ || config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR
+ || config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR
+ || config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR)
+ {
+ requireDeviceExtension("VK_KHR_external_semaphore_win32");
+ requireDeviceExtension("VK_KHR_external_memory_win32");
+ }
+
+ TestLog& log = context.getTestContext().getLog();
+ const vk::InstanceInterface& vki = context.getInstanceInterface();
+ const vk::VkPhysicalDevice physicalDevice = context.getPhysicalDevice();
+
+ // Check resource support
+ if (config.resource.type == RESOURCE_TYPE_IMAGE)
+ {
+ const vk::VkPhysicalDeviceExternalImageFormatInfoKHR externalInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR,
+ DE_NULL,
+ config.memoryHandleType
+ };
+ const vk::VkPhysicalDeviceImageFormatInfo2KHR imageFormatInfo =
+ {
+ vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR,
+ &externalInfo,
+ config.resource.imageFormat,
+ config.resource.imageType,
+ vk::VK_IMAGE_TILING_OPTIMAL,
+ readOp.getResourceUsageFlags() | writeOp.getResourceUsageFlags(),
+ 0u
+ };
+ vk::VkExternalImageFormatPropertiesKHR externalProperties =
+ {
+ vk::VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR,
+ DE_NULL,
+ { 0u, 0u, 0u }
+ };
+ vk::VkImageFormatProperties2KHR formatProperties =
+ {
+ vk::VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR,
+ &externalProperties,
+ {
+ { 0u, 0u, 0u },
+ 0u,
+ 0u,
+ 0u,
+ 0u,
+ }
+ };
+
+ {
+ const vk::VkResult res = vki.getPhysicalDeviceImageFormatProperties2KHR(physicalDevice, &imageFormatInfo, &formatProperties);
+
+ if (res == vk::VK_ERROR_FORMAT_NOT_SUPPORTED)
+ TCU_THROW(NotSupportedError, "Image format not supported");
+
+ VK_CHECK(res); // Check other errors
+ }
+
+ log << TestLog::Message << "External image format properties: " << imageFormatInfo << "\n"<< externalProperties << TestLog::EndMessage;
+
+ if ((externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR) == 0)
+ TCU_THROW(NotSupportedError, "Exporting image resource not supported");
+
+ if ((externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR) == 0)
+ TCU_THROW(NotSupportedError, "Importing image resource not supported");
+
+ if (!config.dedicated && (externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR) != 0)
+ {
+ TCU_THROW(NotSupportedError, "Handle requires dedicated allocation, but test uses suballocated memory");
+ }
+ }
+ else
+ {
+ const vk::VkPhysicalDeviceExternalBufferInfoKHR info =
+ {
+ vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR,
+ DE_NULL,
+
+ 0u,
+ readOp.getResourceUsageFlags() | writeOp.getResourceUsageFlags(),
+ config.memoryHandleType
+ };
+ vk::VkExternalBufferPropertiesKHR properties =
+ {
+ vk::VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR,
+ DE_NULL,
+ { 0u, 0u, 0u}
+ };
+ vki.getPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, &info, &properties);
+
+ log << TestLog::Message << "External buffer properties: " << info << "\n" << properties << TestLog::EndMessage;
+
+ if ((properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR) == 0
+ || (properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR) == 0)
+ TCU_THROW(NotSupportedError, "Exporting and importing memory type not supported");
+
+ if (!config.dedicated && (properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR) != 0)
+ {
+ TCU_THROW(NotSupportedError, "Handle requires dedicated allocation, but test uses suballocated memory");
+ }
+ }
+
+ // Check semaphore support
+ {
+ const vk::VkPhysicalDeviceExternalSemaphoreInfoKHR info =
+ {
+ vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR,
+ DE_NULL,
+ config.semaphoreHandleType
+ };
+ vk::VkExternalSemaphorePropertiesKHR properties;
+
+ vki.getPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, &info, &properties);
+
+ log << TestLog::Message << info << "\n" << properties << TestLog::EndMessage;
+
+ if ((properties.externalSemaphoreFeatures & vk::VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR) == 0
+ || (properties.externalSemaphoreFeatures & vk::VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR) == 0)
+ TCU_THROW(NotSupportedError, "Exporting and importing semaphore type not supported");
+ }
+ }
+
+private:
+ void requireDeviceExtension(const char* name) const
+ {
+ if (!de::contains(m_context.getDeviceExtensions().begin(), m_context.getDeviceExtensions().end(), name))
+ TCU_THROW(NotSupportedError, (std::string(name) + " is not supported").c_str());
+ }
+
+ void requireInstanceExtension(const char* name) const
+ {
+ if (!de::contains(m_context.getInstanceExtensions().begin(), m_context.getInstanceExtensions().end(), name))
+ TCU_THROW(NotSupportedError, (std::string(name) + " is not supported").c_str());
+ }
+
+ const Context& m_context;
+};
+
bool checkQueueFlags (vk::VkQueueFlags availableFlags, const vk::VkQueueFlags neededFlags)
{
if ((availableFlags & (vk::VK_QUEUE_GRAPHICS_BIT | vk::VK_QUEUE_COMPUTE_BIT)) != 0)
@@ -813,6 +985,7 @@
const TestConfig m_config;
const de::UniquePtr<OperationSupport> m_supportWriteOp;
const de::UniquePtr<OperationSupport> m_supportReadOp;
+ const NotSupportedChecker m_notSupportedChecker; // Must declare before VkInstance to effectively reduce runtimes!
const vk::Unique<vk::VkInstance> m_instanceA;
@@ -850,6 +1023,7 @@
, m_config (config)
, m_supportWriteOp (makeOperationSupport(config.writeOp, config.resource))
, m_supportReadOp (makeOperationSupport(config.readOp, config.resource))
+ , m_notSupportedChecker (context, m_config, *m_supportWriteOp, *m_supportReadOp)
, m_instanceA (createInstance(context.getPlatformInterface()))
@@ -877,117 +1051,6 @@
, m_queueANdx (0)
, m_queueBNdx (0)
{
- TestLog& log = m_context.getTestContext().getLog();
-
- // Check resource support
- if (m_config.resource.type == RESOURCE_TYPE_IMAGE)
- {
- const vk::VkPhysicalDeviceExternalImageFormatInfoKHR externalInfo =
- {
- vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR,
- DE_NULL,
- m_memoryHandleType
- };
- const vk::VkPhysicalDeviceImageFormatInfo2KHR imageFormatInfo =
- {
- vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR,
- &externalInfo,
- m_config.resource.imageFormat,
- m_config.resource.imageType,
- vk::VK_IMAGE_TILING_OPTIMAL,
- m_supportReadOp->getResourceUsageFlags() | m_supportWriteOp->getResourceUsageFlags(),
- 0u
- };
- vk::VkExternalImageFormatPropertiesKHR externalProperties =
- {
- vk::VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR,
- DE_NULL,
- { 0u, 0u, 0u }
- };
- vk::VkImageFormatProperties2KHR formatProperties =
- {
- vk::VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR,
- &externalProperties,
- {
- { 0u, 0u, 0u },
- 0u,
- 0u,
- 0u,
- 0u,
- }
- };
-
- {
- const vk::VkResult res = m_vkiA.getPhysicalDeviceImageFormatProperties2KHR(m_physicalDeviceA, &imageFormatInfo, &formatProperties);
-
- if (res == vk::VK_ERROR_FORMAT_NOT_SUPPORTED)
- TCU_THROW(NotSupportedError, "Image format not supported");
-
- VK_CHECK(res); // Check other errors
- }
-
- log << TestLog::Message << "External image format properties: " << imageFormatInfo << "\n"<< externalProperties << TestLog::EndMessage;
-
- if ((externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR) == 0)
- TCU_THROW(NotSupportedError, "Exporting image resource not supported");
-
- if ((externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR) == 0)
- TCU_THROW(NotSupportedError, "Importing image resource not supported");
-
- if (!m_config.dedicated && (externalProperties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR) != 0)
- {
- TCU_THROW(NotSupportedError, "Handle requires dedicated allocation, but test uses suballocated memory");
- }
- }
- else
- {
- const vk::VkPhysicalDeviceExternalBufferInfoKHR info =
- {
- vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR,
- DE_NULL,
-
- 0u,
- m_supportReadOp->getResourceUsageFlags() | m_supportWriteOp->getResourceUsageFlags(),
- m_memoryHandleType
- };
- vk::VkExternalBufferPropertiesKHR properties =
- {
- vk::VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR,
- DE_NULL,
- { 0u, 0u, 0u}
- };
- m_vkiA.getPhysicalDeviceExternalBufferPropertiesKHR(m_physicalDeviceA, &info, &properties);
-
- log << TestLog::Message << "External buffer properties: " << info << "\n" << properties << TestLog::EndMessage;
-
- if ((properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR) == 0
- || (properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR) == 0)
- TCU_THROW(NotSupportedError, "Exporting and importing memory type not supported");
-
- if (!m_config.dedicated && (properties.externalMemoryProperties.externalMemoryFeatures & vk::VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR) != 0)
- {
- TCU_THROW(NotSupportedError, "Handle requires dedicated allocation, but test uses suballocated memory");
- }
- }
-
- // Check semaphore support
- {
- const vk::VkPhysicalDeviceExternalSemaphoreInfoKHR info =
- {
- vk::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR,
- DE_NULL,
- m_semaphoreHandleType
- };
- vk::VkExternalSemaphorePropertiesKHR properties;
-
- m_vkiA.getPhysicalDeviceExternalSemaphorePropertiesKHR(m_physicalDeviceA, &info, &properties);
-
- log << TestLog::Message << info << "\n" << properties << TestLog::EndMessage;
-
- if ((properties.externalSemaphoreFeatures & vk::VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR) == 0
- || (properties.externalSemaphoreFeatures & vk::VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR) == 0)
- TCU_THROW(NotSupportedError, "Exporting and importing semaphore type not supported");
- }
}
tcu::TestStatus SharingTestInstance::iterate (void)
diff --git a/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp b/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp
index 2548e97..5911f82 100644
--- a/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp
+++ b/external/vulkancts/modules/vulkan/texture/vktTextureTestUtil.cpp
@@ -1094,8 +1094,8 @@
else
DE_ASSERT(DE_FALSE);
- Unique<VkShaderModule> vertexShaderModule (createShaderModule(vkd, vkDevice, m_context.getBinaryCollection().get("vertext_" + std::string(getProgramName(progSpec))), 0));
- Unique<VkShaderModule> fragmentShaderModule (createShaderModule(vkd, vkDevice, m_context.getBinaryCollection().get("fragment_" + std::string(getProgramName(progSpec))), 0));
+ Unique<VkShaderModule> vertexShaderModule (createShaderModule(vkd, vkDevice, m_context.getBinaryCollection().get("vertext_" + std::string(getProgramName(progSpec))), 0));
+ Unique<VkShaderModule> fragmentShaderModule (createShaderModule(vkd, vkDevice, m_context.getBinaryCollection().get("fragment_" + std::string(getProgramName(progSpec))), 0));
Move<VkSampler> sampler;
Move<VkDescriptorSet> descriptorSet[2];
@@ -1106,10 +1106,14 @@
Move<VkPipeline> graphicsPipeline;
Move<VkBuffer> vertexBuffer;
de::MovePtr<Allocation> vertexBufferMemory;
- const deUint32 positionDataSize = deUint32(sizeof(float) * 4 * 4);
- const deUint32 textureCoordDataSize = deUint32(sizeof(float) * numComps * 4);
- const VkPhysicalDeviceProperties properties = m_context.getDeviceProperties();
+ const VkDeviceSize vertexBufferOffset = 0;
+ const deUint32 vertexPositionStrideSize = deUint32(sizeof(tcu::Vec4));
+ const deUint32 vertexTextureStrideSize = deUint32(numComps * sizeof(float));
+ const deUint32 positionDataSize = vertexPositionStrideSize * 4u;
+ const deUint32 textureCoordDataSize = vertexTextureStrideSize * 4u;
+
+ const VkPhysicalDeviceProperties properties = m_context.getDeviceProperties();
if (positionDataSize > properties.limits.maxVertexInputAttributeOffset)
{
@@ -1142,9 +1146,6 @@
}
};
- const deUint32 vertexPositionStrideSize = deUint32(sizeof(tcu::Vec4));
- const deUint32 vertexTextureStrideSize = deUint32(numComps * sizeof(float));
-
const VkVertexInputBindingDescription vertexInputBindingDescription[2] =
{
{
@@ -1395,12 +1396,17 @@
// Create Vertex Buffer
{
+ VkDeviceSize bufferSize = positionDataSize + textureCoordDataSize;
+
+ // Pad the buffer size to a stride multiple for the last element so that it isn't out of bounds
+ bufferSize += vertexTextureStrideSize - ((bufferSize - vertexBufferOffset) % vertexTextureStrideSize);
+
const VkBufferCreateInfo vertexBufferParams =
{
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, // VkStructureType sType;
DE_NULL, // const void* pNext;
0u, // VkBufferCreateFlags flags;
- positionDataSize + textureCoordDataSize, // VkDeviceSize size;
+ bufferSize, // VkDeviceSize size;
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, // VkBufferUsageFlags usage;
VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode sharingMode;
1u, // deUint32 queueFamilyCount;
@@ -1453,8 +1459,6 @@
vkd.cmdBeginRenderPass(*commandBuffer, &renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
}
- const VkDeviceSize vertexBufferOffset = 0;
-
vkd.cmdBindPipeline(*commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, *graphicsPipeline);
vkd.cmdBindDescriptorSets(*commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, *pipelineLayout, 0u, 1, &descriptorSet[0].get(), 0u, DE_NULL);
vkd.cmdBindDescriptorSets(*commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, *pipelineLayout, 1u, 1, &descriptorSet[1].get(), 0u, DE_NULL);
diff --git a/external/vulkancts/modules/vulkan/vktDrawUtil.cpp b/external/vulkancts/modules/vulkan/vktDrawUtil.cpp
index 2325f54..17f5714 100644
--- a/external/vulkancts/modules/vulkan/vktDrawUtil.cpp
+++ b/external/vulkancts/modules/vulkan/vktDrawUtil.cpp
@@ -654,7 +654,7 @@
0u, // write mask
0u); // reference
- if (m_drawState.depthBoundsTestEnable && context.getDeviceFeatures().depthBounds)
+ if (m_drawState.depthBoundsTestEnable && !context.getDeviceFeatures().depthBounds)
TCU_THROW(NotSupportedError, "depthBounds not supported");
const VkPipelineDepthStencilStateCreateInfo pipelineDepthStencilStateInfo =
diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp
index 540e511..53a0450 100644
--- a/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp
+++ b/external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp
@@ -1095,7 +1095,7 @@
deUint32 imageIndex;
// Acquire next image
- VK_CHECK(m_vkd.acquireNextImageKHR(*m_device, *m_swapchain, foreverNs, currentAcquireSemaphore, fence, &imageIndex));
+ VK_CHECK(m_vkd.acquireNextImageKHR(*m_device, *m_swapchain, foreverNs, currentAcquireSemaphore, (vk::VkFence)0, &imageIndex));
// Create command buffer
m_commandBuffers[m_frameNdx % m_commandBuffers.size()] = createCommandBuffer(m_vkd, *m_device, *m_commandPool, *m_pipelineLayout, *m_renderPass, m_framebuffers[imageIndex], *m_pipeline, m_frameNdx, m_quadCount, width, height).disown();
@@ -1208,7 +1208,7 @@
¤tRenderSemaphore
};
- VK_CHECK(m_vkd.queueSubmit(m_queue, 1u, &submitInfo, (vk::VkFence)0));
+ VK_CHECK(m_vkd.queueSubmit(m_queue, 1u, &submitInfo, fence));
}
// Present frame
diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
index b72a910..1457146 100644
--- a/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
+++ b/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
@@ -1190,7 +1190,7 @@
deUint32 imageIndex;
// Acquire next image
- VK_CHECK(m_vkd.acquireNextImageKHR(*m_device, *m_swapchain, foreverNs, currentAcquireSemaphore, fence, &imageIndex));
+ VK_CHECK(m_vkd.acquireNextImageKHR(*m_device, *m_swapchain, foreverNs, currentAcquireSemaphore, (vk::VkFence)0, &imageIndex));
// Create command buffer
{
@@ -1216,7 +1216,7 @@
¤tRenderSemaphore
};
- VK_CHECK(m_vkd.queueSubmit(m_queue, 1u, &submitInfo, (vk::VkFence)0));
+ VK_CHECK(m_vkd.queueSubmit(m_queue, 1u, &submitInfo, fence));
}
// Present frame
diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp
index 97ee3a8..8ed1064 100644
--- a/external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp
+++ b/external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp
@@ -1055,11 +1055,12 @@
VK_CHECK(m_vkd.endCommandBuffer(*commandBuffer));
+ const vk::VkPipelineStageFlags waitDstStages[] = { vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT };
const vk::VkSubmitInfo submitInfo =
{
vk::VK_STRUCTURE_TYPE_SUBMIT_INFO,
DE_NULL,
- 1, &*semaphore, DE_NULL,
+ 1, &*semaphore, waitDstStages,
1, &*commandBuffer,
0, DE_NULL,
};
diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp
index d01c7a8..176d7cd 100644
--- a/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp
+++ b/external/vulkancts/modules/vulkan/wsi/vktWsiSwapchainTests.cpp
@@ -1398,7 +1398,7 @@
*swapchain,
std::numeric_limits<deUint64>::max(),
imageReadySemaphore,
- imageReadyFence,
+ (VkFence)0,
&imageNdx);
if (acquireResult == VK_SUBOPTIMAL_KHR)
@@ -1438,7 +1438,7 @@
};
renderer.recordFrame(commandBuffer, imageNdx, frameNdx);
- VK_CHECK(vkd.queueSubmit(devHelper.queue, 1u, &submitInfo, (VkFence)0));
+ VK_CHECK(vkd.queueSubmit(devHelper.queue, 1u, &submitInfo, imageReadyFence));
VK_CHECK(vkd.queuePresentKHR(devHelper.queue, &presentInfo));
}
}
diff --git a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp
index d5bee20..163f69e 100644
--- a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp
+++ b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrConversionTests.cpp
@@ -1915,7 +1915,7 @@
log << TestLog::Message << "XChromaOffset: " << config.xChromaOffset << TestLog::EndMessage;
log << TestLog::Message << "YChromaOffset: " << config.yChromaOffset << TestLog::EndMessage;
log << TestLog::Message << "ExplicitReconstruction: " << (config.explicitReconstruction ? "true" : "false") << TestLog::EndMessage;
- log << TestLog::Message << "Disjoint: " << (config.explicitReconstruction ? "true" : "false") << TestLog::EndMessage;
+ log << TestLog::Message << "Disjoint: " << (config.disjoint ? "true" : "false") << TestLog::EndMessage;
log << TestLog::Message << "ColorRange: " << config.colorRange << TestLog::EndMessage;
log << TestLog::Message << "ColorModel: " << config.colorModel << TestLog::EndMessage;
log << TestLog::Message << "ComponentMapping: " << config.componentMapping << TestLog::EndMessage;
@@ -1995,22 +1995,26 @@
#endif
{
- const vk::PlanarFormatDescription planeInfo (vk::getPlanarFormatDescription(config.format));
- MultiPlaneImageData src (config.format, size);
+ const vk::PlanarFormatDescription planeInfo (vk::getPlanarFormatDescription(config.format));
+ MultiPlaneImageData src (config.format, size);
- deUint32 nullAccessData (0u);
- ChannelAccess nullAccess (tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT, 1u, IVec3(size.x(), size.y(), 1), IVec3(0, 0, 0), &nullAccessData, 0u);
- deUint32 nullAccessAlphaData (~0u);
- ChannelAccess nullAccessAlpha (tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT, 1u, IVec3(size.x(), size.y(), 1), IVec3(0, 0, 0), &nullAccessAlphaData, 0u);
- ChannelAccess rChannelAccess (planeInfo.hasChannelNdx(0) ? getChannelAccess(src, planeInfo, size, 0) : nullAccess);
- ChannelAccess gChannelAccess (planeInfo.hasChannelNdx(1) ? getChannelAccess(src, planeInfo, size, 1) : nullAccess);
- ChannelAccess bChannelAccess (planeInfo.hasChannelNdx(2) ? getChannelAccess(src, planeInfo, size, 2) : nullAccess);
- ChannelAccess aChannelAccess (planeInfo.hasChannelNdx(3) ? getChannelAccess(src, planeInfo, size, 3) : nullAccessAlpha);
+ deUint32 nullAccessData (0u);
+ ChannelAccess nullAccess (tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT, 1u, IVec3(size.x(), size.y(), 1), IVec3(0, 0, 0), &nullAccessData, 0u);
+ deUint32 nullAccessAlphaData (~0u);
+ ChannelAccess nullAccessAlpha (tcu::TEXTURECHANNELCLASS_UNSIGNED_FIXED_POINT, 1u, IVec3(size.x(), size.y(), 1), IVec3(0, 0, 0), &nullAccessAlphaData, 0u);
+ ChannelAccess rChannelAccess (planeInfo.hasChannelNdx(0) ? getChannelAccess(src, planeInfo, size, 0) : nullAccess);
+ ChannelAccess gChannelAccess (planeInfo.hasChannelNdx(1) ? getChannelAccess(src, planeInfo, size, 1) : nullAccess);
+ ChannelAccess bChannelAccess (planeInfo.hasChannelNdx(2) ? getChannelAccess(src, planeInfo, size, 2) : nullAccess);
+ ChannelAccess aChannelAccess (planeInfo.hasChannelNdx(3) ? getChannelAccess(src, planeInfo, size, 3) : nullAccessAlpha);
+ const bool implicitNearestCosited ((config.chromaFilter == vk::VK_FILTER_NEAREST && !config.explicitReconstruction) &&
+ (config.xChromaOffset == vk::VK_CHROMA_LOCATION_COSITED_EVEN_KHR || config.yChromaOffset == vk::VK_CHROMA_LOCATION_COSITED_EVEN_KHR));
vector<Vec2> sts;
vector<Vec4> results;
vector<Vec4> minBounds;
+ vector<Vec4> minMidpointBounds;
vector<Vec4> maxBounds;
+ vector<Vec4> maxMidpointBounds;
vector<Vec4> uvBounds;
vector<IVec4> ijBounds;
@@ -2050,6 +2054,12 @@
calculateBounds(rChannelAccess, gChannelAccess, bChannelAccess, aChannelAccess, bitDepth, sts, filteringPrecision, conversionPrecision, subTexelPrecisionBits, config.textureFilter, config.colorModel, config.colorRange, config.chromaFilter, config.xChromaOffset, config.yChromaOffset, config.componentMapping, explicitReconstruction, config.addressModeU, config.addressModeV, minBounds, maxBounds, uvBounds, ijBounds);
+ // Handle case: If implicit reconstruction and chromaFilter == NEAREST, an implementation may behave as if both chroma offsets are MIDPOINT.
+ if (implicitNearestCosited)
+ {
+ calculateBounds(rChannelAccess, gChannelAccess, bChannelAccess, aChannelAccess, bitDepth, sts, filteringPrecision, conversionPrecision, subTexelPrecisionBits, config.textureFilter, config.colorModel, config.colorRange, config.chromaFilter, vk::VK_CHROMA_LOCATION_MIDPOINT_KHR, vk::VK_CHROMA_LOCATION_MIDPOINT_KHR, config.componentMapping, explicitReconstruction, config.addressModeU, config.addressModeV, minMidpointBounds, maxMidpointBounds, uvBounds, ijBounds);
+ }
+
if (vk::isYCbCrFormat(config.format))
{
tcu::TextureLevel rImage (tcu::TextureFormat(tcu::TextureFormat::R, tcu::TextureFormat::FLOAT), rChannelAccess.getSize().x(), rChannelAccess.getSize().y());
@@ -2100,9 +2110,11 @@
evalShader(context, config.shaderType, src, size, config.format, config.imageTiling, config.disjoint, config.textureFilter, config.addressModeU, config.addressModeV, config.colorModel, config.colorRange, config.xChromaOffset, config.yChromaOffset, config.chromaFilter, config.componentMapping, config.explicitReconstruction, sts, results);
{
- tcu::TextureLevel minImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
- tcu::TextureLevel maxImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
- tcu::TextureLevel resImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
+ tcu::TextureLevel minImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
+ tcu::TextureLevel maxImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
+ tcu::TextureLevel minMidpointImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
+ tcu::TextureLevel maxMidpointImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
+ tcu::TextureLevel resImage (tcu::TextureFormat(tcu::TextureFormat::RGBA, tcu::TextureFormat::FLOAT), size.x() + (size.x() / 2), size.y() + (size.y() / 2));
for (int y = 0; y < (int)(size.y() + (size.y() / 2)); y++)
for (int x = 0; x < (int)(size.x() + (size.x() / 2)); x++)
@@ -2119,12 +2131,30 @@
resImage.getAccess().setPixel(results[ndx], x, y);
}
+ if (implicitNearestCosited)
+ {
+ for (int y = 0; y < (int)(size.y() + (size.y() / 2)); y++)
+ for (int x = 0; x < (int)(size.x() + (size.x() / 2)); x++)
+ {
+ const int ndx = x + y * (int)(size.x() + (size.x() / 2));
+ minMidpointImage.getAccess().setPixel(minMidpointBounds[ndx], x, y);
+ maxMidpointImage.getAccess().setPixel(maxMidpointBounds[ndx], x, y);
+ }
+ }
+
{
const Vec4 scale (1.0f);
const Vec4 bias (0.0f);
log << TestLog::Image("MinBoundImage", "MinBoundImage", minImage.getAccess(), scale, bias);
log << TestLog::Image("MaxBoundImage", "MaxBoundImage", maxImage.getAccess(), scale, bias);
+
+ if (implicitNearestCosited)
+ {
+ log << TestLog::Image("MinMidpointBoundImage", "MinMidpointBoundImage", minMidpointImage.getAccess(), scale, bias);
+ log << TestLog::Image("MaxMidpointBoundImage", "MaxMidpointBoundImage", maxMidpointImage.getAccess(), scale, bias);
+ }
+
log << TestLog::Image("ResultImage", "ResultImage", resImage.getAccess(), scale, bias);
}
}
@@ -2133,7 +2163,18 @@
for (size_t ndx = 0; ndx < sts.size(); ndx++)
{
- if (tcu::boolAny(tcu::lessThan(results[ndx], minBounds[ndx])) || tcu::boolAny(tcu::greaterThan(results[ndx], maxBounds[ndx])))
+ bool fail;
+ if (implicitNearestCosited)
+ {
+ fail = (tcu::boolAny(tcu::lessThan(results[ndx], minMidpointBounds[ndx])) || tcu::boolAny(tcu::greaterThan(results[ndx], maxMidpointBounds[ndx]))) &&
+ (tcu::boolAny(tcu::lessThan(results[ndx], minBounds[ndx])) || tcu::boolAny(tcu::greaterThan(results[ndx], maxBounds[ndx])));
+ }
+ else
+ {
+ fail = tcu::boolAny(tcu::lessThan(results[ndx], minBounds[ndx])) || tcu::boolAny(tcu::greaterThan(results[ndx], maxBounds[ndx]));
+ }
+
+ if (fail)
{
log << TestLog::Message << "Fail: " << sts[ndx] << " " << results[ndx] << TestLog::EndMessage;
log << TestLog::Message << " Min : " << minBounds[ndx] << TestLog::EndMessage;
diff --git a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrCopyTests.cpp b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrCopyTests.cpp
index 8fabaef..77adfde 100644
--- a/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrCopyTests.cpp
+++ b/external/vulkancts/modules/vulkan/ycbcr/vktYCbCrCopyTests.cpp
@@ -166,7 +166,7 @@
1u,
vk::VK_SAMPLE_COUNT_1_BIT,
tiling,
- vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT | vk::VK_IMAGE_USAGE_SAMPLED_BIT,
+ vk::VK_IMAGE_USAGE_TRANSFER_SRC_BIT | vk::VK_IMAGE_USAGE_TRANSFER_DST_BIT,
vk::VK_SHARING_MODE_EXCLUSIVE,
0u,
(const deUint32*)DE_NULL,
@@ -809,7 +809,35 @@
VK_CHECK(vkd.beginCommandBuffer(*cmdBuffer, &beginInfo));
}
- vkd.cmdCopyImage(*cmdBuffer, *srcImage, vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *dstImage, vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, (deUint32)copies.size(), &copies[0]);
+ for (size_t i = 0; i < copies.size(); i++)
+ {
+ vkd.cmdCopyImage(*cmdBuffer, *srcImage, vk::VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, *dstImage, vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &copies[i]);
+
+ const vk::VkImageMemoryBarrier preCopyBarrier =
+ {
+ vk::VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER,
+ DE_NULL,
+ vk::VK_ACCESS_TRANSFER_WRITE_BIT,
+ vk::VK_ACCESS_TRANSFER_WRITE_BIT,
+ vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ vk::VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
+ VK_QUEUE_FAMILY_IGNORED,
+ VK_QUEUE_FAMILY_IGNORED,
+ *dstImage,
+ { vk::VK_IMAGE_ASPECT_COLOR_BIT, 0u, 1u, 0u, 1u }
+ };
+
+ vkd.cmdPipelineBarrier(*cmdBuffer,
+ (vk::VkPipelineStageFlags)vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
+ (vk::VkPipelineStageFlags)vk::VK_PIPELINE_STAGE_TRANSFER_BIT,
+ (vk::VkDependencyFlags)0u,
+ 0u,
+ (const vk::VkMemoryBarrier*)DE_NULL,
+ 0u,
+ (const vk::VkBufferMemoryBarrier*)DE_NULL,
+ 1u,
+ &preCopyBarrier);
+ }
VK_CHECK(vkd.endCommandBuffer(*cmdBuffer));
diff --git a/external/vulkancts/scripts/src/vulkan.h.in b/external/vulkancts/scripts/src/vulkan.h.in
index b8e204a..25c49d0 100644
--- a/external/vulkancts/scripts/src/vulkan.h.in
+++ b/external/vulkancts/scripts/src/vulkan.h.in
@@ -4293,7 +4293,6 @@
VkSurfaceFormat2KHR* pSurfaceFormats);
#endif
-<<<<<<< HEAD
#define VK_KHR_external_fence_capabilities 1
#define VK_LUID_SIZE_KHR 8
#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1
@@ -4439,8 +4438,6 @@
int* pFd);
#endif
-=======
->>>>>>> 6c472cc5... Test VK_KHR_dedicated_allocation mem requirement queries
#define VK_KHR_dedicated_allocation 1
#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 1
#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
@@ -4459,10 +4456,6 @@
VkBuffer buffer;
} VkMemoryDedicatedAllocateInfoKHR;
-<<<<<<< HEAD
-
-=======
->>>>>>> 6c472cc5... Test VK_KHR_dedicated_allocation mem requirement queries
#define VK_KHR_get_memory_requirements2 1
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"