- Notifications
You must be signed in to change notification settings - Fork 805
Closed
Description
Scenario 1: Const expr cast between vectors of same component count, but different component types causes compiler crash.
Below is the shader and cmdlines which currently crashes.
%dxc -E main -T vs_6_2 -DVEC1 -DLTV=uint16_t1 -DRTV=uint1
%dxc -E main -T vs_6_2 -enable-16bit-types -DVEC1 -DLTV=uint1 -DRTV=uint16_t1
%dxc -E main -T vs_6_2 -DVEC3 -DLTV=bool3 -DRTV=int3
RWByteAddressBuffer rwbab; void main() : OUT { #ifdef VEC1 const LTV v = RTV(0); rwbab.Store<LTV>(256, v); #elif VEC2 const LTV v = RTV(1, 2); rwbab.Store<LTV>(512, v); #elif VEC3 const LTV v = RTV(4, 5, 6); rwbab.Store<LTV>(1024, v); #else const LTV v = RTV(7, 8, 9, 10); rwbab.Store<LTV>(2048, v); #endif }
Scenario 2: Const expr cast between vector-vector and vector-scalar causes compiler crash.
Below is an example shader and the cmdlines
%dxc -E main -T vs_6_2 -DLTV=uint -DRTV=uint4
%dxc -E main -T vs_6_2 -enable-16bit-types -DLTV=float16_t -DRTV=float16_t4
%dxc -E main -T vs_6_2 -enable-16bit-types -DLTV=bool3 -DRTV=float16_t4
RWByteAddressBuffer rwbab; void main() : OUT { // Case 1: all zero constant const LTV v1 = RTV(0, 0, 0, 0); rwbab.Store<LTV>(100, v1); // Case 2: Non-zero constant const LTV v2 = RTV(1, 2, 3, 4); rwbab.Store<LTV>(200, v2); }
Metadata
Metadata
Assignees
Labels
No labels