<value name="A6XX_TEX_ANISO_8" value="3"/>
<value name="A6XX_TEX_ANISO_16" value="4"/>
</enum>
+ <enum name="a6xx_reduction_mode">
+ <value name="A6XX_REDUCTION_MODE_AVERAGE" value="0"/>
+ <value name="A6XX_REDUCTION_MODE_MIN" value="1"/>
+ <value name="A6XX_REDUCTION_MODE_MAX" value="2"/>
+ </enum>
+
<reg32 offset="0" name="0">
<bitfield name="MIPFILTER_LINEAR_NEAR" pos="0" type="boolean"/>
<bitfield name="XY_MAG" low="1" high="2" type="a6xx_tex_filter"/>
<bitfield name="MIN_LOD" low="20" high="31" type="ufixed" radix="8"/>
</reg32>
<reg32 offset="2" name="2">
- <bitfield name="BCOLOR_OFFSET" low="0" high="31"/>
+ <bitfield name="REDUCTION_MODE" low="0" high="1" type="a6xx_reduction_mode"/>
+ <bitfield name="BCOLOR_OFFSET" low="7" high="31" shr="7"/>
</reg32>
<reg32 offset="3" name="3"/>
</domain>
properties->variableSampleLocations = true;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES: {
+ VkPhysicalDeviceSamplerFilterMinmaxProperties *properties =
+ (VkPhysicalDeviceSamplerFilterMinmaxProperties *)ext;
+ properties->filterMinmaxImageComponentMapping = true;
+ properties->filterMinmaxSingleComponentFormats = true;
+ break;
+ }
default:
break;
struct tu_sampler *sampler,
const VkSamplerCreateInfo *pCreateInfo)
{
+ const struct VkSamplerReductionModeCreateInfo *reduction =
+ vk_find_struct_const(pCreateInfo->pNext, SAMPLER_REDUCTION_MODE_CREATE_INFO);
+
unsigned aniso = pCreateInfo->anisotropyEnable ?
util_last_bit(MIN2((uint32_t)pCreateInfo->maxAnisotropy >> 1, 8)) : 0;
bool miplinear = (pCreateInfo->mipmapMode == VK_SAMPLER_MIPMAP_MODE_LINEAR);
sizeof(struct bcolor_entry));
sampler->descriptor[3] = 0;
+ if (reduction) {
+ /* note: vulkan enum matches hw */
+ sampler->descriptor[2] |= A6XX_TEX_SAMP_2_REDUCTION_MODE(reduction->reductionMode);
+ }
+
/* TODO:
* A6XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR disables mipmapping, but vk has no NONE mipfilter?
*/
Extension('VK_EXT_external_memory_dma_buf', 1, True),
Extension('VK_EXT_image_drm_format_modifier', 1, False),
Extension('VK_EXT_sample_locations', 1, 'device->gpu_id == 650'),
+ Extension('VK_EXT_sampler_filter_minmax', 1, True),
Extension('VK_EXT_transform_feedback', 1, True),
Extension('VK_ANDROID_native_buffer', 1, True),
Extension('VK_KHR_external_semaphore_fd', 1, True),
optimal |= VK_FORMAT_FEATURE_TRANSFER_SRC_BIT |
VK_FORMAT_FEATURE_TRANSFER_DST_BIT |
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
- VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT;
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT |
+ VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT;
buffer |= VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT;
if (physical_device->supported_extensions.EXT_filter_cubic)