Commit 1d83e1e8 by Tobin Ehlis Committed by Commit Bot

Vulkan: Handle new validation errors

With updated validation layers Vulkan backend is hitting two new errors. This CL fixes one and works around (WA) another. Fixes issue where a Buffer used in vkCmdDispatchIndirect() did not have VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT set so now setting that usage bit for all buffers. WA issue where invalid topologies enabled primitiveRestart so ignoring that VUID initially until complete fix is implemented. Bug: angleproject:3832 Change-Id: Ie3f681eaf9e2051c27bdf00a35dc50d8ad4a2528 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1763196Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
parent ed4906f8
......@@ -105,7 +105,7 @@ angle::Result BufferVk::setData(const gl::Context *context,
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT |
VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT |
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT;
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;
VkBufferCreateInfo createInfo = {};
createInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
......
......@@ -105,6 +105,8 @@ constexpr const char *kSkippedMessages[] = {
"UNASSIGNED-CoreValidation-Shader-OutputNotConsumed",
// http://anglebug.com/2796
"UNASSIGNED-CoreValidation-Shader-PointSizeMissing",
// http://anglebug.com/3832
"VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428",
};
// Suppress validation errors that are known
......
......@@ -723,6 +723,15 @@ angle::Result GraphicsPipelineDesc::initializePipeline(
inputAssemblyState.flags = 0;
inputAssemblyState.topology =
static_cast<VkPrimitiveTopology>(mInputAssemblyAndColorBlendStateInfo.primitive.topology);
// http://anglebug.com/3832
// We currently hit a VK Validation here where VUID
// VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00428 is flagged because we allow
// primitiveRestartEnable to be true for topologies VK_PRIMITIVE_TOPOLOGY_POINT_LIST,
// VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
// VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY,
// VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY and VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
// However if we force primiteRestartEnable to FALSE we fail tests.
// Need to identify alternate fix.
inputAssemblyState.primitiveRestartEnable =
static_cast<VkBool32>(mInputAssemblyAndColorBlendStateInfo.primitive.restartEnable);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment