Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Merge requests
!80
Resolve "MinGW corrections for the hacks"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "MinGW corrections for the hacks"
93-mingw-corrections-for-the-hacks
into
develop
Overview
3
Commits
10
Pipelines
5
Changes
4
All threads resolved!
Hide all comments
Merged
Tobias Frisch
requested to merge
93-mingw-corrections-for-the-hacks
into
develop
3 years ago
Overview
3
Commits
10
Pipelines
5
Changes
4
All threads resolved!
Hide all comments
Expand
Closes
#93 (closed)
Edited
3 years ago
by
Tobias Frisch
0
0
Merge request reports
Compare
develop
version 3
79584934
3 years ago
version 2
e5f7a2ef
3 years ago
version 1
f56d38f7
3 years ago
develop (base)
and
latest version
latest version
9a2e2ecc
10 commits,
3 years ago
version 3
79584934
9 commits,
3 years ago
version 2
e5f7a2ef
8 commits,
3 years ago
version 1
f56d38f7
7 commits,
3 years ago
4 files
+
71
−
8
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
config/lib/vma/vma.cpp
+
51
−
0
Options
@@ -3,5 +3,56 @@
@@ -3,5 +3,56 @@
#define _DEBUG
#define _DEBUG
#endif
#endif
#ifndef _MSVC_LANG
#ifdef __MINGW32__
#include
<stdint.h>
#include
<stdlib.h>
class
VmaMutex
{
public:
VmaMutex
()
:
m_locked
(
false
)
{}
void
Lock
()
{
while
(
m_locked
);
m_locked
=
true
;
}
void
Unlock
()
{
m_locked
=
false
;
}
private
:
bool
m_locked
;
};
#define VMA_MUTEX VmaMutex
template
<
typename
T
>
T
*
custom_overestimate_malloc
(
size_t
size
)
{
return
new
T
[
size
+
(
sizeof
(
T
)
-
1
)
/
sizeof
(
T
)];
}
void
*
custom_aligned_malloc
(
size_t
alignment
,
size_t
size
)
{
if
(
alignment
>
4
)
{
return
custom_overestimate_malloc
<
uint64_t
>
(
size
);
}
else
if
(
alignment
>
2
)
{
return
custom_overestimate_malloc
<
uint32_t
>
(
size
);
}
else
if
(
alignment
>
1
)
{
return
custom_overestimate_malloc
<
uint16_t
>
(
size
);
}
else
{
return
custom_overestimate_malloc
<
uint8_t
>
(
size
);
}
}
void
custom_free
(
void
*
ptr
)
{
delete
[]
reinterpret_cast
<
uint8_t
*>
(
ptr
);
}
#define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (custom_aligned_malloc(alignment, size))
#define VMA_SYSTEM_FREE(ptr) (custom_free(ptr))
#endif
#endif
#define VMA_IMPLEMENTATION
#define VMA_IMPLEMENTATION
#include
"vk_mem_alloc.hpp"
#include
"vk_mem_alloc.hpp"
Loading