aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShahbaz Youssefi <syoussefi@google.com>2024-01-29 22:30:23 -0500
committerswiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com <swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-01-30 13:55:18 +0000
commit5d78b6f0c12370e35ffdcb944f68e8b6537e2818 (patch)
treee38e74eb1ef81567a03a88a8917c35ef97940dc8
parentd040a5bab638bf7c226235c95787ba6288bb6416 (diff)
downloadswiftshader-5d78b6f0c12370e35ffdcb944f68e8b6537e2818.tar.gz
Fix MSAN complaint about uninitialized (and unused) value
Change-Id: Ia83f6a548726c7e277990f9ddfc7286065047307 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/73028 Tested-by: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@google.com>
-rw-r--r--src/Device/Renderer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Device/Renderer.cpp b/src/Device/Renderer.cpp
index b80ee4639..93d2993da 100644
--- a/src/Device/Renderer.cpp
+++ b/src/Device/Renderer.cpp
@@ -285,11 +285,7 @@ void Renderer::draw(const vk::GraphicsPipeline *pipeline, const vk::DynamicState
data->layer = layer;
data->instanceID = instanceID;
data->baseVertex = baseVertex;
-
- if(indexBuffer)
- {
- draw->indexType = pipeline->getIndexBuffer().getIndexType();
- }
+ draw->indexType = indexBuffer ? pipeline->getIndexBuffer().getIndexType() : VK_INDEX_TYPE_UINT16;
draw->vertexRoutine = vertexRoutine;