mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
0f59016635 Merge pull request #636 from KhronosGroup/cfg-refactor 2bf57d6dff Deal with composite constants in variable initializer. dcddd5326e Add LUT test cases for OpVariable with initializer. af290ede87 Remove some redundant spvArrayCopy declarations. 8c314112b4 Run format_all.sh. 5582523d9a Add some tests for LUT promotion. 5143695080 Don't need to enclose expression for arrays. d29f48ef06 Deduce constant LUTs from read-write variables. b5ed706860 Hoist out variable scope analysis. c26c41b26b Make the CFGs for all active functions available. 6fdadb9218 Track partial writes as well. 7216129377 Hoist out the inline VariableAccessHandler class. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 0f590166359f4ee35d80040f0965417f482cd6b1
31 lines
527 B
GLSL
31 lines
527 B
GLSL
static const float _17[5] = { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f };
|
|
|
|
static float4 FragColor;
|
|
static float4 v0;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float4 v0 : TEXCOORD0;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float4 FragColor : SV_Target0;
|
|
};
|
|
|
|
void frag_main()
|
|
{
|
|
for (int i = 0; i < 4; i++, FragColor += _17[i].xxxx)
|
|
{
|
|
}
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
v0 = stage_input.v0;
|
|
frag_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.FragColor = FragColor;
|
|
return stage_output;
|
|
}
|