Don't assert pNext == NULL, some apps seem to pass (invalid?) structs

This commit is contained in:
baldurk
2016-02-07 18:41:09 +01:00
parent 6188720537
commit 38a34db5ca
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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>
+1 -1
View File
@@ -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]));