radv: Fix rasterization precision bits.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Wed, 2 Jan 2019 16:53:41 +0000 (17:53 +0100)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 7 Jan 2019 22:27:30 +0000 (23:27 +0100)
Note that these limits are exact, not a "precision is at least x",
as texel coords also get snapped to a multiple of this step size
before filtering.

This fixes CTS tests

dEQP-VK.texture.explicit_lod.2d.sizes.31x55_nearest_linear_mipmap_nearest_repeat
dEQP-VK.texture.explicit_lod.2d.sizes.57x35_nearest_linear_mipmap_nearest_repeat

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109151
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_device.c

index 814b5ccbd1163a3fe213784a27768473390a8944..a1199c614f79dd70dac291269e0c8feba8036fcb 100644 (file)
@@ -939,9 +939,9 @@ void radv_GetPhysicalDeviceProperties(
                        2048,
                        2048
                },
-               .subPixelPrecisionBits                    = 4 /* FIXME */,
-               .subTexelPrecisionBits                    = 4 /* FIXME */,
-               .mipmapPrecisionBits                      = 4 /* FIXME */,
+               .subPixelPrecisionBits                    = 8,
+               .subTexelPrecisionBits                    = 8,
+               .mipmapPrecisionBits                      = 8,
                .maxDrawIndexedIndexValue                 = UINT32_MAX,
                .maxDrawIndirectCount                     = UINT32_MAX,
                .maxSamplerLodBias                        = 16,