Minor fixes
This commit is contained in:
@@ -422,7 +422,7 @@ namespace FlaxEngine.Interop
|
|||||||
return fieldOffset;
|
return fieldOffset;
|
||||||
#elif DOTNET_HOST_MONO
|
#elif DOTNET_HOST_MONO
|
||||||
// Get the address from _MonoClassField::offset, source: https://meetemq.com/2023/09/10/nets-fields-and-their-offsets/
|
// Get the address from _MonoClassField::offset, source: https://meetemq.com/2023/09/10/nets-fields-and-their-offsets/
|
||||||
IntPtr fieldOffsetPtr = (IntPtr*)field.FieldHandle.Value; // Pointer to MonoClassField
|
var fieldOffsetPtr = (IntPtr*)field.FieldHandle.Value; // Pointer to MonoClassField
|
||||||
fieldOffsetPtr += 3; // Skip three pointers (type, name, parent_and_flags)
|
fieldOffsetPtr += 3; // Skip three pointers (type, name, parent_and_flags)
|
||||||
return *(int*)fieldOffsetPtr - IntPtr.Size * 2; // Load the value of a pointer (4 bytes, int32), then subtracting 16 bytes from it (2 pointers for vtable and threadsync)
|
return *(int*)fieldOffsetPtr - IntPtr.Size * 2; // Load the value of a pointer (4 bytes, int32), then subtracting 16 bytes from it (2 pointers for vtable and threadsync)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1388,7 +1388,7 @@ void GPUContextVulkan::UpdateBuffer(GPUBuffer* buffer, const void* data, uint32
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto allocation = _device->UploadBuffer.Upload(data, size, 4);
|
auto allocation = _device->UploadBuffer.Upload(data, size, PLATFORM_MEMORY_ALIGNMENT);
|
||||||
|
|
||||||
VkBufferCopy region;
|
VkBufferCopy region;
|
||||||
region.size = size;
|
region.size = size;
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ UploadBufferVulkan::Allocation UploadBufferVulkan::Allocate(uint64 size, uint64
|
|||||||
|
|
||||||
// Move within a page
|
// Move within a page
|
||||||
_currentOffset += size;
|
_currentOffset += size;
|
||||||
|
ASSERT_LOW_LAYER(_currentOffset <= _currentPage->Size);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -749,10 +749,7 @@ void RenderList::SortDrawCalls(const RenderContext& renderContext, bool reverseD
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int32 i = 0; i < listSize; i++)
|
for (int32 i = 0; i < listSize; i++)
|
||||||
{
|
sortedKeys[i] = drawCallsData[listData[i]].SortKey;
|
||||||
const DrawCall& drawCall = drawCallsData[listData[i]];
|
|
||||||
sortedKeys[i] = drawCall.SortKey;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort draw calls indices
|
// Sort draw calls indices
|
||||||
|
|||||||
Reference in New Issue
Block a user