Skip to content

Commit 435956c

Browse files
committed
Format VK_WHOLE_SIZE properly on texel buffers in pipeline state
1 parent d7236e0 commit 435956c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,13 @@ bool VulkanPipelineStateViewer::setViewDetails(RDTreeWidgetItem *node, const Des
790790

791791
if(descriptor.byteOffset + dynamicOffset > 0 || descriptor.byteSize < buf->length)
792792
{
793+
uint64_t effectiveSize = descriptor.byteSize;
794+
if(descriptor.byteSize == UINT64_MAX)
795+
effectiveSize = buf->length - (descriptor.byteOffset + dynamicOffset);
793796
text +=
794797
tr("The view covers bytes %1-%2.\nThe buffer is %3 bytes in length.\n")
795798
.arg(Formatter::HumanFormat(descriptor.byteOffset + dynamicOffset, Formatter::OffsetSize))
796-
.arg(Formatter::HumanFormat(descriptor.byteOffset + dynamicOffset + descriptor.byteSize,
799+
.arg(Formatter::HumanFormat(descriptor.byteOffset + dynamicOffset + effectiveSize,
797800
Formatter::OffsetSize))
798801
.arg(Formatter::HumanFormat(buf->length, Formatter::OffsetSize));
799802
}

0 commit comments

Comments
 (0)