Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Dependencies
Cpp
mirrage
Commits
3b8657af
Commit
3b8657af
authored
Mar 26, 2019
by
Florian Oetke
Browse files
fixed vulkan warnings and special case to disable labels (-DMIRRAGE_VULKAN_USE_LABELS=OFF)
parent
40377081
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/mirrage/graphic/CMakeLists.txt
View file @
3b8657af
...
...
@@ -32,6 +32,11 @@ add_library(mirrage_graphic STATIC
add_library
(
mirrage::graphic ALIAS mirrage_graphic
)
target_compile_features
(
mirrage_graphic PUBLIC cxx_std_17
)
option
(
MIRRAGE_VULKAN_USE_LABELS
"Use labels if VK_EXT_DEBUG_UTILS_EXTENSION_NAME is available"
ON
)
if
(
NOT MIRRAGE_VULKAN_USE_LABELS
)
target_compile_definitions
(
mirrage_graphic PRIVATE MIRRAGE_IGNORE_VULKAN_LABELS
)
endif
()
set
(
MIRRAGE_DEFAULT_COMPILER_ARGS
${
MIRRAGE_DEFAULT_COMPILER_ARGS
}
)
target_compile_options
(
mirrage_graphic PRIVATE
${
MIRRAGE_DEFAULT_COMPILER_ARGS
}
)
...
...
src/mirrage/graphic/include/mirrage/graphic/context.hpp
View file @
3b8657af
...
...
@@ -82,8 +82,8 @@ namespace mirrage {
std
::
unordered_map
<
std
::
string
,
Window_ptr
>
_windows
;
PFN_vkCmdBeginDebugUtilsLabelEXT
_vkCmdBeginDebugUtilsLabelEXT
;
PFN_vkCmdEndDebugUtilsLabelEXT
_vkCmdEndDebugUtilsLabelEXT
;
PFN_vkCmdBeginDebugUtilsLabelEXT
_vkCmdBeginDebugUtilsLabelEXT
=
nullptr
;
PFN_vkCmdEndDebugUtilsLabelEXT
_vkCmdEndDebugUtilsLabelEXT
=
nullptr
;
auto
_find_window_settings
(
const
std
::
string
&
name
,
int
width
,
int
height
)
->
Window_settings
;
};
...
...
src/mirrage/graphic/src/context.cpp
View file @
3b8657af
...
...
@@ -321,6 +321,7 @@ namespace mirrage::graphic {
_debug_callback
=
_instance
->
createDebugUtilsMessengerEXTUnique
(
create_info
);
}
#ifndef MIRRAGE_VULKAN_USE_LABELS
_vkCmdBeginDebugUtilsLabelEXT
=
reinterpret_cast
<
PFN_vkCmdBeginDebugUtilsLabelEXT
>
(
vkGetInstanceProcAddr
(
*
_instance
,
"vkCmdBeginDebugUtilsLabelEXT"
));
_vkCmdEndDebugUtilsLabelEXT
=
reinterpret_cast
<
PFN_vkCmdEndDebugUtilsLabelEXT
>
(
...
...
@@ -332,6 +333,7 @@ namespace mirrage::graphic {
LOG
(
plog
::
warning
)
<<
"vkCmdBeginDebugUtilsLabelEXT/vkCmdEndDebugUtilsLabelEXT extension "
"function not found."
;
}
#endif
for
(
auto
&&
[
_
,
window
]
:
_windows
)
{
(
void
)
_
;
...
...
src/mirrage/renderer/src/pass/particle_pass.cpp
View file @
3b8657af
...
...
@@ -763,9 +763,21 @@ namespace mirrage::renderer {
return
current_score
;
}
void
Particle_pass_factory
::
configure_device
(
vk
::
PhysicalDevice
,
void
Particle_pass_factory
::
configure_device
(
vk
::
PhysicalDevice
pd
,
util
::
maybe
<
std
::
uint32_t
>
,
graphic
::
Device_create_info
&
)
graphic
::
Device_create_info
&
ci
)
{
auto
features
=
pd
.
getFeatures
();
if
(
features
.
fragmentStoresAndAtomics
)
{
ci
.
features
.
fragmentStoresAndAtomics
=
true
;
}
else
{
LOG
(
plog
::
warning
)
<<
"Feature fragmentStoresAndAtomics is not supported."
;
}
if
(
features
.
vertexPipelineStoresAndAtomics
)
{
ci
.
features
.
vertexPipelineStoresAndAtomics
=
true
;
}
else
{
LOG
(
plog
::
warning
)
<<
"Feature vertexPipelineStoresAndAtomics is not supported."
;
}
}
}
// namespace mirrage::renderer
src/mirrage/renderer/src/pass/transparent_pass.cpp
View file @
3b8657af
...
...
@@ -572,5 +572,17 @@ namespace mirrage::renderer {
LOG
(
plog
::
warning
)
<<
"Feature independentBlend is not supported. Transparent objects will not "
"be rendered!"
;
}
if
(
features
.
fragmentStoresAndAtomics
)
{
ci
.
features
.
fragmentStoresAndAtomics
=
true
;
}
else
{
LOG
(
plog
::
warning
)
<<
"Feature fragmentStoresAndAtomics is not supported."
;
}
if
(
features
.
vertexPipelineStoresAndAtomics
)
{
ci
.
features
.
vertexPipelineStoresAndAtomics
=
true
;
}
else
{
LOG
(
plog
::
warning
)
<<
"Feature vertexPipelineStoresAndAtomics is not supported."
;
}
}
}
// namespace mirrage::renderer
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment