Browse Source

Vk: Add some Nvidia specific VkResults and required win32 surface ext

Signed-off-by: Squareys <squareys@googlemail.com>
pull/202/head
Squareys 10 years ago committed by Squareys
parent
commit
582e799800
  1. 4
      src/Magnum/Vk/Context.cpp
  2. 7
      src/Magnum/Vk/Context.h

4
src/Magnum/Vk/Context.cpp

@ -110,7 +110,7 @@ bool Context::tryCreate() {
appInfo.pEngineName = "Magnum";
appInfo.apiVersion = UnsignedInt(_version);
std::vector<const char*> enabledExtensions = { VK_KHR_SURFACE_EXTENSION_NAME };
std::vector<const char*> enabledExtensions = { VK_KHR_SURFACE_EXTENSION_NAME, "VK_KHR_win32_surface" };
// Enable surface extensions depending on os
// enabledExtensions.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
@ -190,6 +190,8 @@ Debug& operator<<(Debug& debug, Result value) {
_c(ErrorIncompatibleDisplay)
_c(ErrorValidationFailed)
_c(ErrorInvalidShader)
_c(ErrorInvalidParameter)
_c(ErrorInvalidAlignment)
#undef _c
}

7
src/Magnum/Vk/Context.h

@ -50,6 +50,9 @@ enum class Version: UnsignedInt {
Vulkan_1_0 = VK_API_VERSION_1_0, /**< Vulkan 1.0 */
};
#define VK_ERROR_INVALID_PARAMETER_NV -1000013000
#define VK_ERROR_INVALID_ALIGNMENT_NV -1000013001
enum class Result: Int {
Success = VK_SUCCESS, /**< Success */
NotReady = VK_NOT_READY, /**< Not ready */
@ -74,7 +77,9 @@ enum class Result: Int {
ErrorOutOfDate = VK_ERROR_OUT_OF_DATE_KHR, /**< Out of date */
ErrorIncompatibleDisplay = VK_ERROR_INCOMPATIBLE_DISPLAY_KHR, /**< Incompatible display */
ErrorValidationFailed = VK_ERROR_VALIDATION_FAILED_EXT, /**< Validation failed */
ErrorInvalidShader = VK_ERROR_INVALID_SHADER_NV /**< Invalid shader */
ErrorInvalidShader = VK_ERROR_INVALID_SHADER_NV, /**< Invalid shader */
ErrorInvalidParameter = VK_ERROR_INVALID_PARAMETER_NV, /**< Invalid Parameter, only on Nvidia */
ErrorInvalidAlignment = VK_ERROR_INVALID_ALIGNMENT_NV, /**< Invalid Alignment, only on Nvidia */
};
/**

Loading…
Cancel
Save