You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
339 B
15 lines
339 B
4 months ago
|
|
||
|
cbuffer CB {
|
||
|
float4 foo;
|
||
|
};
|
||
|
|
||
|
static const float4 bar = foo; // test const (in the immutable sense) initializer from non-const.
|
||
|
|
||
|
static const float2 a1[2] = { { 1, 2 }, { foo.x, 4 } }; // not entirely constant
|
||
|
static const float2 a2[2] = { { 5, 6 }, { 7, 8 } }; // entirely constant
|
||
|
|
||
|
float4 main() : SV_Target0
|
||
|
{
|
||
|
return bar;
|
||
|
}
|