diff options
author | Jason Ekstrand <[email protected]> | 2015-11-20 14:45:44 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-20 14:45:44 -0800 |
commit | 1d42f773d3f236656f84a2ee6d1c726b9668104f (patch) | |
tree | b3536e0b0ee30d72ccf6e0896caf86b2d2644065 /src/vulkan/gen8_state.c | |
parent | 48228c114ef127126dfcb55d242e9125ac116a06 (diff) |
gen8_state: Clamp sampler values to HW limitations
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r-- | src/vulkan/gen8_state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 94972d20490..4e441797523 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -316,10 +316,10 @@ VkResult gen8_CreateSampler( .MipModeFilter = vk_to_gen_mipmap_mode[pCreateInfo->mipMode], .MagModeFilter = mag_filter, .MinModeFilter = min_filter, - .TextureLODBias = pCreateInfo->mipLodBias * 256, + .TextureLODBias = anv_clamp_f(pCreateInfo->mipLodBias, -16, 15.996), .AnisotropicAlgorithm = EWAApproximation, - .MinLOD = pCreateInfo->minLod, - .MaxLOD = pCreateInfo->maxLod, + .MinLOD = anv_clamp_f(pCreateInfo->minLod, 0, 14), + .MaxLOD = anv_clamp_f(pCreateInfo->maxLod, 0, 14), .ChromaKeyEnable = 0, .ChromaKeyIndex = 0, .ChromaKeyMode = 0, |