From 398867f74cbd5bd4bc41ddd34d54bbf2c296ca93 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Tue, 2 Jan 2024 13:40:53 -0800 Subject: [PATCH] Correct sampling param error in DXIL docs The documentation for sample incorrectly implied that textureCUBE resources should have 3 active offsets. Actually, cube textures have no sample method overloads that include offsets. This corrects the table indicating the number of active elements for sample and also for sampleGrad as it incorrectly stated that the number of active gradients is the same as the number of offsets. Again for cube textures this is inaccurate. Cube textures take 3 gradients, but still allow no active offsets. --- docs/DXIL.rst | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/DXIL.rst b/docs/DXIL.rst index 7b5c203d7f..9d050ed3a5 100644 --- a/docs/DXIL.rst +++ b/docs/DXIL.rst @@ -1411,8 +1411,8 @@ Texture1DArray 2 (c0, c1 = array slice) 1 (o0) Texture2D 2 (c0, c1) 2 (o0, o1) Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1) Texture3D 3 (c0, c1, c2) 3 (o0, o1, o2) -TextureCUBE 3 (c0, c1, c2) 3 (o0, o1, o2) -TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 3 (o0, o1, o2) +TextureCUBE 3 (c0, c1, c2) 0 +TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0 =================== ================================ =================== SampleBias @@ -1435,7 +1435,7 @@ The following signature shows the operation syntax:: float, ; bias: in [-16.f,15.99f] float) ; clamp -Valid resource types and active components/offsets are the same as for the sample operation. +Valid resource types and active coordinates/offsets are the same as for the sample operation. SampleLevel ~~~~~~~~~~~ @@ -1456,7 +1456,7 @@ The following signature shows the operation syntax:: i32, ; offset o2 float) ; LOD -Valid resource types and active components/offsets are the same as for the sample operation. +Valid resource types and active coordinates/offsets are the same as for the sample operation. SampleGrad ~~~~~~~~~~ @@ -1483,7 +1483,17 @@ The following signature shows the operation syntax:: float, ; ddy2 float) ; clamp -Valid resource types and active components and offsets are the same as for the sample operation. Valid active ddx and ddy are the same as offsets. +=================== ================================ =================== ==================================== +Valid resource type # of active coordinates # of active offsets # of active gradients +=================== ================================ =================== ==================================== +Texture1D 1 (c0) 1 (o0) 1 (ddx0/ddy0) +Texture1DArray 2 (c0, c1 = array slice) 1 (o0) 1 (ddx0/ddy0) +Texture2D 2 (c0, c1) 2 (o0, o1) 2 (ddx0/ddy0, ddx1/ddy1) +Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1) 2 (ddx0/ddy0, ddx1/ddy1) +Texture3D 3 (c0, c1, c2) 3 (o0, o1, o2) 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2) +TextureCUBE 3 (c0, c1, c2) 0 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2) +TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0 3 (ddx0/ddy0, ddx1/ddy1, ddx2,ddy2) +=================== ================================ =================== ==================================== SampleCmp ~~~~~~~~~ @@ -1512,8 +1522,8 @@ Texture1D 1 (c0) 1 (o0) Texture1DArray 2 (c0, c1 = array slice) 1 (o0) Texture2D 2 (c0, c1) 2 (o0, o1) Texture2DArray 3 (c0, c1, c2 = array slice) 2 (o0, o1) -TextureCUBE 3 (c0, c1, c2) 3 (o0, o1, o2) -TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 3 (o0, o1, o2) +TextureCUBE 3 (c0, c1, c2) 0 +TextureCUBEArray 4 (c0, c1, c2, c3 = array slice) 0 =================== ================================ =================== SampleCmpLevelZero @@ -1535,7 +1545,7 @@ The following signature shows the operation syntax:: i32, ; offset o2 float) ; compare value -Valid resource types and active components/offsets are the same as for the sampleCmp operation. +Valid resource types and active coordinates/offsets are the same as for the sampleCmp operation. TextureLoad ~~~~~~~~~~~ @@ -1679,7 +1689,7 @@ The following signature shows the operation syntax:: i32, ; channel, constant in {0=red,1=green,2=blue,3=alpha} float) ; compare value -Valid resource types and active components/offsets are the same as for the textureGather operation. +Valid resource types and active coordinates/offsets are the same as for the textureGather operation. Texture2DMSGetSamplePosition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~