mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-07 07:11:06 +00:00
Don't assert pNext == NULL, some apps seem to pass (invalid?) structs
This commit is contained in:
@@ -1920,8 +1920,8 @@ static void SerialiseNext(Serialiser *ser, const void *&pNext)
|
||||
// VKTODOLOW serialise out whether there is a next structure, its type, and contents
|
||||
if(ser->IsReading())
|
||||
pNext = NULL;
|
||||
else
|
||||
RDCASSERT(pNext == NULL);
|
||||
//else
|
||||
//RDCASSERT(pNext == NULL);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -70,7 +70,7 @@ PrimitiveTopology MakePrimitiveTopology(VkPrimitiveTopology Topo, uint32_t patch
|
||||
// structure for casting to easily iterate and template specialising Serialise
|
||||
struct VkGenericStruct
|
||||
{
|
||||
VkStructureType type;
|
||||
VkStructureType sType;
|
||||
const VkGenericStruct *pNext;
|
||||
};
|
||||
|
||||
|
||||
@@ -1204,7 +1204,7 @@ bool WrappedVulkan::Serialise_vkCmdPipelineBarrier(
|
||||
|
||||
for(uint32_t i=0; i < memCount; i++)
|
||||
{
|
||||
SERIALISE_ELEMENT(VkStructureType, stype, ((VkGenericStruct *)ppMemBarriers[i])->type);
|
||||
SERIALISE_ELEMENT(VkStructureType, stype, ((VkGenericStruct *)ppMemBarriers[i])->sType);
|
||||
|
||||
if(stype == VK_STRUCTURE_TYPE_MEMORY_BARRIER)
|
||||
{
|
||||
@@ -1284,14 +1284,14 @@ void WrappedVulkan::vkCmdPipelineBarrier(
|
||||
{
|
||||
VkGenericStruct *header = (VkGenericStruct *)ppMemBarriers[i];
|
||||
|
||||
if(header->type == VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER)
|
||||
if(header->sType == VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER)
|
||||
{
|
||||
VkImageMemoryBarrier barrier = *(VkImageMemoryBarrier *)header;
|
||||
barrier.image = Unwrap(barrier.image);
|
||||
im.push_back(barrier);
|
||||
unwrappedBarriers[i] = &im.back();
|
||||
}
|
||||
else if(header->type == VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER)
|
||||
else if(header->sType == VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER)
|
||||
{
|
||||
VkBufferMemoryBarrier barrier = *(VkBufferMemoryBarrier *)header;
|
||||
barrier.buffer = Unwrap(barrier.buffer);
|
||||
@@ -1322,7 +1322,7 @@ void WrappedVulkan::vkCmdPipelineBarrier(
|
||||
|
||||
for(uint32_t i=0; i < memBarrierCount; i++)
|
||||
{
|
||||
VkStructureType stype = ((VkGenericStruct *)ppMemBarriers[i])->type;
|
||||
VkStructureType stype = ((VkGenericStruct *)ppMemBarriers[i])->sType;
|
||||
|
||||
if(stype == VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER)
|
||||
imTrans.push_back(*((VkImageMemoryBarrier *)ppMemBarriers[i]));
|
||||
|
||||
Reference in New Issue
Block a user