mesa/src/intel
Alyssa Rosenzweig 3ce875a2d0 anv: use D3D-compatible texturing for Proton
Intel & AMD Direct3D drivers modify their rounding behaviour for texturing to
match Direct3D expectations. Such behaviour is not conformant in Vulkan, and
Intel hardware lacks a reasonable way to get NVIDIA's behaviour (which uniquely
works for Vulkan & Direct3D). The second best choice is to use
Direct3D-compatible behaviour for Proton (via driconf) and our current
Vulkan-conformant behaviour everywhere else. Given the APIs diverge and there is
no Vulkan extension to control the behaviour explicitly, driconf'ing on the
engineName is the reasonable solution.

anv already has a anv_force_filter_addr_rounding driconf option to force
Direct3D behaviour for certain Direct3D titles. Here we simply apply it to all
D3D10+ titles, aligning us with the Windows driver.

Note that D3D9 does not have this behaviour. We therefore use standard Vulkan
behaviour for D3D9 to avoid breaking D3D9 titles, even though the engineName is
the same as D3D10+.

This is the same solution radv uses, they call it radv_disable_trunc_coord. We
could unify the driconf entries later.

See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38098#note_3166306
for a more detailed analysis, as well as the linked references:

   https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27337
   https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25911
   https://github.com/HansKristian-Work/vkd3d-proton/pull/1884

This fixes misrendering in piles of Direct3D games run on anv via Proton,
including Assassin's Creed Valhalla.

Cc: mesa-stable
Closes: #13886
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Co-authored-by: Calder Young <cgiacun@gmail.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
(cherry picked from commit 7a71952762)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38268>
2025-10-30 12:13:52 -07:00
..
blorp brw: Move into a new src/intel/compiler/brw subdirectory 2025-10-09 07:01:47 +00:00
ci intel/ci: remove old comments 2025-10-15 01:10:49 +00:00
common intel: Drop intel_mem.c/h 2025-10-16 01:19:45 +00:00
compiler brw/rt: fix ray_object_(direction|origin) for closest-hit shaders 2025-10-27 09:34:33 -07:00
decoder brw: Move into a new src/intel/compiler/brw subdirectory 2025-10-09 07:01:47 +00:00
dev intel: Delete the has_illegal_ccs_values bool 2025-10-06 13:50:39 +00:00
ds intel/ds: disable draw/blorp tracepoints by default on android 2025-10-08 16:00:50 +00:00
executor intel/executor: Add a matrix multiplication example 2025-10-11 01:02:45 +00:00
genxml anv: Add support for AV1 film grain sythesis on Xe2+ 2025-09-22 14:41:48 +00:00
isl Revert "intel: Always set Cube Face Enables for all surfaces." 2025-10-13 11:54:11 -07:00
mda intel/mda: Fix gnu-empty-initializer warning 2025-09-26 08:30:16 +00:00
nullhw-layer build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
perf intel/perf: fix enum type for eu stall props 2025-09-08 14:12:13 +00:00
shaders intel: use common CL args 2025-03-06 00:43:59 +00:00
tools intel/sanitize-gpu: Use util_flush_inval_range() 2025-10-16 01:19:45 +00:00
vulkan anv: use D3D-compatible texturing for Proton 2025-10-30 12:13:52 -07:00
vulkan_hasvk hasvk: Switch to util/cache_ops.h 2025-10-16 01:19:44 +00:00
meson.build brw: Move into a new src/intel/compiler/brw subdirectory 2025-10-09 07:01:47 +00:00