vk/0.170.2: Rename VkTexAddress to VkTexAddressMode
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:15:06 +0000 (20:15 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:15:06 +0000 (20:15 -0700)
include/vulkan/vulkan.h
src/vulkan/gen7_state.c
src/vulkan/gen8_state.c

index 9790230902017cccd099336ebdf350f1628e7756..a13ff9900205bd2ba86d33544f48193c7c350265 100644 (file)
@@ -688,16 +688,16 @@ typedef enum {
 } VkTexMipmapMode;
 
 typedef enum {
-    VK_TEX_ADDRESS_WRAP = 0,
-    VK_TEX_ADDRESS_MIRROR = 1,
-    VK_TEX_ADDRESS_CLAMP = 2,
-    VK_TEX_ADDRESS_MIRROR_ONCE = 3,
-    VK_TEX_ADDRESS_CLAMP_BORDER = 4,
-    VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_WRAP,
-    VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_CLAMP_BORDER,
-    VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_CLAMP_BORDER - VK_TEX_ADDRESS_WRAP + 1),
+    VK_TEX_ADDRESS_MODE_WRAP = 0,
+    VK_TEX_ADDRESS_MODE_MIRROR = 1,
+    VK_TEX_ADDRESS_MODE_CLAMP = 2,
+    VK_TEX_ADDRESS_MODE_MIRROR_ONCE = 3,
+    VK_TEX_ADDRESS_MODE_CLAMP_BORDER = 4,
+    VK_TEX_ADDRESS_BEGIN_RANGE = VK_TEX_ADDRESS_MODE_WRAP,
+    VK_TEX_ADDRESS_END_RANGE = VK_TEX_ADDRESS_MODE_CLAMP_BORDER,
+    VK_TEX_ADDRESS_NUM = (VK_TEX_ADDRESS_MODE_CLAMP_BORDER - VK_TEX_ADDRESS_MODE_WRAP + 1),
     VK_TEX_ADDRESS_MAX_ENUM = 0x7FFFFFFF
-} VkTexAddress;
+} VkTexAddressMode;
 
 typedef enum {
     VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0,
@@ -1717,9 +1717,9 @@ typedef struct {
     VkTexFilter                                 magFilter;
     VkTexFilter                                 minFilter;
     VkTexMipmapMode                             mipMode;
-    VkTexAddress                                addressU;
-    VkTexAddress                                addressV;
-    VkTexAddress                                addressW;
+    VkTexAddressMode                            addressModeU;
+    VkTexAddressMode                            addressModeV;
+    VkTexAddressMode                            addressModeW;
     float                                       mipLodBias;
     float                                       maxAnisotropy;
     VkBool32                                    compareEnable;
index 778c9096461502b497b4fffc6452091c3519876d..a06e76015d39b9a9d820a810f73ce544aa13ffef 100644 (file)
@@ -95,11 +95,11 @@ static const uint32_t vk_to_gen_mipmap_mode[] = {
 };
 
 static const uint32_t vk_to_gen_tex_address[] = {
-   [VK_TEX_ADDRESS_WRAP]                        = TCM_WRAP,
-   [VK_TEX_ADDRESS_MIRROR]                      = TCM_MIRROR,
-   [VK_TEX_ADDRESS_CLAMP]                       = TCM_CLAMP,
-   [VK_TEX_ADDRESS_MIRROR_ONCE]                 = TCM_MIRROR_ONCE,
-   [VK_TEX_ADDRESS_CLAMP_BORDER]                = TCM_CLAMP_BORDER,
+   [VK_TEX_ADDRESS_MODE_WRAP]                   = TCM_WRAP,
+   [VK_TEX_ADDRESS_MODE_MIRROR]                 = TCM_MIRROR,
+   [VK_TEX_ADDRESS_MODE_CLAMP]                  = TCM_CLAMP,
+   [VK_TEX_ADDRESS_MODE_MIRROR_ONCE]            = TCM_MIRROR_ONCE,
+   [VK_TEX_ADDRESS_MODE_CLAMP_BORDER]           = TCM_CLAMP_BORDER,
 };
 
 static const uint32_t vk_to_gen_compare_op[] = {
@@ -169,9 +169,9 @@ VkResult gen7_CreateSampler(
       .UAddressMagFilterRoundingEnable = 0,
       .TrilinearFilterQuality = 0,
       .NonnormalizedCoordinateEnable = 0,
-      .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressU],
-      .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressV],
-      .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressW],
+      .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
+      .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
+      .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],
    };
 
    GEN7_SAMPLER_STATE_pack(NULL, sampler->state, &sampler_state);
index 450bc52b579482eb0f4b45314f4e9fdd37c55ce7..60135feaebeb903a9396f34aeb3f14fbb78b1ca7 100644 (file)
@@ -443,11 +443,11 @@ VkResult gen8_CreateSampler(
    };
 
    static const uint32_t vk_to_gen_tex_address[] = {
-      [VK_TEX_ADDRESS_WRAP]                     = TCM_WRAP,
-      [VK_TEX_ADDRESS_MIRROR]                   = TCM_MIRROR,
-      [VK_TEX_ADDRESS_CLAMP]                    = TCM_CLAMP,
-      [VK_TEX_ADDRESS_MIRROR_ONCE]              = TCM_MIRROR_ONCE,
-      [VK_TEX_ADDRESS_CLAMP_BORDER]             = TCM_CLAMP_BORDER,
+      [VK_TEX_ADDRESS_MODE_WRAP]                = TCM_WRAP,
+      [VK_TEX_ADDRESS_MODE_MIRROR]              = TCM_MIRROR,
+      [VK_TEX_ADDRESS_MODE_CLAMP]               = TCM_CLAMP,
+      [VK_TEX_ADDRESS_MODE_MIRROR_ONCE]         = TCM_MIRROR_ONCE,
+      [VK_TEX_ADDRESS_MODE_CLAMP_BORDER]        = TCM_CLAMP_BORDER,
    };
 
    static const uint32_t vk_to_gen_compare_op[] = {
@@ -503,9 +503,9 @@ VkResult gen8_CreateSampler(
       .UAddressMagFilterRoundingEnable = 0,
       .TrilinearFilterQuality = 0,
       .NonnormalizedCoordinateEnable = 0,
-      .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressU],
-      .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressV],
-      .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressW],
+      .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
+      .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
+      .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],
    };
 
    GEN8_SAMPLER_STATE_pack(NULL, sampler->state, &sampler_state);