From e932faddaeef973503503ca30dfb8365658b34c3 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Tue, 21 Jan 2025 17:50:12 -0700 Subject: [PATCH] Clarify platform guidance and revise native vector load Anupama had some feedback on the description of where long vectors can be used. This attempts to add language that is more useful. Removed the mask param and made the load function independent per discussions with Tex and others. --- proposals/0026-hlsl-long-vector-type.md | 6 ++++-- proposals/NNNN-dxil-vectors.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/proposals/0026-hlsl-long-vector-type.md b/proposals/0026-hlsl-long-vector-type.md index 77d12664..75423baa 100644 --- a/proposals/0026-hlsl-long-vector-type.md +++ b/proposals/0026-hlsl-long-vector-type.md @@ -58,8 +58,7 @@ Unlike vector sizes between 1 and 4, no shorthand declarations that concatenate #### Allowed Usage -The new vectors will be supported in all shader stages including Node shaders. There are no control flow or wave -uniformity requirements, but implementations may specify best practices in certain uses for optimal performance. +The new vectors will be supported in all shader stages including Node shaders. Long vectors can be: @@ -77,6 +76,9 @@ Long vectors are not permitted in: * A ray tracing `Parameter`, `Attributes`, or `Payload` parameter structures. * A work graph record. +While this describes where long vecgtors can be used and later sections will describe how, +implementations may specify best practices in certain uses for optimal performance. + #### Constructing vectors HLSL vectors can be constructed through initializer lists, constructor syntax initialization, or by assignment. diff --git a/proposals/NNNN-dxil-vectors.md b/proposals/NNNN-dxil-vectors.md index 821f9cbf..c19cd933 100644 --- a/proposals/NNNN-dxil-vectors.md +++ b/proposals/NNNN-dxil-vectors.md @@ -73,16 +73,15 @@ The returned vector value and the status indicator are grouped into a new `ResRe ```asm ; overloads: SM6.9: f16|f32|i16|i32 ; returns: status, vector - declare %dx.types.ResRet.v[NUM][TY] @dx.op.rawBufferLoad.v[NUM][TY]( + declare %dx.types.ResRet.v[NUM][TY] @dx.op.rawBufferVectorLoad.v[NUM][TY]( i32, ; opcode %dx.types.Handle, ; resource handle - i32, ; coordinate c0 (index) + i32, ; coordinate c0 (byteOffset) i32, ; coordinate c1 (elementOffset) - i8, ; mask - i32, ; alignment - ) + i32) ; alignment ``` + The return struct contains a single vector and a single integer representing mapped tile status. ```asm