Skip to content

Commit

Permalink
layers: Fix inconsistant naming convensions
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Aug 16, 2023
1 parent 1a0dfb2 commit 190f683
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions layers/decompression/decompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,30 +121,30 @@ std::vector<std::pair<uint32_t, uint32_t>> custom_stype_info{};
namespace memory_decompression {

static const VkLayerProperties kGlobalLayer = {
"VK_LAYER_KHRONOS_memory_decompression",
"VK_LAYER_KHRONOS_decompression",
VK_HEADER_VERSION_COMPLETE,
1,
"Default memory_decompression layer",
"Default memory decompression layer",
};

static const VkExtensionProperties kDeviceExtension = {VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME,
VK_NV_MEMORY_DECOMPRESSION_SPEC_VERSION};

static const char* const kEnvarForceEnable =
#if defined(__ANDROID__)
"debug.vulkan.decompression";
"debug.vulkan.memory_decompression.force_enable";
#else
"VK_MEMORY_DECOMPRESSION_FORCE_ENABLE";
#endif
static const char* const kLayerSettingsForceEnable = "khronos_memory_decompression.force_enable";
static const char* const kLayerSettingsForceEnable = "khronos_decompression.force_enable";

static const char* const kEnvarLogging =
#if defined(__ANDROID__)
"debug.vulkan.decompression.logging";
"debug.vulkan.memory_decompression.logging";
#else
"VK_MEMORY_DECOMPRESSION_LOGGING";
#endif
static const char* const kLayerSettingsLogging = "khronos_memory_decompression.logging";
static const char* const kLayerSettingsLogging = "khronos_decompression.logging";

static vl_concurrent_unordered_map<uintptr_t, std::shared_ptr<InstanceData>> instance_data_map;
static vl_concurrent_unordered_map<uintptr_t, std::shared_ptr<DeviceData>> device_data_map;
Expand Down
2 changes: 1 addition & 1 deletion layers/json/VkLayer_khronos_memory_decompression.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"library_path": "@JSON_LIBRARY_PATH@",
"api_version": "@JSON_VERSION@",
"implementation_version": "1",
"description": "Khronos Memory Decompression layer",
"description": "Khronos Decompression layer",
"status": "STABLE",
"platforms": [ "WINDOWS", "LINUX", "MACOS", "ANDROID" ],
"instance_extensions": [],
Expand Down
2 changes: 1 addition & 1 deletion layers/json/VkLayer_khronos_synchronization2.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"settings": [
{
"key": "force_enable",
"env": "VK_SYNC2_FORCE_ENABLE",
"env": "VK_SYNCHRONIZATION2_FORCE_ENABLE",
"label": "Force Enable",
"description": "Force the layer to be active even if the underlying driver also implements the synchonization2 extension.",
"type": "BOOL",
Expand Down
2 changes: 1 addition & 1 deletion layers/shader_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ std::vector<std::pair<uint32_t, uint32_t>> custom_stype_info{};

namespace shader_object {

static const char* kLayerName = "VkLayer_khronos_shader_object";
static const char* kLayerName = "VK_LAYER_KHRONOS_shader_object";
static const VkExtensionProperties kExtensionProperties = {VK_EXT_SHADER_OBJECT_EXTENSION_NAME, VK_EXT_SHADER_OBJECT_SPEC_VERSION};

static const char* const kEnvarForceEnable =
Expand Down
8 changes: 4 additions & 4 deletions layers/synchronization2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ static const VkExtensionProperties kDeviceExtension = {VK_KHR_SYNCHRONIZATION_2_

static const char* const kEnvarForceEnable =
#if defined(__ANDROID__)
"debug.vulkan.sync2.force_enable";
"debug.vulkan.synchronization2.force_enable";
#else
"VK_SYNC2_FORCE_ENABLE";
"VK_SYNCHRONIZATION2_FORCE_ENABLE";
#endif
static const char* const kLayerSettingsForceEnable = "khronos_synchronization2.force_enable";

// TODO: should we try to use the same fields as ValidationLayers, so that list only needs
// to be defined once?
static const char* const kEnvarCustomStypeList =
#if defined(__ANDROID__)
"debug.vulkan.sync2.custom_stype_list";
"debug.vulkan.synchronization2.custom_stype_list";
#else
"VK_LAYER_SYNC2_CUSTOM_STYPE_LIST";
"VK_SYNCHRONIZATION2_CUSTOM_STYPE_LIST";
#endif
static const char* const kLayerSettingsCustomStypeList = "khronos_synchronization2.custom_stype_list";

Expand Down
2 changes: 1 addition & 1 deletion tests/synchronization2_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "vk_layer_config.h"

void Sync2Test::SetUp() {
SetEnvironment("VK_SYNC2_FORCE_ENABLE", "1");
SetEnvironment("VK_SYNCHRONIZATION2_FORCE_ENABLE", "1");
VkExtensionLayerTest::SetUp();
SetTargetApiVersion(VK_API_VERSION_1_2);
VkExtensionLayerTest::AddSurfaceInstanceExtension();
Expand Down

0 comments on commit 190f683

Please sign in to comment.