mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-09 08:11:06 +00:00
[Coverity] Fix overflow-before-widen errors
This commit is contained in:
@@ -377,7 +377,7 @@ ResourceId GLReplay::RenderOverlay(ResourceId texid, CompType typeHint, DebugOve
|
||||
idxs.resize(length);
|
||||
gl.glGetBufferSubData(
|
||||
eGL_ELEMENT_ARRAY_BUFFER, offset,
|
||||
RDCMIN(GLsizeiptr(length - offset), GLsizeiptr(draw->numIndices * draw->indexByteWidth)),
|
||||
RDCMIN(GLsizeiptr(length - offset), GLsizeiptr(draw->numIndices) * draw->indexByteWidth),
|
||||
&idxs[0]);
|
||||
|
||||
// unbind the real index buffer
|
||||
|
||||
@@ -1293,13 +1293,13 @@ void VulkanReplay::InitPostVSBuffers(uint32_t eventId)
|
||||
|
||||
if(vi->pVertexBindingDescriptions[vb].inputRate == VK_VERTEX_INPUT_RATE_INSTANCE)
|
||||
{
|
||||
len = (maxInstance + 1) * vi->pVertexBindingDescriptions[vb].stride;
|
||||
len = uint64_t(maxInstance + 1) * vi->pVertexBindingDescriptions[vb].stride;
|
||||
|
||||
offs += drawcall->instanceOffset * vi->pVertexBindingDescriptions[vb].stride;
|
||||
}
|
||||
else
|
||||
{
|
||||
len = (maxIndex + 1) * vi->pVertexBindingDescriptions[vb].stride;
|
||||
len = uint64_t(maxIndex + 1) * vi->pVertexBindingDescriptions[vb].stride;
|
||||
|
||||
offs += drawcall->vertexOffset * vi->pVertexBindingDescriptions[vb].stride;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user