Skip to content

radv: Use TRUNC_COORD on samplers

Joshua Ashton requested to merge frog/mesa:sampler-trunc into master

The default behaviour (0) is: "round-nearest-even to n.6 and drop fraction when point sampling" whereas the Vulkan spec simply wants us to floor it (1) "truncate when point sampling".

See 15.6.1 in the Vulkan spec. https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#textures-normalized-operations

The Direct3D spec also mandates this (https://microsoft.github.io/DirectX-Specs/d3d/archive/D3D11_3_FunctionalSpec.htm#7.18.7%20Point%20Sample%20Addressing)

This fixes some point-sampling texture precision issues in some Direct3D 9 titles such as Guild Wars 2 and htoL#NiQ: The Firefly Diary that are not present on other vendors.

https://github.com/Joshua-Ashton/d9vk/issues/450 https://github.com/doitsujin/dxvk/issues/1433

Edited by Joshua Ashton

Merge request reports