# Tests loading of a variable entry in a large constant array with an offset. [require] GL >= 1.3 ARB_vertex_program ARB_fragment_program [vertex program] !!ARBvp1.0 OPTION ARB_position_invariant; PARAM vals[] = { {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 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1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0}, {0.5, 1.0, 2.0, 0.0}, {1.0, 0.0, 0.8, 0.0}, {1.0, 0.0, 0.5, 0.0}, {0.8, 1.0, 0.0, 0.0} }; ADDRESS A0; ARL A0.x, program.local[0].x; MOV result.color, vals[A0.x+109]; END [fragment program] !!ARBfp1.0 MOV result.color, fragment.color; END [test] ortho 0 1 0 1 parameter local_vp 0 (-1.0, 0.0, 0.0, 0.0) clear color 1.0 0.0 0.0 1.0 clear draw rect 0 0 1 1 probe all rgba 0.5 1.0 1.0 0.0 parameter local_vp 0 (0.0, 0.0, 0.0, 0.0) clear color 0.0 1.0 0.0 1.0 clear draw rect 0 0 1 1 probe all rgba 1.0 0.0 0.8 0.0 parameter local_vp 0 (1.0, 0.0, 0.0, 0.0) clear color 0.0 1.0 1.0 1.0 clear draw rect 0 0 1 1 probe all rgba 1.0 0.0 0.5 0.0 parameter local_vp 0 (2.0, 0.0, 0.0, 0.0) clear color 0.0 0.0 1.0 1.0 clear draw rect 0 0 1 1 probe all rgba 0.8 1.0 0.0 0.0