Example #1
0
static void
initialize_fs_variables(exec_list *instructions,
                        struct _mesa_glsl_parse_state *state)
{

    switch (state->language_version) {
    case 100:
        generate_100ES_fs_variables(instructions, state);
        break;
    case 110:
        generate_110_fs_variables(instructions, state);
        break;
    case 120:
        generate_120_fs_variables(instructions, state);
        break;
    case 130:
        generate_130_fs_variables(instructions, state);
        break;
    }

    if (state->ARB_shader_stencil_export_enable)
        generate_ARB_shader_stencil_export_variables(instructions, state,
                state->ARB_shader_stencil_export_warn);

    if (state->AMD_shader_stencil_export_enable)
        generate_AMD_shader_stencil_export_variables(instructions, state,
                state->AMD_shader_stencil_export_warn);
}
Example #2
0
static void
generate_140_fs_variables(exec_list *instructions,
                          struct _mesa_glsl_parse_state *state)
{
    generate_120_fs_variables(instructions, state, false);

    generate_130_uniforms(instructions, state);
    generate_fs_clipdistance(instructions, state);
}
Example #3
0
static void
generate_130_fs_variables(exec_list *instructions,
                          struct _mesa_glsl_parse_state *state)
{
    generate_120_fs_variables(instructions, state);

    const glsl_type *const clip_distance_array_type =
        glsl_type::get_array_instance(glsl_type::float_type,
                                      state->Const.MaxClipPlanes);

    /* FINISHME: gl_ClipDistance needs a real location assigned. */
    add_variable(instructions, state->symbols,
                 "gl_ClipDistance", clip_distance_array_type, ir_var_in, -1);
}
Example #4
0
static void
initialize_fs_variables(exec_list *instructions,
                        struct _mesa_glsl_parse_state *state)
{
    if (state->es_shader) {
        switch (state->language_version) {
        case 100:
            generate_100ES_fs_variables(instructions, state);
            break;
        case 300:
            generate_300ES_fs_variables(instructions, state);
            break;
        default:
            assert(!"Unexpected language version");
            break;
        }
    } else {
        switch (state->language_version) {
        case 110:
            generate_110_fs_variables(instructions, state, true);
            break;
        case 120:
            generate_120_fs_variables(instructions, state, true);
            break;
        case 130:
            generate_130_fs_variables(instructions, state);
            break;
        case 140:
            generate_140_fs_variables(instructions, state);
            break;
        default:
            assert(!"Unexpected language version");
            break;
        }
    }

    if (state->ARB_shader_stencil_export_enable)
        generate_ARB_shader_stencil_export_variables(instructions, state,
                state->ARB_shader_stencil_export_warn);

    if (state->AMD_shader_stencil_export_enable)
        generate_AMD_shader_stencil_export_variables(instructions, state,
                state->AMD_shader_stencil_export_warn);
}