mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-30 19:31:07 +00:00
Fix a case where descriptor bind length wasn't being checked for ~0U
This commit is contained in:
@@ -798,6 +798,8 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
|
||||
TextureDescription *tex = NULL;
|
||||
BufferDescription *buf = NULL;
|
||||
|
||||
uint64_t descriptorLen = descriptorBind ? descriptorBind->size : 0;
|
||||
|
||||
if(filledSlot && descriptorBind != NULL)
|
||||
{
|
||||
name = "Object " + ToQStr(descriptorBind->res);
|
||||
@@ -831,8 +833,6 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
|
||||
name = buf->name;
|
||||
restype = TextureDim::Buffer;
|
||||
|
||||
ulong descriptorLen = descriptorBind->size;
|
||||
|
||||
if(descriptorLen == 0xFFFFFFFFFFFFFFFFULL)
|
||||
descriptorLen = len - descriptorBind->offset;
|
||||
|
||||
@@ -867,7 +867,7 @@ void VulkanPipelineStateViewer::addResourceRow(ShaderReflection *shaderDetails,
|
||||
{
|
||||
QString range = "-";
|
||||
if(descriptorBind != NULL)
|
||||
range = QString("%1 - %2").arg(descriptorBind->offset).arg(descriptorBind->size);
|
||||
range = QString("%1 - %2").arg(descriptorBind->offset).arg(descriptorLen);
|
||||
|
||||
node = new RDTreeWidgetItem({
|
||||
"", bindset, slotname, ToQStr(bindType), name, QString("%1 bytes").arg(len), range,
|
||||
|
||||
@@ -514,6 +514,11 @@ namespace renderdocui.Windows.PipelineState
|
||||
object tag = null;
|
||||
bool viewDetails = false;
|
||||
|
||||
ulong descriptorLen = 0;
|
||||
|
||||
if(descriptorBind != null)
|
||||
descriptorLen = descriptorBind.size;
|
||||
|
||||
if (filledSlot && descriptorBind != null)
|
||||
{
|
||||
name = "Object " + descriptorBind.res.ToString();
|
||||
@@ -558,8 +563,6 @@ namespace renderdocui.Windows.PipelineState
|
||||
name = bufs[t].name;
|
||||
restype = ShaderResourceType.Buffer;
|
||||
|
||||
ulong descriptorLen = descriptorBind.size;
|
||||
|
||||
if(descriptorLen == ulong.MaxValue)
|
||||
descriptorLen = len - descriptorBind.offset;
|
||||
|
||||
@@ -601,7 +604,8 @@ namespace renderdocui.Windows.PipelineState
|
||||
{
|
||||
string range = "-";
|
||||
if (descriptorBind != null)
|
||||
range = String.Format("{0} - {1}", descriptorBind.offset, descriptorBind.size);
|
||||
range = String.Format("{0} - {1}", descriptorBind.offset, descriptorLen);
|
||||
|
||||
node = parentNodes.Add(new object[] {
|
||||
"", bindset, slotname, bindType,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user