Home | History | Annotate | Download | only in glsl

Lines Matching refs:state

364                               struct _mesa_glsl_parse_state *state);
417 struct _mesa_glsl_parse_state * const state;
444 exec_list *instructions, struct _mesa_glsl_parse_state *state)
445 : instructions(instructions), state(state), symtab(state->symbols),
446 compatibility(!state->is_version(140, 100)),
621 add_const("gl_MaxVertexAttribs", state->Const.MaxVertexAttribs);
623 state->Const.MaxVertexTextureImageUnits);
625 state->Const.MaxCombinedTextureImageUnits);
626 add_const("gl_MaxTextureImageUnits", state->Const.MaxTextureImageUnits);
627 add_const("gl_MaxDrawBuffers", state->Const.MaxDrawBuffers);
632 if (state->is_version(410, 100)) {
634 state->Const.MaxVertexUniformComponents / 4);
636 state->Const.MaxFragmentUniformComponents / 4);
641 if (state->is_version(0, 300)) {
643 state->ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4);
645 state->ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents / 4);
648 state->ctx->Const.MaxVarying);
654 if (state->EXT_blend_func_extended_enable) {
656 state->Const.MaxDualSourceDrawBuffers);
660 state->Const.MaxVertexUniformComponents);
665 add_const("gl_MaxVaryingFloats", state->ctx->Const.MaxVarying * 4);
668 state->Const.MaxFragmentUniformComponents);
675 if ((state->is_version(130, 0) &&
676 state->ARB_shading_language_420pack_enable) ||
677 state->is_version(420, 300)) {
679 state->Const.MinProgramTexelOffset);
681 state->Const.MaxProgramTexelOffset);
684 if (state->has_clip_distance()) {
685 add_const("gl_MaxClipDistances", state->Const.MaxClipPlanes);
687 if (state->is_version(130, 0)) {
688 add_const("gl_MaxVaryingComponents", state->ctx->Const.MaxVarying * 4);
690 if (state->has_cull_distance()) {
691 add_const("gl_MaxCullDistances", state->Const.MaxClipPlanes);
693 state->Const.MaxClipPlanes);
696 if (state->has_geometry_shader()) {
698 state->Const.MaxVertexOutputComponents);
700 state->Const.MaxGeometryInputComponents);
702 state->Const.MaxGeometryOutputComponents);
704 state->Const.MaxFragmentInputComponents);
706 state->Const.MaxGeometryTextureImageUnits);
708 state->Const.MaxGeometryOutputVertices);
710 state->Const.MaxGeometryTotalOutputComponents);
712 state->Const.MaxGeometryUniformComponents);
724 state->Const.MaxGeometryOutputComponents);
733 add_const("gl_MaxLights", state->Const.MaxLights);
735 add_const("gl_MaxClipPlanes", state->Const.MaxClipPlanes);
740 add_const("gl_MaxTextureUnits", state->Const.MaxTextureUnits);
746 add_const("gl_MaxTextureCoords", state->Const.MaxTextureCoords);
749 if (state->has_atomic_counters()) {
751 state->Const.MaxVertexAtomicCounters);
753 state->Const.MaxFragmentAtomicCounters);
755 state->Const.MaxCombinedAtomicCounters);
757 state->Const.MaxAtomicBufferBindings);
759 if (state->has_geometry_shader()) {
761 state->Const.MaxGeometryAtomicCounters);
763 if (state->is_version(110, 320)) {
765 state->Const.MaxTessControlAtomicCounters);
767 state->Const.MaxTessEvaluationAtomicCounters);
771 if (state->is_version(420, 310)) {
773 state->Const.MaxVertexAtomicCounterBuffers);
775 state->Const.MaxFragmentAtomicCounterBuffers);
777 state->Const.MaxCombinedAtomicCounterBuffers);
779 state->Const.MaxAtomicCounterBufferSize);
781 if (state->has_geometry_shader()) {
783 state->Const.MaxGeometryAtomicCounterBuffers);
785 if (state->is_version(110, 320)) {
787 state->Const.MaxTessControlAtomicCounterBuffers);
789 state->Const.MaxTessEvaluationAtomicCounterBuffers);
793 if (state->is_version(430, 310) || state->ARB_compute_shader_enable) {
795 state->Const.MaxComputeAtomicCounterBuffers);
797 state->Const.MaxComputeAtomicCounters);
799 state->Const.MaxComputeImageUniforms);
801 state->Const.MaxComputeTextureImageUnits);
803 state->Const.MaxComputeUniformComponents);
806 state->Const.MaxComputeWorkGroupCount[0],
807 state->Const.MaxComputeWorkGroupCount[1],
808 state->Const.MaxComputeWorkGroupCount[2]);
810 state->Const.MaxComputeWorkGroupSize[0],
811 state->Const.MaxComputeWorkGroupSize[1],
812 state->Const.MaxComputeWorkGroupSize[2]);
835 if (state->has_enhanced_layouts()) {
837 state->Const.MaxTransformFeedbackBuffers);
839 state->Const.MaxTransformFeedbackInterleavedComponents);
842 if (state->is_version(420, 310) ||
843 state->ARB_shader_image_load_store_enable) {
845 state->Const.MaxImageUnits);
847 state->Const.MaxVertexImageUniforms);
849 state->Const.MaxFragmentImageUniforms);
851 state->Const.MaxCombinedImageUniforms);
853 if (state->has_geometry_shader()) {
855 state->Const.MaxGeometryImageUniforms);
858 if (!state->es_shader) {
860 state->Const.MaxCombinedShaderOutputResources);
862 state->Const.MaxImageSamples);
865 if (state->has_tessellation_shader()) {
867 state->Const.MaxTessControlImageUniforms);
869 state->Const.MaxTessEvaluationImageUniforms);
873 if (state->is_version(440, 310) ||
874 state->ARB_ES3_1_compatibility_enable) {
876 state->Const.MaxCombinedShaderOutputResources);
879 if (state->is_version(410, 0) ||
880 state->ARB_viewport_array_enable ||
881 state->OES_viewport_array_enable)
882 add_const("gl_MaxViewports", state->Const.MaxViewports);
884 if (state->has_tessellation_shader()) {
885 add_const("gl_MaxPatchVertices", state->Const.MaxPatchVertices);
886 add_const("gl_MaxTessGenLevel", state->Const.MaxTessGenLevel);
887 add_const("gl_MaxTessControlInputComponents", state->Const.MaxTessControlInputComponents);
888 add_const("gl_MaxTessControlOutputComponents", state->Const.MaxTessControlOutputComponents);
889 add_const("gl_MaxTessControlTextureImageUnits", state->Const.MaxTessControlTextureImageUnits);
890 add_const("gl_MaxTessEvaluationInputComponents", state->Const.MaxTessEvaluationInputComponents);
891 add_const("gl_MaxTessEvaluationOutputComponents", state->Const.MaxTessEvaluationOutputComponents);
892 add_const("gl_MaxTessEvaluationTextureImageUnits", state->Const.MaxTessEvaluationTextureImageUnits);
893 add_const("gl_MaxTessPatchComponents", state->Const.MaxTessPatchComponents);
894 add_const("gl_MaxTessControlTotalOutputComponents", state->Const.MaxTessControlTotalOutputComponents);
895 add_const("gl_MaxTessControlUniformComponents", state->Const.MaxTessControlUniformComponents);
896 add_const("gl_MaxTessEvaluationUniformComponents", state->Const.MaxTessEvaluationUniformComponents);
899 if (state->is_version(450, 320) ||
900 state->OES_sample_variables_enable ||
901 state->ARB_ES3_1_compatibility_enable)
902 add_const("gl_MaxSamples", state->Const.MaxSamples);
912 if (state->is_version(400, 320) ||
913 state->ARB_sample_shading_enable ||
914 state->OES_sample_variables_enable)
939 array(mat4_t, state->Const.MaxTextureCoords);
945 add_uniform(array(vec4_t, state->Const.MaxClipPlanes), "gl_ClipPlane");
954 state->Const.MaxLights),
963 array(type("gl_LightProducts"), state->Const.MaxLights);
967 add_uniform(array(vec4_t, state->Const.MaxTextureUnits),
971 array(vec4_t, state->Const.MaxTextureCoords);
994 if (state->is_version(130, 300))
996 if (state->ARB_draw_instanced_enable)
998 if (state->ARB_draw_instanced_enable || state->is_version(140, 300))
1000 if (state->ARB_shader_draw_parameters_enable) {
1005 if (state->AMD_vertex_shader_layer_enable ||
1006 state->ARB_shader_viewport_layer_array_enable) {
1010 if (state->AMD_vertex_shader_viewport_index_enable ||
1011 state->ARB_shader_viewport_layer_array_enable) {
1042 if (state->ctx->Const.LowerTCSPatchVerticesIn) {
1053 int bbox_slot = state->ctx->Const.NoPrimitiveBoundingBoxOutput ? -1 :
1055 if (state->EXT_primitive_bounding_box_enable)
1058 if (state->OES_primitive_bounding_box_enable)
1061 if (state->is_version(0, 320) || state->ARB_ES3_2_compatibility_enable)
1078 if (this->state->ctx->Const.GLSLTessLevelsAsInputs) {
1089 if (state->ARB_shader_viewport_layer_array_enable) {
1108 if (state->is_version(410, 0) || state->ARB_viewport_array_enable ||
1109 state->OES_viewport_array_enable) {
1113 if (state->is_version(400, 320) || state->ARB_gpu_shader5_enable ||
1114 state->OES_geometry_shader_enable || state->EXT_geometry_shader_enable) {
1143 if (this->state->ctx->Const.GLSLFragCoordIsSysVal)
1148 if (this->state->ctx->Const.GLSLFrontFacingIsSysVal)
1153 if (state->is_version(120, 100))
1156 if (state->has_geometry_shader()) {
1165 if (compatibility || !state->is_version(420, 300)) {
1168 array(vec4_t, state->Const.MaxDrawBuffers), "gl_FragData");
1171 if (state->has_framebuffer_fetch() && !state->is_version(130, 300)) {
1174 array(vec4_t, state->Const.MaxDrawBuffers),
1181 if (state->es_shader && state->language_version == 100 && state->EXT_blend_func_extended_enable) {
1185 array(vec4_t, state->Const.MaxDualSourceDrawBuffers),
1192 if (state->is_version(110, 300))
1195 if (state->ARB_shader_stencil_export_enable) {
1198 if (state->ARB_shader_stencil_export_warn)
1202 if (state->AMD_shader_stencil_export_enable) {
1205 if (state->AMD_shader_stencil_export_warn)
1209 if (state->is_version(400, 320) ||
1210 state->ARB_sample_shading_enable ||
1211 state->OES_sample_variables_enable) {
1224 if (state->is_version(400, 320) ||
1225 state->ARB_gpu_shader5_enable ||
1226 state->OES_sample_variables_enable) {
1230 if (state->is_version(430, 320) ||
1231 state->ARB_fragment_layer_viewport_enable ||
1232 state->OES_geometry_shader_enable ||
1233 state->EXT_geometry_shader_enable) {
1238 if (state->is_version(430, 0) ||
1239 state->ARB_fragment_layer_viewport_enable ||
1240 state->OES_viewport_array_enable) {
1245 if (state->is_version(450, 310) || state->ARB_ES3_1_compatibility_enable)
1261 if (state->ARB_compute_variable_group_size_enable) {
1266 if (state->ctx->Const.LowerCsDerivedVariables) {
1287 switch (state->stage) {
1314 if (state->stage != MESA_SHADER_FRAGMENT) {
1316 if (!state->es_shader ||
1317 state->stage == MESA_SHADER_VERTEX ||
1318 (state->stage == MESA_SHADER_GEOMETRY &&
1319 (state->OES_geometry_point_size_enable ||
1320 state->EXT_geometry_point_size_enable)) ||
1321 ((state->stage == MESA_SHADER_TESS_CTRL ||
1322 state->stage == MESA_SHADER_TESS_EVAL) &&
1323 (state->OES_tessellation_point_size_enable ||
1324 state->EXT_tessellation_point_size_enable))) {
1329 if (state->has_clip_distance()) {
1333 if (state->has_cull_distance()) {
1341 if (state->stage == MESA_SHADER_FRAGMENT) {
1365 if (state->stage == MESA_SHADER_TESS_CTRL ||
1366 state->stage == MESA_SHADER_TESS_EVAL) {
1369 add_variable("gl_in", array(per_vertex_in_type, state->Const.MaxPatchVertices),
1372 if (state->stage == MESA_SHADER_GEOMETRY) {
1378 if (state->stage == MESA_SHADER_TESS_CTRL) {
1384 if (state->stage == MESA_SHADER_VERTEX ||
1385 state->stage == MESA_SHADER_TESS_EVAL ||
1386 state->stage == MESA_SHADER_GEOMETRY) {
1410 struct _mesa_glsl_parse_state *state)
1412 builtin_variable_generator gen(instructions, state);
1419 switch (state->stage) {