From: Matthew Netsch Date: Wed, 24 Apr 2019 16:02:30 +0000 (-0400) Subject: Fixes pipeline tests to check for maxSamplerLodBias X-Git-Tag: upstream/1.3.5~2002^2~4^2~2^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=641d884c4b87f5b679cd2987490c07ff21ad2ba9;p=platform%2Fupstream%2FVK-GL-CTS.git Fixes pipeline tests to check for maxSamplerLodBias Components: Vulkan VK-GL-CTS Issue: 1750 Affects: dEQP-VK.pipeline.sampler.* Change-Id: I1ed594f0eb5cf8e249eda5eb31b114f1bfb93fd2 --- diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp index d7aa9aa..75c07d5 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp @@ -217,14 +217,18 @@ ImageSamplingInstance::ImageSamplingInstance (Context& context, , m_colorFormat (VK_FORMAT_R8G8B8A8_UNORM) , m_vertices (vertices) { - const InstanceInterface& vki = context.getInstanceInterface(); - const DeviceInterface& vk = context.getDeviceInterface(); - const VkPhysicalDevice physDevice = context.getPhysicalDevice(); - const VkDevice vkDevice = context.getDevice(); - const VkQueue queue = context.getUniversalQueue(); - const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); - SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice())); - const VkComponentMapping componentMappingRGBA = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }; + const InstanceInterface& vki = context.getInstanceInterface(); + const DeviceInterface& vk = context.getDeviceInterface(); + const VkPhysicalDevice physDevice = context.getPhysicalDevice(); + const VkDevice vkDevice = context.getDevice(); + const VkQueue queue = context.getUniversalQueue(); + const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); + SimpleAllocator memAlloc (vk, vkDevice, getPhysicalDeviceMemoryProperties(context.getInstanceInterface(), context.getPhysicalDevice())); + const VkComponentMapping componentMappingRGBA = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A }; + const vk::VkPhysicalDeviceLimits limits = getPhysicalDeviceProperties(vki, physDevice).limits; + + if (de::abs(samplerParams.mipLodBias) > limits.maxSamplerLodBias) + TCU_THROW(NotSupportedError, "Unsupported sampler Lod bias value"); if (!isSupportedSamplableFormat(context.getInstanceInterface(), context.getPhysicalDevice(), imageFormat)) throw tcu::NotSupportedError(std::string("Unsupported format for sampling: ") + getFormatName(imageFormat));