You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need an additional discussion on if we are using the rich availability diagnostics to also validate the numthreads on shaders using derivative intrinsics.
Conversation around if the availability diagnostics should be used for larger analysis should happen on the diagnostics spec.
Implement HLSL derivative intrinsics
ddx
,ddx_fine
,ddx_coarse
,ddy
,ddy_fine
andddy_coarse
.https://godbolt.org/z/1Ej8514MY
The
ddx
andddy
intrinsic were initially introduced in Shader Model 2.1 for pixel shaders:https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-ddx
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-ddy
Shader Model 5.0 added
ddx_fine
,ddx_coarse
,ddy_fine
andddy_coarse
, also just for pixel shaders:https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/ddx-fine
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/ddx-coarse
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/ddy-fine
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/ddy-coarse
In DirectX the
ddx
andddy
functions default to coarse behavior -ddx
is the same asddx_coarse
andddy
is the same asddy_coarse
.In Shader model 6.6 the derivative intrinsics support was extended to compute, mesh and amplification shaders:
https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_Derivatives.html
The text was updated successfully, but these errors were encountered: