Commit a4a24af3 by James Dong Committed by Commit Bot

Vulkan: fix uint indices causing incomplete buffer

Fixes buffer size calculation when uploading element buffer to account for 4-byte (uint) indices. Bug: angleproject:2902 Change-Id: Id70fc0fdffecd0b27995820bd0ad88e4cb61e013 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1648325Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 266a9e8d
......@@ -169,7 +169,15 @@ angle::Result VertexArrayVk::convertIndexBufferCPU(ContextVk *contextVk,
dynamicBuffer->releaseRetainedBuffers(contextVk);
const size_t amount = sizeof(GLushort) * indexCount;
size_t elementSize = gl::GetDrawElementsTypeSize(indexType);
if (indexType == gl::DrawElementsType::UnsignedByte)
{
// 8-bit indices are not supported by Vulkan, so they are promoted to
// 16-bit indices below
elementSize = sizeof(GLushort);
}
const size_t amount = elementSize * indexCount;
GLubyte *dst = nullptr;
ANGLE_TRY(dynamicBuffer->allocate(contextVk, amount, &dst, nullptr,
......
......@@ -711,10 +711,6 @@
2950 VULKAN : dEQP-GLES3.functional.negative_api.vertex_array.draw_element* = SKIP
2950 VULKAN : dEQP-GLES3.functional.negative_api.state.get_active_unifor* = SKIP
2950 VULKAN : dEQP-GLES3.functional.negative_api.state.get_active_attrib = SKIP
2950 VULKAN : dEQP-GLES3.functional.draw.draw_elements.indices.user_ptr.index_int = FAIL
2950 VULKAN : dEQP-GLES3.functional.draw.draw_elements.indices.unaligned_user_ptr.index_int = FAIL
2950 VULKAN : dEQP-GLES3.functional.draw.draw_elements_instanced.indices.user_ptr.index_int = FAIL
2950 VULKAN : dEQP-GLES3.functional.draw.draw_elements_instanced.indices.unaligned_user_ptr.index_int = FAIL
// Android Vulkan failures
2950 ANDROID VULKAN : dEQP-GLES3.functional.implementation_limits.max_combined_texture_image_units = FAIL
......
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