Skip to content

[DX] Implement Samplers for the DirectX backend #664

Description

@s-perron

I have added the ability to define samplers in the YAML test, and the Vulkan backend is able to create and bind them. This issue tracks implementing sampler support in the DirectX backend.See #1226 for the Metal backend (split from this issue).


Work required (implementation plan)

This issue (the DirectX half of sampler support) is implemented by the same work as #1042. All backend changes are in lib/API/DX/Device.cpp; YAML sampler parsing already exists from the Vulkan work.

  • Map YAML sampler fields to D3D12: address mode, min/mag filter, comparison func, LOD bias/min/max (getDXSamplerDesc + helpers).
  • Create and bind a dedicated D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER heap (separate from CBV/SRV/UAV).
  • Emit a separate sampler descriptor table in the root signature; CreateSampler into the sampler heap at bind time.
  • Bind both heaps and keep samplers out of the CBV/SRV/UAV handle offset (explicit-root and fallback paths).
  • Support SamplerComparison.
  • Refine the sampler-test XFAILs to (Clang && DirectX) || Metal.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions