diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 19 | ||||
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 4117686414e..9410e3ff67a 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1790,6 +1790,18 @@ typedef enum } gl_system_value; +/** + * The possible interpolation qualifiers that can be applied to a fragment + * shader input in GLSL. + */ +enum glsl_interp_qualifier +{ + INTERP_QUALIFIER_SMOOTH, + INTERP_QUALIFIER_FLAT, + INTERP_QUALIFIER_NOPERSPECTIVE +}; + + /** Vertex and fragment instructions */ struct prog_instruction; struct gl_program_parameter_list; @@ -1890,6 +1902,13 @@ struct gl_fragment_program GLboolean OriginUpperLeft; GLboolean PixelCenterInteger; enum gl_frag_depth_layout FragDepthLayout; + + /** + * GLSL interpolation qualifier associated with each fragment shader input. + * For inputs that do not have an interpolation qualifier specified in + * GLSL, the value is INTERP_QUALIFIER_SMOOTH. + */ + enum glsl_interp_qualifier InterpQualifier[FRAG_ATTRIB_MAX]; }; diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index bdbb6b93838..93563bdaa5b 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3191,7 +3191,7 @@ get_mesa_program(struct gl_context *ctx, prog->Instructions = mesa_instructions; prog->NumInstructions = num_instructions; - do_set_program_inouts(shader->ir, prog); + do_set_program_inouts(shader->ir, prog, shader->Type == GL_FRAGMENT_SHADER); count_resources(prog); check_resources(ctx, shader_program, prog); diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 145bd7dcd0c..67a1b513bda 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4966,7 +4966,7 @@ get_mesa_program(struct gl_context *ctx, prog->Instructions = NULL; prog->NumInstructions = 0; - do_set_program_inouts(shader->ir, prog); + do_set_program_inouts(shader->ir, prog, shader->Type == GL_FRAGMENT_SHADER); count_resources(v, prog); check_resources(ctx, shader_program, v, prog); |