vk/0.170.2: Add unnormalizedCoordinates to VkSamplerCreateInfo
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:17:24 +0000 (20:17 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 6 Oct 2015 03:17:24 +0000 (20:17 -0700)
include/vulkan/vulkan.h
src/vulkan/gen7_state.c
src/vulkan/gen8_state.c

index a13ff9900205bd2ba86d33544f48193c7c350265..2afe53b6c9de1ae2323996c181f4b35869b1949e 100644 (file)
@@ -1727,6 +1727,7 @@ typedef struct {
     float                                       minLod;
     float                                       maxLod;
     VkBorderColor                               borderColor;
+    VkBool32                                    unnormalizedCoordinates;
 } VkSamplerCreateInfo;
 
 typedef struct {
index a06e76015d39b9a9d820a810f73ce544aa13ffef..ed9d9f8c568e5cbc2f376747ca087707c23b2344 100644 (file)
@@ -168,7 +168,7 @@ VkResult gen7_CreateSampler(
       .UAddressMinFilterRoundingEnable = 0,
       .UAddressMagFilterRoundingEnable = 0,
       .TrilinearFilterQuality = 0,
-      .NonnormalizedCoordinateEnable = 0,
+      .NonnormalizedCoordinateEnable = pCreateInfo->unnormalizedCoordinates,
       .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
       .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
       .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],
index 60135feaebeb903a9396f34aeb3f14fbb78b1ca7..4990becf60aae2710b9b11c00c8329df7fde4110 100644 (file)
@@ -502,7 +502,7 @@ VkResult gen8_CreateSampler(
       .UAddressMinFilterRoundingEnable = 0,
       .UAddressMagFilterRoundingEnable = 0,
       .TrilinearFilterQuality = 0,
-      .NonnormalizedCoordinateEnable = 0,
+      .NonnormalizedCoordinateEnable = pCreateInfo->unnormalizedCoordinates,
       .TCXAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeU],
       .TCYAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeV],
       .TCZAddressControlMode = vk_to_gen_tex_address[pCreateInfo->addressModeW],