-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
When targeting DXIL IR, Intel seems to consistently fail to write the third scalar value from a CBuffer containing 3 scalars into an output buffer containing a struct of 3 scalar members:
HLSL:
cbuffer CBScalars : register(b0) {
float16_t a1;
uint16_t a2;
int16_t a3;
}
struct Scalars {
float16_t a1;
uint16_t a2;
int16_t a3;
};
RWStructuredBuffer<Scalars> Out : register(u1);
[numthreads(1,1,1)]
void main() {
Out[0].a1 = a1;
Out[0].a2 = a2;
Out[0].a3 = a3;
}
Setup:
---
Shaders:
- Stage: Compute
Entry: main
DispatchSize: [1, 1, 1]
Buffers:
- Name: CBScalars
Format: Hex16
Data: [ 0x3c00, 0x0001, 0xffff ]
- Name: Out
Format: Hex16
Stride: 6
FillSize: 6
DescriptorSets:
- Resources:
- Name: CBScalars
Kind: ConstantBuffer
DirectXBinding:
Register: 0
Space: 0
VulkanBinding:
Binding: 0
- Name: Out
Kind: RWStructuredBuffer
DirectXBinding:
Register: 1
Space: 0
VulkanBinding:
Binding: 1
# RUN: split-file %s %t
# RUN: %dxc_target -fvk-use-dx-layout -enable-16bit-types -T cs_6_5 -Fo %t.o %t/source.hlsl
# RUN: %offloader %t/pipeline.yaml %t.o | FileCheck %s
...
We expect Data: [ 0x3C00, 0x1, 0xFFFF ]
But the actual output is: Data: [ 0x3C00, 0x1, 0x0 ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status