diff options
author | Fredrik Höglund <[email protected]> | 2016-11-23 23:04:58 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-11-24 08:19:06 +1000 |
commit | 5cbcbc75f437b805e5c3c0c3b5c1192c0d68c1f5 (patch) | |
tree | 6a7ea3dcb504cf1b1cb59224300f73f28d1321a2 /src/amd/vulkan/radv_device.c | |
parent | 72c00e7c478f23835b4d94ef3a7c6ef2524d40fa (diff) |
radv: add support for anisotropic filtering on SI-CI
Ported from radeonsi.
Note that si_make_texture_descriptor() already sets img7 to the mask
value referred to in the comment.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 00f3a07367e..70c94e919db 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -371,7 +371,7 @@ void radv_GetPhysicalDeviceFeatures( .largePoints = true, .alphaToOne = true, .multiViewport = false, - .samplerAnisotropy = false, /* FINISHME */ + .samplerAnisotropy = true, .textureCompressionETC2 = false, .textureCompressionASTC_LDR = false, .textureCompressionBC = true, @@ -1805,14 +1805,7 @@ radv_init_sampler(struct radv_device *device, uint32_t max_aniso = pCreateInfo->anisotropyEnable && pCreateInfo->maxAnisotropy > 1.0 ? (uint32_t) pCreateInfo->maxAnisotropy : 0; uint32_t max_aniso_ratio = radv_tex_aniso_filter(max_aniso); - bool is_vi; - is_vi = (device->instance->physicalDevice.rad_info.chip_class >= VI); - - if (!is_vi && max_aniso > 0) { - radv_finishme("Anisotropic filtering must be disabled manually " - "by the shader on SI-CI when BASE_LEVEL == LAST_LEVEL\n"); - max_aniso = max_aniso_ratio = 0; - } + bool is_vi = (device->instance->physicalDevice.rad_info.chip_class >= VI); sampler->state[0] = (S_008F30_CLAMP_X(radv_tex_wrap(pCreateInfo->addressModeU)) | S_008F30_CLAMP_Y(radv_tex_wrap(pCreateInfo->addressModeV)) | |