Skip to content

Commit

Permalink
Clarify platform guidance and revise native vector load
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pow2clk committed Jan 22, 2025
1 parent 6a23347 commit e932fad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions proposals/0026-hlsl-long-vector-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.
Expand Down
9 changes: 4 additions & 5 deletions proposals/NNNN-dxil-vectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e932fad

Please sign in to comment.