From 57f500324b8d7b6de1e3d5e0c0b18622b97ecca9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 5 Oct 2015 20:17:24 -0700 Subject: [PATCH] vk/0.170.2: Add unnormalizedCoordinates to VkSamplerCreateInfo --- include/vulkan/vulkan.h | 1 + src/vulkan/gen7_state.c | 2 +- src/vulkan/gen8_state.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index a13ff990020..2afe53b6c9d 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -1727,6 +1727,7 @@ typedef struct { float minLod; float maxLod; VkBorderColor borderColor; + VkBool32 unnormalizedCoordinates; } VkSamplerCreateInfo; typedef struct { diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index a06e76015d3..ed9d9f8c568 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -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], diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 60135feaebe..4990becf60a 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -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], -- 2.30.2