From 3e3a6f0faa26bb956fcea773876926adc2db39e0 Mon Sep 17 00:00:00 2001 From: Jamie Madill Date: Wed, 6 Jul 2016 13:37:33 -0400 Subject: [PATCH] layers: Fix an MSVS error and a warning. Fatal error C1017: invalid integer constant expression warning C4389: '!=': signed/unsigned mismatch Change-Id: I13e06f1578e47a0076241e1a344f4f05ae6d50c2 --- layers/core_validation.cpp | 2 +- layers/vk_layer_config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 6f4d0c9..744c318 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -2903,7 +2903,7 @@ static bool validatePipelineDrawtimeState(layer_data const *my_data, subpass_num_samples |= (unsigned)render_pass_info->pAttachments[attachment].samples; } - if (subpass_num_samples && pso_num_samples != subpass_num_samples) { + if (subpass_num_samples && static_cast(pso_num_samples) != subpass_num_samples) { skip_call |= log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT, reinterpret_cast(pPipeline->pipeline), __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS", diff --git a/layers/vk_layer_config.h b/layers/vk_layer_config.h index c4526db..f64c547 100644 --- a/layers/vk_layer_config.h +++ b/layers/vk_layer_config.h @@ -44,7 +44,7 @@ const std::unordered_map debug_actions_option_definitions {std::string("VK_DBG_LAYER_ACTION_CALLBACK"), VK_DBG_LAYER_ACTION_CALLBACK}, {std::string("VK_DBG_LAYER_ACTION_LOG_MSG"), VK_DBG_LAYER_ACTION_LOG_MSG}, {std::string("VK_DBG_LAYER_ACTION_BREAK"), VK_DBG_LAYER_ACTION_BREAK}, -#if WIN32 +#if defined(WIN32) {std::string("VK_DBG_LAYER_ACTION_DEBUG_OUTPUT"), VK_DBG_LAYER_ACTION_DEBUG_OUTPUT}, #endif {std::string("VK_DBG_LAYER_ACTION_DEFAULT"), VK_DBG_LAYER_ACTION_DEFAULT}}; -- 2.7.4