OSDN Git Service

Activate layers when the strings match.
authorMichael Lentine <mlentine@google.com>
Tue, 19 Jan 2016 19:57:26 +0000 (13:57 -0600)
committerJesse Hall <jessehall@google.com>
Mon, 25 Jan 2016 21:49:31 +0000 (13:49 -0800)
Change-Id: I7bf6ba2bfe215b2dad671b3996f421313d72d3a2
(cherry picked from commit 90c828766ae8d560ed254fd434ad872cd6b21eb0)

vulkan/libvulkan/layers_extensions.cpp

index 3e7fbec..e100e46 100644 (file)
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+// #define LOG_NDEBUG 0
+
 #include "loader.h"
 #include <alloca.h>
 #include <dirent.h>
@@ -316,7 +318,7 @@ void GetLayerExtensions(const std::vector<Layer>& layers,
 
 LayerRef GetLayerRef(std::vector<Layer>& layers, const char* name) {
     for (uint32_t id = 0; id < layers.size(); id++) {
-        if (strcmp(name, layers[id].properties.layerName) != 0) {
+        if (strcmp(name, layers[id].properties.layerName) == 0) {
             LayerLibrary& library = g_layer_libraries[layers[id].library_idx];
             std::lock_guard<std::mutex> lock(g_library_mutex);
             if (library.refcount++ == 0) {