Skip to content

Commit e9430a0

Browse files
committed
Fix chunk-adding code to add fourcc and size
1 parent 86585b6 commit e9430a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

renderdoc/driver/shaders/dxbc/dxbc_container.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,9 @@ void DXBCContainer::ReplaceChunk(bytebuf &ByteCode, uint32_t fourcc, const byte
751751
for(uint32_t chunkIdx = 0; chunkIdx < header->numChunks; chunkIdx++)
752752
chunkOffsets[chunkIdx] += sizeof(uint32_t);
753753

754+
ByteCode.append((byte *)&fourcc, sizeof(fourcc));
755+
uint32_t chunkSize = (uint32_t)size;
756+
ByteCode.append((byte *)&chunkSize, sizeof(chunkSize));
754757
ByteCode.append(replacement, size);
755758

756759
header->numChunks++;

0 commit comments

Comments
 (0)