mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Fix warnings identified by clang
This commit is contained in:
@@ -641,19 +641,20 @@ public:
|
||||
|
||||
// first/num slices
|
||||
if(row == 0)
|
||||
return col == 0 ? lit("Slice Range")
|
||||
: QFormatStr("%1 - %2")
|
||||
.arg(desc.firstSlice)
|
||||
.arg(desc.numSlices == UINT_MAX ? desc.numSlices
|
||||
: desc.firstSlice + desc.numSlices);
|
||||
return col == 0
|
||||
? lit("Slice Range")
|
||||
: QFormatStr("%1 - %2")
|
||||
.arg(desc.firstSlice)
|
||||
.arg(desc.numSlices == UINT16_MAX ? desc.numSlices
|
||||
: desc.firstSlice + desc.numSlices);
|
||||
|
||||
// first/num mips
|
||||
if(row == 1)
|
||||
return col == 0 ? lit("Mip Range")
|
||||
: QFormatStr("%1 - %2")
|
||||
.arg(desc.firstMip)
|
||||
.arg(desc.numMips == UINT_MAX ? desc.numMips
|
||||
: desc.firstMip + desc.numMips);
|
||||
.arg(desc.numMips == UINT8_MAX ? desc.numMips
|
||||
: desc.firstMip + desc.numMips);
|
||||
|
||||
// swizzle
|
||||
if(row == 2)
|
||||
|
||||
@@ -1605,7 +1605,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
rdcarray<Descriptor> outputs = m_Ctx.CurPipelineState().GetOutputTargets();
|
||||
for(uint32_t i = 0; i < outputs.size(); i++)
|
||||
{
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::OMTarget, i, outputs[i]), NULL, NULL,
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::OMTarget, i, outputs[i]), NULL, true,
|
||||
ui->targetOutputs);
|
||||
|
||||
if(outputs[i].resource != ResourceId())
|
||||
@@ -1780,7 +1780,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
}
|
||||
|
||||
addResourceRow(D3D11ViewTag(D3D11ViewTag::OMDepth, 0, m_Ctx.CurPipelineState().GetDepthTarget()),
|
||||
NULL, NULL, ui->targetOutputs);
|
||||
NULL, true, ui->targetOutputs);
|
||||
|
||||
ui->vsClasses->parentWidget()->setVisible(ui->vsClasses->topLevelItemCount() > 0);
|
||||
ui->hsClasses->parentWidget()->setVisible(ui->hsClasses->topLevelItemCount() > 0);
|
||||
|
||||
@@ -820,8 +820,7 @@ bool CreateDescriptorWritesForSlotData(WrappedVulkan *vk, rdcarray<VkWriteDescri
|
||||
}
|
||||
|
||||
void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
ResourceId pushStorage, ResourceId specStorage,
|
||||
rdcarray<DescriptorAccess> &staticDescriptorAccess,
|
||||
ResourceId pushStorage, ResourceId specStorage, rdcarray<DescriptorAccess> &descriptorAccess,
|
||||
rdcarray<const DescSetLayout *> setLayoutInfos) const
|
||||
{
|
||||
if(!refl)
|
||||
@@ -833,9 +832,9 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
// we will store the descriptor set in byteSize to be decoded into descriptorStore later
|
||||
access.byteSize = 0;
|
||||
|
||||
staticDescriptorAccess.reserve(staticDescriptorAccess.size() + refl->constantBlocks.size() +
|
||||
refl->samplers.size() + refl->readOnlyResources.size() +
|
||||
refl->readWriteResources.size());
|
||||
descriptorAccess.reserve(descriptorAccess.size() + refl->constantBlocks.size() +
|
||||
refl->samplers.size() + refl->readOnlyResources.size() +
|
||||
refl->readWriteResources.size());
|
||||
|
||||
RDCASSERT(refl->constantBlocks.size() < 0xffff, refl->constantBlocks.size());
|
||||
for(uint16_t i = 0; i < refl->constantBlocks.size(); i++)
|
||||
@@ -856,7 +855,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.descriptorStore = specStorage;
|
||||
access.byteSize = 1;
|
||||
access.byteOffset = 0;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -864,7 +863,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.descriptorStore = pushStorage;
|
||||
access.byteSize = 1;
|
||||
access.byteOffset = 0;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -882,7 +881,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.byteOffset =
|
||||
setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].elemOffset +
|
||||
setLayoutInfos[bind.fixedBindSetOrSpace]->inlineByteSize;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -908,7 +907,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
access.byteOffset =
|
||||
setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].elemOffset;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
|
||||
RDCASSERT(refl->readOnlyResources.size() < 0xffff, refl->readOnlyResources.size());
|
||||
@@ -931,7 +930,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
access.byteOffset =
|
||||
setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].elemOffset;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
|
||||
RDCASSERT(refl->readWriteResources.size() < 0xffff, refl->readWriteResources.size());
|
||||
@@ -954,7 +953,7 @@ void VulkanCreationInfo::Pipeline::Shader::ProcessStaticDescriptorAccess(
|
||||
access.byteSize = bind.fixedBindSetOrSpace;
|
||||
access.byteOffset =
|
||||
setLayoutInfos[bind.fixedBindSetOrSpace]->bindings[bind.fixedBindNumber].elemOffset;
|
||||
staticDescriptorAccess.push_back(access);
|
||||
descriptorAccess.push_back(access);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user