Fix copy-paste errors reported by Coverity Scan

This commit is contained in:
baldurk
2017-11-22 11:50:37 +00:00
parent c860d8baa3
commit 4c67de2995
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -2147,7 +2147,7 @@ void BufferViewer::updatePreviewColumns()
m_VSInSecondary.buf = vbs[el.buffer].Buffer;
m_VSInSecondary.stride = vbs[el.buffer].ByteStride;
m_VSInSecondary.offset =
vbs[el.buffer].ByteOffset + el.offset + draw->vertexOffset * m_VSInPosition.stride;
vbs[el.buffer].ByteOffset + el.offset + draw->vertexOffset * m_VSInSecondary.stride;
}
else
{
@@ -1765,7 +1765,7 @@ void D3D12PipelineStateViewer::resource_itemActivated(RDTreeWidgetItem *item, in
const rdcarray<BindpointMap> &bindArray = view.space == D3D12ViewTag::SRV
? stage->BindpointMapping.ReadOnlyResources
: stage->BindpointMapping.ReadOnlyResources;
: stage->BindpointMapping.ReadWriteResources;
for(int i = 0; i < bindArray.count(); i++)
{
+3 -1
View File
@@ -2727,8 +2727,10 @@ bool WrappedID3D11Device::Serialise_OpenSharedResource(SerialiserType &ser, HAND
{
ID3D11Buffer *stage = NULL;
UINT byteSize = Descriptor.ByteWidth;
RDCEraseEl(Descriptor);
Descriptor.ByteWidth = Descriptor.ByteWidth;
Descriptor.ByteWidth = byteSize;
Descriptor.MiscFlags = 0;
Descriptor.StructureByteStride = 0;
// We don't need to bind this, but IMMUTABLE requires at least one
+1 -1
View File
@@ -1060,7 +1060,7 @@ TextureFilter MakeFilter(GLenum minf, GLenum magf, bool shadowSampler, float max
}
else if(minf == eGL_NEAREST_MIPMAP_NEAREST || minf == eGL_LINEAR_MIPMAP_NEAREST)
{
ret.minify = (minf == eGL_LINEAR_MIPMAP_LINEAR) ? FilterMode::Linear : FilterMode::Point;
ret.minify = (minf == eGL_LINEAR_MIPMAP_NEAREST) ? FilterMode::Linear : FilterMode::Point;
ret.mip = FilterMode::Point;
}
+1 -1
View File
@@ -504,7 +504,7 @@ static std::string ResourceFormatName(const ResourceFormat &fmt)
break;
case ResourceFormatType::R11G11B10: return "R11G11B10_FLOAT";
case ResourceFormatType::R5G6B5: return fmt.bgraOrder ? "R5G6B5_UNORM" : "B5G6R5_UNORM";
case ResourceFormatType::R5G5B5A1: return fmt.bgraOrder ? "R5G5B5A1_UNORM" : "R5G5B5A1_UNORM";
case ResourceFormatType::R5G5B5A1: return fmt.bgraOrder ? "R5G5B5A1_UNORM" : "B5G5R5A1_UNORM";
case ResourceFormatType::R9G9B9E5: return "R9G9B9E5_FLOAT";
case ResourceFormatType::R4G4B4A4: return fmt.bgraOrder ? "R4G4B4A4_UNORM" : "B4G4R4A4_UNORM";
case ResourceFormatType::R4G4: return "R4G4_UNORM";